@launchsecure/launch-kit 0.0.5 → 0.0.7

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.
@@ -1,358 +0,0 @@
1
- function sP(e,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rx={exports:{}},Zc={},Mx={exports:{}},de={};/**
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 la=Symbol.for("react.element"),aP=Symbol.for("react.portal"),lP=Symbol.for("react.fragment"),cP=Symbol.for("react.strict_mode"),uP=Symbol.for("react.profiler"),fP=Symbol.for("react.provider"),dP=Symbol.for("react.context"),pP=Symbol.for("react.forward_ref"),hP=Symbol.for("react.suspense"),mP=Symbol.for("react.memo"),gP=Symbol.for("react.lazy"),Eg=Symbol.iterator;function yP(e){return e===null||typeof e!="object"?null:(e=Eg&&e[Eg]||e["@@iterator"],typeof e=="function"?e:null)}var Ax={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tx=Object.assign,Ix={};function Ci(e,n,r){this.props=e,this.context=n,this.refs=Ix,this.updater=r||Ax}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jx(){}jx.prototype=Ci.prototype;function th(e,n,r){this.props=e,this.context=n,this.refs=Ix,this.updater=r||Ax}var nh=th.prototype=new jx;nh.constructor=th;Tx(nh,Ci.prototype);nh.isPureReactComponent=!0;var kg=Array.isArray,$x=Object.prototype.hasOwnProperty,rh={current:null},Ox={key:!0,ref:!0,__self:!0,__source:!0};function Dx(e,n,r){var o,i={},s=null,a=null;if(n!=null)for(o in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(s=""+n.key),n)$x.call(n,o)&&!Ox.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return{$$typeof:la,type:e,key:s,ref:a,props:i,_owner:rh.current}}function vP(e,n){return{$$typeof:la,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function oh(e){return typeof e=="object"&&e!==null&&e.$$typeof===la}function xP(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return n[r]})}var Ng=/\/+/g;function lf(e,n){return typeof e=="object"&&e!==null&&e.key!=null?xP(""+e.key):n.toString(36)}function Sl(e,n,r,o,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case la:case aP:a=!0}}if(a)return a=e,i=i(a),e=o===""?"."+lf(a,0):o,kg(i)?(r="",e!=null&&(r=e.replace(Ng,"$&/")+"/"),Sl(i,n,r,"",function(u){return u})):i!=null&&(oh(i)&&(i=vP(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Ng,"$&/")+"/")+e)),n.push(i)),1;if(a=0,o=o===""?".":o+":",kg(e))for(var l=0;l<e.length;l++){s=e[l];var c=o+lf(s,l);a+=Sl(s,n,r,c,i)}else if(c=yP(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=o+lf(s,l++),a+=Sl(s,n,r,c,i);else if(s==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return a}function Oa(e,n,r){if(e==null)return e;var o=[],i=0;return Sl(e,o,"","",function(s){return n.call(r,s,i++)}),o}function wP(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var st={current:null},Cl={transition:null},bP={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Cl,ReactCurrentOwner:rh};function Lx(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Oa,forEach:function(e,n,r){Oa(e,function(){n.apply(this,arguments)},r)},count:function(e){var n=0;return Oa(e,function(){n++}),n},toArray:function(e){return Oa(e,function(n){return n})||[]},only:function(e){if(!oh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};de.Component=Ci;de.Fragment=lP;de.Profiler=uP;de.PureComponent=th;de.StrictMode=cP;de.Suspense=hP;de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bP;de.act=Lx;de.cloneElement=function(e,n,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=Tx({},e.props),i=e.key,s=e.ref,a=e._owner;if(n!=null){if(n.ref!==void 0&&(s=n.ref,a=rh.current),n.key!==void 0&&(i=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in n)$x.call(n,c)&&!Ox.hasOwnProperty(c)&&(o[c]=n[c]===void 0&&l!==void 0?l[c]:n[c])}var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:la,type:e.type,key:i,ref:s,props:o,_owner:a}};de.createContext=function(e){return e={$$typeof:dP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fP,_context:e},e.Consumer=e};de.createElement=Dx;de.createFactory=function(e){var n=Dx.bind(null,e);return n.type=e,n};de.createRef=function(){return{current:null}};de.forwardRef=function(e){return{$$typeof:pP,render:e}};de.isValidElement=oh;de.lazy=function(e){return{$$typeof:gP,_payload:{_status:-1,_result:e},_init:wP}};de.memo=function(e,n){return{$$typeof:mP,type:e,compare:n===void 0?null:n}};de.startTransition=function(e){var n=Cl.transition;Cl.transition={};try{e()}finally{Cl.transition=n}};de.unstable_act=Lx;de.useCallback=function(e,n){return st.current.useCallback(e,n)};de.useContext=function(e){return st.current.useContext(e)};de.useDebugValue=function(){};de.useDeferredValue=function(e){return st.current.useDeferredValue(e)};de.useEffect=function(e,n){return st.current.useEffect(e,n)};de.useId=function(){return st.current.useId()};de.useImperativeHandle=function(e,n,r){return st.current.useImperativeHandle(e,n,r)};de.useInsertionEffect=function(e,n){return st.current.useInsertionEffect(e,n)};de.useLayoutEffect=function(e,n){return st.current.useLayoutEffect(e,n)};de.useMemo=function(e,n){return st.current.useMemo(e,n)};de.useReducer=function(e,n,r){return st.current.useReducer(e,n,r)};de.useRef=function(e){return st.current.useRef(e)};de.useState=function(e){return st.current.useState(e)};de.useSyncExternalStore=function(e,n,r){return st.current.useSyncExternalStore(e,n,r)};de.useTransition=function(){return st.current.useTransition()};de.version="18.3.1";Mx.exports=de;var h=Mx.exports;const Je=qc(h),Qc=sP({__proto__:null,default:Je},[h]);/**
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 _P=h,SP=Symbol.for("react.element"),CP=Symbol.for("react.fragment"),EP=Object.prototype.hasOwnProperty,kP=_P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NP={key:!0,ref:!0,__self:!0,__source:!0};function zx(e,n,r){var o,i={},s=null,a=null;r!==void 0&&(s=""+r),n.key!==void 0&&(s=""+n.key),n.ref!==void 0&&(a=n.ref);for(o in n)EP.call(n,o)&&!NP.hasOwnProperty(o)&&(i[o]=n[o]);if(e&&e.defaultProps)for(o in n=e.defaultProps,n)i[o]===void 0&&(i[o]=n[o]);return{$$typeof:SP,type:e,key:s,ref:a,props:i,_owner:kP.current}}Zc.Fragment=CP;Zc.jsx=zx;Zc.jsxs=zx;Rx.exports=Zc;var b=Rx.exports,dd={},Fx={exports:{}},Mt={},Vx={exports:{}},Bx={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function n(T,M){var D=T.length;T.push(M);e:for(;0<D;){var B=D-1>>>1,O=T[B];if(0<i(O,M))T[B]=M,T[D]=O,D=B;else break e}}function r(T){return T.length===0?null:T[0]}function o(T){if(T.length===0)return null;var M=T[0],D=T.pop();if(D!==M){T[0]=D;e:for(var B=0,O=T.length,W=O>>>1;B<W;){var G=2*(B+1)-1,U=T[G],X=G+1,H=T[X];if(0>i(U,D))X<O&&0>i(H,U)?(T[B]=H,T[X]=D,B=X):(T[B]=U,T[G]=D,B=G);else if(X<O&&0>i(H,D))T[B]=H,T[X]=D,B=X;else break e}}return M}function i(T,M){var D=T.sortIndex-M.sortIndex;return D!==0?D:T.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,p=3,m=!1,g=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(T){for(var M=r(u);M!==null;){if(M.callback===null)o(u);else if(M.startTime<=T)o(u),M.sortIndex=M.expirationTime,n(c,M);else break;M=r(u)}}function S(T){if(v=!1,x(T),!g)if(r(c)!==null)g=!0,$(C);else{var M=r(u);M!==null&&F(S,M.startTime-T)}}function C(T,M){g=!1,v&&(v=!1,y(N),N=-1),m=!0;var D=p;try{for(x(M),f=r(c);f!==null&&(!(f.expirationTime>M)||T&&!I());){var B=f.callback;if(typeof B=="function"){f.callback=null,p=f.priorityLevel;var O=B(f.expirationTime<=M);M=e.unstable_now(),typeof O=="function"?f.callback=O:f===r(c)&&o(c),x(M)}else o(c);f=r(c)}if(f!==null)var W=!0;else{var G=r(u);G!==null&&F(S,G.startTime-M),W=!1}return W}finally{f=null,p=D,m=!1}}var E=!1,k=null,N=-1,A=5,R=-1;function I(){return!(e.unstable_now()-R<A)}function j(){if(k!==null){var T=e.unstable_now();R=T;var M=!0;try{M=k(!0,T)}finally{M?L():(E=!1,k=null)}}else E=!1}var L;if(typeof w=="function")L=function(){w(j)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,z=P.port2;P.port1.onmessage=j,L=function(){z.postMessage(null)}}else L=function(){_(j,0)};function $(T){k=T,E||(E=!0,L())}function F(T,M){N=_(function(){T(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,$(C))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(T){switch(p){case 1:case 2:case 3:var M=3;break;default:M=p}var D=p;p=M;try{return T()}finally{p=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,M){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=p;p=T;try{return M()}finally{p=D}},e.unstable_scheduleCallback=function(T,M,D){var B=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?B+D:B):D=B,T){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=D+O,T={id:d++,callback:M,priorityLevel:T,startTime:D,expirationTime:O,sortIndex:-1},D>B?(T.sortIndex=D,n(u,T),r(c)===null&&T===r(u)&&(v?(y(N),N=-1):v=!0,F(S,D-B))):(T.sortIndex=O,n(c,T),g||m||(g=!0,$(C))),T},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(T){var M=p;return function(){var D=p;p=M;try{return T.apply(this,arguments)}finally{p=D}}}})(Bx);Vx.exports=Bx;var PP=Vx.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 RP=h,Pt=PP;function q(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hx=new Set,Rs={};function yo(e,n){oi(e,n),oi(e+"Capture",n)}function oi(e,n){for(Rs[e]=n,e=0;e<n.length;e++)Hx.add(n[e])}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pd=Object.prototype.hasOwnProperty,MP=/^[: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]*$/,Pg={},Rg={};function AP(e){return pd.call(Rg,e)?!0:pd.call(Pg,e)?!1:MP.test(e)?Rg[e]=!0:(Pg[e]=!0,!1)}function TP(e,n,r,o){if(r!==null&&r.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function IP(e,n,r,o){if(n===null||typeof n>"u"||TP(e,n,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function at(e,n,r,o,i,s,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=s,this.removeEmptyString=a}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Xe[n]=new at(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new at(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){Xe[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var ih=/[\-:]([a-z])/g;function sh(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 n=e.replace(ih,sh);Xe[n]=new at(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(ih,sh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(ih,sh);Xe[n]=new at(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function ah(e,n,r,o){var i=Xe.hasOwnProperty(n)?Xe[n]:null;(i!==null?i.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(IP(n,r,i,o)&&(r=null),o||i===null?AP(n)&&(r===null?e.removeAttribute(n):e.setAttribute(n,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(n=i.attributeName,o=i.attributeNamespace,r===null?e.removeAttribute(n):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,o?e.setAttributeNS(o,n,r):e.setAttribute(n,r))))}var Xn=RP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Da=Symbol.for("react.element"),jo=Symbol.for("react.portal"),$o=Symbol.for("react.fragment"),lh=Symbol.for("react.strict_mode"),hd=Symbol.for("react.profiler"),Wx=Symbol.for("react.provider"),Ux=Symbol.for("react.context"),ch=Symbol.for("react.forward_ref"),md=Symbol.for("react.suspense"),gd=Symbol.for("react.suspense_list"),uh=Symbol.for("react.memo"),sr=Symbol.for("react.lazy"),Gx=Symbol.for("react.offscreen"),Mg=Symbol.iterator;function zi(e){return e===null||typeof e!="object"?null:(e=Mg&&e[Mg]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,cf;function os(e){if(cf===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);cf=n&&n[1]||""}return`
34
- `+cf+e}var uf=!1;function ff(e,n){if(!e||uf)return"";uf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(u){var o=u}Reflect.construct(e,[],n)}else{try{n.call()}catch(u){o=u}e.call(n.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=o.stack.split(`
36
- `),a=i.length-1,l=s.length-1;1<=a&&0<=l&&i[a]!==s[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==s[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==s[l]){var c=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{uf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?os(e):""}function jP(e){switch(e.tag){case 5:return os(e.type);case 16:return os("Lazy");case 13:return os("Suspense");case 19:return os("SuspenseList");case 0:case 2:case 15:return e=ff(e.type,!1),e;case 11:return e=ff(e.type.render,!1),e;case 1:return e=ff(e.type,!0),e;default:return""}}function yd(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 $o:return"Fragment";case jo:return"Portal";case hd:return"Profiler";case lh:return"StrictMode";case md:return"Suspense";case gd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ux:return(e.displayName||"Context")+".Consumer";case Wx:return(e._context.displayName||"Context")+".Provider";case ch:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uh:return n=e.displayName||null,n!==null?n:yd(e.type)||"Memo";case sr:n=e._payload,e=e._init;try{return yd(e(n))}catch{}}return null}function $P(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yd(n);case 8:return n===lh?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function kr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yx(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function OP(e){var n=Yx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(a){o=""+a,s.call(this,a)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(a){o=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function La(e){e._valueTracker||(e._valueTracker=OP(e))}function Xx(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=Yx(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}function Gl(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 vd(e,n){var r=n.checked;return je({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ag(e,n){var r=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;r=kr(n.value!=null?n.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Kx(e,n){n=n.checked,n!=null&&ah(e,"checked",n,!1)}function xd(e,n){Kx(e,n);var r=kr(n.value),o=n.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?wd(e,n.type,r):n.hasOwnProperty("defaultValue")&&wd(e,n.type,kr(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Tg(e,n,r){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,r||n===e.value||(e.value=n),e.defaultValue=n}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function wd(e,n,r){(n!=="number"||Gl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var is=Array.isArray;function Xo(e,n,r,o){if(e=e.options,n){n={};for(var i=0;i<r.length;i++)n["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=n.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&o&&(e[r].defaultSelected=!0)}else{for(r=""+kr(r),n=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}n!==null||e[i].disabled||(n=e[i])}n!==null&&(n.selected=!0)}}function bd(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(q(91));return je({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ig(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(q(92));if(is(r)){if(1<r.length)throw Error(q(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:kr(r)}}function qx(e,n){var r=kr(n.value),o=kr(n.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),n.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function jg(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Zx(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 _d(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Zx(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var za,Qx=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,r,o,i){MSApp.execUnsafeLocalFunction(function(){return e(n,r,o,i)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(za=za||document.createElement("div"),za.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ms(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var hs={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},DP=["Webkit","ms","Moz","O"];Object.keys(hs).forEach(function(e){DP.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),hs[n]=hs[e]})});function Jx(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||hs.hasOwnProperty(e)&&hs[e]?(""+n).trim():n+"px"}function ew(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var o=r.indexOf("--")===0,i=Jx(r,n[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,i):e[r]=i}}var LP=je({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 Sd(e,n){if(n){if(LP[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(q(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(q(61))}if(n.style!=null&&typeof n.style!="object")throw Error(q(62))}}function Cd(e,n){if(e.indexOf("-")===-1)return typeof n.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 Ed=null;function fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kd=null,Ko=null,qo=null;function $g(e){if(e=fa(e)){if(typeof kd!="function")throw Error(q(280));var n=e.stateNode;n&&(n=ru(n),kd(e.stateNode,e.type,n))}}function tw(e){Ko?qo?qo.push(e):qo=[e]:Ko=e}function nw(){if(Ko){var e=Ko,n=qo;if(qo=Ko=null,$g(e),n)for(e=0;e<n.length;e++)$g(n[e])}}function rw(e,n){return e(n)}function ow(){}var df=!1;function iw(e,n,r){if(df)return e(n,r);df=!0;try{return rw(e,n,r)}finally{df=!1,(Ko!==null||qo!==null)&&(ow(),nw())}}function As(e,n){var r=e.stateNode;if(r===null)return null;var o=ru(r);if(o===null)return null;r=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(q(231,n,typeof r));return r}var Nd=!1;if(Vn)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{Nd=!1}function zP(e,n,r,o,i,s,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{n.apply(r,u)}catch(d){this.onError(d)}}var ms=!1,Yl=null,Xl=!1,Pd=null,FP={onError:function(e){ms=!0,Yl=e}};function VP(e,n,r,o,i,s,a,l,c){ms=!1,Yl=null,zP.apply(FP,arguments)}function BP(e,n,r,o,i,s,a,l,c){if(VP.apply(this,arguments),ms){if(ms){var u=Yl;ms=!1,Yl=null}else throw Error(q(198));Xl||(Xl=!0,Pd=u)}}function vo(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function sw(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Og(e){if(vo(e)!==e)throw Error(q(188))}function HP(e){var n=e.alternate;if(!n){if(n=vo(e),n===null)throw Error(q(188));return n!==e?null:e}for(var r=e,o=n;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(o=i.return,o!==null){r=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Og(i),e;if(s===o)return Og(i),n;s=s.sibling}throw Error(q(188))}if(r.return!==o.return)r=i,o=s;else{for(var a=!1,l=i.child;l;){if(l===r){a=!0,r=i,o=s;break}if(l===o){a=!0,o=i,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,o=i;break}if(l===o){a=!0,o=s,r=i;break}l=l.sibling}if(!a)throw Error(q(189))}}if(r.alternate!==o)throw Error(q(190))}if(r.tag!==3)throw Error(q(188));return r.stateNode.current===r?e:n}function aw(e){return e=HP(e),e!==null?lw(e):null}function lw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=lw(e);if(n!==null)return n;e=e.sibling}return null}var cw=Pt.unstable_scheduleCallback,Dg=Pt.unstable_cancelCallback,WP=Pt.unstable_shouldYield,UP=Pt.unstable_requestPaint,De=Pt.unstable_now,GP=Pt.unstable_getCurrentPriorityLevel,dh=Pt.unstable_ImmediatePriority,uw=Pt.unstable_UserBlockingPriority,Kl=Pt.unstable_NormalPriority,YP=Pt.unstable_LowPriority,fw=Pt.unstable_IdlePriority,Jc=null,vn=null;function XP(e){if(vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Jc,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:ZP,KP=Math.log,qP=Math.LN2;function ZP(e){return e>>>=0,e===0?32:31-(KP(e)/qP|0)|0}var Fa=64,Va=4194304;function ss(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 ql(e,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?o=ss(l):(s&=a,s!==0&&(o=ss(s)))}else a=r&~i,a!==0?o=ss(a):s!==0&&(o=ss(s));if(o===0)return 0;if(n!==0&&n!==o&&!(n&i)&&(i=o&-o,s=n&-n,i>=s||i===16&&(s&4194240)!==0))return n;if(o&4&&(o|=r&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)r=31-nn(n),i=1<<r,o|=e[r],n&=~i;return o}function QP(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 JP(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-nn(s),l=1<<a,c=i[a];c===-1?(!(l&r)||l&o)&&(i[a]=QP(l,n)):c<=n&&(e.expiredLanes|=l),s&=~l}}function Rd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dw(){var e=Fa;return Fa<<=1,!(Fa&4194240)&&(Fa=64),e}function pf(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function ca(e,n,r){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-nn(n),e[n]=r}function eR(e,n){var r=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-nn(r),s=1<<i;n[i]=0,o[i]=-1,e[i]=-1,r&=~s}}function ph(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-nn(r),i=1<<o;i&n|e[o]&n&&(e[o]|=n),r&=~i}}var ve=0;function pw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hw,hh,mw,gw,yw,Md=!1,Ba=[],mr=null,gr=null,yr=null,Ts=new Map,Is=new Map,cr=[],tR="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 Lg(e,n){switch(e){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":yr=null;break;case"pointerover":case"pointerout":Ts.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(n.pointerId)}}function Vi(e,n,r,o,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:s,targetContainers:[i]},n!==null&&(n=fa(n),n!==null&&hh(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,i!==null&&n.indexOf(i)===-1&&n.push(i),e)}function nR(e,n,r,o,i){switch(n){case"focusin":return mr=Vi(mr,e,n,r,o,i),!0;case"dragenter":return gr=Vi(gr,e,n,r,o,i),!0;case"mouseover":return yr=Vi(yr,e,n,r,o,i),!0;case"pointerover":var s=i.pointerId;return Ts.set(s,Vi(Ts.get(s)||null,e,n,r,o,i)),!0;case"gotpointercapture":return s=i.pointerId,Is.set(s,Vi(Is.get(s)||null,e,n,r,o,i)),!0}return!1}function vw(e){var n=Xr(e.target);if(n!==null){var r=vo(n);if(r!==null){if(n=r.tag,n===13){if(n=sw(r),n!==null){e.blockedOn=n,yw(e.priority,function(){mw(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function El(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=Ad(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ed=o,r.target.dispatchEvent(o),Ed=null}else return n=fa(r),n!==null&&hh(n),e.blockedOn=r,!1;n.shift()}return!0}function zg(e,n,r){El(e)&&r.delete(n)}function rR(){Md=!1,mr!==null&&El(mr)&&(mr=null),gr!==null&&El(gr)&&(gr=null),yr!==null&&El(yr)&&(yr=null),Ts.forEach(zg),Is.forEach(zg)}function Bi(e,n){e.blockedOn===n&&(e.blockedOn=null,Md||(Md=!0,Pt.unstable_scheduleCallback(Pt.unstable_NormalPriority,rR)))}function js(e){function n(i){return Bi(i,e)}if(0<Ba.length){Bi(Ba[0],e);for(var r=1;r<Ba.length;r++){var o=Ba[r];o.blockedOn===e&&(o.blockedOn=null)}}for(mr!==null&&Bi(mr,e),gr!==null&&Bi(gr,e),yr!==null&&Bi(yr,e),Ts.forEach(n),Is.forEach(n),r=0;r<cr.length;r++)o=cr[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<cr.length&&(r=cr[0],r.blockedOn===null);)vw(r),r.blockedOn===null&&cr.shift()}var Zo=Xn.ReactCurrentBatchConfig,Zl=!0;function oR(e,n,r,o){var i=ve,s=Zo.transition;Zo.transition=null;try{ve=1,mh(e,n,r,o)}finally{ve=i,Zo.transition=s}}function iR(e,n,r,o){var i=ve,s=Zo.transition;Zo.transition=null;try{ve=4,mh(e,n,r,o)}finally{ve=i,Zo.transition=s}}function mh(e,n,r,o){if(Zl){var i=Ad(e,n,r,o);if(i===null)Sf(e,n,o,Ql,r),Lg(e,o);else if(nR(i,e,n,r,o))o.stopPropagation();else if(Lg(e,o),n&4&&-1<tR.indexOf(e)){for(;i!==null;){var s=fa(i);if(s!==null&&hw(s),s=Ad(e,n,r,o),s===null&&Sf(e,n,o,Ql,r),s===i)break;i=s}i!==null&&o.stopPropagation()}else Sf(e,n,o,null,r)}}var Ql=null;function Ad(e,n,r,o){if(Ql=null,e=fh(o),e=Xr(e),e!==null)if(n=vo(e),n===null)e=null;else if(r=n.tag,r===13){if(e=sw(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Ql=e,null}function xw(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(GP()){case dh:return 1;case uw:return 4;case Kl:case YP:return 16;case fw:return 536870912;default:return 16}default:return 16}}var dr=null,gh=null,kl=null;function ww(){if(kl)return kl;var e,n=gh,r=n.length,o,i="value"in dr?dr.value:dr.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(o=1;o<=a&&n[r-o]===i[s-o];o++);return kl=i.slice(e,1<o?1-o:void 0)}function Nl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ha(){return!0}function Fg(){return!1}function At(e){function n(r,o,i,s,a){this._reactName=r,this._targetInst=i,this.type=o,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ha:Fg,this.isPropagationStopped=Fg,this}return je(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ha)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ha)},persist:function(){},isPersistent:Ha}),n}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yh=At(Ei),ua=je({},Ei,{view:0,detail:0}),sR=At(ua),hf,mf,Hi,eu=je({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vh,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!==Hi&&(Hi&&e.type==="mousemove"?(hf=e.screenX-Hi.screenX,mf=e.screenY-Hi.screenY):mf=hf=0,Hi=e),hf)},movementY:function(e){return"movementY"in e?e.movementY:mf}}),Vg=At(eu),aR=je({},eu,{dataTransfer:0}),lR=At(aR),cR=je({},ua,{relatedTarget:0}),gf=At(cR),uR=je({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),fR=At(uR),dR=je({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pR=At(dR),hR=je({},Ei,{data:0}),Bg=At(hR),mR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gR={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"},yR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vR(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=yR[e])?!!n[e]:!1}function vh(){return vR}var xR=je({},ua,{key:function(e){if(e.key){var n=mR[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vh,charCode:function(e){return e.type==="keypress"?Nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wR=At(xR),bR=je({},eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=At(bR),_R=je({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vh}),SR=At(_R),CR=je({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),ER=At(CR),kR=je({},eu,{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}),NR=At(kR),PR=[9,13,27,32],xh=Vn&&"CompositionEvent"in window,gs=null;Vn&&"documentMode"in document&&(gs=document.documentMode);var RR=Vn&&"TextEvent"in window&&!gs,bw=Vn&&(!xh||gs&&8<gs&&11>=gs),Wg=" ",Ug=!1;function _w(e,n){switch(e){case"keyup":return PR.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oo=!1;function MR(e,n){switch(e){case"compositionend":return Sw(n);case"keypress":return n.which!==32?null:(Ug=!0,Wg);case"textInput":return e=n.data,e===Wg&&Ug?null:e;default:return null}}function AR(e,n){if(Oo)return e==="compositionend"||!xh&&_w(e,n)?(e=ww(),kl=gh=dr=null,Oo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return bw&&n.locale!=="ko"?null:n.data;default:return null}}var TR={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 Gg(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!TR[e.type]:n==="textarea"}function Cw(e,n,r,o){tw(o),n=Jl(n,"onChange"),0<n.length&&(r=new yh("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var ys=null,$s=null;function IR(e){$w(e,0)}function tu(e){var n=zo(e);if(Xx(n))return e}function jR(e,n){if(e==="change")return n}var Ew=!1;if(Vn){var yf;if(Vn){var vf="oninput"in document;if(!vf){var Yg=document.createElement("div");Yg.setAttribute("oninput","return;"),vf=typeof Yg.oninput=="function"}yf=vf}else yf=!1;Ew=yf&&(!document.documentMode||9<document.documentMode)}function Xg(){ys&&(ys.detachEvent("onpropertychange",kw),$s=ys=null)}function kw(e){if(e.propertyName==="value"&&tu($s)){var n=[];Cw(n,$s,e,fh(e)),iw(IR,n)}}function $R(e,n,r){e==="focusin"?(Xg(),ys=n,$s=r,ys.attachEvent("onpropertychange",kw)):e==="focusout"&&Xg()}function OR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu($s)}function DR(e,n){if(e==="click")return tu(n)}function LR(e,n){if(e==="input"||e==="change")return tu(n)}function zR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var on=typeof Object.is=="function"?Object.is:zR;function Os(e,n){if(on(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var i=r[o];if(!pd.call(n,i)||!on(e[i],n[i]))return!1}return!0}function Kg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qg(e,n){var r=Kg(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Kg(r)}}function Nw(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Nw(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Pw(){for(var e=window,n=Gl();n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=Gl(e.document)}return n}function wh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function FR(e){var n=Pw(),r=e.focusedElem,o=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&Nw(r.ownerDocument.documentElement,r)){if(o!==null&&wh(r)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in r)r.selectionStart=n,r.selectionEnd=Math.min(e,r.value.length);else if(e=(n=r.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(o.start,i);o=o.end===void 0?s:Math.min(o.end,i),!e.extend&&s>o&&(i=o,o=s,s=i),i=qg(r,s);var a=qg(r,o);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),s>o?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=r;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<n.length;r++)e=n[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var VR=Vn&&"documentMode"in document&&11>=document.documentMode,Do=null,Td=null,vs=null,Id=!1;function Zg(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Id||Do==null||Do!==Gl(o)||(o=Do,"selectionStart"in o&&wh(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),vs&&Os(vs,o)||(vs=o,o=Jl(Td,"onSelect"),0<o.length&&(n=new yh("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=Do)))}function Wa(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var Lo={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionend:Wa("Transition","TransitionEnd")},xf={},Rw={};Vn&&(Rw=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function nu(e){if(xf[e])return xf[e];if(!Lo[e])return e;var n=Lo[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Rw)return xf[e]=n[r];return e}var Mw=nu("animationend"),Aw=nu("animationiteration"),Tw=nu("animationstart"),Iw=nu("transitionend"),jw=new Map,Qg="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 Ar(e,n){jw.set(e,n),yo(n,[e])}for(var wf=0;wf<Qg.length;wf++){var bf=Qg[wf],BR=bf.toLowerCase(),HR=bf[0].toUpperCase()+bf.slice(1);Ar(BR,"on"+HR)}Ar(Mw,"onAnimationEnd");Ar(Aw,"onAnimationIteration");Ar(Tw,"onAnimationStart");Ar("dblclick","onDoubleClick");Ar("focusin","onFocus");Ar("focusout","onBlur");Ar(Iw,"onTransitionEnd");oi("onMouseEnter",["mouseout","mouseover"]);oi("onMouseLeave",["mouseout","mouseover"]);oi("onPointerEnter",["pointerout","pointerover"]);oi("onPointerLeave",["pointerout","pointerover"]);yo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yo("onBeforeInput",["compositionend","keypress","textInput","paste"]);yo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(" "),WR=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function Jg(e,n,r){var o=e.type||"unknown-event";e.currentTarget=r,BP(o,n,void 0,e),e.currentTarget=null}function $w(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],i=o.event;o=o.listeners;e:{var s=void 0;if(n)for(var a=o.length-1;0<=a;a--){var l=o[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&i.isPropagationStopped())break e;Jg(i,l,u),s=c}else for(a=0;a<o.length;a++){if(l=o[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&i.isPropagationStopped())break e;Jg(i,l,u),s=c}}}if(Xl)throw e=Pd,Xl=!1,Pd=null,e}function Se(e,n){var r=n[Ld];r===void 0&&(r=n[Ld]=new Set);var o=e+"__bubble";r.has(o)||(Ow(n,e,2,!1),r.add(o))}function _f(e,n,r){var o=0;n&&(o|=4),Ow(r,e,o,n)}var Ua="_reactListening"+Math.random().toString(36).slice(2);function Ds(e){if(!e[Ua]){e[Ua]=!0,Hx.forEach(function(r){r!=="selectionchange"&&(WR.has(r)||_f(r,!1,e),_f(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ua]||(n[Ua]=!0,_f("selectionchange",!1,n))}}function Ow(e,n,r,o){switch(xw(n)){case 1:var i=oR;break;case 4:i=iR;break;default:i=mh}r=i.bind(null,n,r,e),i=void 0,!Nd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(n,r,{capture:!0,passive:i}):e.addEventListener(n,r,!0):i!==void 0?e.addEventListener(n,r,{passive:i}):e.addEventListener(n,r,!1)}function Sf(e,n,r,o,i){var s=o;if(!(n&1)&&!(n&2)&&o!==null)e:for(;;){if(o===null)return;var a=o.tag;if(a===3||a===4){var l=o.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=o.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;l!==null;){if(a=Xr(l),a===null)return;if(c=a.tag,c===5||c===6){o=s=a;continue e}l=l.parentNode}}o=o.return}iw(function(){var u=s,d=fh(r),f=[];e:{var p=jw.get(e);if(p!==void 0){var m=yh,g=e;switch(e){case"keypress":if(Nl(r)===0)break e;case"keydown":case"keyup":m=wR;break;case"focusin":g="focus",m=gf;break;case"focusout":g="blur",m=gf;break;case"beforeblur":case"afterblur":m=gf;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":m=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=lR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=SR;break;case Mw:case Aw:case Tw:m=fR;break;case Iw:m=ER;break;case"scroll":m=sR;break;case"wheel":m=NR;break;case"copy":case"cut":case"paste":m=pR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Hg}var v=(n&4)!==0,_=!v&&e==="scroll",y=v?p!==null?p+"Capture":null:p;v=[];for(var w=u,x;w!==null;){x=w;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,y!==null&&(S=As(w,y),S!=null&&v.push(Ls(w,S,x)))),_)break;w=w.return}0<v.length&&(p=new m(p,g,null,r,d),f.push({event:p,listeners:v}))}}if(!(n&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&r!==Ed&&(g=r.relatedTarget||r.fromElement)&&(Xr(g)||g[Bn]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(g=r.relatedTarget||r.toElement,m=u,g=g?Xr(g):null,g!==null&&(_=vo(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(v=Vg,S="onMouseLeave",y="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(v=Hg,S="onPointerLeave",y="onPointerEnter",w="pointer"),_=m==null?p:zo(m),x=g==null?p:zo(g),p=new v(S,w+"leave",m,r,d),p.target=_,p.relatedTarget=x,S=null,Xr(d)===u&&(v=new v(y,w+"enter",g,r,d),v.target=x,v.relatedTarget=_,S=v),_=S,m&&g)t:{for(v=m,y=g,w=0,x=v;x;x=Co(x))w++;for(x=0,S=y;S;S=Co(S))x++;for(;0<w-x;)v=Co(v),w--;for(;0<x-w;)y=Co(y),x--;for(;w--;){if(v===y||y!==null&&v===y.alternate)break t;v=Co(v),y=Co(y)}v=null}else v=null;m!==null&&ey(f,p,m,v,!1),g!==null&&_!==null&&ey(f,_,g,v,!0)}}e:{if(p=u?zo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var C=jR;else if(Gg(p))if(Ew)C=LR;else{C=OR;var E=$R}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=DR);if(C&&(C=C(e,u))){Cw(f,C,r,d);break e}E&&E(e,p,u),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&wd(p,"number",p.value)}switch(E=u?zo(u):window,e){case"focusin":(Gg(E)||E.contentEditable==="true")&&(Do=E,Td=u,vs=null);break;case"focusout":vs=Td=Do=null;break;case"mousedown":Id=!0;break;case"contextmenu":case"mouseup":case"dragend":Id=!1,Zg(f,r,d);break;case"selectionchange":if(VR)break;case"keydown":case"keyup":Zg(f,r,d)}var k;if(xh)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Oo?_w(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(bw&&r.locale!=="ko"&&(Oo||N!=="onCompositionStart"?N==="onCompositionEnd"&&Oo&&(k=ww()):(dr=d,gh="value"in dr?dr.value:dr.textContent,Oo=!0)),E=Jl(u,N),0<E.length&&(N=new Bg(N,e,null,r,d),f.push({event:N,listeners:E}),k?N.data=k:(k=Sw(r),k!==null&&(N.data=k)))),(k=RR?MR(e,r):AR(e,r))&&(u=Jl(u,"onBeforeInput"),0<u.length&&(d=new Bg("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=k))}$w(f,n)})}function Ls(e,n,r){return{instance:e,listener:n,currentTarget:r}}function Jl(e,n){for(var r=n+"Capture",o=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=As(e,r),s!=null&&o.unshift(Ls(e,s,i)),s=As(e,n),s!=null&&o.push(Ls(e,s,i))),e=e.return}return o}function Co(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ey(e,n,r,o,i){for(var s=n._reactName,a=[];r!==null&&r!==o;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===o)break;l.tag===5&&u!==null&&(l=u,i?(c=As(r,s),c!=null&&a.unshift(Ls(r,c,l))):i||(c=As(r,s),c!=null&&a.push(Ls(r,c,l)))),r=r.return}a.length!==0&&e.push({event:n,listeners:a})}var UR=/\r\n?/g,GR=/\u0000|\uFFFD/g;function ty(e){return(typeof e=="string"?e:""+e).replace(UR,`
38
- `).replace(GR,"")}function Ga(e,n,r){if(n=ty(n),ty(e)!==n&&r)throw Error(q(425))}function ec(){}var jd=null,$d=null;function Od(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Dd=typeof setTimeout=="function"?setTimeout:void 0,YR=typeof clearTimeout=="function"?clearTimeout:void 0,ny=typeof Promise=="function"?Promise:void 0,XR=typeof queueMicrotask=="function"?queueMicrotask:typeof ny<"u"?function(e){return ny.resolve(null).then(e).catch(KR)}:Dd;function KR(e){setTimeout(function(){throw e})}function Cf(e,n){var r=n,o=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(o===0){e.removeChild(i),js(n);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=i}while(r);js(n)}function vr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function ry(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}var ki=Math.random().toString(36).slice(2),hn="__reactFiber$"+ki,zs="__reactProps$"+ki,Bn="__reactContainer$"+ki,Ld="__reactEvents$"+ki,qR="__reactListeners$"+ki,ZR="__reactHandles$"+ki;function Xr(e){var n=e[hn];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Bn]||r[hn]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=ry(e);e!==null;){if(r=e[hn])return r;e=ry(e)}return n}e=r,r=e.parentNode}return null}function fa(e){return e=e[hn]||e[Bn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function ru(e){return e[zs]||null}var zd=[],Fo=-1;function Tr(e){return{current:e}}function Ee(e){0>Fo||(e.current=zd[Fo],zd[Fo]=null,Fo--)}function be(e,n){Fo++,zd[Fo]=e.current,e.current=n}var Nr={},nt=Tr(Nr),ht=Tr(!1),ro=Nr;function ii(e,n){var r=e.type.contextTypes;if(!r)return Nr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=n[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return e=e.childContextTypes,e!=null}function tc(){Ee(ht),Ee(nt)}function oy(e,n,r){if(nt.current!==Nr)throw Error(q(168));be(nt,n),be(ht,r)}function Dw(e,n,r){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var i in o)if(!(i in n))throw Error(q(108,$P(e)||"Unknown",i));return je({},r,o)}function nc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nr,ro=nt.current,be(nt,e),be(ht,ht.current),!0}function iy(e,n,r){var o=e.stateNode;if(!o)throw Error(q(169));r?(e=Dw(e,n,ro),o.__reactInternalMemoizedMergedChildContext=e,Ee(ht),Ee(nt),be(nt,e)):Ee(ht),be(ht,r)}var In=null,ou=!1,Ef=!1;function Lw(e){In===null?In=[e]:In.push(e)}function QR(e){ou=!0,Lw(e)}function Ir(){if(!Ef&&In!==null){Ef=!0;var e=0,n=ve;try{var r=In;for(ve=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}In=null,ou=!1}catch(i){throw In!==null&&(In=In.slice(e+1)),cw(dh,Ir),i}finally{ve=n,Ef=!1}}return null}var Vo=[],Bo=0,rc=null,oc=0,Dt=[],Lt=0,oo=null,$n=1,On="";function Wr(e,n){Vo[Bo++]=oc,Vo[Bo++]=rc,rc=e,oc=n}function zw(e,n,r){Dt[Lt++]=$n,Dt[Lt++]=On,Dt[Lt++]=oo,oo=e;var o=$n;e=On;var i=32-nn(o)-1;o&=~(1<<i),r+=1;var s=32-nn(n)+i;if(30<s){var a=i-i%5;s=(o&(1<<a)-1).toString(32),o>>=a,i-=a,$n=1<<32-nn(n)+i|r<<i|o,On=s+e}else $n=1<<s|r<<i|o,On=e}function bh(e){e.return!==null&&(Wr(e,1),zw(e,1,0))}function _h(e){for(;e===rc;)rc=Vo[--Bo],Vo[Bo]=null,oc=Vo[--Bo],Vo[Bo]=null;for(;e===oo;)oo=Dt[--Lt],Dt[Lt]=null,On=Dt[--Lt],Dt[Lt]=null,$n=Dt[--Lt],Dt[Lt]=null}var Et=null,Ct=null,Ne=!1,Zt=null;function Fw(e,n){var r=Ft(5,null,null,0);r.elementType="DELETED",r.stateNode=n,r.return=e,n=e.deletions,n===null?(e.deletions=[r],e.flags|=16):n.push(r)}function sy(e,n){switch(e.tag){case 5:var r=e.type;return n=n.nodeType!==1||r.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Et=e,Ct=vr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Et=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(r=oo!==null?{id:$n,overflow:On}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=Ft(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,Et=e,Ct=null,!0):!1;default:return!1}}function Fd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vd(e){if(Ne){var n=Ct;if(n){var r=n;if(!sy(e,n)){if(Fd(e))throw Error(q(418));n=vr(r.nextSibling);var o=Et;n&&sy(e,n)?Fw(o,r):(e.flags=e.flags&-4097|2,Ne=!1,Et=e)}}else{if(Fd(e))throw Error(q(418));e.flags=e.flags&-4097|2,Ne=!1,Et=e}}}function ay(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Et=e}function Ya(e){if(e!==Et)return!1;if(!Ne)return ay(e),Ne=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Od(e.type,e.memoizedProps)),n&&(n=Ct)){if(Fd(e))throw Vw(),Error(q(418));for(;n;)Fw(e,n),n=vr(n.nextSibling)}if(ay(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){Ct=vr(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Et?vr(e.stateNode.nextSibling):null;return!0}function Vw(){for(var e=Ct;e;)e=vr(e.nextSibling)}function si(){Ct=Et=null,Ne=!1}function Sh(e){Zt===null?Zt=[e]:Zt.push(e)}var JR=Xn.ReactCurrentBatchConfig;function Wi(e,n,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(q(309));var o=r.stateNode}if(!o)throw Error(q(147,e));var i=o,s=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===s?n.ref:(n=function(a){var l=i.refs;a===null?delete l[s]:l[s]=a},n._stringRef=s,n)}if(typeof e!="string")throw Error(q(284));if(!r._owner)throw Error(q(290,e))}return e}function Xa(e,n){throw e=Object.prototype.toString.call(n),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function ly(e){var n=e._init;return n(e._payload)}function Bw(e){function n(y,w){if(e){var x=y.deletions;x===null?(y.deletions=[w],y.flags|=16):x.push(w)}}function r(y,w){if(!e)return null;for(;w!==null;)n(y,w),w=w.sibling;return null}function o(y,w){for(y=new Map;w!==null;)w.key!==null?y.set(w.key,w):y.set(w.index,w),w=w.sibling;return y}function i(y,w){return y=_r(y,w),y.index=0,y.sibling=null,y}function s(y,w,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<w?(y.flags|=2,w):x):(y.flags|=2,w)):(y.flags|=1048576,w)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,w,x,S){return w===null||w.tag!==6?(w=Tf(x,y.mode,S),w.return=y,w):(w=i(w,x),w.return=y,w)}function c(y,w,x,S){var C=x.type;return C===$o?d(y,w,x.props.children,S,x.key):w!==null&&(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===sr&&ly(C)===w.type)?(S=i(w,x.props),S.ref=Wi(y,w,x),S.return=y,S):(S=jl(x.type,x.key,x.props,null,y.mode,S),S.ref=Wi(y,w,x),S.return=y,S)}function u(y,w,x,S){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=If(x,y.mode,S),w.return=y,w):(w=i(w,x.children||[]),w.return=y,w)}function d(y,w,x,S,C){return w===null||w.tag!==7?(w=Jr(x,y.mode,S,C),w.return=y,w):(w=i(w,x),w.return=y,w)}function f(y,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Tf(""+w,y.mode,x),w.return=y,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Da:return x=jl(w.type,w.key,w.props,null,y.mode,x),x.ref=Wi(y,null,w),x.return=y,x;case jo:return w=If(w,y.mode,x),w.return=y,w;case sr:var S=w._init;return f(y,S(w._payload),x)}if(is(w)||zi(w))return w=Jr(w,y.mode,x,null),w.return=y,w;Xa(y,w)}return null}function p(y,w,x,S){var C=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:l(y,w,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Da:return x.key===C?c(y,w,x,S):null;case jo:return x.key===C?u(y,w,x,S):null;case sr:return C=x._init,p(y,w,C(x._payload),S)}if(is(x)||zi(x))return C!==null?null:d(y,w,x,S,null);Xa(y,x)}return null}function m(y,w,x,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(x)||null,l(w,y,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Da:return y=y.get(S.key===null?x:S.key)||null,c(w,y,S,C);case jo:return y=y.get(S.key===null?x:S.key)||null,u(w,y,S,C);case sr:var E=S._init;return m(y,w,x,E(S._payload),C)}if(is(S)||zi(S))return y=y.get(x)||null,d(w,y,S,C,null);Xa(w,S)}return null}function g(y,w,x,S){for(var C=null,E=null,k=w,N=w=0,A=null;k!==null&&N<x.length;N++){k.index>N?(A=k,k=null):A=k.sibling;var R=p(y,k,x[N],S);if(R===null){k===null&&(k=A);break}e&&k&&R.alternate===null&&n(y,k),w=s(R,w,N),E===null?C=R:E.sibling=R,E=R,k=A}if(N===x.length)return r(y,k),Ne&&Wr(y,N),C;if(k===null){for(;N<x.length;N++)k=f(y,x[N],S),k!==null&&(w=s(k,w,N),E===null?C=k:E.sibling=k,E=k);return Ne&&Wr(y,N),C}for(k=o(y,k);N<x.length;N++)A=m(k,y,N,x[N],S),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?N:A.key),w=s(A,w,N),E===null?C=A:E.sibling=A,E=A);return e&&k.forEach(function(I){return n(y,I)}),Ne&&Wr(y,N),C}function v(y,w,x,S){var C=zi(x);if(typeof C!="function")throw Error(q(150));if(x=C.call(x),x==null)throw Error(q(151));for(var E=C=null,k=w,N=w=0,A=null,R=x.next();k!==null&&!R.done;N++,R=x.next()){k.index>N?(A=k,k=null):A=k.sibling;var I=p(y,k,R.value,S);if(I===null){k===null&&(k=A);break}e&&k&&I.alternate===null&&n(y,k),w=s(I,w,N),E===null?C=I:E.sibling=I,E=I,k=A}if(R.done)return r(y,k),Ne&&Wr(y,N),C;if(k===null){for(;!R.done;N++,R=x.next())R=f(y,R.value,S),R!==null&&(w=s(R,w,N),E===null?C=R:E.sibling=R,E=R);return Ne&&Wr(y,N),C}for(k=o(y,k);!R.done;N++,R=x.next())R=m(k,y,N,R.value,S),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?N:R.key),w=s(R,w,N),E===null?C=R:E.sibling=R,E=R);return e&&k.forEach(function(j){return n(y,j)}),Ne&&Wr(y,N),C}function _(y,w,x,S){if(typeof x=="object"&&x!==null&&x.type===$o&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Da:e:{for(var C=x.key,E=w;E!==null;){if(E.key===C){if(C=x.type,C===$o){if(E.tag===7){r(y,E.sibling),w=i(E,x.props.children),w.return=y,y=w;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===sr&&ly(C)===E.type){r(y,E.sibling),w=i(E,x.props),w.ref=Wi(y,E,x),w.return=y,y=w;break e}r(y,E);break}else n(y,E);E=E.sibling}x.type===$o?(w=Jr(x.props.children,y.mode,S,x.key),w.return=y,y=w):(S=jl(x.type,x.key,x.props,null,y.mode,S),S.ref=Wi(y,w,x),S.return=y,y=S)}return a(y);case jo:e:{for(E=x.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){r(y,w.sibling),w=i(w,x.children||[]),w.return=y,y=w;break e}else{r(y,w);break}else n(y,w);w=w.sibling}w=If(x,y.mode,S),w.return=y,y=w}return a(y);case sr:return E=x._init,_(y,w,E(x._payload),S)}if(is(x))return g(y,w,x,S);if(zi(x))return v(y,w,x,S);Xa(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(r(y,w.sibling),w=i(w,x),w.return=y,y=w):(r(y,w),w=Tf(x,y.mode,S),w.return=y,y=w),a(y)):r(y,w)}return _}var ai=Bw(!0),Hw=Bw(!1),ic=Tr(null),sc=null,Ho=null,Ch=null;function Eh(){Ch=Ho=sc=null}function kh(e){var n=ic.current;Ee(ic),e._currentValue=n}function Bd(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function Qo(e,n){sc=e,Ch=Ho=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(dt=!0),e.firstContext=null)}function Ht(e){var n=e._currentValue;if(Ch!==e)if(e={context:e,memoizedValue:n,next:null},Ho===null){if(sc===null)throw Error(q(308));Ho=e,sc.dependencies={lanes:0,firstContext:e}}else Ho=Ho.next=e;return n}var Kr=null;function Nh(e){Kr===null?Kr=[e]:Kr.push(e)}function Ww(e,n,r,o){var i=n.interleaved;return i===null?(r.next=r,Nh(n)):(r.next=i.next,i.next=r),n.interleaved=r,Hn(e,o)}function Hn(e,n){e.lanes|=n;var r=e.alternate;for(r!==null&&(r.lanes|=n),r=e,e=e.return;e!==null;)e.childLanes|=n,r=e.alternate,r!==null&&(r.childLanes|=n),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ar=!1;function Ph(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uw(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function xr(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,me&2){var i=o.pending;return i===null?n.next=n:(n.next=i.next,i.next=n),o.pending=n,Hn(e,r)}return i=o.interleaved,i===null?(n.next=n,Nh(o)):(n.next=i.next,i.next=n),o.interleaved=n,Hn(e,r)}function Pl(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,ph(e,r)}}function cy(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=n:s=s.next=n}else i=s=n;r={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}function ac(e,n,r,o){var i=e.updateQueue;ar=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;a=0,d=u=c=null,l=s;do{var p=l.lane,m=l.eventTime;if((o&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(p=n,m=r,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(m,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,p=typeof g=="function"?g.call(m,f,p):g,p==null)break e;f=je({},f,p);break e;case 2:ar=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,a|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,n=i.shared.interleaved,n!==null){i=n;do a|=i.lane,i=i.next;while(i!==n)}else s===null&&(i.shared.lanes=0);so|=a,e.lanes=a,e.memoizedState=f}}function uy(e,n,r){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],i=o.callback;if(i!==null){if(o.callback=null,o=r,typeof i!="function")throw Error(q(191,i));i.call(o)}}}var da={},xn=Tr(da),Fs=Tr(da),Vs=Tr(da);function qr(e){if(e===da)throw Error(q(174));return e}function Rh(e,n){switch(be(Vs,n),be(Fs,e),be(xn,da),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:_d(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=_d(n,e)}Ee(xn),be(xn,n)}function li(){Ee(xn),Ee(Fs),Ee(Vs)}function Gw(e){qr(Vs.current);var n=qr(xn.current),r=_d(n,e.type);n!==r&&(be(Fs,e),be(xn,r))}function Mh(e){Fs.current===e&&(Ee(xn),Ee(Fs))}var Ae=Tr(0);function lc(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var kf=[];function Ah(){for(var e=0;e<kf.length;e++)kf[e]._workInProgressVersionPrimary=null;kf.length=0}var Rl=Xn.ReactCurrentDispatcher,Nf=Xn.ReactCurrentBatchConfig,io=0,Te=null,Ve=null,We=null,cc=!1,xs=!1,Bs=0,eM=0;function qe(){throw Error(q(321))}function Th(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!on(e[r],n[r]))return!1;return!0}function Ih(e,n,r,o,i,s){if(io=s,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Rl.current=e===null||e.memoizedState===null?oM:iM,e=r(o,i),xs){s=0;do{if(xs=!1,Bs=0,25<=s)throw Error(q(301));s+=1,We=Ve=null,n.updateQueue=null,Rl.current=sM,e=r(o,i)}while(xs)}if(Rl.current=uc,n=Ve!==null&&Ve.next!==null,io=0,We=Ve=Te=null,cc=!1,n)throw Error(q(300));return e}function jh(){var e=Bs!==0;return Bs=0,e}function dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Te.memoizedState=We=e:We=We.next=e,We}function Wt(){if(Ve===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var n=We===null?Te.memoizedState:We.next;if(n!==null)We=n,Ve=e;else{if(e===null)throw Error(q(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},We===null?Te.memoizedState=We=e:We=We.next=e}return We}function Hs(e,n){return typeof n=="function"?n(e):n}function Pf(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=Ve,i=o.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}o.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,o=o.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((io&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=o):c=c.next=f,Te.lanes|=d,so|=d}u=u.next}while(u!==null&&u!==s);c===null?a=o:c.next=l,on(o,n.memoizedState)||(dt=!0),n.memoizedState=o,n.baseState=a,n.baseQueue=c,r.lastRenderedState=o}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Te.lanes|=s,so|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function Rf(e){var n=Wt(),r=n.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,s=n.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);on(s,n.memoizedState)||(dt=!0),n.memoizedState=s,n.baseQueue===null&&(n.baseState=s),r.lastRenderedState=s}return[s,o]}function Yw(){}function Xw(e,n){var r=Te,o=Wt(),i=n(),s=!on(o.memoizedState,i);if(s&&(o.memoizedState=i,dt=!0),o=o.queue,$h(Zw.bind(null,r,o,e),[e]),o.getSnapshot!==n||s||We!==null&&We.memoizedState.tag&1){if(r.flags|=2048,Ws(9,qw.bind(null,r,o,i,n),void 0,null),Ue===null)throw Error(q(349));io&30||Kw(r,n,i)}return i}function Kw(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function qw(e,n,r,o){n.value=r,n.getSnapshot=o,Qw(n)&&Jw(e)}function Zw(e,n,r){return r(function(){Qw(n)&&Jw(e)})}function Qw(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!on(e,r)}catch{return!0}}function Jw(e){var n=Hn(e,1);n!==null&&rn(n,e,1,-1)}function fy(e){var n=dn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:e},n.queue=e,e=e.dispatch=rM.bind(null,Te,e),[n.memoizedState,e]}function Ws(e,n,r,o){return e={tag:e,create:n,destroy:r,deps:o,next:null},n=Te.updateQueue,n===null?(n={lastEffect:null,stores:null},Te.updateQueue=n,n.lastEffect=e.next=e):(r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e)),e}function e1(){return Wt().memoizedState}function Ml(e,n,r,o){var i=dn();Te.flags|=e,i.memoizedState=Ws(1|n,r,void 0,o===void 0?null:o)}function iu(e,n,r,o){var i=Wt();o=o===void 0?null:o;var s=void 0;if(Ve!==null){var a=Ve.memoizedState;if(s=a.destroy,o!==null&&Th(o,a.deps)){i.memoizedState=Ws(n,r,s,o);return}}Te.flags|=e,i.memoizedState=Ws(1|n,r,s,o)}function dy(e,n){return Ml(8390656,8,e,n)}function $h(e,n){return iu(2048,8,e,n)}function t1(e,n){return iu(4,2,e,n)}function n1(e,n){return iu(4,4,e,n)}function r1(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function o1(e,n,r){return r=r!=null?r.concat([e]):null,iu(4,4,r1.bind(null,n,e),r)}function Oh(){}function i1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Th(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function s1(e,n){var r=Wt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&Th(n,o[1])?o[0]:(e=e(),r.memoizedState=[e,n],e)}function a1(e,n,r){return io&21?(on(r,n)||(r=dw(),Te.lanes|=r,so|=r,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=r)}function tM(e,n){var r=ve;ve=r!==0&&4>r?r:4,e(!0);var o=Nf.transition;Nf.transition={};try{e(!1),n()}finally{ve=r,Nf.transition=o}}function l1(){return Wt().memoizedState}function nM(e,n,r){var o=br(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},c1(e))u1(n,r);else if(r=Ww(e,n,r,o),r!==null){var i=it();rn(r,e,o,i),f1(r,n,o)}}function rM(e,n,r){var o=br(e),i={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(c1(e))u1(n,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=n.lastRenderedReducer,s!==null))try{var a=n.lastRenderedState,l=s(a,r);if(i.hasEagerState=!0,i.eagerState=l,on(l,a)){var c=n.interleaved;c===null?(i.next=i,Nh(n)):(i.next=c.next,c.next=i),n.interleaved=i;return}}catch{}finally{}r=Ww(e,n,i,o),r!==null&&(i=it(),rn(r,e,o,i),f1(r,n,o))}}function c1(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function u1(e,n){xs=cc=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function f1(e,n,r){if(r&4194240){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,ph(e,r)}}var uc={readContext:Ht,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},oM={readContext:Ht,useCallback:function(e,n){return dn().memoizedState=[e,n===void 0?null:n],e},useContext:Ht,useEffect:dy,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,Ml(4194308,4,r1.bind(null,n,e),r)},useLayoutEffect:function(e,n){return Ml(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ml(4,2,e,n)},useMemo:function(e,n){var r=dn();return n=n===void 0?null:n,e=e(),r.memoizedState=[e,n],e},useReducer:function(e,n,r){var o=dn();return n=r!==void 0?r(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=nM.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var n=dn();return e={current:e},n.memoizedState=e},useState:fy,useDebugValue:Oh,useDeferredValue:function(e){return dn().memoizedState=e},useTransition:function(){var e=fy(!1),n=e[0];return e=tM.bind(null,e[1]),dn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var o=Te,i=dn();if(Ne){if(r===void 0)throw Error(q(407));r=r()}else{if(r=n(),Ue===null)throw Error(q(349));io&30||Kw(o,n,r)}i.memoizedState=r;var s={value:r,getSnapshot:n};return i.queue=s,dy(Zw.bind(null,o,s,e),[e]),o.flags|=2048,Ws(9,qw.bind(null,o,s,r,n),void 0,null),r},useId:function(){var e=dn(),n=Ue.identifierPrefix;if(Ne){var r=On,o=$n;r=(o&~(1<<32-nn(o)-1)).toString(32)+r,n=":"+n+"R"+r,r=Bs++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=eM++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},iM={readContext:Ht,useCallback:i1,useContext:Ht,useEffect:$h,useImperativeHandle:o1,useInsertionEffect:t1,useLayoutEffect:n1,useMemo:s1,useReducer:Pf,useRef:e1,useState:function(){return Pf(Hs)},useDebugValue:Oh,useDeferredValue:function(e){var n=Wt();return a1(n,Ve.memoizedState,e)},useTransition:function(){var e=Pf(Hs)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:Yw,useSyncExternalStore:Xw,useId:l1,unstable_isNewReconciler:!1},sM={readContext:Ht,useCallback:i1,useContext:Ht,useEffect:$h,useImperativeHandle:o1,useInsertionEffect:t1,useLayoutEffect:n1,useMemo:s1,useReducer:Rf,useRef:e1,useState:function(){return Rf(Hs)},useDebugValue:Oh,useDeferredValue:function(e){var n=Wt();return Ve===null?n.memoizedState=e:a1(n,Ve.memoizedState,e)},useTransition:function(){var e=Rf(Hs)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:Yw,useSyncExternalStore:Xw,useId:l1,unstable_isNewReconciler:!1};function Xt(e,n){if(e&&e.defaultProps){n=je({},n),e=e.defaultProps;for(var r in e)n[r]===void 0&&(n[r]=e[r]);return n}return n}function Hd(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:je({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var su={isMounted:function(e){return(e=e._reactInternals)?vo(e)===e:!1},enqueueSetState:function(e,n,r){e=e._reactInternals;var o=it(),i=br(e),s=zn(o,i);s.payload=n,r!=null&&(s.callback=r),n=xr(e,s,i),n!==null&&(rn(n,e,i,o),Pl(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=it(),i=br(e),s=zn(o,i);s.tag=1,s.payload=n,r!=null&&(s.callback=r),n=xr(e,s,i),n!==null&&(rn(n,e,i,o),Pl(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=it(),o=br(e),i=zn(r,o);i.tag=2,n!=null&&(i.callback=n),n=xr(e,i,o),n!==null&&(rn(n,e,o,r),Pl(n,e,o))}};function py(e,n,r,o,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,s,a):n.prototype&&n.prototype.isPureReactComponent?!Os(r,o)||!Os(i,s):!0}function d1(e,n,r){var o=!1,i=Nr,s=n.contextType;return typeof s=="object"&&s!==null?s=Ht(s):(i=mt(n)?ro:nt.current,o=n.contextTypes,s=(o=o!=null)?ii(e,i):Nr),n=new n(r,s),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=su,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),n}function hy(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&su.enqueueReplaceState(n,n.state,null)}function Wd(e,n,r,o){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Ph(e);var s=n.contextType;typeof s=="object"&&s!==null?i.context=Ht(s):(s=mt(n)?ro:nt.current,i.context=ii(e,s)),i.state=e.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Hd(e,n,s,r),i.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(n=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),n!==i.state&&su.enqueueReplaceState(i,i.state,null),ac(e,r,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ci(e,n){try{var r="",o=n;do r+=jP(o),o=o.return;while(o);var i=r}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:n,stack:i,digest:null}}function Mf(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function Ud(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var aM=typeof WeakMap=="function"?WeakMap:Map;function p1(e,n,r){r=zn(-1,r),r.tag=3,r.payload={element:null};var o=n.value;return r.callback=function(){dc||(dc=!0,tp=o),Ud(e,n)},r}function h1(e,n,r){r=zn(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var i=n.value;r.payload=function(){return o(i)},r.callback=function(){Ud(e,n)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Ud(e,n),typeof o!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var a=n.stack;this.componentDidCatch(n.value,{componentStack:a!==null?a:""})}),r}function my(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new aM;var i=new Set;o.set(n,i)}else i=o.get(n),i===void 0&&(i=new Set,o.set(n,i));i.has(r)||(i.add(r),e=bM.bind(null,e,n,r),n.then(e,e))}function gy(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function yy(e,n,r,o,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===n?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(n=zn(-1,1),n.tag=2,xr(r,n,1))),r.lanes|=1),e)}var lM=Xn.ReactCurrentOwner,dt=!1;function rt(e,n,r,o){n.child=e===null?Hw(n,null,r,o):ai(n,e.child,r,o)}function vy(e,n,r,o,i){r=r.render;var s=n.ref;return Qo(n,i),o=Ih(e,n,r,o,s,i),r=jh(),e!==null&&!dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Wn(e,n,i)):(Ne&&r&&bh(n),n.flags|=1,rt(e,n,o,i),n.child)}function xy(e,n,r,o,i){if(e===null){var s=r.type;return typeof s=="function"&&!Wh(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=s,m1(e,n,s,o,i)):(e=jl(r.type,null,o,n,n.mode,i),e.ref=n.ref,e.return=n,n.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Os,r(a,o)&&e.ref===n.ref)return Wn(e,n,i)}return n.flags|=1,e=_r(s,o),e.ref=n.ref,e.return=n,n.child=e}function m1(e,n,r,o,i){if(e!==null){var s=e.memoizedProps;if(Os(s,o)&&e.ref===n.ref)if(dt=!1,n.pendingProps=o=s,(e.lanes&i)!==0)e.flags&131072&&(dt=!0);else return n.lanes=e.lanes,Wn(e,n,i)}return Gd(e,n,r,o,i)}function g1(e,n,r){var o=n.pendingProps,i=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(Uo,_t),_t|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,be(Uo,_t),_t|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,be(Uo,_t),_t|=o}else s!==null?(o=s.baseLanes|r,n.memoizedState=null):o=r,be(Uo,_t),_t|=o;return rt(e,n,i,r),n.child}function y1(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function Gd(e,n,r,o,i){var s=mt(r)?ro:nt.current;return s=ii(n,s),Qo(n,i),r=Ih(e,n,r,o,s,i),o=jh(),e!==null&&!dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,Wn(e,n,i)):(Ne&&o&&bh(n),n.flags|=1,rt(e,n,r,i),n.child)}function wy(e,n,r,o,i){if(mt(r)){var s=!0;nc(n)}else s=!1;if(Qo(n,i),n.stateNode===null)Al(e,n),d1(n,r,o),Wd(n,r,o,i),o=!0;else if(e===null){var a=n.stateNode,l=n.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ht(u):(u=mt(r)?ro:nt.current,u=ii(n,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==o||c!==u)&&hy(n,a,o,u),ar=!1;var p=n.memoizedState;a.state=p,ac(n,o,a,i),c=n.memoizedState,l!==o||p!==c||ht.current||ar?(typeof d=="function"&&(Hd(n,r,d,o),c=n.memoizedState),(l=ar||py(n,r,l,o,p,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(n.flags|=4194308)):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=c),a.props=o,a.state=c,a.context=u,o=l):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{a=n.stateNode,Uw(e,n),l=n.memoizedProps,u=n.type===n.elementType?l:Xt(n.type,l),a.props=u,f=n.pendingProps,p=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Ht(c):(c=mt(r)?ro:nt.current,c=ii(n,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==c)&&hy(n,a,o,c),ar=!1,p=n.memoizedState,a.state=p,ac(n,o,a,i);var g=n.memoizedState;l!==f||p!==g||ht.current||ar?(typeof m=="function"&&(Hd(n,r,m,o),g=n.memoizedState),(u=ar||py(n,r,u,o,p,g,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,g,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,g,c)),typeof a.componentDidUpdate=="function"&&(n.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=g),a.props=o,a.state=g,a.context=c,o=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),o=!1)}return Yd(e,n,r,o,s,i)}function Yd(e,n,r,o,i,s){y1(e,n);var a=(n.flags&128)!==0;if(!o&&!a)return i&&iy(n,r,!1),Wn(e,n,s);o=n.stateNode,lM.current=n;var l=a&&typeof r.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&a?(n.child=ai(n,e.child,null,s),n.child=ai(n,null,l,s)):rt(e,n,l,s),n.memoizedState=o.state,i&&iy(n,r,!0),n.child}function v1(e){var n=e.stateNode;n.pendingContext?oy(e,n.pendingContext,n.pendingContext!==n.context):n.context&&oy(e,n.context,!1),Rh(e,n.containerInfo)}function by(e,n,r,o,i){return si(),Sh(i),n.flags|=256,rt(e,n,r,o),n.child}var Xd={dehydrated:null,treeContext:null,retryLane:0};function Kd(e){return{baseLanes:e,cachePool:null,transitions:null}}function x1(e,n,r){var o=n.pendingProps,i=Ae.current,s=!1,a=(n.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),be(Ae,i&1),e===null)return Vd(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(a=o.children,e=o.fallback,s?(o=n.mode,s=n.child,a={mode:"hidden",children:a},!(o&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=cu(a,o,0,null),e=Jr(e,o,r,null),s.return=n,e.return=n,s.sibling=e,n.child=s,n.child.memoizedState=Kd(r),n.memoizedState=Xd,e):Dh(n,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return cM(e,n,a,o,l,i,r);if(s){s=o.fallback,a=n.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:o.children};return!(a&1)&&n.child!==i?(o=n.child,o.childLanes=0,o.pendingProps=c,n.deletions=null):(o=_r(i,c),o.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=_r(l,s):(s=Jr(s,a,r,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,o=s,s=n.child,a=e.child.memoizedState,a=a===null?Kd(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,n.memoizedState=Xd,o}return s=e.child,e=s.sibling,o=_r(s,{mode:"visible",children:o.children}),!(n.mode&1)&&(o.lanes=r),o.return=n,o.sibling=null,e!==null&&(r=n.deletions,r===null?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=o,n.memoizedState=null,o}function Dh(e,n){return n=cu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ka(e,n,r,o){return o!==null&&Sh(o),ai(n,e.child,null,r),e=Dh(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function cM(e,n,r,o,i,s,a){if(r)return n.flags&256?(n.flags&=-257,o=Mf(Error(q(422))),Ka(e,n,a,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(s=o.fallback,i=n.mode,o=cu({mode:"visible",children:o.children},i,0,null),s=Jr(s,i,a,null),s.flags|=2,o.return=n,s.return=n,o.sibling=s,n.child=o,n.mode&1&&ai(n,e.child,null,a),n.child.memoizedState=Kd(a),n.memoizedState=Xd,s);if(!(n.mode&1))return Ka(e,n,a,null);if(i.data==="$!"){if(o=i.nextSibling&&i.nextSibling.dataset,o)var l=o.dgst;return o=l,s=Error(q(419)),o=Mf(s,o,void 0),Ka(e,n,a,o)}if(l=(a&e.childLanes)!==0,dt||l){if(o=Ue,o!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(o.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Hn(e,i),rn(o,e,i,-1))}return Hh(),o=Mf(Error(q(421))),Ka(e,n,a,o)}return i.data==="$?"?(n.flags|=128,n.child=e.child,n=_M.bind(null,e),i._reactRetry=n,null):(e=s.treeContext,Ct=vr(i.nextSibling),Et=n,Ne=!0,Zt=null,e!==null&&(Dt[Lt++]=$n,Dt[Lt++]=On,Dt[Lt++]=oo,$n=e.id,On=e.overflow,oo=n),n=Dh(n,o.children),n.flags|=4096,n)}function _y(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Bd(e.return,n,r)}function Af(e,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:i}:(s.isBackwards=n,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=r,s.tailMode=i)}function w1(e,n,r){var o=n.pendingProps,i=o.revealOrder,s=o.tail;if(rt(e,n,o.children,r),o=Ae.current,o&2)o=o&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_y(e,r,n);else if(e.tag===19)_y(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(be(Ae,o),!(n.mode&1))n.memoizedState=null;else switch(i){case"forwards":for(r=n.child,i=null;r!==null;)e=r.alternate,e!==null&&lc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=n.child,n.child=null):(i=r.sibling,r.sibling=null),Af(n,!1,i,r,s);break;case"backwards":for(r=null,i=n.child,n.child=null;i!==null;){if(e=i.alternate,e!==null&&lc(e)===null){n.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Af(n,!0,r,null,s);break;case"together":Af(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Al(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Wn(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),so|=n.lanes,!(r&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(q(153));if(n.child!==null){for(e=n.child,r=_r(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=_r(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function uM(e,n,r){switch(n.tag){case 3:v1(n),si();break;case 5:Gw(n);break;case 1:mt(n.type)&&nc(n);break;case 4:Rh(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,i=n.memoizedProps.value;be(ic,o._currentValue),o._currentValue=i;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(be(Ae,Ae.current&1),n.flags|=128,null):r&n.child.childLanes?x1(e,n,r):(be(Ae,Ae.current&1),e=Wn(e,n,r),e!==null?e.sibling:null);be(Ae,Ae.current&1);break;case 19:if(o=(r&n.childLanes)!==0,e.flags&128){if(o)return w1(e,n,r);n.flags|=128}if(i=n.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(Ae,Ae.current),o)break;return null;case 22:case 23:return n.lanes=0,g1(e,n,r)}return Wn(e,n,r)}var b1,qd,_1,S1;b1=function(e,n){for(var r=n.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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};qd=function(){};_1=function(e,n,r,o){var i=e.memoizedProps;if(i!==o){e=n.stateNode,qr(xn.current);var s=null;switch(r){case"input":i=vd(e,i),o=vd(e,o),s=[];break;case"select":i=je({},i,{value:void 0}),o=je({},o,{value:void 0}),s=[];break;case"textarea":i=bd(e,i),o=bd(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=ec)}Sd(r,o);var a;r=null;for(u in i)if(!o.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Rs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in o){var c=o[u];if(l=i!=null?i[u]:void 0,o.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(s||(s=[]),s.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Rs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Se("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}r&&(s=s||[]).push("style",r);var u=s;(n.updateQueue=u)&&(n.flags|=4)}};S1=function(e,n,r,o){r!==o&&(n.flags|=4)};function Ui(e,n){if(!Ne)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ze(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags&14680064,o|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function fM(e,n,r){var o=n.pendingProps;switch(_h(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(n),null;case 1:return mt(n.type)&&tc(),Ze(n),null;case 3:return o=n.stateNode,li(),Ee(ht),Ee(nt),Ah(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Ya(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Zt!==null&&(op(Zt),Zt=null))),qd(e,n),Ze(n),null;case 5:Mh(n);var i=qr(Vs.current);if(r=n.type,e!==null&&n.stateNode!=null)_1(e,n,r,o,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(q(166));return Ze(n),null}if(e=qr(xn.current),Ya(n)){o=n.stateNode,r=n.type;var s=n.memoizedProps;switch(o[hn]=n,o[zs]=s,e=(n.mode&1)!==0,r){case"dialog":Se("cancel",o),Se("close",o);break;case"iframe":case"object":case"embed":Se("load",o);break;case"video":case"audio":for(i=0;i<as.length;i++)Se(as[i],o);break;case"source":Se("error",o);break;case"img":case"image":case"link":Se("error",o),Se("load",o);break;case"details":Se("toggle",o);break;case"input":Ag(o,s),Se("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Se("invalid",o);break;case"textarea":Ig(o,s),Se("invalid",o)}Sd(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="children"?typeof l=="string"?o.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ga(o.textContent,l,e),i=["children",l]):typeof l=="number"&&o.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ga(o.textContent,l,e),i=["children",""+l]):Rs.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Se("scroll",o)}switch(r){case"input":La(o),Tg(o,s,!0);break;case"textarea":La(o),jg(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=ec)}o=i,n.updateQueue=o,o!==null&&(n.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zx(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=a.createElement(r,{is:o.is}):(e=a.createElement(r),r==="select"&&(a=e,o.multiple?a.multiple=!0:o.size&&(a.size=o.size))):e=a.createElementNS(e,r),e[hn]=n,e[zs]=o,b1(e,n,!1,!1),n.stateNode=e;e:{switch(a=Cd(r,o),r){case"dialog":Se("cancel",e),Se("close",e),i=o;break;case"iframe":case"object":case"embed":Se("load",e),i=o;break;case"video":case"audio":for(i=0;i<as.length;i++)Se(as[i],e);i=o;break;case"source":Se("error",e),i=o;break;case"img":case"image":case"link":Se("error",e),Se("load",e),i=o;break;case"details":Se("toggle",e),i=o;break;case"input":Ag(e,o),i=vd(e,o),Se("invalid",e);break;case"option":i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=je({},o,{value:void 0}),Se("invalid",e);break;case"textarea":Ig(e,o),i=bd(e,o),Se("invalid",e);break;default:i=o}Sd(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?ew(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Qx(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ms(e,c):typeof c=="number"&&Ms(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Rs.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Se("scroll",e):c!=null&&ah(e,s,c,a))}switch(r){case"input":La(e),Tg(e,o,!1);break;case"textarea":La(e),jg(e);break;case"option":o.value!=null&&e.setAttribute("value",""+kr(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?Xo(e,!!o.multiple,s,!1):o.defaultValue!=null&&Xo(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ec)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Ze(n),null;case 6:if(e&&n.stateNode!=null)S1(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(q(166));if(r=qr(Vs.current),qr(xn.current),Ya(n)){if(o=n.stateNode,r=n.memoizedProps,o[hn]=n,(s=o.nodeValue!==r)&&(e=Et,e!==null))switch(e.tag){case 3:Ga(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ga(o.nodeValue,r,(e.mode&1)!==0)}s&&(n.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[hn]=n,n.stateNode=o}return Ze(n),null;case 13:if(Ee(Ae),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ne&&Ct!==null&&n.mode&1&&!(n.flags&128))Vw(),si(),n.flags|=98560,s=!1;else if(s=Ya(n),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[hn]=n}else si(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;Ze(n),s=!1}else Zt!==null&&(op(Zt),Zt=null),s=!0;if(!s)return n.flags&65536?n:null}return n.flags&128?(n.lanes=r,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,n.mode&1&&(e===null||Ae.current&1?Be===0&&(Be=3):Hh())),n.updateQueue!==null&&(n.flags|=4),Ze(n),null);case 4:return li(),qd(e,n),e===null&&Ds(n.stateNode.containerInfo),Ze(n),null;case 10:return kh(n.type._context),Ze(n),null;case 17:return mt(n.type)&&tc(),Ze(n),null;case 19:if(Ee(Ae),s=n.memoizedState,s===null)return Ze(n),null;if(o=(n.flags&128)!==0,a=s.rendering,a===null)if(o)Ui(s,!1);else{if(Be!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(a=lc(e),a!==null){for(n.flags|=128,Ui(s,!1),o=a.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=r,r=n.child;r!==null;)s=r,e=o,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return be(Ae,Ae.current&1|2),n.child}e=e.sibling}s.tail!==null&&De()>ui&&(n.flags|=128,o=!0,Ui(s,!1),n.lanes=4194304)}else{if(!o)if(e=lc(a),e!==null){if(n.flags|=128,o=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),Ui(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ne)return Ze(n),null}else 2*De()-s.renderingStartTime>ui&&r!==1073741824&&(n.flags|=128,o=!0,Ui(s,!1),n.lanes=4194304);s.isBackwards?(a.sibling=n.child,n.child=a):(r=s.last,r!==null?r.sibling=a:n.child=a,s.last=a)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=De(),n.sibling=null,r=Ae.current,be(Ae,o?r&1|2:r&1),n):(Ze(n),null);case 22:case 23:return Bh(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&n.mode&1?_t&1073741824&&(Ze(n),n.subtreeFlags&6&&(n.flags|=8192)):Ze(n),null;case 24:return null;case 25:return null}throw Error(q(156,n.tag))}function dM(e,n){switch(_h(n),n.tag){case 1:return mt(n.type)&&tc(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return li(),Ee(ht),Ee(nt),Ah(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Mh(n),null;case 13:if(Ee(Ae),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(q(340));si()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ee(Ae),null;case 4:return li(),null;case 10:return kh(n.type._context),null;case 22:case 23:return Bh(),null;case 24:return null;default:return null}}var qa=!1,et=!1,pM=typeof WeakSet=="function"?WeakSet:Set,re=null;function Wo(e,n){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Oe(e,n,o)}else r.current=null}function Zd(e,n,r){try{r()}catch(o){Oe(e,n,o)}}var Sy=!1;function hM(e,n){if(jd=Zl,e=Pw(),wh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var m;f!==r||i!==0&&f.nodeType!==3||(l=a+i),f!==s||o!==0&&f.nodeType!==3||(c=a+o),f.nodeType===3&&(a+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===r&&++u===i&&(l=a),p===s&&++d===o&&(c=a),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for($d={focusedElem:e,selectionRange:r},Zl=!1,re=n;re!==null;)if(n=re,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,re=e;else for(;re!==null;){n=re;try{var g=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,_=g.memoizedState,y=n.stateNode,w=y.getSnapshotBeforeUpdate(n.elementType===n.type?v:Xt(n.type,v),_);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=n.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(S){Oe(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,re=e;break}re=n.return}return g=Sy,Sy=!1,g}function ws(e,n,r){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Zd(n,r,s)}i=i.next}while(i!==o)}}function au(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==n)}}function Qd(e){var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof n=="function"?n(e):n.current=e}}function C1(e){var n=e.alternate;n!==null&&(e.alternate=null,C1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[hn],delete n[zs],delete n[Ld],delete n[qR],delete n[ZR])),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 E1(e){return e.tag===5||e.tag===3||e.tag===4}function Cy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E1(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 Jd(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.nodeType===8?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(r.nodeType===8?(n=r.parentNode,n.insertBefore(e,r)):(n=r,n.appendChild(e)),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=ec));else if(o!==4&&(e=e.child,e!==null))for(Jd(e,n,r),e=e.sibling;e!==null;)Jd(e,n,r),e=e.sibling}function ep(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(ep(e,n,r),e=e.sibling;e!==null;)ep(e,n,r),e=e.sibling}var Ge=null,qt=!1;function Qn(e,n,r){for(r=r.child;r!==null;)k1(e,n,r),r=r.sibling}function k1(e,n,r){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Jc,r)}catch{}switch(r.tag){case 5:et||Wo(r,n);case 6:var o=Ge,i=qt;Ge=null,Qn(e,n,r),Ge=o,qt=i,Ge!==null&&(qt?(e=Ge,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ge.removeChild(r.stateNode));break;case 18:Ge!==null&&(qt?(e=Ge,r=r.stateNode,e.nodeType===8?Cf(e.parentNode,r):e.nodeType===1&&Cf(e,r),js(e)):Cf(Ge,r.stateNode));break;case 4:o=Ge,i=qt,Ge=r.stateNode.containerInfo,qt=!0,Qn(e,n,r),Ge=o,qt=i;break;case 0:case 11:case 14:case 15:if(!et&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Zd(r,n,a),i=i.next}while(i!==o)}Qn(e,n,r);break;case 1:if(!et&&(Wo(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(l){Oe(r,n,l)}Qn(e,n,r);break;case 21:Qn(e,n,r);break;case 22:r.mode&1?(et=(o=et)||r.memoizedState!==null,Qn(e,n,r),et=o):Qn(e,n,r);break;default:Qn(e,n,r)}}function Ey(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new pM),n.forEach(function(o){var i=SM.bind(null,e,o);r.has(o)||(r.add(o),o.then(i,i))})}}function Ut(e,n){var r=n.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o];try{var s=e,a=n,l=a;e:for(;l!==null;){switch(l.tag){case 5:Ge=l.stateNode,qt=!1;break e;case 3:Ge=l.stateNode.containerInfo,qt=!0;break e;case 4:Ge=l.stateNode.containerInfo,qt=!0;break e}l=l.return}if(Ge===null)throw Error(q(160));k1(s,a,i),Ge=null,qt=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Oe(i,n,u)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)N1(n,e),n=n.sibling}function N1(e,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(n,e),fn(e),o&4){try{ws(3,e,e.return),au(3,e)}catch(v){Oe(e,e.return,v)}try{ws(5,e,e.return)}catch(v){Oe(e,e.return,v)}}break;case 1:Ut(n,e),fn(e),o&512&&r!==null&&Wo(r,r.return);break;case 5:if(Ut(n,e),fn(e),o&512&&r!==null&&Wo(r,r.return),e.flags&32){var i=e.stateNode;try{Ms(i,"")}catch(v){Oe(e,e.return,v)}}if(o&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Kx(i,s),Cd(l,a);var u=Cd(l,s);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?ew(i,f):d==="dangerouslySetInnerHTML"?Qx(i,f):d==="children"?Ms(i,f):ah(i,d,f,u)}switch(l){case"input":xd(i,s);break;case"textarea":qx(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Xo(i,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Xo(i,!!s.multiple,s.defaultValue,!0):Xo(i,!!s.multiple,s.multiple?[]:"",!1))}i[zs]=s}catch(v){Oe(e,e.return,v)}}break;case 6:if(Ut(n,e),fn(e),o&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(v){Oe(e,e.return,v)}}break;case 3:if(Ut(n,e),fn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{js(n.containerInfo)}catch(v){Oe(e,e.return,v)}break;case 4:Ut(n,e),fn(e);break;case 13:Ut(n,e),fn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Fh=De())),o&4&&Ey(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(et=(u=et)||d,Ut(n,e),et=u):Ut(n,e),fn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(re=e,d=e.child;d!==null;){for(f=re=d;re!==null;){switch(p=re,m=p.child,p.tag){case 0:case 11:case 14:case 15:ws(4,p,p.return);break;case 1:Wo(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){o=p,r=p.return;try{n=o,g.props=n.memoizedProps,g.state=n.memoizedState,g.componentWillUnmount()}catch(v){Oe(o,r,v)}}break;case 5:Wo(p,p.return);break;case 22:if(p.memoizedState!==null){Ny(f);continue}}m!==null?(m.return=p,re=m):Ny(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Jx("display",a))}catch(v){Oe(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){Oe(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ut(n,e),fn(e),o&4&&Ey(e);break;case 21:break;default:Ut(n,e),fn(e)}}function fn(e){var n=e.flags;if(n&2){try{e:{for(var r=e.return;r!==null;){if(E1(r)){var o=r;break e}r=r.return}throw Error(q(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&(Ms(i,""),o.flags&=-33);var s=Cy(e);ep(e,s,i);break;case 3:case 4:var a=o.stateNode.containerInfo,l=Cy(e);Jd(e,l,a);break;default:throw Error(q(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function mM(e,n,r){re=e,P1(e)}function P1(e,n,r){for(var o=(e.mode&1)!==0;re!==null;){var i=re,s=i.child;if(i.tag===22&&o){var a=i.memoizedState!==null||qa;if(!a){var l=i.alternate,c=l!==null&&l.memoizedState!==null||et;l=qa;var u=et;if(qa=a,(et=c)&&!u)for(re=i;re!==null;)a=re,c=a.child,a.tag===22&&a.memoizedState!==null?Py(i):c!==null?(c.return=a,re=c):Py(i);for(;s!==null;)re=s,P1(s),s=s.sibling;re=i,qa=l,et=u}ky(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,re=s):ky(e)}}function ky(e){for(;re!==null;){var n=re;if(n.flags&8772){var r=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:et||au(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!et)if(r===null)o.componentDidMount();else{var i=n.elementType===n.type?r.memoizedProps:Xt(n.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var s=n.updateQueue;s!==null&&uy(n,s,o);break;case 3:var a=n.updateQueue;if(a!==null){if(r=null,n.child!==null)switch(n.child.tag){case 5:r=n.child.stateNode;break;case 1:r=n.child.stateNode}uy(n,a,r)}break;case 5:var l=n.stateNode;if(r===null&&n.flags&4){r=l;var c=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var u=n.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&js(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}et||n.flags&512&&Qd(n)}catch(p){Oe(n,n.return,p)}}if(n===e){re=null;break}if(r=n.sibling,r!==null){r.return=n.return,re=r;break}re=n.return}}function Ny(e){for(;re!==null;){var n=re;if(n===e){re=null;break}var r=n.sibling;if(r!==null){r.return=n.return,re=r;break}re=n.return}}function Py(e){for(;re!==null;){var n=re;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{au(4,n)}catch(c){Oe(n,r,c)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var i=n.return;try{o.componentDidMount()}catch(c){Oe(n,i,c)}}var s=n.return;try{Qd(n)}catch(c){Oe(n,s,c)}break;case 5:var a=n.return;try{Qd(n)}catch(c){Oe(n,a,c)}}}catch(c){Oe(n,n.return,c)}if(n===e){re=null;break}var l=n.sibling;if(l!==null){l.return=n.return,re=l;break}re=n.return}}var gM=Math.ceil,fc=Xn.ReactCurrentDispatcher,Lh=Xn.ReactCurrentOwner,Vt=Xn.ReactCurrentBatchConfig,me=0,Ue=null,Le=null,Ye=0,_t=0,Uo=Tr(0),Be=0,Us=null,so=0,lu=0,zh=0,bs=null,ft=null,Fh=0,ui=1/0,Tn=null,dc=!1,tp=null,wr=null,Za=!1,pr=null,pc=0,_s=0,np=null,Tl=-1,Il=0;function it(){return me&6?De():Tl!==-1?Tl:Tl=De()}function br(e){return e.mode&1?me&2&&Ye!==0?Ye&-Ye:JR.transition!==null?(Il===0&&(Il=dw()),Il):(e=ve,e!==0||(e=window.event,e=e===void 0?16:xw(e.type)),e):1}function rn(e,n,r,o){if(50<_s)throw _s=0,np=null,Error(q(185));ca(e,r,o),(!(me&2)||e!==Ue)&&(e===Ue&&(!(me&2)&&(lu|=r),Be===4&&ur(e,Ye)),gt(e,o),r===1&&me===0&&!(n.mode&1)&&(ui=De()+500,ou&&Ir()))}function gt(e,n){var r=e.callbackNode;JP(e,n);var o=ql(e,e===Ue?Ye:0);if(o===0)r!==null&&Dg(r),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(r!=null&&Dg(r),n===1)e.tag===0?QR(Ry.bind(null,e)):Lw(Ry.bind(null,e)),XR(function(){!(me&6)&&Ir()}),r=null;else{switch(pw(o)){case 1:r=dh;break;case 4:r=uw;break;case 16:r=Kl;break;case 536870912:r=fw;break;default:r=Kl}r=O1(r,R1.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function R1(e,n){if(Tl=-1,Il=0,me&6)throw Error(q(327));var r=e.callbackNode;if(Jo()&&e.callbackNode!==r)return null;var o=ql(e,e===Ue?Ye:0);if(o===0)return null;if(o&30||o&e.expiredLanes||n)n=hc(e,o);else{n=o;var i=me;me|=2;var s=A1();(Ue!==e||Ye!==n)&&(Tn=null,ui=De()+500,Qr(e,n));do try{xM();break}catch(l){M1(e,l)}while(!0);Eh(),fc.current=s,me=i,Le!==null?n=0:(Ue=null,Ye=0,n=Be)}if(n!==0){if(n===2&&(i=Rd(e),i!==0&&(o=i,n=rp(e,i))),n===1)throw r=Us,Qr(e,0),ur(e,o),gt(e,De()),r;if(n===6)ur(e,o);else{if(i=e.current.alternate,!(o&30)&&!yM(i)&&(n=hc(e,o),n===2&&(s=Rd(e),s!==0&&(o=s,n=rp(e,s))),n===1))throw r=Us,Qr(e,0),ur(e,o),gt(e,De()),r;switch(e.finishedWork=i,e.finishedLanes=o,n){case 0:case 1:throw Error(q(345));case 2:Ur(e,ft,Tn);break;case 3:if(ur(e,o),(o&130023424)===o&&(n=Fh+500-De(),10<n)){if(ql(e,0)!==0)break;if(i=e.suspendedLanes,(i&o)!==o){it(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Dd(Ur.bind(null,e,ft,Tn),n);break}Ur(e,ft,Tn);break;case 4:if(ur(e,o),(o&4194240)===o)break;for(n=e.eventTimes,i=-1;0<o;){var a=31-nn(o);s=1<<a,a=n[a],a>i&&(i=a),o&=~s}if(o=i,o=De()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*gM(o/1960))-o,10<o){e.timeoutHandle=Dd(Ur.bind(null,e,ft,Tn),o);break}Ur(e,ft,Tn);break;case 5:Ur(e,ft,Tn);break;default:throw Error(q(329))}}}return gt(e,De()),e.callbackNode===r?R1.bind(null,e):null}function rp(e,n){var r=bs;return e.current.memoizedState.isDehydrated&&(Qr(e,n).flags|=256),e=hc(e,n),e!==2&&(n=ft,ft=r,n!==null&&op(n)),e}function op(e){ft===null?ft=e:ft.push.apply(ft,e)}function yM(e){for(var n=e;;){if(n.flags&16384){var r=n.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var i=r[o],s=i.getSnapshot;i=i.value;try{if(!on(s(),i))return!1}catch{return!1}}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ur(e,n){for(n&=~zh,n&=~lu,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var r=31-nn(n),o=1<<r;e[r]=-1,n&=~o}}function Ry(e){if(me&6)throw Error(q(327));Jo();var n=ql(e,0);if(!(n&1))return gt(e,De()),null;var r=hc(e,n);if(e.tag!==0&&r===2){var o=Rd(e);o!==0&&(n=o,r=rp(e,o))}if(r===1)throw r=Us,Qr(e,0),ur(e,n),gt(e,De()),r;if(r===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Ur(e,ft,Tn),gt(e,De()),null}function Vh(e,n){var r=me;me|=1;try{return e(n)}finally{me=r,me===0&&(ui=De()+500,ou&&Ir())}}function ao(e){pr!==null&&pr.tag===0&&!(me&6)&&Jo();var n=me;me|=1;var r=Vt.transition,o=ve;try{if(Vt.transition=null,ve=1,e)return e()}finally{ve=o,Vt.transition=r,me=n,!(me&6)&&Ir()}}function Bh(){_t=Uo.current,Ee(Uo)}function Qr(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,YR(r)),Le!==null)for(r=Le.return;r!==null;){var o=r;switch(_h(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&tc();break;case 3:li(),Ee(ht),Ee(nt),Ah();break;case 5:Mh(o);break;case 4:li();break;case 13:Ee(Ae);break;case 19:Ee(Ae);break;case 10:kh(o.type._context);break;case 22:case 23:Bh()}r=r.return}if(Ue=e,Le=e=_r(e.current,null),Ye=_t=n,Be=0,Us=null,zh=lu=so=0,ft=bs=null,Kr!==null){for(n=0;n<Kr.length;n++)if(r=Kr[n],o=r.interleaved,o!==null){r.interleaved=null;var i=o.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,o.next=a}r.pending=o}Kr=null}return e}function M1(e,n){do{var r=Le;try{if(Eh(),Rl.current=uc,cc){for(var o=Te.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}cc=!1}if(io=0,We=Ve=Te=null,xs=!1,Bs=0,Lh.current=null,r===null||r.return===null){Be=1,Us=n,Le=null;break}e:{var s=e,a=r.return,l=r,c=n;if(n=Ye,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=gy(a);if(m!==null){m.flags&=-257,yy(m,a,l,s,n),m.mode&1&&my(s,u,n),n=m,c=u;var g=n.updateQueue;if(g===null){var v=new Set;v.add(c),n.updateQueue=v}else g.add(c);break e}else{if(!(n&1)){my(s,u,n),Hh();break e}c=Error(q(426))}}else if(Ne&&l.mode&1){var _=gy(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),yy(_,a,l,s,n),Sh(ci(c,l));break e}}s=c=ci(c,l),Be!==4&&(Be=2),bs===null?bs=[s]:bs.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,n&=-n,s.lanes|=n;var y=p1(s,c,n);cy(s,y);break e;case 1:l=c;var w=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(wr===null||!wr.has(x)))){s.flags|=65536,n&=-n,s.lanes|=n;var S=h1(s,l,n);cy(s,S);break e}}s=s.return}while(s!==null)}I1(r)}catch(C){n=C,Le===r&&r!==null&&(Le=r=r.return);continue}break}while(!0)}function A1(){var e=fc.current;return fc.current=uc,e===null?uc:e}function Hh(){(Be===0||Be===3||Be===2)&&(Be=4),Ue===null||!(so&268435455)&&!(lu&268435455)||ur(Ue,Ye)}function hc(e,n){var r=me;me|=2;var o=A1();(Ue!==e||Ye!==n)&&(Tn=null,Qr(e,n));do try{vM();break}catch(i){M1(e,i)}while(!0);if(Eh(),me=r,fc.current=o,Le!==null)throw Error(q(261));return Ue=null,Ye=0,Be}function vM(){for(;Le!==null;)T1(Le)}function xM(){for(;Le!==null&&!WP();)T1(Le)}function T1(e){var n=$1(e.alternate,e,_t);e.memoizedProps=e.pendingProps,n===null?I1(e):Le=n,Lh.current=null}function I1(e){var n=e;do{var r=n.alternate;if(e=n.return,n.flags&32768){if(r=dM(r,n),r!==null){r.flags&=32767,Le=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Be=6,Le=null;return}}else if(r=fM(r,n,_t),r!==null){Le=r;return}if(n=n.sibling,n!==null){Le=n;return}Le=n=e}while(n!==null);Be===0&&(Be=5)}function Ur(e,n,r){var o=ve,i=Vt.transition;try{Vt.transition=null,ve=1,wM(e,n,r,o)}finally{Vt.transition=i,ve=o}return null}function wM(e,n,r,o){do Jo();while(pr!==null);if(me&6)throw Error(q(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(eR(e,s),e===Ue&&(Le=Ue=null,Ye=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Za||(Za=!0,O1(Kl,function(){return Jo(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Vt.transition,Vt.transition=null;var a=ve;ve=1;var l=me;me|=4,Lh.current=null,hM(e,r),N1(r,e),FR($d),Zl=!!jd,$d=jd=null,e.current=r,mM(r),UP(),me=l,ve=a,Vt.transition=s}else e.current=r;if(Za&&(Za=!1,pr=e,pc=i),s=e.pendingLanes,s===0&&(wr=null),XP(r.stateNode),gt(e,De()),n!==null)for(o=e.onRecoverableError,r=0;r<n.length;r++)i=n[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(dc)throw dc=!1,e=tp,tp=null,e;return pc&1&&e.tag!==0&&Jo(),s=e.pendingLanes,s&1?e===np?_s++:(_s=0,np=e):_s=0,Ir(),null}function Jo(){if(pr!==null){var e=pw(pc),n=Vt.transition,r=ve;try{if(Vt.transition=null,ve=16>e?16:e,pr===null)var o=!1;else{if(e=pr,pr=null,pc=0,me&6)throw Error(q(331));var i=me;for(me|=4,re=e.current;re!==null;){var s=re,a=s.child;if(re.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var d=re;switch(d.tag){case 0:case 11:case 15:ws(8,d,s)}var f=d.child;if(f!==null)f.return=d,re=f;else for(;re!==null;){d=re;var p=d.sibling,m=d.return;if(C1(d),d===u){re=null;break}if(p!==null){p.return=m,re=p;break}re=m}}}var g=s.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}re=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,re=a;else e:for(;re!==null;){if(s=re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ws(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,re=y;break e}re=s.return}}var w=e.current;for(re=w;re!==null;){a=re;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,re=x;else e:for(a=w;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:au(9,l)}}catch(C){Oe(l,l.return,C)}if(l===a){re=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,re=S;break e}re=l.return}}if(me=i,Ir(),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Jc,e)}catch{}o=!0}return o}finally{ve=r,Vt.transition=n}}return!1}function My(e,n,r){n=ci(r,n),n=p1(e,n,1),e=xr(e,n,1),n=it(),e!==null&&(ca(e,1,n),gt(e,n))}function Oe(e,n,r){if(e.tag===3)My(e,e,r);else for(;n!==null;){if(n.tag===3){My(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(wr===null||!wr.has(o))){e=ci(r,e),e=h1(n,e,1),n=xr(n,e,1),e=it(),n!==null&&(ca(n,1,e),gt(n,e));break}}n=n.return}}function bM(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),n=it(),e.pingedLanes|=e.suspendedLanes&r,Ue===e&&(Ye&r)===r&&(Be===4||Be===3&&(Ye&130023424)===Ye&&500>De()-Fh?Qr(e,0):zh|=r),gt(e,n)}function j1(e,n){n===0&&(e.mode&1?(n=Va,Va<<=1,!(Va&130023424)&&(Va=4194304)):n=1);var r=it();e=Hn(e,n),e!==null&&(ca(e,n,r),gt(e,r))}function _M(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),j1(e,r)}function SM(e,n){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(q(314))}o!==null&&o.delete(n),j1(e,r)}var $1;$1=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||ht.current)dt=!0;else{if(!(e.lanes&r)&&!(n.flags&128))return dt=!1,uM(e,n,r);dt=!!(e.flags&131072)}else dt=!1,Ne&&n.flags&1048576&&zw(n,oc,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;Al(e,n),e=n.pendingProps;var i=ii(n,nt.current);Qo(n,r),i=Ih(null,n,o,e,i,r);var s=jh();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,mt(o)?(s=!0,nc(n)):s=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ph(n),i.updater=su,n.stateNode=i,i._reactInternals=n,Wd(n,o,e,r),n=Yd(null,n,o,!0,s,r)):(n.tag=0,Ne&&s&&bh(n),rt(null,n,i,r),n=n.child),n;case 16:o=n.elementType;e:{switch(Al(e,n),e=n.pendingProps,i=o._init,o=i(o._payload),n.type=o,i=n.tag=EM(o),e=Xt(o,e),i){case 0:n=Gd(null,n,o,e,r);break e;case 1:n=wy(null,n,o,e,r);break e;case 11:n=vy(null,n,o,e,r);break e;case 14:n=xy(null,n,o,Xt(o.type,e),r);break e}throw Error(q(306,o,""))}return n;case 0:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),Gd(e,n,o,i,r);case 1:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),wy(e,n,o,i,r);case 3:e:{if(v1(n),e===null)throw Error(q(387));o=n.pendingProps,s=n.memoizedState,i=s.element,Uw(e,n),ac(n,o,null,r);var a=n.memoizedState;if(o=a.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=s,n.memoizedState=s,n.flags&256){i=ci(Error(q(423)),n),n=by(e,n,o,r,i);break e}else if(o!==i){i=ci(Error(q(424)),n),n=by(e,n,o,r,i);break e}else for(Ct=vr(n.stateNode.containerInfo.firstChild),Et=n,Ne=!0,Zt=null,r=Hw(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(si(),o===i){n=Wn(e,n,r);break e}rt(e,n,o,r)}n=n.child}return n;case 5:return Gw(n),e===null&&Vd(n),o=n.type,i=n.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Od(o,i)?a=null:s!==null&&Od(o,s)&&(n.flags|=32),y1(e,n),rt(e,n,a,r),n.child;case 6:return e===null&&Vd(n),null;case 13:return x1(e,n,r);case 4:return Rh(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=ai(n,null,o,r):rt(e,n,o,r),n.child;case 11:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),vy(e,n,o,i,r);case 7:return rt(e,n,n.pendingProps,r),n.child;case 8:return rt(e,n,n.pendingProps.children,r),n.child;case 12:return rt(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(o=n.type._context,i=n.pendingProps,s=n.memoizedProps,a=i.value,be(ic,o._currentValue),o._currentValue=a,s!==null)if(on(s.value,a)){if(s.children===i.children&&!ht.current){n=Wn(e,n,r);break e}}else for(s=n.child,s!==null&&(s.return=n);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var c=l.firstContext;c!==null;){if(c.context===o){if(s.tag===1){c=zn(-1,r&-r),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),Bd(s.return,r,n),l.lanes|=r;break}c=c.next}}else if(s.tag===10)a=s.type===n.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(q(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Bd(a,r,n),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===n){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}rt(e,n,i.children,r),n=n.child}return n;case 9:return i=n.type,o=n.pendingProps.children,Qo(n,r),i=Ht(i),o=o(i),n.flags|=1,rt(e,n,o,r),n.child;case 14:return o=n.type,i=Xt(o,n.pendingProps),i=Xt(o.type,i),xy(e,n,o,i,r);case 15:return m1(e,n,n.type,n.pendingProps,r);case 17:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:Xt(o,i),Al(e,n),n.tag=1,mt(o)?(e=!0,nc(n)):e=!1,Qo(n,r),d1(n,o,i),Wd(n,o,i,r),Yd(null,n,o,!0,e,r);case 19:return w1(e,n,r);case 22:return g1(e,n,r)}throw Error(q(156,n.tag))};function O1(e,n){return cw(e,n)}function CM(e,n,r,o){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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,n,r,o){return new CM(e,n,r,o)}function Wh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function EM(e){if(typeof e=="function")return Wh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ch)return 11;if(e===uh)return 14}return 2}function _r(e,n){var r=e.alternate;return r===null?(r=Ft(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,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,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function jl(e,n,r,o,i,s){var a=2;if(o=e,typeof e=="function")Wh(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case $o:return Jr(r.children,i,s,n);case lh:a=8,i|=8;break;case hd:return e=Ft(12,r,n,i|2),e.elementType=hd,e.lanes=s,e;case md:return e=Ft(13,r,n,i),e.elementType=md,e.lanes=s,e;case gd:return e=Ft(19,r,n,i),e.elementType=gd,e.lanes=s,e;case Gx:return cu(r,i,s,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wx:a=10;break e;case Ux:a=9;break e;case ch:a=11;break e;case uh:a=14;break e;case sr:a=16,o=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return n=Ft(a,r,n,i),n.elementType=e,n.type=o,n.lanes=s,n}function Jr(e,n,r,o){return e=Ft(7,e,o,n),e.lanes=r,e}function cu(e,n,r,o){return e=Ft(22,e,o,n),e.elementType=Gx,e.lanes=r,e.stateNode={isHidden:!1},e}function Tf(e,n,r){return e=Ft(6,e,null,n),e.lanes=r,e}function If(e,n,r){return n=Ft(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function kM(e,n,r,o,i){this.tag=n,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=pf(0),this.expirationTimes=pf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pf(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uh(e,n,r,o,i,s,a,l,c){return e=new kM(e,n,r,l,c),n===1?(n=1,s===!0&&(n|=8)):n=0,s=Ft(3,null,null,n),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ph(s),e}function NM(e,n,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jo,key:o==null?null:""+o,children:e,containerInfo:n,implementation:r}}function D1(e){if(!e)return Nr;e=e._reactInternals;e:{if(vo(e)!==e||e.tag!==1)throw Error(q(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(mt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(q(171))}if(e.tag===1){var r=e.type;if(mt(r))return Dw(e,r,n)}return n}function L1(e,n,r,o,i,s,a,l,c){return e=Uh(r,o,!0,e,i,s,a,l,c),e.context=D1(null),r=e.current,o=it(),i=br(r),s=zn(o,i),s.callback=n??null,xr(r,s,i),e.current.lanes=i,ca(e,i,o),gt(e,o),e}function uu(e,n,r,o){var i=n.current,s=it(),a=br(i);return r=D1(r),n.context===null?n.context=r:n.pendingContext=r,n=zn(s,a),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=xr(i,n,a),e!==null&&(rn(e,i,a,s),Pl(e,i,a)),a}function mc(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 Ay(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function Gh(e,n){Ay(e,n),(e=e.alternate)&&Ay(e,n)}function PM(){return null}var z1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yh(e){this._internalRoot=e}fu.prototype.render=Yh.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(q(409));uu(e,n,null,null)};fu.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ao(function(){uu(null,e,null,null)}),n[Bn]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var n=gw();e={blockedOn:null,target:e,priority:n};for(var r=0;r<cr.length&&n!==0&&n<cr[r].priority;r++);cr.splice(r,0,e),r===0&&vw(e)}};function Xh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ty(){}function RM(e,n,r,o,i){if(i){if(typeof o=="function"){var s=o;o=function(){var u=mc(a);s.call(u)}}var a=L1(n,o,e,0,null,!1,!1,"",Ty);return e._reactRootContainer=a,e[Bn]=a.current,Ds(e.nodeType===8?e.parentNode:e),ao(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof o=="function"){var l=o;o=function(){var u=mc(c);l.call(u)}}var c=Uh(e,0,!1,null,null,!1,!1,"",Ty);return e._reactRootContainer=c,e[Bn]=c.current,Ds(e.nodeType===8?e.parentNode:e),ao(function(){uu(n,c,r,o)}),c}function pu(e,n,r,o,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var l=i;i=function(){var c=mc(a);l.call(c)}}uu(n,a,e,i)}else a=RM(r,n,e,i,o);return mc(a)}hw=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=ss(n.pendingLanes);r!==0&&(ph(n,r|1),gt(n,De()),!(me&6)&&(ui=De()+500,Ir()))}break;case 13:ao(function(){var o=Hn(e,1);if(o!==null){var i=it();rn(o,e,1,i)}}),Gh(e,1)}};hh=function(e){if(e.tag===13){var n=Hn(e,134217728);if(n!==null){var r=it();rn(n,e,134217728,r)}Gh(e,134217728)}};mw=function(e){if(e.tag===13){var n=br(e),r=Hn(e,n);if(r!==null){var o=it();rn(r,e,n,o)}Gh(e,n)}};gw=function(){return ve};yw=function(e,n){var r=ve;try{return ve=e,n()}finally{ve=r}};kd=function(e,n,r){switch(n){case"input":if(xd(e,r),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var i=ru(o);if(!i)throw Error(q(90));Xx(o),xd(o,i)}}}break;case"textarea":qx(e,r);break;case"select":n=r.value,n!=null&&Xo(e,!!r.multiple,n,!1)}};rw=Vh;ow=ao;var MM={usingClientEntryPoint:!1,Events:[fa,zo,ru,tw,nw,Vh]},Gi={findFiberByHostInstance:Xr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AM={bundleType:Gi.bundleType,version:Gi.version,rendererPackageName:Gi.rendererPackageName,rendererConfig:Gi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=aw(e),e===null?null:e.stateNode},findFiberByHostInstance:Gi.findFiberByHostInstance||PM,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 Qa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qa.isDisabled&&Qa.supportsFiber)try{Jc=Qa.inject(AM),vn=Qa}catch{}}Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MM;Mt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xh(n))throw Error(q(200));return NM(e,n,null,r)};Mt.createRoot=function(e,n){if(!Xh(e))throw Error(q(299));var r=!1,o="",i=z1;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),n=Uh(e,1,!1,null,null,r,!1,o,i),e[Bn]=n.current,Ds(e.nodeType===8?e.parentNode:e),new Yh(n)};Mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=aw(n),e=e===null?null:e.stateNode,e};Mt.flushSync=function(e){return ao(e)};Mt.hydrate=function(e,n,r){if(!du(n))throw Error(q(200));return pu(null,e,n,!0,r)};Mt.hydrateRoot=function(e,n,r){if(!Xh(e))throw Error(q(405));var o=r!=null&&r.hydratedSources||null,i=!1,s="",a=z1;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),n=L1(n,null,e,1,r??null,i,!1,s,a),e[Bn]=n.current,Ds(e),o)for(e=0;e<o.length;e++)r=o[e],i=r._getVersion,i=i(r._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[r,i]:n.mutableSourceEagerHydrationData.push(r,i);return new fu(n)};Mt.render=function(e,n,r){if(!du(n))throw Error(q(200));return pu(null,e,n,!1,r)};Mt.unmountComponentAtNode=function(e){if(!du(e))throw Error(q(40));return e._reactRootContainer?(ao(function(){pu(null,null,e,!1,function(){e._reactRootContainer=null,e[Bn]=null})}),!0):!1};Mt.unstable_batchedUpdates=Vh;Mt.unstable_renderSubtreeIntoContainer=function(e,n,r,o){if(!du(r))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return pu(e,n,r,!1,o)};Mt.version="18.3.1-next-f1338f8080-20240426";function F1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F1)}catch(e){console.error(e)}}F1(),Fx.exports=Mt;var xo=Fx.exports;const TM=qc(xo);var Iy=xo;dd.createRoot=Iy.createRoot,dd.hydrateRoot=Iy.hydrateRoot;/**
41
- * @remix-run/router v1.23.2
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Gs.apply(this,arguments)}var hr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(hr||(hr={}));const jy="popstate";function IM(e){e===void 0&&(e={});function n(o,i){let{pathname:s,search:a,hash:l}=o.location;return ip("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:gc(i)}return $M(n,r,null,e)}function Ie(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Kh(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function jM(){return Math.random().toString(36).substr(2,8)}function $y(e,n){return{usr:e.state,key:e.key,idx:n}}function ip(e,n,r,o){return r===void 0&&(r=null),Gs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Ni(n):n,{state:r,key:n&&n.key||o||jM()})}function gc(e){let{pathname:n="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ni(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function $M(e,n,r,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:s=!1}=o,a=i.history,l=hr.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(Gs({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function f(){l=hr.Pop;let _=d(),y=_==null?null:_-u;u=_,c&&c({action:l,location:v.location,delta:y})}function p(_,y){l=hr.Push;let w=ip(v.location,_,y);u=d()+1;let x=$y(w,u),S=v.createHref(w);try{a.pushState(x,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&c&&c({action:l,location:v.location,delta:1})}function m(_,y){l=hr.Replace;let w=ip(v.location,_,y);u=d();let x=$y(w,u),S=v.createHref(w);a.replaceState(x,"",S),s&&c&&c({action:l,location:v.location,delta:0})}function g(_){let y=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof _=="string"?_:gc(_);return w=w.replace(/ $/,"%20"),Ie(y,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,y)}let v={get action(){return l},get location(){return e(i,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(jy,f),c=_,()=>{i.removeEventListener(jy,f),c=null}},createHref(_){return n(i,_)},createURL:g,encodeLocation(_){let y=g(_);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:m,go(_){return a.go(_)}};return v}var Oy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Oy||(Oy={}));function OM(e,n,r){return r===void 0&&(r="/"),DM(e,n,r)}function DM(e,n,r,o){let i=typeof n=="string"?Ni(n):n,s=fi(i.pathname||"/",r);if(s==null)return null;let a=V1(e);LM(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=KM(s);l=YM(a[c],u)}return l}function V1(e,n,r,o){n===void 0&&(n=[]),r===void 0&&(r=[]),o===void 0&&(o="");let i=(s,a,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(Ie(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let u=Sr([o,c.relativePath]),d=r.concat(c);s.children&&s.children.length>0&&(Ie(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),V1(s.children,n,d,u)),!(s.path==null&&!s.index)&&n.push({path:u,score:UM(u,s.index),routesMeta:d})};return e.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let c of B1(s.path))i(s,a,c)}),n}function B1(e){let n=e.split("/");if(n.length===0)return[];let[r,...o]=n,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let a=B1(o.join("/")),l=[];return l.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function LM(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:GM(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const zM=/^:[\w-]+$/,FM=3,VM=2,BM=1,HM=10,WM=-2,Dy=e=>e==="*";function UM(e,n){let r=e.split("/"),o=r.length;return r.some(Dy)&&(o+=WM),n&&(o+=VM),r.filter(i=>!Dy(i)).reduce((i,s)=>i+(zM.test(s)?FM:s===""?BM:HM),o)}function GM(e,n){return e.length===n.length&&e.slice(0,-1).every((o,i)=>o===n[i])?e[e.length-1]-n[n.length-1]:0}function YM(e,n,r){let{routesMeta:o}=e,i={},s="/",a=[];for(let l=0;l<o.length;++l){let c=o[l],u=l===o.length-1,d=s==="/"?n:n.slice(s.length)||"/",f=sp({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!f)return null;Object.assign(i,f.params),a.push({params:i,pathname:Sr([s,f.pathname]),pathnameBase:eA(Sr([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=Sr([s,f.pathnameBase]))}return a}function sp(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=XM(e.path,e.caseSensitive,e.end),i=n.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:o.reduce((u,d,f)=>{let{paramName:p,isOptional:m}=d;if(p==="*"){let v=l[f]||"";a=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const g=l[f];return m&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function XM(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),Kh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]}function KM(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Kh(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function fi(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}const qM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ZM=e=>qM.test(e);function QM(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?Ni(e):e,s;if(r)if(ZM(r))s=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),Kh(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?s=Ly(r.substring(1),"/"):s=Ly(r,n)}else s=n;return{pathname:s,search:tA(o),hash:nA(i)}}function Ly(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function jf(e,n,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function JM(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function qh(e,n){let r=JM(e);return n?r.map((o,i)=>i===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function Zh(e,n,r,o){o===void 0&&(o=!1);let i;typeof e=="string"?i=Ni(e):(i=Gs({},e),Ie(!i.pathname||!i.pathname.includes("?"),jf("?","pathname","search",i)),Ie(!i.pathname||!i.pathname.includes("#"),jf("#","pathname","hash",i)),Ie(!i.search||!i.search.includes("#"),jf("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,l;if(a==null)l=r;else{let f=n.length-1;if(!o&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}l=f>=0?n[f]:"/"}let c=QM(i,l),u=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Sr=e=>e.join("/").replace(/\/\/+/g,"/"),eA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const H1=["post","put","patch","delete"];new Set(H1);const oA=["get",...H1];new Set(oA);/**
50
- * React Router v6.30.3
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ys.apply(this,arguments)}const hu=h.createContext(null),W1=h.createContext(null),Kn=h.createContext(null),mu=h.createContext(null),jr=h.createContext({outlet:null,matches:[],isDataRoute:!1}),U1=h.createContext(null);function iA(e,n){let{relative:r}=n===void 0?{}:n;Pi()||Ie(!1);let{basename:o,navigator:i}=h.useContext(Kn),{hash:s,pathname:a,search:l}=gu(e,{relative:r}),c=a;return o!=="/"&&(c=a==="/"?o:Sr([o,a])),i.createHref({pathname:c,search:l,hash:s})}function Pi(){return h.useContext(mu)!=null}function Ri(){return Pi()||Ie(!1),h.useContext(mu).location}function G1(e){h.useContext(Kn).static||h.useLayoutEffect(e)}function Y1(){let{isDataRoute:e}=h.useContext(jr);return e?vA():sA()}function sA(){Pi()||Ie(!1);let e=h.useContext(hu),{basename:n,future:r,navigator:o}=h.useContext(Kn),{matches:i}=h.useContext(jr),{pathname:s}=Ri(),a=JSON.stringify(qh(i,r.v7_relativeSplatPath)),l=h.useRef(!1);return G1(()=>{l.current=!0}),h.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){o.go(u);return}let f=Zh(u,JSON.parse(a),s,d.relative==="path");e==null&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Sr([n,f.pathname])),(d.replace?o.replace:o.push)(f,d.state,d)},[n,o,a,s,e])}function gu(e,n){let{relative:r}=n===void 0?{}:n,{future:o}=h.useContext(Kn),{matches:i}=h.useContext(jr),{pathname:s}=Ri(),a=JSON.stringify(qh(i,o.v7_relativeSplatPath));return h.useMemo(()=>Zh(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function aA(e,n){return lA(e,n)}function lA(e,n,r,o){Pi()||Ie(!1);let{navigator:i}=h.useContext(Kn),{matches:s}=h.useContext(jr),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Ri(),d;if(n){var f;let _=typeof n=="string"?Ni(n):n;c==="/"||(f=_.pathname)!=null&&f.startsWith(c)||Ie(!1),d=_}else d=u;let p=d.pathname||"/",m=p;if(c!=="/"){let _=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=OM(e,{pathname:m}),v=pA(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:Sr([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:Sr([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,o);return n&&v?h.createElement(mu.Provider,{value:{location:Ys({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:hr.Pop}},v):v}function cA(){let e=yA(),n=rA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},n),r?h.createElement("pre",{style:i},r):null,null)}const uA=h.createElement(cA,null);class fA extends h.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){console.error("React Router caught the following error during render",n,r)}render(){return this.state.error!==void 0?h.createElement(jr.Provider,{value:this.props.routeContext},h.createElement(U1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dA(e){let{routeContext:n,match:r,children:o}=e,i=h.useContext(hu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(jr.Provider,{value:n},o)}function pA(e,n,r,o){var i;if(n===void 0&&(n=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let d=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Ie(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:m}=r,g=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,p)=>{let m,g=!1,v=null,_=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||uA,c&&(u<0&&p===0?(xA("route-fallback"),g=!0,_=null):u===p&&(g=!0,_=f.route.hydrateFallbackElement||null)));let y=n.concat(a.slice(0,p+1)),w=()=>{let x;return m?x=v:g?x=_:f.route.Component?x=h.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,h.createElement(dA,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(fA,{location:r.location,revalidation:r.revalidation,component:v,error:m,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):w()},null)}var X1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(X1||{}),K1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(K1||{});function hA(e){let n=h.useContext(hu);return n||Ie(!1),n}function mA(e){let n=h.useContext(W1);return n||Ie(!1),n}function gA(e){let n=h.useContext(jr);return n||Ie(!1),n}function q1(e){let n=gA(),r=n.matches[n.matches.length-1];return r.route.id||Ie(!1),r.route.id}function yA(){var e;let n=h.useContext(U1),r=mA(),o=q1();return n!==void 0?n:(e=r.errors)==null?void 0:e[o]}function vA(){let{router:e}=hA(X1.UseNavigateStable),n=q1(K1.UseNavigateStable),r=h.useRef(!1);return G1(()=>{r.current=!0}),h.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ys({fromRouteId:n},s)))},[e,n])}const zy={};function xA(e,n,r){zy[e]||(zy[e]=!0)}function wA(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function bA(e){let{to:n,replace:r,state:o,relative:i}=e;Pi()||Ie(!1);let{future:s,static:a}=h.useContext(Kn),{matches:l}=h.useContext(jr),{pathname:c}=Ri(),u=Y1(),d=Zh(n,qh(l,s.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(d);return h.useEffect(()=>u(JSON.parse(f),{replace:r,state:o,relative:i}),[u,f,i,r,o]),null}function Gr(e){Ie(!1)}function _A(e){let{basename:n="/",children:r=null,location:o,navigationType:i=hr.Pop,navigator:s,static:a=!1,future:l}=e;Pi()&&Ie(!1);let c=n.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:c,navigator:s,static:a,future:Ys({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof o=="string"&&(o=Ni(o));let{pathname:d="/",search:f="",hash:p="",state:m=null,key:g="default"}=o,v=h.useMemo(()=>{let _=fi(d,c);return _==null?null:{location:{pathname:_,search:f,hash:p,state:m,key:g},navigationType:i}},[c,d,f,p,m,g,i]);return v==null?null:h.createElement(Kn.Provider,{value:u},h.createElement(mu.Provider,{children:r,value:v}))}function SA(e){let{children:n,location:r}=e;return aA(ap(n),r)}new Promise(()=>{});function ap(e,n){n===void 0&&(n=[]);let r=[];return h.Children.forEach(e,(o,i)=>{if(!h.isValidElement(o))return;let s=[...n,i];if(o.type===h.Fragment){r.push.apply(r,ap(o.props.children,s));return}o.type!==Gr&&Ie(!1),!o.props.index||!o.props.children||Ie(!1);let a={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(a.children=ap(o.props.children,s)),r.push(a)}),r}/**
59
- * React Router DOM v6.30.3
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},yc.apply(this,arguments)}function Z1(e,n){if(e==null)return{};var r={},o=Object.keys(e),i,s;for(s=0;s<o.length;s++)i=o[s],!(n.indexOf(i)>=0)&&(r[i]=e[i]);return r}function CA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function EA(e,n){return e.button===0&&(!n||n==="_self")&&!CA(e)}const kA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NA=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],PA="6";try{window.__reactRouterVersion=PA}catch{}const RA=h.createContext({isTransitioning:!1}),MA="startTransition",Fy=Qc[MA];function AA(e){let{basename:n,children:r,future:o,window:i}=e,s=h.useRef();s.current==null&&(s.current=IM({window:i,v5Compat:!0}));let a=s.current,[l,c]=h.useState({action:a.action,location:a.location}),{v7_startTransition:u}=o||{},d=h.useCallback(f=>{u&&Fy?Fy(()=>c(f)):c(f)},[c,u]);return h.useLayoutEffect(()=>a.listen(d),[a,d]),h.useEffect(()=>wA(o),[o]),h.createElement(_A,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a,future:o})}const TA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jA=h.forwardRef(function(n,r){let{onClick:o,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=n,p=Z1(n,kA),{basename:m}=h.useContext(Kn),g,v=!1;if(typeof u=="string"&&IA.test(u)&&(g=u,TA))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),C=fi(S.pathname,m);S.origin===x.origin&&C!=null?u=C+S.search+S.hash:v=!0}catch{}let _=iA(u,{relative:i}),y=DA(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:f});function w(x){o&&o(x),x.defaultPrevented||y(x)}return h.createElement("a",yc({},p,{href:g||_,onClick:v||s?o:w,ref:r,target:c}))}),$A=h.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:u,children:d}=n,f=Z1(n,NA),p=gu(c,{relative:f.relative}),m=Ri(),g=h.useContext(W1),{navigator:v,basename:_}=h.useContext(Kn),y=g!=null&&LA(p)&&u===!0,w=v.encodeLocation?v.encodeLocation(p).pathname:p.pathname,x=m.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(x=x.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&_&&(S=fi(S,_)||S);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let E=x===w||!a&&x.startsWith(w)&&x.charAt(C)==="/",k=S!=null&&(S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/"),N={isActive:E,isPending:k,isTransitioning:y},A=E?o:void 0,R;typeof s=="function"?R=s(N):R=[s,E?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(N):l;return h.createElement(jA,yc({},f,{"aria-current":A,className:R,ref:r,style:I,to:c,viewTransition:u}),typeof d=="function"?d(N):d)});var lp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lp||(lp={}));var Vy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vy||(Vy={}));function OA(e){let n=h.useContext(hu);return n||Ie(!1),n}function DA(e,n){let{target:r,replace:o,state:i,preventScrollReset:s,relative:a,viewTransition:l}=n===void 0?{}:n,c=Y1(),u=Ri(),d=gu(e,{relative:a});return h.useCallback(f=>{if(EA(f,r)){f.preventDefault();let p=o!==void 0?o:gc(u)===gc(d);c(e,{replace:p,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[u,c,d,o,i,r,e,s,a,l])}function LA(e,n){n===void 0&&(n={});let r=h.useContext(RA);r==null&&Ie(!1);let{basename:o}=OA(lp.useViewTransitionState),i=gu(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=fi(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=fi(r.nextLocation.pathname,o)||r.nextLocation.pathname;return sp(i.pathname,a)!=null||sp(i.pathname,s)!=null}const Q1=h.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function zA(){return h.useContext(Q1)}function FA(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function By(e){return e==="system"?FA():e}function VA({children:e}){const[n,r]=h.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[o,i]=h.useState(()=>By(localStorage.getItem("launchpod-theme")||"system")),s=h.useCallback(l=>{const c=By(l);i(c),document.documentElement.classList.toggle("dark",c==="dark")},[]),a=h.useCallback(l=>{r(l),localStorage.setItem("launchpod-theme",l),s(l)},[s]);return h.useEffect(()=>{s(n);const l=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{n==="system"&&s("system")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[n,s]),b.jsx(Q1.Provider,{value:{theme:n,resolvedTheme:o,setTheme:a},children:e})}function J1(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=J1(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function eb(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=J1(e))&&(o&&(o+=" "),o+=n);return o}const BA=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},HA=(e,n)=>({classGroupId:e,validator:n}),tb=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),vc="-",Hy=[],WA="arbitrary..",UA=e=>{const n=YA(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return GA(a);const l=a.split(vc),c=l[0]===""&&l.length>1?1:0;return nb(l,c,n)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],u=r[a];return c?u?BA(u,c):c:u||Hy}return r[a]||Hy}}},nb=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],s=r.nextPart.get(i);if(s){const u=nb(e,n+1,s);if(u)return u}const a=r.validators;if(a===null)return;const l=n===0?e.join(vc):e.slice(n).join(vc),c=a.length;for(let u=0;u<c;u++){const d=a[u];if(d.validator(l))return d.classGroupId}},GA=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?WA+o:void 0})(),YA=e=>{const{theme:n,classGroups:r}=e;return XA(r,n)},XA=(e,n)=>{const r=tb();for(const o in e){const i=e[o];Qh(i,r,o,n)}return r},Qh=(e,n,r,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];KA(a,n,r,o)}},KA=(e,n,r,o)=>{if(typeof e=="string"){qA(e,n,r);return}if(typeof e=="function"){ZA(e,n,r,o);return}QA(e,n,r,o)},qA=(e,n,r)=>{const o=e===""?n:rb(n,e);o.classGroupId=r},ZA=(e,n,r,o)=>{if(JA(e)){Qh(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(HA(r,e))},QA=(e,n,r,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];Qh(c,rb(n,l),r,o)}},rb=(e,n)=>{let r=e;const o=n.split(vc),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=r.nextPart.get(a);l||(l=tb(),r.nextPart.set(a,l)),r=l}return r},JA=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,eT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(s,a)=>{r[s]=a,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in r?r[s]=a:i(s,a)}}},cp="!",Wy=":",tT=[],Uy=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),nT=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const s=[];let a=0,l=0,c=0,u;const d=i.length;for(let v=0;v<d;v++){const _=i[v];if(a===0&&l===0){if(_===Wy){s.push(i.slice(c,v)),c=v+1;continue}if(_==="/"){u=v;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const f=s.length===0?i:i.slice(c);let p=f,m=!1;f.endsWith(cp)?(p=f.slice(0,-1),m=!0):f.startsWith(cp)&&(p=f.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Uy(s,m,p,g)};if(n){const i=n+Wy,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):Uy(tT,!1,a,void 0,!0)}if(r){const i=o;o=s=>r({className:s,parseClassName:i})}return o},rT=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let s=0;s<r.length;s++){const a=r[s],l=a[0]==="[",c=n.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},oT=e=>({cache:eT(e.cacheSize),parseClassName:nT(e),sortModifiers:rT(e),...UA(e)}),iT=/\s+/,sT=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s}=n,a=[],l=e.trim().split(iT);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=r(d);if(f){c=d+(c.length>0?" "+c:c);continue}let _=!!v,y=o(_?g.substring(0,v):g);if(!y){if(!_){c=d+(c.length>0?" "+c:c);continue}if(y=o(g),!y){c=d+(c.length>0?" "+c:c);continue}_=!1}const w=p.length===0?"":p.length===1?p[0]:s(p).join(":"),x=m?w+cp:w,S=x+y;if(a.indexOf(S)>-1)continue;a.push(S);const C=i(y,_);for(let E=0;E<C.length;++E){const k=C[E];a.push(x+k)}c=d+(c.length>0?" "+c:c)}return c},aT=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=ob(r))&&(i&&(i+=" "),i+=o);return i},ob=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=ob(e[o]))&&(r&&(r+=" "),r+=n);return r},lT=(e,...n)=>{let r,o,i,s;const a=c=>{const u=n.reduce((d,f)=>f(d),e());return r=oT(u),o=r.cache.get,i=r.cache.set,s=l,l(c)},l=c=>{const u=o(c);if(u)return u;const d=sT(c,r);return i(c,d),d};return s=a,(...c)=>s(aT(...c))},cT=[],Fe=e=>{const n=r=>r[e]||cT;return n.isThemeGetter=!0,n},ib=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,uT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,fT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dT=/\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$/,pT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jn=e=>uT.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),er=e=>!!e&&Number.isInteger(Number(e)),$f=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Nn=e=>fT.test(e),ab=()=>!0,gT=e=>dT.test(e)&&!pT.test(e),Jh=()=>!1,yT=e=>hT.test(e),vT=e=>mT.test(e),xT=e=>!oe(e)&&!ie(e),wT=e=>$r(e,ub,Jh),oe=e=>ib.test(e),Vr=e=>$r(e,fb,gT),Gy=e=>$r(e,PT,ue),bT=e=>$r(e,pb,ab),_T=e=>$r(e,db,Jh),Yy=e=>$r(e,lb,Jh),ST=e=>$r(e,cb,vT),Ja=e=>$r(e,hb,yT),ie=e=>sb.test(e),Yi=e=>wo(e,fb),CT=e=>wo(e,db),Xy=e=>wo(e,lb),ET=e=>wo(e,ub),kT=e=>wo(e,cb),el=e=>wo(e,hb,!0),NT=e=>wo(e,pb,!0),$r=(e,n,r)=>{const o=ib.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},wo=(e,n,r=!1)=>{const o=sb.exec(e);return o?o[1]?n(o[1]):r:!1},lb=e=>e==="position"||e==="percentage",cb=e=>e==="image"||e==="url",ub=e=>e==="length"||e==="size"||e==="bg-size",fb=e=>e==="length",PT=e=>e==="number",db=e=>e==="family-name",pb=e=>e==="number"||e==="weight",hb=e=>e==="shadow",RT=()=>{const e=Fe("color"),n=Fe("font"),r=Fe("text"),o=Fe("font-weight"),i=Fe("tracking"),s=Fe("leading"),a=Fe("breakpoint"),l=Fe("container"),c=Fe("spacing"),u=Fe("radius"),d=Fe("shadow"),f=Fe("inset-shadow"),p=Fe("text-shadow"),m=Fe("drop-shadow"),g=Fe("blur"),v=Fe("perspective"),_=Fe("aspect"),y=Fe("ease"),w=Fe("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),ie,oe],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],N=()=>[ie,oe,c],A=()=>[Jn,"full","auto",...N()],R=()=>[er,"none","subgrid",ie,oe],I=()=>["auto",{span:["full",er,ie,oe]},er,ie,oe],j=()=>[er,"auto",ie,oe],L=()=>["auto","min","max","fr",ie,oe],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...N()],F=()=>[Jn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],T=()=>[Jn,"screen","full","dvw","lvw","svw","min","max","fit",...N()],M=()=>[Jn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],D=()=>[e,ie,oe],B=()=>[...S(),Xy,Yy,{position:[ie,oe]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",ET,wT,{size:[ie,oe]}],G=()=>[$f,Yi,Vr],U=()=>["","none","full",u,ie,oe],X=()=>["",ue,Yi,Vr],H=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ue,$f,Xy,Yy],ee=()=>["","none",g,ie,oe],J=()=>["none",ue,ie,oe],Q=()=>["none",ue,ie,oe],ne=()=>[ue,ie,oe],ce=()=>[Jn,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nn],breakpoint:[Nn],color:[ab],container:[Nn],"drop-shadow":[Nn],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nn],shadow:[Nn],spacing:["px",ue],text:[Nn],"text-shadow":[Nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jn,oe,ie,_]}],container:["container"],columns:[{columns:[ue,oe,ie,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[er,"auto",ie,oe]}],basis:[{basis:[Jn,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Jn,"auto","initial","none",oe]}],grow:[{grow:["",ue,ie,oe]}],shrink:[{shrink:["",ue,ie,oe]}],order:[{order:[er,"first","last","none",ie,oe]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[l,"screen",...F()]}],"min-w":[{"min-w":[l,"screen","none",...F()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,Yi,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,NT,bT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$f,oe]}],"font-family":[{font:[CT,_T,n]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ie,oe]}],"line-clamp":[{"line-clamp":[ue,"none",ie,Gy]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",ie,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",ie,Vr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ue,"auto",ie,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,oe]}],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",ie,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},er,ie,oe],radial:["",ie,oe],conic:[er,ie,oe]},kT,ST]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,ie,oe]}],"outline-w":[{outline:["",ue,Yi,Vr]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,el,Ja]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,el,Ja]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ue,Vr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",p,el,Ja]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ue,ie,oe]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"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":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ie,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,oe]}],filter:[{filter:["","none",ie,oe]}],blur:[{blur:ee()}],brightness:[{brightness:[ue,ie,oe]}],contrast:[{contrast:[ue,ie,oe]}],"drop-shadow":[{"drop-shadow":["","none",m,el,Ja]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ue,ie,oe]}],"hue-rotate":[{"hue-rotate":[ue,ie,oe]}],invert:[{invert:["",ue,ie,oe]}],saturate:[{saturate:[ue,ie,oe]}],sepia:[{sepia:["",ue,ie,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,oe]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[ue,ie,oe]}],"backdrop-contrast":[{"backdrop-contrast":[ue,ie,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,ie,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,ie,oe]}],"backdrop-invert":[{"backdrop-invert":["",ue,ie,oe]}],"backdrop-opacity":[{"backdrop-opacity":[ue,ie,oe]}],"backdrop-saturate":[{"backdrop-saturate":[ue,ie,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,ie,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",ie,oe]}],ease:[{ease:["linear","initial",y,ie,oe]}],delay:[{delay:[ue,ie,oe]}],animate:[{animate:["none",w,ie,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ie,oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[ie,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",ie,oe]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",ie,oe]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ue,Yi,Vr,Gy]}],stroke:[{stroke:["none",...D()]}],"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"]}},MT=lT(RT);function se(...e){return MT(eb(e))}function mb(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a);l.displayName=s+"Context";const c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,AT(i,...n)]}function AT(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function _n(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>(...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},[])}var He=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{};function Ky(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function _e(...e){return n=>{let r=!1;const o=e.map(i=>{const s=Ky(i,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():Ky(e[i],null)}}}}function pe(...e){return h.useCallback(_e(...e),e)}var TT=Symbol.for("react.lazy"),xc=Qc[" use ".trim().toString()];function IT(e){return typeof e=="object"&&e!==null&&"then"in e}function gb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===TT&&"_payload"in e&&IT(e._payload)}function yb(e){const n=jT(e),r=h.forwardRef((o,i)=>{let{children:s,...a}=o;gb(s)&&typeof xc=="function"&&(s=xc(s._payload));const l=h.Children.toArray(s),c=l.find(OT);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var vb=yb("Slot");function jT(e){const n=h.forwardRef((r,o)=>{let{children:i,...s}=r;if(gb(i)&&typeof xc=="function"&&(i=xc(i._payload)),h.isValidElement(i)){const a=LT(i),l=DT(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var $T=Symbol("radix.slottable");function OT(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$T}function DT(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function LT(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lt=zT.reduce((e,n)=>{const r=yb(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),xb={exports:{}},wb={};/**
68
- * @license React
69
- * use-sync-external-store-shim.production.js
70
- *
71
- * Copyright (c) Meta Platforms, Inc. and affiliates.
72
- *
73
- * This source code is licensed under the MIT license found in the
74
- * LICENSE file in the root directory of this source tree.
75
- */var di=h;function FT(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var VT=typeof Object.is=="function"?Object.is:FT,BT=di.useState,HT=di.useEffect,WT=di.useLayoutEffect,UT=di.useDebugValue;function GT(e,n){var r=n(),o=BT({inst:{value:r,getSnapshot:n}}),i=o[0].inst,s=o[1];return WT(function(){i.value=r,i.getSnapshot=n,Of(i)&&s({inst:i})},[e,r,n]),HT(function(){return Of(i)&&s({inst:i}),e(function(){Of(i)&&s({inst:i})})},[e]),UT(r),r}function Of(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!VT(e,r)}catch{return!0}}function YT(e,n){return n()}var XT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?YT:GT;wb.useSyncExternalStore=di.useSyncExternalStore!==void 0?di.useSyncExternalStore:XT;xb.exports=wb;var bb=xb.exports;function KT(){return bb.useSyncExternalStore(qT,()=>!0,()=>!1)}function qT(){return()=>{}}var em="Avatar",[ZT]=mb(em),[QT,_b]=ZT(em),Sb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,...o}=e,[i,s]=h.useState("idle");return b.jsx(QT,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:b.jsx(lt.span,{...o,ref:n})})});Sb.displayName=em;var Cb="AvatarImage",Eb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...s}=e,a=_b(Cb,r),l=JT(o,s),c=_n(u=>{i(u),a.onImageLoadingStatusChange(u)});return He(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?b.jsx(lt.img,{...s,ref:n,src:o}):null});Eb.displayName=Cb;var kb="AvatarFallback",Nb=h.forwardRef((e,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=e,s=_b(kb,r),[a,l]=h.useState(o===void 0);return h.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>l(!0),o);return()=>window.clearTimeout(c)}},[o]),a&&s.imageLoadingStatus!=="loaded"?b.jsx(lt.span,{...i,ref:n}):null});Nb.displayName=kb;function qy(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function JT(e,{referrerPolicy:n,crossOrigin:r}){const o=KT(),i=h.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[a,l]=h.useState(()=>qy(s,e));return He(()=>{l(qy(s,e))},[s,e]),He(()=>{const c=f=>()=>{l(f)};if(!s)return;const u=c("loaded"),d=c("error");return s.addEventListener("load",u),s.addEventListener("error",d),n&&(s.referrerPolicy=n),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,r,n]),a}var Pb=Sb,Rb=Eb,Mb=Nb;const eI=h.forwardRef(({className:e,...n},r)=>b.jsx(Pb,{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));eI.displayName=Pb.displayName;const tI=h.forwardRef(({className:e,...n},r)=>b.jsx(Rb,{ref:r,className:se("aspect-square h-full w-full",e),...n}));tI.displayName=Rb.displayName;const nI=h.forwardRef(({className:e,...n},r)=>b.jsx(Mb,{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...n}));nI.displayName=Mb.displayName;const Zy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Qy=eb,tm=(e,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return Qy(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=n,a=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],f=s==null?void 0:s[u];if(d===null)return null;const p=Zy(d)||Zy(f);return i[u][p]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...s,...l}[v]):{...s,...l}[v]===_})?[...u,f,p]:u},[]);return Qy(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
76
- * @license lucide-react v0.576.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 Ab=(...e)=>e.filter((n,r,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===r).join(" ").trim();/**
81
- * @license lucide-react v0.576.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 rI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
86
- * @license lucide-react v0.576.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 oI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
91
- * @license lucide-react v0.576.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 Jy=e=>{const n=oI(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
96
- * @license lucide-react v0.576.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
- */var iI={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"};/**
101
- * @license lucide-react v0.576.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 sI=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
106
- * @license lucide-react v0.576.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 aI=h.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>h.createElement("svg",{ref:c,...iI,width:n,height:n,stroke:e,strokeWidth:o?Number(r)*24/Number(n):r,className:Ab("lucide",i),...!s&&!sI(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,d])=>h.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
111
- * @license lucide-react v0.576.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 we=(e,n)=>{const r=h.forwardRef(({className:o,...i},s)=>h.createElement(aI,{ref:s,iconNode:n,className:Ab(`lucide-${rI(Jy(e))}`,`lucide-${e}`,o),...i}));return r.displayName=Jy(e),r};/**
116
- * @license lucide-react v0.576.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 lI=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],cI=we("arrow-left",lI);/**
121
- * @license lucide-react v0.576.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 uI=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],nm=we("boxes",uI);/**
126
- * @license lucide-react v0.576.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 fI=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rm=we("check",fI);/**
131
- * @license lucide-react v0.576.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 dI=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Tb=we("chevron-down",dI);/**
136
- * @license lucide-react v0.576.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 pI=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hI=we("chevron-right",pI);/**
141
- * @license lucide-react v0.576.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 mI=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],gI=we("chevron-up",mI);/**
146
- * @license lucide-react v0.576.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 yI=[["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"}]],vI=we("circle-alert",yI);/**
151
- * @license lucide-react v0.576.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 xI=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ev=we("circle-check-big",xI);/**
156
- * @license lucide-react v0.576.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 wI=[["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"}]],bI=we("circle-x",wI);/**
161
- * @license lucide-react v0.576.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 _I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],SI=we("circle",_I);/**
166
- * @license lucide-react v0.576.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 CI=[["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"}]],Ib=we("database",CI);/**
171
- * @license lucide-react v0.576.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 EI=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],kI=we("file-code",EI);/**
176
- * @license lucide-react v0.576.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 NI=[["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"}]],jb=we("globe",NI);/**
181
- * @license lucide-react v0.576.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 PI=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],yu=we("layers",PI);/**
186
- * @license lucide-react v0.576.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 RI=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],MI=we("layout-dashboard",RI);/**
191
- * @license lucide-react v0.576.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 AI=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],TI=we("moon",AI);/**
196
- * @license lucide-react v0.576.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 II=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],jI=we("network",II);/**
201
- * @license lucide-react v0.576.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 $I=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],OI=we("plus",$I);/**
206
- * @license lucide-react v0.576.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 DI=[["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"}]],$b=we("refresh-cw",DI);/**
211
- * @license lucide-react v0.576.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 LI=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],zI=we("route",LI);/**
216
- * @license lucide-react v0.576.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 FI=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],VI=we("save",FI);/**
221
- * @license lucide-react v0.576.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 BI=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],HI=we("search",BI);/**
226
- * @license lucide-react v0.576.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 WI=[["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"}]],Ob=we("settings",WI);/**
231
- * @license lucide-react v0.576.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 UI=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],GI=we("sun",UI);/**
236
- * @license lucide-react v0.576.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 YI=[["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"}]],XI=we("trash-2",YI);/**
241
- * @license lucide-react v0.576.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 KI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Db=we("x",KI);/**
246
- * @license lucide-react v0.576.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 qI=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ZI=we("zap",qI),QI=h.forwardRef(({...e},n)=>b.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));QI.displayName="Breadcrumb";const JI=h.forwardRef(({className:e,...n},r)=>b.jsx("ol",{ref:r,className:se("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));JI.displayName="BreadcrumbList";const ej=h.forwardRef(({className:e,...n},r)=>b.jsx("li",{ref:r,className:se("inline-flex items-center gap-1.5",e),...n}));ej.displayName="BreadcrumbItem";const tj=h.forwardRef(({asChild:e,className:n,...r},o)=>{const i=e?vb:"a";return b.jsx(i,{ref:o,className:se("transition-colors hover:text-foreground",n),...r})});tj.displayName="BreadcrumbLink";const nj=h.forwardRef(({className:e,...n},r)=>b.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:se("font-normal text-foreground",e),...n}));nj.displayName="BreadcrumbPage";const rj=tm("inline-flex items-center justify-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{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"}}),Lb=h.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>{const a=o?vb:"button";return b.jsx(a,{className:se(rj({variant:n,size:r,className:e})),ref:s,...i})});Lb.displayName="Button";const oj=h.forwardRef(({className:e,onClick:n,...r},o)=>{const i=h.useRef(null),[s,a]=h.useState(!1);return h.useEffect(()=>{var u;const l=i.current;if(!l)return;const c=!!n||((u=l.parentElement)==null?void 0:u.tagName)==="A"||!!l.querySelector(":scope > a");a(c)},[n]),b.jsx("div",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},className:se("ls-card rounded-xl bg-card text-card-foreground",s&&"interactive",e),onClick:n,...r})});oj.displayName="Card";const ij=h.forwardRef(({className:e,...n},r)=>b.jsx("div",{ref:r,className:se("flex flex-col space-y-1.5 p-6",e),...n}));ij.displayName="CardHeader";const sj=h.forwardRef(({className:e,...n},r)=>b.jsx("div",{ref:r,className:se("font-semibold leading-none tracking-tight",e),...n}));sj.displayName="CardTitle";const aj=h.forwardRef(({className:e,...n},r)=>b.jsx("div",{ref:r,className:se("text-sm text-muted-foreground",e),...n}));aj.displayName="CardDescription";const lj=h.forwardRef(({className:e,...n},r)=>b.jsx("div",{ref:r,className:se("p-6 pt-0",e),...n}));lj.displayName="CardContent";const cj=h.forwardRef(({className:e,...n},r)=>b.jsx("div",{ref:r,className:se("flex items-center p-6 pt-0",e),...n}));cj.displayName="CardFooter";function uj(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,fj(i,...n)]}function fj(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function te(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}var dj=Qc[" useInsertionEffect ".trim().toString()]||He;function pa({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=pj({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:i;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,o])}const u=h.useCallback(d=>{var f;if(l){const p=hj(d)?d(e):d;p!==e&&((f=a.current)==null||f.call(a,p))}else s(d)},[l,e,s,a]);return[c,u]}function pj({defaultProp:e,onChange:n}){const[r,o]=h.useState(e),i=h.useRef(r),s=h.useRef(n);return dj(()=>{s.current=n},[n]),h.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,o,s]}function hj(e){return typeof e=="function"}function om(e){const n=h.useRef({value:e,previous:e});return h.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function im(e){const[n,r]=h.useState(void 0);return He(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}function mj(e,n){return h.useReducer((r,o)=>n[r][o]??r,e)}var yt=e=>{const{present:n,children:r}=e,o=gj(n),i=typeof r=="function"?r({present:o.isPresent}):h.Children.only(r),s=pe(o.ref,yj(i));return typeof r=="function"||o.isPresent?h.cloneElement(i,{ref:s}):null};yt.displayName="Presence";function gj(e){const[n,r]=h.useState(),o=h.useRef(null),i=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[l,c]=mj(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=tl(o.current);s.current=l==="mounted"?u:"none"},[l]),He(()=>{const u=o.current,d=i.current;if(d!==e){const p=s.current,m=tl(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),He(()=>{if(n){let u;const d=n.ownerDocument.defaultView??window,f=m=>{const v=tl(o.current).includes(CSS.escape(m.animationName));if(m.target===n&&v&&(c("ANIMATION_END"),!i.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",u=d.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},p=m=>{m.target===n&&(s.current=tl(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{d.clearTimeout(u),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:h.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function tl(e){return(e==null?void 0:e.animationName)||"none"}function yj(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function vj(e){const n=xj(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(bj);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function xj(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Sj(i),l=_j(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var wj=Symbol("radix.slottable");function bj(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wj}function _j(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Sj(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Cj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sm=Cj.reduce((e,n)=>{const r=vj(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),vu="Checkbox",[Ej]=uj(vu),[kj,am]=Ej(vu);function Nj(e){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:i,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[p,m]=pa({prop:r,defaultProp:i??!1,onChange:c,caller:vu}),[g,v]=h.useState(null),[_,y]=h.useState(null),w=h.useRef(!1),x=g?!!a||!!g.closest("form"):!0,S={checked:p,disabled:s,setChecked:m,control:g,setControl:v,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Cr(i)?!1:i,isFormControl:x,bubbleInput:_,setBubbleInput:y};return b.jsx(kj,{scope:n,...S,children:Pj(f)?f(S):o})}var zb="CheckboxTrigger",Fb=h.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...o},i)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:g}=am(zb,e),v=pe(i,d),_=h.useRef(c);return h.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const w=()=>f(_.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[s,f]),b.jsx(sm.button,{type:"button",role:"checkbox","aria-checked":Cr(c)?"mixed":c,"aria-required":u,"data-state":Ub(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:v,onKeyDown:te(n,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:te(r,y=>{f(w=>Cr(w)?!0:!w),g&&m&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});Fb.displayName=zb;var lm=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return b.jsx(Nj,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:d,value:c,internal_do_not_use_render:({isFormControl:p})=>b.jsxs(b.Fragment,{children:[b.jsx(Fb,{...f,ref:n,__scopeCheckbox:r}),p&&b.jsx(Wb,{__scopeCheckbox:r})]})})});lm.displayName=vu;var Vb="CheckboxIndicator",Bb=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,s=am(Vb,r);return b.jsx(yt,{present:o||Cr(s.checked)||s.checked===!0,children:b.jsx(sm.span,{"data-state":Ub(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})});Bb.displayName=Vb;var Hb="CheckboxBubbleInput",Wb=h.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=am(Hb,e),g=pe(r,m),v=om(s),_=im(o);h.useEffect(()=>{const w=p;if(!w)return;const x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,E=!i.current;if(v!==s&&C){const k=new Event("click",{bubbles:E});w.indeterminate=Cr(s),C.call(w,Cr(s)?!1:s),w.dispatchEvent(k)}},[p,v,s,i]);const y=h.useRef(Cr(s)?!1:s);return b.jsx(sm.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:l,disabled:c,name:u,value:d,form:f,...n,tabIndex:-1,ref:g,style:{...n.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Wb.displayName=Hb;function Pj(e){return typeof e=="function"}function Cr(e){return e==="indeterminate"}function Ub(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}const Rj=h.forwardRef(({className:e,...n},r)=>b.jsx(lm,{ref:r,className:se("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:b.jsx(Bb,{className:se("grid place-content-center text-current"),children:b.jsx(rm,{className:"h-4 w-4"})})}));Rj.displayName=lm.displayName;var Mj=Qc[" useId ".trim().toString()]||(()=>{}),Aj=0;function kt(e){const[n,r]=h.useState(Mj());return He(()=>{r(o=>o??String(Aj++))},[e]),n?`radix-${n}`:""}var tv=1,Tj=.9,Ij=.8,jj=.17,Df=.1,Lf=.999,$j=.9999,Oj=.99,Dj=/[\\\/_+.#"@\[\(\{&]/,Lj=/[\\\/_+.#"@\[\(\{&]/g,zj=/[\s-]/,Gb=/[\s-]/g;function up(e,n,r,o,i,s,a){if(s===n.length)return i===e.length?tv:Oj;var l=`${i},${s}`;if(a[l]!==void 0)return a[l];for(var c=o.charAt(s),u=r.indexOf(c,i),d=0,f,p,m,g;u>=0;)f=up(e,n,r,o,u+1,s+1,a),f>d&&(u===i?f*=tv:Dj.test(e.charAt(u-1))?(f*=Ij,m=e.slice(i,u-1).match(Lj),m&&i>0&&(f*=Math.pow(Lf,m.length))):zj.test(e.charAt(u-1))?(f*=Tj,g=e.slice(i,u-1).match(Gb),g&&i>0&&(f*=Math.pow(Lf,g.length))):(f*=jj,i>0&&(f*=Math.pow(Lf,u-i))),e.charAt(u)!==n.charAt(s)&&(f*=$j)),(f<Df&&r.charAt(u-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(u-1)!==o.charAt(s))&&(p=up(e,n,r,o,u+1,s+2,a),p*Df>f&&(f=p*Df)),f>d&&(d=f),u=r.indexOf(c,u+1);return a[l]=d,d}function nv(e){return e.toLowerCase().replace(Gb," ")}function Fj(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,up(e,n,nv(e),nv(n),0,0,{})}function Vj(e,n){const r=h.createContext(n),o=s=>{const{children:a,...l}=s,c=h.useMemo(()=>l,Object.values(l));return b.jsx(r.Provider,{value:c,children:a})};o.displayName=e+"Provider";function i(s){const a=h.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function Bj(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,Hj(i,...n)]}function Hj(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function Wj(e){const n=Uj(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(Yj);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Uj(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Kj(i),l=Xj(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Gj=Symbol("radix.slottable");function Yj(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gj}function Xj(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Kj(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yb=qj.reduce((e,n)=>{const r=Wj(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function Zj(e,n){e&&xo.flushSync(()=>e.dispatchEvent(n))}function Qj(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e);h.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var Jj="DismissableLayer",fp="dismissableLayer.update",e3="dismissableLayer.pointerDownOutside",t3="dismissableLayer.focusOutside",rv,Xb=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mi=h.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=h.useContext(Xb),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=h.useState({}),g=pe(n,k=>f(k)),v=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(_),w=d?v.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,C=o3(k=>{const N=k.target,A=[...u.branches].some(R=>R.contains(N));!S||A||(i==null||i(k),a==null||a(k),k.defaultPrevented||l==null||l())},p),E=i3(k=>{const N=k.target;[...u.branches].some(R=>R.contains(N))||(s==null||s(k),a==null||a(k),k.defaultPrevented||l==null||l())},p);return Qj(k=>{w===u.layers.size-1&&(o==null||o(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},p),h.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rv=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ov(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=rv)}},[d,p,r,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ov())},[d,u]),h.useEffect(()=>{const k=()=>m({});return document.addEventListener(fp,k),()=>document.removeEventListener(fp,k)},[]),b.jsx(Yb.div,{...c,ref:g,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,E.onFocusCapture),onBlurCapture:te(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,C.onPointerDownCapture)})});Mi.displayName=Jj;var n3="DismissableLayerBranch",r3=h.forwardRef((e,n)=>{const r=h.useContext(Xb),o=h.useRef(null),i=pe(n,o);return h.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),b.jsx(Yb.div,{...e,ref:i})});r3.displayName=n3;function o3(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e),o=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let c=function(){Kb(e3,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=c,n.addEventListener("click",i.current,{once:!0})):c()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function i3(e,n=globalThis==null?void 0:globalThis.document){const r=_n(e),o=h.useRef(!1);return h.useEffect(()=>{const i=s=>{s.target&&!o.current&&Kb(t3,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ov(){const e=new CustomEvent(fp);document.dispatchEvent(e)}function Kb(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?Zj(i,s):i.dispatchEvent(s)}function s3(e){const n=a3(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(c3);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function a3(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=f3(i),l=u3(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var l3=Symbol("radix.slottable");function c3(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===l3}function u3(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function f3(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var d3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],p3=d3.reduce((e,n)=>{const r=s3(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),zf="focusScope.autoFocusOnMount",Ff="focusScope.autoFocusOnUnmount",iv={bubbles:!1,cancelable:!0},h3="FocusScope",ha=h.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=h.useState(null),u=_n(i),d=_n(s),f=h.useRef(null),p=pe(n,v=>c(v)),m=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let v=function(x){if(m.paused||!l)return;const S=x.target;l.contains(S)?f.current=S:ir(f.current,{select:!0})},_=function(x){if(m.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||ir(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&ir(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[o,l,m.paused]),h.useEffect(()=>{if(l){av.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(zf,iv);l.addEventListener(zf,u),l.dispatchEvent(y),y.defaultPrevented||(m3(w3(qb(l)),{select:!0}),document.activeElement===v&&ir(l))}return()=>{l.removeEventListener(zf,u),setTimeout(()=>{const y=new CustomEvent(Ff,iv);l.addEventListener(Ff,d),l.dispatchEvent(y),y.defaultPrevented||ir(v??document.body,{select:!0}),l.removeEventListener(Ff,d),av.remove(m)},0)}}},[l,u,d,m]);const g=h.useCallback(v=>{if(!r&&!o||m.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(_&&y){const w=v.currentTarget,[x,S]=g3(w);x&&S?!v.shiftKey&&y===S?(v.preventDefault(),r&&ir(x,{select:!0})):v.shiftKey&&y===x&&(v.preventDefault(),r&&ir(S,{select:!0})):y===w&&v.preventDefault()}},[r,o,m.paused]);return b.jsx(p3.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});ha.displayName=h3;function m3(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(ir(o,{select:n}),document.activeElement!==r)return}function g3(e){const n=qb(e),r=sv(n,e),o=sv(n.reverse(),e);return[r,o]}function qb(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function sv(e,n){for(const r of e)if(!y3(r,{upTo:n}))return r}function y3(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function v3(e){return e instanceof HTMLInputElement&&"select"in e}function ir(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&v3(e)&&n&&e.select()}}var av=x3();function x3(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=lv(e,n),e.unshift(n)},remove(n){var r;e=lv(e,n),(r=e[0])==null||r.resume()}}}function lv(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function w3(e){return e.filter(n=>n.tagName!=="A")}function b3(e){const n=_3(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(C3);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function _3(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=k3(i),l=E3(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var S3=Symbol("radix.slottable");function C3(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S3}function E3(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function k3(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var N3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],P3=N3.reduce((e,n)=>{const r=b3(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),R3="Portal",Ai=h.forwardRef((e,n)=>{var l;const{container:r,...o}=e,[i,s]=h.useState(!1);He(()=>s(!0),[]);const a=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?TM.createPortal(b.jsx(P3.div,{...o,ref:n}),a):null});Ai.displayName=R3;function Zb(e){const n=M3(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(T3);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function M3(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=j3(i),l=I3(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var A3=Symbol("radix.slottable");function T3(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===A3}function I3(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function j3(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ma=$3.reduce((e,n)=>{const r=Zb(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Vf=0;function xu(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cv()),document.body.insertAdjacentElement("beforeend",e[1]??cv()),Vf++,()=>{Vf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Vf--}},[])}function cv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mn=function(){return mn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},mn.apply(this,arguments)};function Qb(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function O3(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var $l="right-scroll-bar-position",Ol="width-before-scroll-bar",D3="with-scroll-bars-hidden",L3="--removed-body-scroll-bar-size";function Bf(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function z3(e,n){var r=h.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var F3=typeof window<"u"?h.useLayoutEffect:h.useEffect,uv=new WeakMap;function V3(e,n){var r=z3(null,function(o){return e.forEach(function(i){return Bf(i,o)})});return F3(function(){var o=uv.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||Bf(l,null)}),s.forEach(function(l){i.has(l)||Bf(l,a)})}uv.set(r,e)},[e]),r}function B3(e){return e}function H3(e,n){n===void 0&&(n=B3);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return i}function W3(e){e===void 0&&(e={});var n=H3(null);return n.options=mn({async:!0,ssr:!1},e),n}var Jb=function(e){var n=e.sideCar,r=Qb(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return h.createElement(o,mn({},r))};Jb.isSideCarExport=!0;function U3(e,n){return e.useMedium(n),Jb}var e_=W3(),Hf=function(){},wu=h.forwardRef(function(e,n){var r=h.useRef(null),o=h.useState({onScrollCapture:Hf,onWheelCapture:Hf,onTouchMoveCapture:Hf}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,v=e.inert,_=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,x=e.gapMode,S=Qb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,E=V3([r,n]),k=mn(mn({},S),i);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:e_,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!_,lockRef:r,gapMode:x}),a?h.cloneElement(h.Children.only(l),mn(mn({},k),{ref:E})):h.createElement(w,mn({},k,{className:c,ref:E}),l))});wu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wu.classNames={fullWidth:Ol,zeroRight:$l};var G3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Y3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=G3();return n&&e.setAttribute("nonce",n),e}function X3(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function K3(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var q3=function(){var e=0,n=null;return{add:function(r){e==0&&(n=Y3())&&(X3(n,r),K3(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Z3=function(){var e=q3();return function(n,r){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},t_=function(){var e=Z3(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},Q3={left:0,top:0,right:0,gap:0},Wf=function(e){return parseInt(e||"",10)||0},J3=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[Wf(r),Wf(o),Wf(i)]},e$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q3;var n=J3(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},t$=t_(),ei="data-scroll-locked",n$=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
251
- .`.concat(D3,` {
252
- overflow: hidden `).concat(o,`;
253
- padding-right: `).concat(l,"px ").concat(o,`;
254
- }
255
- body[`).concat(ei,`] {
256
- overflow: hidden `).concat(o,`;
257
- overscroll-behavior: contain;
258
- `).concat([n&&"position: relative ".concat(o,";"),r==="margin"&&`
259
- padding-left: `.concat(i,`px;
260
- padding-top: `).concat(s,`px;
261
- padding-right: `).concat(a,`px;
262
- margin-left:0;
263
- margin-top:0;
264
- margin-right: `).concat(l,"px ").concat(o,`;
265
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
266
- }
267
-
268
- .`).concat($l,` {
269
- right: `).concat(l,"px ").concat(o,`;
270
- }
271
-
272
- .`).concat(Ol,` {
273
- margin-right: `).concat(l,"px ").concat(o,`;
274
- }
275
-
276
- .`).concat($l," .").concat($l,` {
277
- right: 0 `).concat(o,`;
278
- }
279
-
280
- .`).concat(Ol," .").concat(Ol,` {
281
- margin-right: 0 `).concat(o,`;
282
- }
283
-
284
- body[`).concat(ei,`] {
285
- `).concat(L3,": ").concat(l,`px;
286
- }
287
- `)},fv=function(){var e=parseInt(document.body.getAttribute(ei)||"0",10);return isFinite(e)?e:0},r$=function(){h.useEffect(function(){return document.body.setAttribute(ei,(fv()+1).toString()),function(){var e=fv()-1;e<=0?document.body.removeAttribute(ei):document.body.setAttribute(ei,e.toString())}},[])},o$=function(e){var n=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;r$();var s=h.useMemo(function(){return e$(i)},[i]);return h.createElement(t$,{styles:n$(s,!n,i,r?"":"!important")})},dp=!1;if(typeof window<"u")try{var nl=Object.defineProperty({},"passive",{get:function(){return dp=!0,!0}});window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{dp=!1}var Eo=dp?{passive:!1}:!1,i$=function(e){return e.tagName==="TEXTAREA"},n_=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!i$(e)&&r[n]==="visible")},s$=function(e){return n_(e,"overflowY")},a$=function(e){return n_(e,"overflowX")},dv=function(e,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=r_(e,o);if(i){var s=o_(e,o),a=s[1],l=s[2];if(a>l)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},l$=function(e){var n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[n,r,o]},c$=function(e){var n=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[n,r,o]},r_=function(e,n){return e==="v"?s$(n):a$(n)},o_=function(e,n){return e==="v"?l$(n):c$(n)},u$=function(e,n){return e==="h"&&n==="rtl"?-1:1},f$=function(e,n,r,o,i){var s=u$(e,window.getComputedStyle(n).direction),a=s*o,l=r.target,c=n.contains(l),u=!1,d=a>0,f=0,p=0;do{if(!l)break;var m=o_(e,l),g=m[0],v=m[1],_=m[2],y=v-_-s*g;(g||y)&&r_(e,l)&&(f+=y,p+=g);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(u=!0),u},rl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pv=function(e){return[e.deltaX,e.deltaY]},hv=function(e){return e&&"current"in e?e.current:e},d$=function(e,n){return e[0]===n[0]&&e[1]===n[1]},p$=function(e){return`
288
- .block-interactivity-`.concat(e,` {pointer-events: none;}
289
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
290
- `)},h$=0,ko=[];function m$(e){var n=h.useRef([]),r=h.useRef([0,0]),o=h.useRef(),i=h.useState(h$++)[0],s=h.useState(t_)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=O3([e.lockRef.current],(e.shards||[]).map(hv),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(v,_){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var y=rl(v),w=r.current,x="deltaX"in v?v.deltaX:w[0]-y[0],S="deltaY"in v?v.deltaY:w[1]-y[1],C,E=v.target,k=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in v&&k==="h"&&E.type==="range")return!1;var N=window.getSelection(),A=N&&N.anchorNode,R=A?A===E||A.contains(E):!1;if(R)return!1;var I=dv(k,E);if(!I)return!0;if(I?C=k:(C=k==="v"?"h":"v",I=dv(k,E)),!I)return!1;if(!o.current&&"changedTouches"in v&&(x||S)&&(o.current=C),!C)return!0;var j=o.current||C;return f$(j,_,v,j==="h"?x:S)},[]),c=h.useCallback(function(v){var _=v;if(!(!ko.length||ko[ko.length-1]!==s)){var y="deltaY"in _?pv(_):rl(_),w=n.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&d$(C.delta,y)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var x=(a.current.shards||[]).map(hv).filter(Boolean).filter(function(C){return C.contains(_.target)}),S=x.length>0?l(_,x[0]):!a.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=h.useCallback(function(v,_,y,w){var x={name:v,delta:_,target:y,should:w,shadowParent:g$(y)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(S){return S!==x})},1)},[]),d=h.useCallback(function(v){r.current=rl(v),o.current=void 0},[]),f=h.useCallback(function(v){u(v.type,pv(v),v.target,l(v,e.lockRef.current))},[]),p=h.useCallback(function(v){u(v.type,rl(v),v.target,l(v,e.lockRef.current))},[]);h.useEffect(function(){return ko.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Eo),document.addEventListener("touchmove",c,Eo),document.addEventListener("touchstart",d,Eo),function(){ko=ko.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Eo),document.removeEventListener("touchmove",c,Eo),document.removeEventListener("touchstart",d,Eo)}},[]);var m=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(s,{styles:p$(i)}):null,m?h.createElement(o$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function g$(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const y$=U3(e_,m$);var ga=h.forwardRef(function(e,n){return h.createElement(wu,mn({},e,{ref:n,sideCar:y$}))});ga.classNames=wu.classNames;var v$=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},No=new WeakMap,ol=new WeakMap,il={},Uf=0,i_=function(e){return e&&(e.host||i_(e.parentNode))},x$=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=i_(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},w$=function(e,n,r,o){var i=x$(n,Array.isArray(e)?e:[e]);il[r]||(il[r]=new WeakMap);var s=il[r],a=[],l=new Set,c=new Set(i),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(o),g=m!==null&&m!=="false",v=(No.get(p)||0)+1,_=(s.get(p)||0)+1;No.set(p,v),s.set(p,_),a.push(p),v===1&&g&&ol.set(p,!0),_===1&&p.setAttribute(r,"true"),g||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(n),l.clear(),Uf++,function(){a.forEach(function(f){var p=No.get(f)-1,m=s.get(f)-1;No.set(f,p),s.set(f,m),p||(ol.has(f)||f.removeAttribute(o),ol.delete(f)),m||f.removeAttribute(r)}),Uf--,Uf||(No=new WeakMap,No=new WeakMap,ol=new WeakMap,il={})}},bu=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=v$(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),w$(o,i,r,"aria-hidden")):function(){return null}},_u="Dialog",[s_]=Bj(_u),[b$,ln]=s_(_u),a_=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=h.useRef(null),c=h.useRef(null),[u,d]=pa({prop:o,defaultProp:i??!1,onChange:s,caller:_u});return b.jsx(b$,{scope:n,triggerRef:l,contentRef:c,contentId:kt(),titleId:kt(),descriptionId:kt(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:a,children:r})};a_.displayName=_u;var l_="DialogTrigger",_$=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(l_,r),s=pe(n,i.triggerRef);return b.jsx(ma.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fm(i.open),...o,ref:s,onClick:te(e.onClick,i.onOpenToggle)})});_$.displayName=l_;var cm="DialogPortal",[S$,c_]=s_(cm,{forceMount:void 0}),u_=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,s=ln(cm,n);return b.jsx(S$,{scope:n,forceMount:r,children:h.Children.map(o,a=>b.jsx(yt,{present:r||s.open,children:b.jsx(Ai,{asChild:!0,container:i,children:a})}))})};u_.displayName=cm;var wc="DialogOverlay",f_=h.forwardRef((e,n)=>{const r=c_(wc,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ln(wc,e.__scopeDialog);return s.modal?b.jsx(yt,{present:o||s.open,children:b.jsx(E$,{...i,ref:n})}):null});f_.displayName=wc;var C$=Zb("DialogOverlay.RemoveScroll"),E$=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(wc,r);return b.jsx(ga,{as:C$,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(ma.div,{"data-state":fm(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),lo="DialogContent",d_=h.forwardRef((e,n)=>{const r=c_(lo,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ln(lo,e.__scopeDialog);return b.jsx(yt,{present:o||s.open,children:s.modal?b.jsx(k$,{...i,ref:n}):b.jsx(N$,{...i,ref:n})})});d_.displayName=lo;var k$=h.forwardRef((e,n)=>{const r=ln(lo,e.__scopeDialog),o=h.useRef(null),i=pe(n,r.contentRef,o);return h.useEffect(()=>{const s=o.current;if(s)return bu(s)},[]),b.jsx(p_,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault())})}),N$=h.forwardRef((e,n)=>{const r=ln(lo,e.__scopeDialog),o=h.useRef(!1),i=h.useRef(!1);return b.jsx(p_,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),p_=h.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=ln(lo,r),c=h.useRef(null),u=pe(n,c);return xu(),b.jsxs(b.Fragment,{children:[b.jsx(ha,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:b.jsx(Mi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":fm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(P$,{titleId:l.titleId}),b.jsx(M$,{contentRef:c,descriptionId:l.descriptionId})]})]})}),um="DialogTitle",h_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(um,r);return b.jsx(ma.h2,{id:i.titleId,...o,ref:n})});h_.displayName=um;var m_="DialogDescription",g_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(m_,r);return b.jsx(ma.p,{id:i.descriptionId,...o,ref:n})});g_.displayName=m_;var y_="DialogClose",v_=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=ln(y_,r);return b.jsx(ma.button,{type:"button",...o,ref:n,onClick:te(e.onClick,()=>i.onOpenChange(!1))})});v_.displayName=y_;function fm(e){return e?"open":"closed"}var x_="DialogTitleWarning",[_X,w_]=Vj(x_,{contentName:lo,titleName:um,docsSlug:"dialog"}),P$=({titleId:e})=>{const n=w_(x_),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
291
-
292
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
293
-
294
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},R$="DialogDescriptionWarning",M$=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${w_(R$).contentName}}.`;return h.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},A$=a_,dm=u_,ya=f_,va=d_,Su=h_,Cu=g_,b_=v_,Xi='[cmdk-group=""]',Gf='[cmdk-group-items=""]',T$='[cmdk-group-heading=""]',__='[cmdk-item=""]',mv=`${__}:not([aria-disabled="true"])`,pp="cmdk-item-select",To="data-value",I$=(e,n,r)=>Fj(e,n,r),S_=h.createContext(void 0),xa=()=>h.useContext(S_),C_=h.createContext(void 0),pm=()=>h.useContext(C_),E_=h.createContext(void 0),k_=h.forwardRef((e,n)=>{let r=Io(()=>{var O,W;return{search:"",value:(W=(O=e.value)!=null?O:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Io(()=>new Set),i=Io(()=>new Map),s=Io(()=>new Map),a=Io(()=>new Set),l=N_(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:g,disablePointerSelection:v=!1,vimBindings:_=!0,...y}=e,w=kt(),x=kt(),S=kt(),C=h.useRef(null),E=W$();co(()=>{if(d!==void 0){let O=d.trim();r.current.value=O,k.emit()}},[d]),co(()=>{E(6,L)},[]);let k=h.useMemo(()=>({subscribe:O=>(a.current.add(O),()=>a.current.delete(O)),snapshot:()=>r.current,setState:(O,W,G)=>{var U,X,H,Y;if(!Object.is(r.current[O],W)){if(r.current[O]=W,O==="search")j(),R(),E(1,I);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(U=document.getElementById(w))==null||U.focus()}if(E(7,()=>{var K;r.current.selectedItemId=(K=P())==null?void 0:K.id,k.emit()}),G||E(5,L),((X=l.current)==null?void 0:X.value)!==void 0){let K=W??"";(Y=(H=l.current).onValueChange)==null||Y.call(H,K);return}}k.emit()}},emit:()=>{a.current.forEach(O=>O())}}),[]),N=h.useMemo(()=>({value:(O,W,G)=>{var U;W!==((U=s.current.get(O))==null?void 0:U.value)&&(s.current.set(O,{value:W,keywords:G}),r.current.filtered.items.set(O,A(W,G)),E(2,()=>{R(),k.emit()}))},item:(O,W)=>(o.current.add(O),W&&(i.current.has(W)?i.current.get(W).add(O):i.current.set(W,new Set([O]))),E(3,()=>{j(),R(),r.current.value||I(),k.emit()}),()=>{s.current.delete(O),o.current.delete(O),r.current.filtered.items.delete(O);let G=P();E(4,()=>{j(),(G==null?void 0:G.getAttribute("id"))===O&&I(),k.emit()})}),group:O=>(i.current.has(O)||i.current.set(O,new Set),()=>{s.current.delete(O),i.current.delete(O)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:C}),[]);function A(O,W){var G,U;let X=(U=(G=l.current)==null?void 0:G.filter)!=null?U:I$;return O?X(O,r.current.search,W):0}function R(){if(!r.current.search||l.current.shouldFilter===!1)return;let O=r.current.filtered.items,W=[];r.current.filtered.groups.forEach(U=>{let X=i.current.get(U),H=0;X.forEach(Y=>{let K=O.get(Y);H=Math.max(K,H)}),W.push([U,H])});let G=C.current;z().sort((U,X)=>{var H,Y;let K=U.getAttribute("id"),ee=X.getAttribute("id");return((H=O.get(ee))!=null?H:0)-((Y=O.get(K))!=null?Y:0)}).forEach(U=>{let X=U.closest(Gf);X?X.appendChild(U.parentElement===X?U:U.closest(`${Gf} > *`)):G.appendChild(U.parentElement===G?U:U.closest(`${Gf} > *`))}),W.sort((U,X)=>X[1]-U[1]).forEach(U=>{var X;let H=(X=C.current)==null?void 0:X.querySelector(`${Xi}[${To}="${encodeURIComponent(U[0])}"]`);H==null||H.parentElement.appendChild(H)})}function I(){let O=z().find(G=>G.getAttribute("aria-disabled")!=="true"),W=O==null?void 0:O.getAttribute(To);k.setState("value",W||void 0)}function j(){var O,W,G,U;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let X=0;for(let H of o.current){let Y=(W=(O=s.current.get(H))==null?void 0:O.value)!=null?W:"",K=(U=(G=s.current.get(H))==null?void 0:G.keywords)!=null?U:[],ee=A(Y,K);r.current.filtered.items.set(H,ee),ee>0&&X++}for(let[H,Y]of i.current)for(let K of Y)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(H);break}r.current.filtered.count=X}function L(){var O,W,G;let U=P();U&&(((O=U.parentElement)==null?void 0:O.firstChild)===U&&((G=(W=U.closest(Xi))==null?void 0:W.querySelector(T$))==null||G.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function P(){var O;return(O=C.current)==null?void 0:O.querySelector(`${__}[aria-selected="true"]`)}function z(){var O;return Array.from(((O=C.current)==null?void 0:O.querySelectorAll(mv))||[])}function $(O){let W=z()[O];W&&k.setState("value",W.getAttribute(To))}function F(O){var W;let G=P(),U=z(),X=U.findIndex(Y=>Y===G),H=U[X+O];(W=l.current)!=null&&W.loop&&(H=X+O<0?U[U.length-1]:X+O===U.length?U[0]:U[X+O]),H&&k.setState("value",H.getAttribute(To))}function T(O){let W=P(),G=W==null?void 0:W.closest(Xi),U;for(;G&&!U;)G=O>0?B$(G,Xi):H$(G,Xi),U=G==null?void 0:G.querySelector(mv);U?k.setState("value",U.getAttribute(To)):F(O)}let M=()=>$(z().length-1),D=O=>{O.preventDefault(),O.metaKey?M():O.altKey?T(1):F(1)},B=O=>{O.preventDefault(),O.metaKey?$(0):O.altKey?T(-1):F(-1)};return h.createElement(lt.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:O=>{var W;(W=y.onKeyDown)==null||W.call(y,O);let G=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||G))switch(O.key){case"n":case"j":{_&&O.ctrlKey&&D(O);break}case"ArrowDown":{D(O);break}case"p":case"k":{_&&O.ctrlKey&&B(O);break}case"ArrowUp":{B(O);break}case"Home":{O.preventDefault(),$(0);break}case"End":{O.preventDefault(),M();break}case"Enter":{O.preventDefault();let U=P();if(U){let X=new Event(pp);U.dispatchEvent(X)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:G$},c),Eu(e,O=>h.createElement(C_.Provider,{value:k},h.createElement(S_.Provider,{value:N},O))))}),j$=h.forwardRef((e,n)=>{var r,o;let i=kt(),s=h.useRef(null),a=h.useContext(E_),l=xa(),c=N_(e),u=(o=(r=c.current)==null?void 0:r.forceMount)!=null?o:a==null?void 0:a.forceMount;co(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let d=P_(i,s,[e.value,e.children,s],e.keywords),f=pm(),p=Pr(E=>E.value&&E.value===d.current),m=Pr(E=>u||l.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);h.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(pp,g),()=>E.removeEventListener(pp,g)},[m,e.onSelect,e.disabled]);function g(){var E,k;v(),(k=(E=c.current).onSelect)==null||k.call(E,d.current)}function v(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:_,value:y,onSelect:w,forceMount:x,keywords:S,...C}=e;return h.createElement(lt.div,{ref:_e(s,n),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||l.getDisablePointerSelection()?void 0:v,onClick:_?void 0:g},e.children)}),$$=h.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...s}=e,a=kt(),l=h.useRef(null),c=h.useRef(null),u=kt(),d=xa(),f=Pr(m=>i||d.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);co(()=>d.group(a),[]),P_(a,l,[e.value,e.heading,c]);let p=h.useMemo(()=>({id:a,forceMount:i}),[i]);return h.createElement(lt.div,{ref:_e(l,n),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Eu(e,m=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},h.createElement(E_.Provider,{value:p},m))))}),O$=h.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=h.useRef(null),s=Pr(a=>!a.search);return!r&&!s?null:h.createElement(lt.div,{ref:_e(i,n),...o,"cmdk-separator":"",role:"separator"})}),D$=h.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,s=pm(),a=Pr(u=>u.search),l=Pr(u=>u.selectedItemId),c=xa();return h.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),h.createElement(lt.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),r==null||r(u.target.value)}})}),L$=h.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,s=h.useRef(null),a=h.useRef(null),l=Pr(u=>u.selectedItemId),c=xa();return h.useEffect(()=>{if(a.current&&s.current){let u=a.current,d=s.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=u.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),h.createElement(lt.div,{ref:_e(s,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},Eu(e,u=>h.createElement("div",{ref:_e(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),z$=h.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:s,container:a,...l}=e;return h.createElement(A$,{open:r,onOpenChange:o},h.createElement(dm,{container:a},h.createElement(ya,{"cmdk-overlay":"",className:i}),h.createElement(va,{"aria-label":e.label,"cmdk-dialog":"",className:s},h.createElement(k_,{ref:n,...l}))))}),F$=h.forwardRef((e,n)=>Pr(r=>r.filtered.count===0)?h.createElement(lt.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),V$=h.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...s}=e;return h.createElement(lt.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Eu(e,a=>h.createElement("div",{"aria-hidden":!0},a)))}),vt=Object.assign(k_,{List:L$,Item:j$,Input:D$,Group:$$,Separator:O$,Dialog:z$,Empty:F$,Loading:V$});function B$(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function H$(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function N_(e){let n=h.useRef(e);return co(()=>{n.current=e}),n}var co=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Io(e){let n=h.useRef();return n.current===void 0&&(n.current=e()),n}function Pr(e){let n=pm(),r=()=>e(n.snapshot());return h.useSyncExternalStore(n.subscribe,r,r)}function P_(e,n,r,o=[]){let i=h.useRef(),s=xa();return co(()=>{var a;let l=(()=>{var u;for(let d of r){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():i.current}})(),c=o.map(u=>u.trim());s.value(e,l,c),(a=n.current)==null||a.setAttribute(To,l),i.current=l}),i}var W$=()=>{let[e,n]=h.useState(),r=Io(()=>new Map);return co(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function U$(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Eu({asChild:e,children:n},r){return e&&h.isValidElement(n)?h.cloneElement(U$(n),{ref:n.ref},r(n.props.children)):r(n)}var G$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Y$=h.forwardRef(({className:e,...n},r)=>b.jsx(vt,{ref:r,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));Y$.displayName=vt.displayName;const X$=h.forwardRef(({className:e,...n},r)=>b.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[b.jsx(HI,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),b.jsx(vt.Input,{ref:r,className:se("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));X$.displayName=vt.Input.displayName;const K$=h.forwardRef(({className:e,onWheel:n,...r},o)=>b.jsx(vt.List,{ref:o,className:se("overflow-y-auto overflow-x-hidden",e),style:{maxHeight:300},onWheel:n??(i=>{i.currentTarget.scrollTop+=i.deltaY}),...r}));K$.displayName=vt.List.displayName;const q$=h.forwardRef((e,n)=>b.jsx(vt.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));q$.displayName=vt.Empty.displayName;const Z$=h.forwardRef(({className:e,...n},r)=>b.jsx(vt.Group,{ref:r,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));Z$.displayName=vt.Group.displayName;const Q$=h.forwardRef(({className:e,...n},r)=>b.jsx(vt.Separator,{ref:r,className:se("-mx-1 h-px bg-border",e),...n}));Q$.displayName=vt.Separator.displayName;const J$=h.forwardRef(({className:e,...n},r)=>b.jsx(vt.Item,{ref:r,className:se("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...n}));J$.displayName=vt.Item.displayName;const eO=dm,R_=h.forwardRef(({className:e,...n},r)=>b.jsx(ya,{ref:r,className:se("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",e),...n}));R_.displayName=ya.displayName;const tO=h.forwardRef(({className:e,children:n,...r},o)=>b.jsxs(eO,{children:[b.jsx(R_,{}),b.jsxs(va,{ref:o,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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%] sm:rounded-lg",e),...r,children:[n,b.jsxs(b_,{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:[b.jsx(Db,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));tO.displayName=va.displayName;const nO=h.forwardRef(({className:e,...n},r)=>b.jsx(Su,{ref:r,className:se("text-lg font-semibold leading-none tracking-tight",e),...n}));nO.displayName=Su.displayName;const rO=h.forwardRef(({className:e,...n},r)=>b.jsx(Cu,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));rO.displayName=Cu.displayName;function oO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,iO(i,...n)]}function iO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function sO(e){const n=aO(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(cO);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function aO(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=fO(i),l=uO(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var lO=Symbol("radix.slottable");function cO(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lO}function uO(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function fO(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var dO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pO=dO.reduce((e,n)=>{const r=sO(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function hO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,mO(i,...n)]}function mO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function gv(e){const n=gO(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(vO);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function gO(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=wO(i),l=xO(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var yO=Symbol("radix.slottable");function vO(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yO}function xO(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function wO(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function hm(e){const n=e+"CollectionProvider",[r,o]=hO(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:_,children:y}=v,w=Je.useRef(null),x=Je.useRef(new Map).current;return b.jsx(i,{scope:_,itemMap:x,collectionRef:w,children:y})};a.displayName=n;const l=e+"CollectionSlot",c=gv(l),u=Je.forwardRef((v,_)=>{const{scope:y,children:w}=v,x=s(l,y),S=pe(_,x.collectionRef);return b.jsx(c,{ref:S,children:w})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=gv(d),m=Je.forwardRef((v,_)=>{const{scope:y,children:w,...x}=v,S=Je.useRef(null),C=pe(_,S),E=s(d,y);return Je.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),b.jsx(p,{[f]:"",ref:C,children:w})});m.displayName=d;function g(v){const _=s(e+"CollectionConsumer",v);return Je.useCallback(()=>{const w=_.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(_.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},g,o]}function bO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,_O(i,...n)]}function _O(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var SO=h.createContext(void 0);function M_(e){const n=h.useContext(SO);return e||n||"ltr"}const CO=["top","right","bottom","left"],Rr=Math.min,St=Math.max,bc=Math.round,sl=Math.floor,wn=e=>({x:e,y:e}),EO={left:"right",right:"left",bottom:"top",top:"bottom"};function hp(e,n,r){return St(e,Rr(n,r))}function Un(e,n){return typeof e=="function"?e(n):e}function Gn(e){return e.split("-")[0]}function Ti(e){return e.split("-")[1]}function mm(e){return e==="x"?"y":"x"}function gm(e){return e==="y"?"height":"width"}function gn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function ym(e){return mm(gn(e))}function kO(e,n,r){r===void 0&&(r=!1);const o=Ti(e),i=ym(e),s=gm(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=_c(a)),[a,_c(a)]}function NO(e){const n=_c(e);return[mp(e),n,mp(n)]}function mp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yv=["left","right"],vv=["right","left"],PO=["top","bottom"],RO=["bottom","top"];function MO(e,n,r){switch(e){case"top":case"bottom":return r?n?vv:yv:n?yv:vv;case"left":case"right":return n?PO:RO;default:return[]}}function AO(e,n,r,o){const i=Ti(e);let s=MO(Gn(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(mp)))),s}function _c(e){const n=Gn(e);return EO[n]+e.slice(n.length)}function TO(e){return{top:0,right:0,bottom:0,left:0,...e}}function A_(e){return typeof e!="number"?TO(e):{top:e,right:e,bottom:e,left:e}}function Sc(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function xv(e,n,r){let{reference:o,floating:i}=e;const s=gn(n),a=ym(n),l=gm(a),c=Gn(n),u=s==="y",d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(c){case"top":m={x:d,y:o.y-i.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(Ti(n)){case"start":m[a]-=p*(r&&u?-1:1);break;case"end":m[a]+=p*(r&&u?-1:1);break}return m}async function IO(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Un(n,e),g=A_(m),_=l[p?f==="floating"?"reference":"floating":f],y=Sc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(_)))==null||r?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Sc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-C.top+g.top)/S.y,bottom:(C.bottom-y.bottom+g.bottom)/S.y,left:(y.left-C.left+g.left)/S.x,right:(C.right-y.right+g.right)/S.x}}const jO=50,$O=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=a.detectOverflow?a:{...a,detectOverflow:IO},c=await(a.isRTL==null?void 0:a.isRTL(n));let u=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:d,y:f}=xv(u,o,c),p=o,m=0;const g={};for(let v=0;v<s.length;v++){const _=s[v];if(!_)continue;const{name:y,fn:w}=_,{x,y:S,data:C,reset:E}=await w({x:d,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:n}});d=x??d,f=S??f,g[y]={...g[y],...C},E&&m<jO&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):E.rects),{x:d,y:f}=xv(u,p,c)),v=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:g}},OO=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:c}=n,{element:u,padding:d=0}=Un(e,n)||{};if(u==null)return{};const f=A_(d),p={x:r,y:o},m=ym(i),g=gm(m),v=await a.getDimensions(u),_=m==="y",y=_?"top":"left",w=_?"bottom":"right",x=_?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[m]-p[m]-s.floating[g],C=p[m]-s.reference[m],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=l.floating[x]||s.floating[g]);const N=S/2-C/2,A=k/2-v[g]/2-1,R=Rr(f[y],A),I=Rr(f[w],A),j=R,L=k-v[g]-I,P=k/2-v[g]/2+N,z=hp(j,P,L),$=!c.arrow&&Ti(i)!=null&&P!==z&&s.reference[g]/2-(P<j?R:I)-v[g]/2<0,F=$?P<j?P-j:P-L:0;return{[m]:p[m]+F,data:{[m]:z,centerOffset:P-z-F,...$&&{alignmentOffset:F}},reset:$}}}),DO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,..._}=Un(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Gn(i),w=gn(l),x=Gn(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(x||!v?[_c(l)]:NO(l)),E=g!=="none";!p&&E&&C.push(...AO(l,v,g,S));const k=[l,...C],N=await c.detectOverflow(n,_),A=[];let R=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&A.push(N[y]),f){const P=kO(i,a,S);A.push(N[P[0]],N[P[1]])}if(R=[...R,{placement:i,overflows:A}],!A.every(P=>P<=0)){var I,j;const P=(((I=s.flip)==null?void 0:I.index)||0)+1,z=k[P];if(z&&(!(f==="alignment"?w!==gn(z):!1)||R.every(T=>gn(T.placement)===w?T.overflows[0]>0:!0)))return{data:{index:P,overflows:R},reset:{placement:z}};let $=(j=R.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:j.placement;if(!$)switch(m){case"bestFit":{var L;const F=(L=R.filter(T=>{if(E){const M=gn(T.placement);return M===w||M==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(M=>M>0).reduce((M,D)=>M+D,0)]).sort((T,M)=>T[1]-M[1])[0])==null?void 0:L[0];F&&($=F);break}case"initialPlacement":$=l;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function wv(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function bv(e){return CO.some(n=>e[n]>=0)}const LO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:o}=n,{strategy:i="referenceHidden",...s}=Un(e,n);switch(i){case"referenceHidden":{const a=await o.detectOverflow(n,{...s,elementContext:"reference"}),l=wv(a,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:bv(l)}}}case"escaped":{const a=await o.detectOverflow(n,{...s,altBoundary:!0}),l=wv(a,r.floating);return{data:{escapedOffsets:l,escaped:bv(l)}}}default:return{}}}}},T_=new Set(["left","top"]);async function zO(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Gn(r),l=Ti(r),c=gn(r)==="y",u=T_.has(a)?-1:1,d=s&&c?-1:1,f=Un(n,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const FO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,c=await zO(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},VO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i,platform:s}=n,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...u}=Un(e,n),d={x:r,y:o},f=await s.detectOverflow(n,u),p=gn(Gn(i)),m=mm(p);let g=d[m],v=d[p];if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=g+f[y],S=g-f[w];g=hp(x,g,S)}if(l){const y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=v+f[y],S=v-f[w];v=hp(x,v,S)}const _=c.fn({...n,[m]:g,[p]:v});return{..._,data:{x:_.x-r,y:_.y-o,enabled:{[m]:a,[p]:l}}}}}},BO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Un(e,n),d={x:r,y:o},f=gn(i),p=mm(f);let m=d[p],g=d[f];const v=Un(l,n),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const x=p==="y"?"height":"width",S=s.reference[p]-s.floating[x]+_.mainAxis,C=s.reference[p]+s.reference[x]-_.mainAxis;m<S?m=S:m>C&&(m=C)}if(u){var y,w;const x=p==="y"?"width":"height",S=T_.has(Gn(i)),C=s.reference[f]-s.floating[x]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:_.crossAxis),E=s.reference[f]+s.reference[x]+(S?0:((w=a.offset)==null?void 0:w[f])||0)-(S?_.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[p]:m,[f]:g}}}},HO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:c=()=>{},...u}=Un(e,n),d=await a.detectOverflow(n,u),f=Gn(i),p=Ti(i),m=gn(i)==="y",{width:g,height:v}=s.floating;let _,y;f==="top"||f==="bottom"?(_=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,_=p==="end"?"top":"bottom");const w=v-d.top-d.bottom,x=g-d.left-d.right,S=Rr(v-d[_],w),C=Rr(g-d[y],x),E=!n.middlewareData.shift;let k=S,N=C;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(N=x),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(k=w),E&&!p){const R=St(d.left,0),I=St(d.right,0),j=St(d.top,0),L=St(d.bottom,0);m?N=g-2*(R!==0||I!==0?R+I:St(d.left,d.right)):k=v-2*(j!==0||L!==0?j+L:St(d.top,d.bottom))}await c({...n,availableWidth:N,availableHeight:k});const A=await a.getDimensions(l.floating);return g!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function ku(){return typeof window<"u"}function Ii(e){return I_(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function En(e){var n;return(n=(I_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function I_(e){return ku()?e instanceof Node||e instanceof Nt(e).Node:!1}function sn(e){return ku()?e instanceof Element||e instanceof Nt(e).Element:!1}function qn(e){return ku()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function _v(e){return!ku()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function wa(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=an(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&i!=="inline"&&i!=="contents"}function WO(e){return/^(table|td|th)$/.test(Ii(e))}function Nu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const UO=/transform|translate|scale|rotate|perspective|filter/,GO=/paint|layout|strict|content/,Br=e=>!!e&&e!=="none";let Yf;function vm(e){const n=sn(e)?an(e):e;return Br(n.transform)||Br(n.translate)||Br(n.scale)||Br(n.rotate)||Br(n.perspective)||!xm()&&(Br(n.backdropFilter)||Br(n.filter))||UO.test(n.willChange||"")||GO.test(n.contain||"")}function YO(e){let n=Mr(e);for(;qn(n)&&!pi(n);){if(vm(n))return n;if(Nu(n))return null;n=Mr(n)}return null}function xm(){return Yf==null&&(Yf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yf}function pi(e){return/^(html|body|#document)$/.test(Ii(e))}function an(e){return Nt(e).getComputedStyle(e)}function Pu(e){return sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mr(e){if(Ii(e)==="html")return e;const n=e.assignedSlot||e.parentNode||_v(e)&&e.host||En(e);return _v(n)?n.host:n}function j_(e){const n=Mr(e);return pi(n)?e.ownerDocument?e.ownerDocument.body:e.body:qn(n)&&wa(n)?n:j_(n)}function Xs(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=j_(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=Nt(i);if(s){const l=gp(a);return n.concat(a,a.visualViewport||[],wa(i)?i:[],l&&r?Xs(l):[])}else return n.concat(i,Xs(i,[],r))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $_(e){const n=an(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=qn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=bc(r)!==s||bc(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function wm(e){return sn(e)?e:e.contextElement}function ti(e){const n=wm(e);if(!qn(n))return wn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=$_(n);let a=(s?bc(r.width):r.width)/o,l=(s?bc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const XO=wn(0);function O_(e){const n=Nt(e);return!xm()||!n.visualViewport?XO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function KO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Nt(e)?!1:n}function uo(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=wm(e);let a=wn(1);n&&(o?sn(o)&&(a=ti(o)):a=ti(e));const l=KO(s,r,o)?O_(s):wn(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(s){const p=Nt(s),m=o&&sn(o)?Nt(o):o;let g=p,v=gp(g);for(;v&&o&&m!==g;){const _=ti(v),y=v.getBoundingClientRect(),w=an(v),x=y.left+(v.clientLeft+parseFloat(w.paddingLeft))*_.x,S=y.top+(v.clientTop+parseFloat(w.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,f*=_.y,c+=x,u+=S,g=Nt(v),v=gp(g)}}return Sc({width:d,height:f,x:c,y:u})}function Ru(e,n){const r=Pu(e).scrollLeft;return n?n.left+r:uo(En(e)).left+r}function D_(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-Ru(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function qO(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=En(o),l=n?Nu(n.floating):!1;if(o===a||l&&s)return r;let c={scrollLeft:0,scrollTop:0},u=wn(1);const d=wn(0),f=qn(o);if((f||!f&&!s)&&((Ii(o)!=="body"||wa(a))&&(c=Pu(o)),f)){const m=uo(o);u=ti(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const p=a&&!f&&!s?D_(a,c):wn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:r.y*u.y-c.scrollTop*u.y+d.y+p.y}}function ZO(e){return Array.from(e.getClientRects())}function QO(e){const n=En(e),r=Pu(e),o=e.ownerDocument.body,i=St(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=St(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+Ru(e);const l=-r.scrollTop;return an(o).direction==="rtl"&&(a+=St(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const Sv=25;function JO(e,n){const r=Nt(e),o=En(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;const d=xm();(!d||d&&n==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=Ru(o);if(u<=0){const d=o.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-m);g<=Sv&&(s-=g)}else u<=Sv&&(s+=u);return{width:s,height:a,x:l,y:c}}function e5(e,n){const r=uo(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=qn(e)?ti(e):wn(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,u=o*s.y;return{width:a,height:l,x:c,y:u}}function Cv(e,n,r){let o;if(n==="viewport")o=JO(e,r);else if(n==="document")o=QO(En(e));else if(sn(n))o=e5(n,r);else{const i=O_(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return Sc(o)}function L_(e,n){const r=Mr(e);return r===n||!sn(r)||pi(r)?!1:an(r).position==="fixed"||L_(r,n)}function t5(e,n){const r=n.get(e);if(r)return r;let o=Xs(e,[],!1).filter(l=>sn(l)&&Ii(l)!=="body"),i=null;const s=an(e).position==="fixed";let a=s?Mr(e):e;for(;sn(a)&&!pi(a);){const l=an(a),c=vm(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||wa(a)&&!c&&L_(e,a))?o=o.filter(d=>d!==a):i=l,a=Mr(a)}return n.set(e,o),o}function n5(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?Nu(n)?[]:t5(n,this._c):[].concat(r),o],l=Cv(n,a[0],i);let c=l.top,u=l.right,d=l.bottom,f=l.left;for(let p=1;p<a.length;p++){const m=Cv(n,a[p],i);c=St(m.top,c),u=Rr(m.right,u),d=Rr(m.bottom,d),f=St(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function r5(e){const{width:n,height:r}=$_(e);return{width:n,height:r}}function o5(e,n,r){const o=qn(n),i=En(n),s=r==="fixed",a=uo(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const c=wn(0);function u(){c.x=Ru(i)}if(o||!o&&!s)if((Ii(n)!=="body"||wa(i))&&(l=Pu(n)),o){const m=uo(n,!0,s,n);c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}else i&&u();s&&!o&&i&&u();const d=i&&!o&&!s?D_(i,l):wn(0),f=a.left+l.scrollLeft-c.x-d.x,p=a.top+l.scrollTop-c.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function Xf(e){return an(e).position==="static"}function Ev(e,n){if(!qn(e)||an(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return En(e)===r&&(r=r.ownerDocument.body),r}function z_(e,n){const r=Nt(e);if(Nu(e))return r;if(!qn(e)){let i=Mr(e);for(;i&&!pi(i);){if(sn(i)&&!Xf(i))return i;i=Mr(i)}return r}let o=Ev(e,n);for(;o&&WO(o)&&Xf(o);)o=Ev(o,n);return o&&pi(o)&&Xf(o)&&!vm(o)?r:o||YO(e)||r}const i5=async function(e){const n=this.getOffsetParent||z_,r=this.getDimensions,o=await r(e.floating);return{reference:o5(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function s5(e){return an(e).direction==="rtl"}const a5={convertOffsetParentRelativeRectToViewportRelativeRect:qO,getDocumentElement:En,getClippingRect:n5,getOffsetParent:z_,getElementRects:i5,getClientRects:ZO,getDimensions:r5,getScale:ti,isElement:sn,isRTL:s5};function F_(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function l5(e,n){let r=null,o;const i=En(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(l||n(),!p||!m)return;const g=sl(f),v=sl(i.clientWidth-(d+p)),_=sl(i.clientHeight-(f+m)),y=sl(d),x={rootMargin:-g+"px "+-v+"px "+-_+"px "+-y+"px",threshold:St(0,Rr(1,c))||1};let S=!0;function C(E){const k=E[0].intersectionRatio;if(k!==c){if(!S)return a();k?a(!1,k):o=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!F_(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return a(!0),s}function c5(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=wm(e),d=i||s?[...u?Xs(u):[],...n?Xs(n):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&l?l5(u,r):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&m&&n&&(m.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(n)})),r()}),u&&!c&&m.observe(u),n&&m.observe(n));let g,v=c?uo(e):null;c&&_();function _(){const y=uo(e);v&&!F_(v,y)&&r(),v=y,g=requestAnimationFrame(_)}return r(),()=>{var y;d.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const u5=FO,f5=VO,d5=DO,p5=HO,h5=LO,kv=OO,m5=BO,g5=(e,n,r)=>{const o=new Map,i={platform:a5,...r},s={...i.platform,_c:o};return $O(e,n,{...i,platform:s})};var y5=typeof document<"u",v5=function(){},Dl=y5?h.useLayoutEffect:v5;function Cc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!Cc(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Cc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function V_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nv(e,n){const r=V_(e);return Math.round(n*r)/r}function Kf(e){const n=h.useRef(e);return Dl(()=>{n.current=e}),n}function x5(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=h.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=h.useState(o);Cc(p,o)||m(o);const[g,v]=h.useState(null),[_,y]=h.useState(null),w=h.useCallback(T=>{T!==E.current&&(E.current=T,v(T))},[]),x=h.useCallback(T=>{T!==k.current&&(k.current=T,y(T))},[]),S=s||g,C=a||_,E=h.useRef(null),k=h.useRef(null),N=h.useRef(d),A=c!=null,R=Kf(c),I=Kf(i),j=Kf(u),L=h.useCallback(()=>{if(!E.current||!k.current)return;const T={placement:n,strategy:r,middleware:p};I.current&&(T.platform=I.current),g5(E.current,k.current,T).then(M=>{const D={...M,isPositioned:j.current!==!1};P.current&&!Cc(N.current,D)&&(N.current=D,xo.flushSync(()=>{f(D)}))})},[p,n,r,I,j]);Dl(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[u]);const P=h.useRef(!1);Dl(()=>(P.current=!0,()=>{P.current=!1}),[]),Dl(()=>{if(S&&(E.current=S),C&&(k.current=C),S&&C){if(R.current)return R.current(S,C,L);L()}},[S,C,L,R,A]);const z=h.useMemo(()=>({reference:E,floating:k,setReference:w,setFloating:x}),[w,x]),$=h.useMemo(()=>({reference:S,floating:C}),[S,C]),F=h.useMemo(()=>{const T={position:r,left:0,top:0};if(!$.floating)return T;const M=Nv($.floating,d.x),D=Nv($.floating,d.y);return l?{...T,transform:"translate("+M+"px, "+D+"px)",...V_($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:D}},[r,l,$.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:L,refs:z,elements:$,floatingStyles:F}),[d,L,z,$,F])}const w5=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?kv({element:o.current,padding:i}).fn(r):{}:o?kv({element:o,padding:i}).fn(r):{}}}},b5=(e,n)=>{const r=u5(e);return{name:r.name,fn:r.fn,options:[e,n]}},_5=(e,n)=>{const r=f5(e);return{name:r.name,fn:r.fn,options:[e,n]}},S5=(e,n)=>({fn:m5(e).fn,options:[e,n]}),C5=(e,n)=>{const r=d5(e);return{name:r.name,fn:r.fn,options:[e,n]}},E5=(e,n)=>{const r=p5(e);return{name:r.name,fn:r.fn,options:[e,n]}},k5=(e,n)=>{const r=h5(e);return{name:r.name,fn:r.fn,options:[e,n]}},N5=(e,n)=>{const r=w5(e);return{name:r.name,fn:r.fn,options:[e,n]}};function P5(e){const n=R5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(A5);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function R5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=I5(i),l=T5(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var M5=Symbol("radix.slottable");function A5(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===M5}function T5(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function I5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var j5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$5=j5.reduce((e,n)=>{const r=P5(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),O5="Arrow",B_=h.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return b.jsx($5.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});B_.displayName=O5;var D5=B_;function L5(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,z5(i,...n)]}function z5(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function F5(e){const n=V5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(H5);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function V5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=U5(i),l=W5(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var B5=Symbol("radix.slottable");function H5(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B5}function W5(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function U5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var G5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H_=G5.reduce((e,n)=>{const r=F5(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),W_="Popper",[U_,Or]=L5(W_),[SX,G_]=U_(W_),Y_="PopperAnchor",X_=h.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=G_(Y_,r),a=h.useRef(null),l=pe(n,a),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=(o==null?void 0:o.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),o?null:b.jsx(H_.div,{...i,ref:l})});X_.displayName=Y_;var bm="PopperContent",[Y5,X5]=U_(bm),K_=h.forwardRef((e,n)=>{var H,Y,K,ee,J,Q;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,_=G_(bm,r),[y,w]=h.useState(null),x=pe(n,ne=>w(ne)),[S,C]=h.useState(null),E=im(S),k=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,A=o+(s!=="center"?"-"+s:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(u)?u:[u],j=I.length>0,L={padding:R,boundary:I.filter(q5),altBoundary:j},{refs:P,floatingStyles:z,placement:$,isPositioned:F,middlewareData:T}=x5({strategy:"fixed",placement:A,whileElementsMounted:(...ne)=>c5(...ne,{animationFrame:m==="always"}),elements:{reference:_.anchor},middleware:[b5({mainAxis:i+N,alignmentAxis:a}),c&&_5({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?S5():void 0,...L}),c&&C5({...L}),E5({...L,apply:({elements:ne,rects:ce,availableWidth:ge,availableHeight:fe})=>{const{width:$e,height:un}=ce.reference,ut=ne.floating.style;ut.setProperty("--radix-popper-available-width",`${ge}px`),ut.setProperty("--radix-popper-available-height",`${fe}px`),ut.setProperty("--radix-popper-anchor-width",`${$e}px`),ut.setProperty("--radix-popper-anchor-height",`${un}px`)}}),S&&N5({element:S,padding:l}),Z5({arrowWidth:k,arrowHeight:N}),p&&k5({strategy:"referenceHidden",...L})]}),[M,D]=Q_($),B=_n(g);He(()=>{F&&(B==null||B())},[F,B]);const O=(H=T.arrow)==null?void 0:H.x,W=(Y=T.arrow)==null?void 0:Y.y,G=((K=T.arrow)==null?void 0:K.centerOffset)!==0,[U,X]=h.useState();return He(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:F?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(ee=T.transformOrigin)==null?void 0:ee.x,(J=T.transformOrigin)==null?void 0:J.y].join(" "),...((Q=T.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(Y5,{scope:r,placedSide:M,onArrowChange:C,arrowX:O,arrowY:W,shouldHideArrow:G,children:b.jsx(H_.div,{"data-side":M,"data-align":D,...v,ref:x,style:{...v.style,animation:F?void 0:"none"}})})})});K_.displayName=bm;var q_="PopperArrow",K5={top:"bottom",right:"left",bottom:"top",left:"right"},Z_=h.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=X5(q_,o),a=K5[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(D5,{...i,ref:r,style:{...i.style,display:"block"}})})});Z_.displayName=q_;function q5(e){return e!==null}var Z5=e=>({name:"transformOrigin",options:e,fn(n){var _,y,w;const{placement:r,rects:o,middlewareData:i}=n,a=((_=i.arrow)==null?void 0:_.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=Q_(r),f={start:"0%",center:"50%",end:"100%"}[d],p=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,m=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let g="",v="";return u==="bottom"?(g=a?f:`${p}px`,v=`${-c}px`):u==="top"?(g=a?f:`${p}px`,v=`${o.floating.height+c}px`):u==="right"?(g=`${-c}px`,v=a?f:`${m}px`):u==="left"&&(g=`${o.floating.width+c}px`,v=a?f:`${m}px`),{data:{x:g,y:v}}}});function Q_(e){const[n,r="center"]=e.split("-");return[n,r]}var ba=X_,Mu=K_,Au=Z_;function J_(e){const n=Q5(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(e4);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Q5(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=n4(i),l=t4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var J5=Symbol("radix.slottable");function e4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===J5}function t4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function n4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var r4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_a=r4.reduce((e,n)=>{const r=J_(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function o4(e,n){e&&xo.flushSync(()=>e.dispatchEvent(n))}function i4(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,s4(i,...n)]}function s4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function a4(e){const n=l4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(u4);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function l4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=d4(i),l=f4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var c4=Symbol("radix.slottable");function u4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c4}function f4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function d4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var p4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],eS=p4.reduce((e,n)=>{const r=a4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),qf="rovingFocusGroup.onEntryFocus",h4={bubbles:!1,cancelable:!0},Sa="RovingFocusGroup",[yp,tS,m4]=hm(Sa),[g4,Tu]=i4(Sa,[m4]),[y4,v4]=g4(Sa),nS=h.forwardRef((e,n)=>b.jsx(yp.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(yp.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(x4,{...e,ref:n})})}));nS.displayName=Sa;var x4=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),m=pe(n,p),g=M_(s),[v,_]=pa({prop:a,defaultProp:l??null,onChange:c,caller:Sa}),[y,w]=h.useState(!1),x=_n(u),S=tS(r),C=h.useRef(!1),[E,k]=h.useState(0);return h.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(qf,x),()=>N.removeEventListener(qf,x)},[x]),b.jsx(y4,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:v,onItemFocus:h.useCallback(N=>_(N),[_]),onItemShiftTab:h.useCallback(()=>w(!0),[]),onFocusableItemAdd:h.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>k(N=>N-1),[]),children:b.jsx(eS.div,{tabIndex:y||E===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{C.current=!0}),onFocus:te(e.onFocus,N=>{const A=!C.current;if(N.target===N.currentTarget&&A&&!y){const R=new CustomEvent(qf,h4);if(N.currentTarget.dispatchEvent(R),!R.defaultPrevented){const I=S().filter($=>$.focusable),j=I.find($=>$.active),L=I.find($=>$.id===v),z=[j,L,...I].filter(Boolean).map($=>$.ref.current);iS(z,d)}}C.current=!1}),onBlur:te(e.onBlur,()=>w(!1))})})}),rS="RovingFocusGroupItem",oS=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=kt(),u=s||c,d=v4(rS,r),f=d.currentTabStopId===u,p=tS(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=d;return h.useEffect(()=>{if(o)return m(),()=>g()},[o,m,g]),b.jsx(yp.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:b.jsx(eS.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:te(e.onMouseDown,_=>{o?d.onItemFocus(u):_.preventDefault()}),onFocus:te(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:te(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){d.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=_4(_,d.orientation,d.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let x=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const S=x.indexOf(_.currentTarget);x=d.loop?S4(x,S+1):x.slice(S+1)}setTimeout(()=>iS(x))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:v!=null}):a})})});oS.displayName=rS;var w4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function b4(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _4(e,n,r){const o=b4(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return w4[o]}function iS(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function S4(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var sS=nS,aS=oS,vp=["Enter"," "],C4=["ArrowDown","PageUp","Home"],lS=["ArrowUp","PageDown","End"],E4=[...C4,...lS],k4={ltr:[...vp,"ArrowRight"],rtl:[...vp,"ArrowLeft"]},N4={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Iu="Menu",[Ks,P4,R4]=hm(Iu),[bo,cS]=bO(Iu,[R4,Or,Tu]),_m=Or(),uS=Tu(),[CX,_o]=bo(Iu),[EX,Ca]=bo(Iu),M4="MenuAnchor",Sm=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=_m(r);return b.jsx(ba,{...i,...o,ref:n})});Sm.displayName=M4;var Cm="MenuPortal",[A4,fS]=bo(Cm,{forceMount:void 0}),dS=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=_o(Cm,n);return b.jsx(A4,{scope:n,forceMount:r,children:b.jsx(yt,{present:r||s.open,children:b.jsx(Ai,{asChild:!0,container:i,children:o})})})};dS.displayName=Cm;var Bt="MenuContent",[T4,Em]=bo(Bt),pS=h.forwardRef((e,n)=>{const r=fS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=_o(Bt,e.__scopeMenu),a=Ca(Bt,e.__scopeMenu);return b.jsx(Ks.Provider,{scope:e.__scopeMenu,children:b.jsx(yt,{present:o||s.open,children:b.jsx(Ks.Slot,{scope:e.__scopeMenu,children:a.modal?b.jsx(I4,{...i,ref:n}):b.jsx(j4,{...i,ref:n})})})})}),I4=h.forwardRef((e,n)=>{const r=_o(Bt,e.__scopeMenu),o=h.useRef(null),i=pe(n,o);return h.useEffect(()=>{const s=o.current;if(s)return bu(s)},[]),b.jsx(km,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),j4=h.forwardRef((e,n)=>{const r=_o(Bt,e.__scopeMenu);return b.jsx(km,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),$4=J_("MenuContent.ScrollLock"),km=h.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...v}=e,_=_o(Bt,r),y=Ca(Bt,r),w=_m(r),x=uS(r),S=P4(r),[C,E]=h.useState(null),k=h.useRef(null),N=pe(n,k,_.onContentChange),A=h.useRef(0),R=h.useRef(""),I=h.useRef(0),j=h.useRef(null),L=h.useRef("right"),P=h.useRef(0),z=g?ga:h.Fragment,$=g?{as:$4,allowPinchZoom:!0}:void 0,F=M=>{var H,Y;const D=R.current+M,B=S().filter(K=>!K.disabled),O=document.activeElement,W=(H=B.find(K=>K.ref.current===O))==null?void 0:H.textValue,G=B.map(K=>K.textValue),U=Y4(G,D,W),X=(Y=B.find(K=>K.textValue===U))==null?void 0:Y.ref.current;(function K(ee){R.current=ee,window.clearTimeout(A.current),ee!==""&&(A.current=window.setTimeout(()=>K(""),1e3))})(D),X&&setTimeout(()=>X.focus())};h.useEffect(()=>()=>window.clearTimeout(A.current),[]),xu();const T=h.useCallback(M=>{var B,O;return L.current===((B=j.current)==null?void 0:B.side)&&K4(M,(O=j.current)==null?void 0:O.area)},[]);return b.jsx(T4,{scope:r,searchRef:R,onItemEnter:h.useCallback(M=>{T(M)&&M.preventDefault()},[T]),onItemLeave:h.useCallback(M=>{var D;T(M)||((D=k.current)==null||D.focus(),E(null))},[T]),onTriggerLeave:h.useCallback(M=>{T(M)&&M.preventDefault()},[T]),pointerGraceTimerRef:I,onPointerGraceIntentChange:h.useCallback(M=>{j.current=M},[]),children:b.jsx(z,{...$,children:b.jsx(ha,{asChild:!0,trapped:i,onMountAutoFocus:te(s,M=>{var D;M.preventDefault(),(D=k.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:b.jsx(Mi,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:b.jsx(sS,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:te(c,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Mu,{role:"menu","aria-orientation":"vertical","data-state":RS(_.open),"data-radix-menu-content":"",dir:y.dir,...w,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:te(v.onKeyDown,M=>{const B=M.target.closest("[data-radix-menu-content]")===M.currentTarget,O=M.ctrlKey||M.altKey||M.metaKey,W=M.key.length===1;B&&(M.key==="Tab"&&M.preventDefault(),!O&&W&&F(M.key));const G=k.current;if(M.target!==G||!E4.includes(M.key))return;M.preventDefault();const X=S().filter(H=>!H.disabled).map(H=>H.ref.current);lS.includes(M.key)&&X.reverse(),U4(X)}),onBlur:te(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(A.current),R.current="")}),onPointerMove:te(e.onPointerMove,qs(M=>{const D=M.target,B=P.current!==M.clientX;if(M.currentTarget.contains(D)&&B){const O=M.clientX>P.current?"right":"left";L.current=O,P.current=M.clientX}}))})})})})})})});pS.displayName=Bt;var O4="MenuGroup",Nm=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return b.jsx(_a.div,{role:"group",...o,ref:n})});Nm.displayName=O4;var D4="MenuLabel",hS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return b.jsx(_a.div,{...o,ref:n})});hS.displayName=D4;var Ec="MenuItem",Pv="menu.itemSelect",ju=h.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...i}=e,s=h.useRef(null),a=Ca(Ec,e.__scopeMenu),l=Em(Ec,e.__scopeMenu),c=pe(n,s),u=h.useRef(!1),d=()=>{const f=s.current;if(!r&&f){const p=new CustomEvent(Pv,{bubbles:!0,cancelable:!0});f.addEventListener(Pv,m=>o==null?void 0:o(m),{once:!0}),o4(f,p),p.defaultPrevented?u.current=!1:a.onClose()}};return b.jsx(mS,{...i,ref:c,disabled:r,onClick:te(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),u.current=!0},onPointerUp:te(e.onPointerUp,f=>{var p;u.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:te(e.onKeyDown,f=>{const p=l.searchRef.current!=="";r||p&&f.key===" "||vp.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});ju.displayName=Ec;var mS=h.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,a=Em(Ec,r),l=uS(r),c=h.useRef(null),u=pe(n,c),[d,f]=h.useState(!1),[p,m]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[s.children]),b.jsx(Ks.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:b.jsx(aS,{asChild:!0,...l,focusable:!o,children:b.jsx(_a.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:te(e.onPointerMove,qs(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,qs(g=>a.onItemLeave(g))),onFocus:te(e.onFocus,()=>f(!0)),onBlur:te(e.onBlur,()=>f(!1))})})})}),L4="MenuCheckboxItem",gS=h.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return b.jsx(bS,{scope:e.__scopeMenu,checked:r,children:b.jsx(ju,{role:"menuitemcheckbox","aria-checked":kc(r)?"mixed":r,...i,ref:n,"data-state":Rm(r),onSelect:te(i.onSelect,()=>o==null?void 0:o(kc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});gS.displayName=L4;var yS="MenuRadioGroup",[z4,F4]=bo(yS,{value:void 0,onValueChange:()=>{}}),vS=h.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=_n(o);return b.jsx(z4,{scope:e.__scopeMenu,value:r,onValueChange:s,children:b.jsx(Nm,{...i,ref:n})})});vS.displayName=yS;var xS="MenuRadioItem",wS=h.forwardRef((e,n)=>{const{value:r,...o}=e,i=F4(xS,e.__scopeMenu),s=r===i.value;return b.jsx(bS,{scope:e.__scopeMenu,checked:s,children:b.jsx(ju,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Rm(s),onSelect:te(o.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});wS.displayName=xS;var Pm="MenuItemIndicator",[bS,V4]=bo(Pm,{checked:!1}),_S=h.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=V4(Pm,r);return b.jsx(yt,{present:o||kc(s.checked)||s.checked===!0,children:b.jsx(_a.span,{...i,ref:n,"data-state":Rm(s.checked)})})});_S.displayName=Pm;var B4="MenuSeparator",SS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return b.jsx(_a.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});SS.displayName=B4;var H4="MenuArrow",CS=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=_m(r);return b.jsx(Au,{...i,...o,ref:n})});CS.displayName=H4;var W4="MenuSub",[kX,ES]=bo(W4),ls="MenuSubTrigger",kS=h.forwardRef((e,n)=>{const r=_o(ls,e.__scopeMenu),o=Ca(ls,e.__scopeMenu),i=ES(ls,e.__scopeMenu),s=Em(ls,e.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),b.jsx(Sm,{asChild:!0,...u,children:b.jsx(mS,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":RS(r.open),...e,ref:_e(n,i.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,qs(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:te(e.onPointerLeave,qs(f=>{var m,g;d();const p=(m=r.content)==null?void 0:m.getBoundingClientRect();if(p){const v=(g=r.content)==null?void 0:g.dataset.side,_=v==="right",y=_?-5:5,w=p[_?"left":"right"],x=p[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:w,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:w,y:p.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,f=>{var m;const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||k4[o.dir].includes(f.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),f.preventDefault())})})})});kS.displayName=ls;var NS="MenuSubContent",PS=h.forwardRef((e,n)=>{const r=fS(Bt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=_o(Bt,e.__scopeMenu),a=Ca(Bt,e.__scopeMenu),l=ES(NS,e.__scopeMenu),c=h.useRef(null),u=pe(n,c);return b.jsx(Ks.Provider,{scope:e.__scopeMenu,children:b.jsx(yt,{present:o||s.open,children:b.jsx(Ks.Slot,{scope:e.__scopeMenu,children:b.jsx(km,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:te(e.onFocusOutside,d=>{d.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:te(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),p=N4[a.dir].includes(d.key);f&&p&&(s.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});PS.displayName=NS;function RS(e){return e?"open":"closed"}function kc(e){return e==="indeterminate"}function Rm(e){return kc(e)?"indeterminate":e?"checked":"unchecked"}function U4(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function G4(e,n){return e.map((r,o)=>e[(n+o)%e.length])}function Y4(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=G4(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function X4(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,d=l.y,f=c.x,p=c.y;d>o!=p>o&&r<(f-u)*(o-d)/(p-d)+u&&(i=!i)}return i}function K4(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return X4(r,n)}function qs(e){return n=>n.pointerType==="mouse"?e(n):void 0}var q4=Sm,Z4=dS,Q4=pS,J4=Nm,eD=hS,tD=ju,nD=gS,rD=vS,oD=wS,iD=_S,sD=SS,aD=CS,lD=kS,cD=PS,MS="DropdownMenu",[uD]=oO(MS,[cS]),xt=cS(),[NX,AS]=uD(MS),TS="DropdownMenuTrigger",fD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=AS(TS,r),a=xt(r);return b.jsx(q4,{asChild:!0,...a,children:b.jsx(pO.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:_e(n,s.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});fD.displayName=TS;var dD="DropdownMenuPortal",IS=e=>{const{__scopeDropdownMenu:n,...r}=e,o=xt(n);return b.jsx(Z4,{...o,...r})};IS.displayName=dD;var jS="DropdownMenuContent",$S=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=AS(jS,r),s=xt(r),a=h.useRef(!1);return b.jsx(Q4,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$S.displayName=jS;var pD="DropdownMenuGroup",hD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(J4,{...i,...o,ref:n})});hD.displayName=pD;var mD="DropdownMenuLabel",OS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(eD,{...i,...o,ref:n})});OS.displayName=mD;var gD="DropdownMenuItem",DS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(tD,{...i,...o,ref:n})});DS.displayName=gD;var yD="DropdownMenuCheckboxItem",LS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(nD,{...i,...o,ref:n})});LS.displayName=yD;var vD="DropdownMenuRadioGroup",xD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(rD,{...i,...o,ref:n})});xD.displayName=vD;var wD="DropdownMenuRadioItem",zS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(oD,{...i,...o,ref:n})});zS.displayName=wD;var bD="DropdownMenuItemIndicator",FS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(iD,{...i,...o,ref:n})});FS.displayName=bD;var _D="DropdownMenuSeparator",VS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(sD,{...i,...o,ref:n})});VS.displayName=_D;var SD="DropdownMenuArrow",CD=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(aD,{...i,...o,ref:n})});CD.displayName=SD;var ED="DropdownMenuSubTrigger",BS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(lD,{...i,...o,ref:n})});BS.displayName=ED;var kD="DropdownMenuSubContent",HS=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=xt(r);return b.jsx(cD,{...i,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HS.displayName=kD;var ND=IS,WS=$S,US=OS,GS=DS,YS=LS,XS=zS,KS=FS,qS=VS,ZS=BS,QS=HS;const PD=h.forwardRef(({className:e,inset:n,children:r,...o},i)=>b.jsxs(ZS,{ref:i,className:se("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[r,b.jsx(hI,{className:"ml-auto"})]}));PD.displayName=ZS.displayName;const RD=h.forwardRef(({className:e,...n},r)=>b.jsx(QS,{ref:r,className:se("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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));RD.displayName=QS.displayName;const MD=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>b.jsx(ND,{children:b.jsx(WS,{ref:o,sideOffset:n,className:se("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));MD.displayName=WS.displayName;const AD=h.forwardRef(({className:e,inset:n,...r},o)=>b.jsx(GS,{ref:o,className:se("relative flex cursor-default select-none items-center gap-2 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 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...r}));AD.displayName=GS.displayName;const TD=h.forwardRef(({className:e,children:n,checked:r,...o},i)=>b.jsxs(YS,{ref:i,className:se("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",e),checked:r,...o,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(KS,{children:b.jsx(rm,{className:"h-4 w-4"})})}),n]}));TD.displayName=YS.displayName;const ID=h.forwardRef(({className:e,children:n,...r},o)=>b.jsxs(XS,{ref:o,className:se("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",e),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(KS,{children:b.jsx(SI,{className:"h-2 w-2 fill-current"})})}),n]}));ID.displayName=XS.displayName;const jD=h.forwardRef(({className:e,inset:n,...r},o)=>b.jsx(US,{ref:o,className:se("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));jD.displayName=US.displayName;const $D=h.forwardRef(({className:e,...n},r)=>b.jsx(qS,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));$D.displayName=qS.displayName;const OD=h.forwardRef(({className:e,type:n,...r},o)=>b.jsx("input",{type:n,className:se("flex h-9 w-full rounded-md border border-transparent bg-input px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));OD.displayName="Input";var DD="Label",JS=h.forwardRef((e,n)=>b.jsx(lt.label,{...e,ref:n,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));JS.displayName=DD;var eC=JS;const LD=tm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),zD=h.forwardRef(({className:e,...n},r)=>b.jsx(eC,{ref:r,className:se(LD(),e),...n}));zD.displayName=eC.displayName;function FD(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,VD(i,...n)]}function VD(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function tC(e){const n=BD(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(WD);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function BD(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=GD(i),l=UD(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var HD=Symbol("radix.slottable");function WD(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HD}function UD(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function GD(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var YD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nC=YD.reduce((e,n)=>{const r=tC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),rC="Popover",[oC]=FD(rC,[Or]),$u=Or(),[PX,Dr]=oC(rC),iC="PopoverAnchor",XD=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(iC,r),s=$u(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return h.useEffect(()=>(a(),()=>l()),[a,l]),b.jsx(ba,{...s,...o,ref:n})});XD.displayName=iC;var sC="PopoverTrigger",KD=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(sC,r),s=$u(r),a=pe(n,i.triggerRef),l=b.jsx(nC.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fC(i.open),...o,ref:a,onClick:te(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:b.jsx(ba,{asChild:!0,...s,children:l})});KD.displayName=sC;var Mm="PopoverPortal",[qD,ZD]=oC(Mm,{forceMount:void 0}),aC=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=Dr(Mm,n);return b.jsx(qD,{scope:n,forceMount:r,children:b.jsx(yt,{present:r||s.open,children:b.jsx(Ai,{asChild:!0,container:i,children:o})})})};aC.displayName=Mm;var hi="PopoverContent",lC=h.forwardRef((e,n)=>{const r=ZD(hi,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=Dr(hi,e.__scopePopover);return b.jsx(yt,{present:o||s.open,children:s.modal?b.jsx(JD,{...i,ref:n}):b.jsx(eL,{...i,ref:n})})});lC.displayName=hi;var QD=tC("PopoverContent.RemoveScroll"),JD=h.forwardRef((e,n)=>{const r=Dr(hi,e.__scopePopover),o=h.useRef(null),i=pe(n,o),s=h.useRef(!1);return h.useEffect(()=>{const a=o.current;if(a)return bu(a)},[]),b.jsx(ga,{as:QD,allowPinchZoom:!0,children:b.jsx(cC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),eL=h.forwardRef((e,n)=>{const r=Dr(hi,e.__scopePopover),o=h.useRef(!1),i=h.useRef(!1);return b.jsx(cC,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),cC=h.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Dr(hi,r),m=$u(r);return xu(),b.jsx(ha,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:b.jsx(Mi,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:b.jsx(Mu,{"data-state":fC(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),uC="PopoverClose",tL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Dr(uC,r);return b.jsx(nC.button,{type:"button",...o,ref:n,onClick:te(e.onClick,()=>i.onOpenChange(!1))})});tL.displayName=uC;var nL="PopoverArrow",rL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=$u(r);return b.jsx(Au,{...i,...o,ref:n})});rL.displayName=nL;function fC(e){return e?"open":"closed"}var oL=aC,dC=lC;const iL=h.forwardRef(({className:e,align:n="start",sideOffset:r=4,...o},i)=>b.jsx(oL,{children:b.jsx(dC,{ref:i,align:n,sideOffset:r,className:se("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none 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",e),...o})}));iL.displayName=dC.displayName;var Am="Progress",Tm=100,[sL]=mb(Am),[aL,lL]=sL(Am),pC=h.forwardRef((e,n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:s=cL,...a}=e;(i||i===0)&&!Rv(i)&&console.error(uL(`${i}`,"Progress"));const l=Rv(i)?i:Tm;o!==null&&!Mv(o,l)&&console.error(fL(`${o}`,"Progress"));const c=Mv(o,l)?o:null,u=Nc(c)?s(c,l):void 0;return b.jsx(aL,{scope:r,value:c,max:l,children:b.jsx(lt.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Nc(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":gC(c,l),"data-value":c??void 0,"data-max":l,...a,ref:n})})});pC.displayName=Am;var hC="ProgressIndicator",mC=h.forwardRef((e,n)=>{const{__scopeProgress:r,...o}=e,i=lL(hC,r);return b.jsx(lt.div,{"data-state":gC(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});mC.displayName=hC;function cL(e,n){return`${Math.round(e/n*100)}%`}function gC(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function Nc(e){return typeof e=="number"}function Rv(e){return Nc(e)&&!isNaN(e)&&e>0}function Mv(e,n){return Nc(e)&&!isNaN(e)&&e<=n&&e>=0}function uL(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Tm}\`.`}function fL(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
295
- - a positive number
296
- - less than the value passed to \`max\` (or ${Tm} if no \`max\` prop is set)
297
- - \`null\` or \`undefined\` if the progress is indeterminate.
298
-
299
- Defaulting to \`null\`.`}var yC=pC,dL=mC;const pL=h.forwardRef(({className:e,value:n,...r},o)=>b.jsx(yC,{ref:o,className:se("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:b.jsx(dL,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));pL.displayName=yC.displayName;function Av(e,[n,r]){return Math.min(r,Math.max(n,e))}function hL(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,mL(i,...n)]}function mL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function vC(e){const n=gL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(vL);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function gL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=wL(i),l=xL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var yL=Symbol("radix.slottable");function vL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yL}function xL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function wL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=bL.reduce((e,n)=>{const r=vC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function _L(e){const n=SL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(EL);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function SL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=NL(i),l=kL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var CL=Symbol("radix.slottable");function EL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CL}function kL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function NL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var PL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RL=PL.reduce((e,n)=>{const r=_L(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),xC=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"}),ML="VisuallyHidden",wC=h.forwardRef((e,n)=>b.jsx(RL.span,{...e,ref:n,style:{...xC,...e.style}}));wC.displayName=ML;var AL=wC,TL=[" ","Enter","ArrowUp","ArrowDown"],IL=[" ","Enter"],Ou="Select",[Im,Du,jL]=hm(Ou),[ji]=hL(Ou,[jL,Or]),jm=Or(),[RX,Lr]=ji(Ou),[MX,$L]=ji(Ou),bC="SelectTrigger",_C=h.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,s=jm(r),a=Lr(bC,r),l=a.disabled||o,c=pe(n,a.onTriggerChange),u=Du(r),d=h.useRef("touch"),[f,p,m]=WC(v=>{const _=u().filter(x=>!x.disabled),y=_.find(x=>x.value===a.value),w=UC(_,v,y);w!==void 0&&a.onValueChange(w.value)}),g=v=>{l||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return b.jsx(ba,{asChild:!0,...s,children:b.jsx(Tt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":HC(a.value)?"":void 0,...i,ref:c,onClick:te(i.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&g(v)}),onPointerDown:te(i.onPointerDown,v=>{d.current=v.pointerType;const _=v.target;_.hasPointerCapture(v.pointerId)&&_.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:te(i.onKeyDown,v=>{const _=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(_&&v.key===" ")&&TL.includes(v.key)&&(g(),v.preventDefault())})})})});_C.displayName=bC;var SC="SelectValue",OL=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=Lr(SC,r),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=pe(n,c.onValueNodeChange);return He(()=>{u(d)},[u,d]),b.jsx(Tt.span,{...l,ref:f,style:{pointerEvents:"none"},children:HC(c.value)?b.jsx(b.Fragment,{children:a}):s})});OL.displayName=SC;var DL="SelectIcon",CC=h.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return b.jsx(Tt.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});CC.displayName=DL;var LL="SelectPortal",EC=e=>b.jsx(Ai,{asChild:!0,...e});EC.displayName=LL;var fo="SelectContent",kC=h.forwardRef((e,n)=>{const r=Lr(fo,e.__scopeSelect),[o,i]=h.useState();if(He(()=>{i(new DocumentFragment)},[]),!r.open){const s=o;return s?xo.createPortal(b.jsx(NC,{scope:e.__scopeSelect,children:b.jsx(Im.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),s):null}return b.jsx(PC,{...e,ref:n})});kC.displayName=fo;var Yt=10,[NC,zr]=ji(fo),zL="SelectContentImpl",FL=vC("SelectContent.RemoveScroll"),PC=h.forwardRef((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:_,...y}=e,w=Lr(fo,r),[x,S]=h.useState(null),[C,E]=h.useState(null),k=pe(n,H=>S(H)),[N,A]=h.useState(null),[R,I]=h.useState(null),j=Du(r),[L,P]=h.useState(!1),z=h.useRef(!1);h.useEffect(()=>{if(x)return bu(x)},[x]),xu();const $=h.useCallback(H=>{const[Y,...K]=j().map(Q=>Q.ref.current),[ee]=K.slice(-1),J=document.activeElement;for(const Q of H)if(Q===J||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===Y&&C&&(C.scrollTop=0),Q===ee&&C&&(C.scrollTop=C.scrollHeight),Q==null||Q.focus(),document.activeElement!==J))return},[j,C]),F=h.useCallback(()=>$([N,x]),[$,N,x]);h.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:T,triggerPointerDownPosRef:M}=w;h.useEffect(()=>{if(x){let H={x:0,y:0};const Y=ee=>{var J,Q;H={x:Math.abs(Math.round(ee.pageX)-(((J=M.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((Q=M.current)==null?void 0:Q.y)??0))}},K=ee=>{H.x<=10&&H.y<=10?ee.preventDefault():x.contains(ee.target)||T(!1),document.removeEventListener("pointermove",Y),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",K,{capture:!0})}}},[x,T,M]),h.useEffect(()=>{const H=()=>T(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[T]);const[D,B]=WC(H=>{const Y=j().filter(J=>!J.disabled),K=Y.find(J=>J.ref.current===document.activeElement),ee=UC(Y,H,K);ee&&setTimeout(()=>ee.ref.current.focus())}),O=h.useCallback((H,Y,K)=>{const ee=!z.current&&!K;(w.value!==void 0&&w.value===Y||ee)&&(A(H),ee&&(z.current=!0))},[w.value]),W=h.useCallback(()=>x==null?void 0:x.focus(),[x]),G=h.useCallback((H,Y,K)=>{const ee=!z.current&&!K;(w.value!==void 0&&w.value===Y||ee)&&I(H)},[w.value]),U=o==="popper"?xp:RC,X=U===xp?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:_}:{};return b.jsx(NC,{scope:r,content:x,viewport:C,onViewportChange:E,itemRefCallback:O,selectedItem:N,onItemLeave:W,itemTextRefCallback:G,focusSelectedItem:F,selectedItemText:R,position:o,isPositioned:L,searchRef:D,children:b.jsx(ga,{as:FL,allowPinchZoom:!0,children:b.jsx(ha,{asChild:!0,trapped:w.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:te(i,H=>{var Y;(Y=w.trigger)==null||Y.focus({preventScroll:!0}),H.preventDefault()}),children:b.jsx(Mi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:b.jsx(U,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:H=>H.preventDefault(),...y,...X,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,H=>{const Y=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!Y&&H.key.length===1&&B(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let ee=j().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(H.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const J=H.target,Q=ee.indexOf(J);ee=ee.slice(Q+1)}setTimeout(()=>$(ee)),H.preventDefault()}})})})})})})});PC.displayName=zL;var VL="SelectItemAlignedPosition",RC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,s=Lr(fo,r),a=zr(fo,r),[l,c]=h.useState(null),[u,d]=h.useState(null),f=pe(n,k=>d(k)),p=Du(r),m=h.useRef(!1),g=h.useRef(!0),{viewport:v,selectedItem:_,selectedItemText:y,focusSelectedItem:w}=a,x=h.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&v&&_&&y){const k=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),R=y.getBoundingClientRect();if(s.dir!=="rtl"){const J=R.left-N.left,Q=A.left-J,ne=k.left-Q,ce=k.width+ne,ge=Math.max(ce,N.width),fe=window.innerWidth-Yt,$e=Av(Q,[Yt,Math.max(Yt,fe-ge)]);l.style.minWidth=ce+"px",l.style.left=$e+"px"}else{const J=N.right-R.right,Q=window.innerWidth-A.right-J,ne=window.innerWidth-k.right-Q,ce=k.width+ne,ge=Math.max(ce,N.width),fe=window.innerWidth-Yt,$e=Av(Q,[Yt,Math.max(Yt,fe-ge)]);l.style.minWidth=ce+"px",l.style.right=$e+"px"}const I=p(),j=window.innerHeight-Yt*2,L=v.scrollHeight,P=window.getComputedStyle(u),z=parseInt(P.borderTopWidth,10),$=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),T=parseInt(P.paddingBottom,10),M=z+$+L+T+F,D=Math.min(_.offsetHeight*5,M),B=window.getComputedStyle(v),O=parseInt(B.paddingTop,10),W=parseInt(B.paddingBottom,10),G=k.top+k.height/2-Yt,U=j-G,X=_.offsetHeight/2,H=_.offsetTop+X,Y=z+$+H,K=M-Y;if(Y<=G){const J=I.length>0&&_===I[I.length-1].ref.current;l.style.bottom="0px";const Q=u.clientHeight-v.offsetTop-v.offsetHeight,ne=Math.max(U,X+(J?W:0)+Q+F),ce=Y+ne;l.style.height=ce+"px"}else{const J=I.length>0&&_===I[0].ref.current;l.style.top="0px";const ne=Math.max(G,z+v.offsetTop+(J?O:0)+X)+K;l.style.height=ne+"px",v.scrollTop=Y-G+v.offsetTop}l.style.margin=`${Yt}px 0`,l.style.minHeight=D+"px",l.style.maxHeight=j+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,l,u,v,_,y,s.dir,o]);He(()=>x(),[x]);const[S,C]=h.useState();He(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const E=h.useCallback(k=>{k&&g.current===!0&&(x(),w==null||w(),g.current=!1)},[x,w]);return b.jsx(HL,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:b.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(Tt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});RC.displayName=VL;var BL="SelectPopperPosition",xp=h.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Yt,...s}=e,a=jm(r);return b.jsx(Mu,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});xp.displayName=BL;var[HL,$m]=ji(fo,{}),wp="SelectViewport",MC=h.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...i}=e,s=zr(wp,r),a=$m(wp,r),l=pe(n,s.onViewportChange),c=h.useRef(0);return b.jsxs(b.Fragment,{children:[b.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:o}),b.jsx(Im.Slot,{scope:r,children:b.jsx(Tt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:te(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const g=window.innerHeight-Yt*2,v=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),y=Math.max(v,_);if(y<g){const w=y+m,x=Math.min(g,w),S=w-x;f.style.height=x+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});MC.displayName=wp;var AC="SelectGroup",[WL,UL]=ji(AC),GL=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=kt();return b.jsx(WL,{scope:r,id:i,children:b.jsx(Tt.div,{role:"group","aria-labelledby":i,...o,ref:n})})});GL.displayName=AC;var TC="SelectLabel",IC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=UL(TC,r);return b.jsx(Tt.div,{id:i.id,...o,ref:n})});IC.displayName=TC;var Pc="SelectItem",[YL,jC]=ji(Pc),$C=h.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=e,l=Lr(Pc,r),c=zr(Pc,r),u=l.value===o,[d,f]=h.useState(s??""),[p,m]=h.useState(!1),g=pe(n,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,o,i)}),v=kt(),_=h.useRef("touch"),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 b.jsx(YL,{scope:r,value:o,disabled:i,textId:v,isSelected:u,onItemTextChange:h.useCallback(w=>{f(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:b.jsx(Im.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:b.jsx(Tt.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:te(a.onFocus,()=>m(!0)),onBlur:te(a.onBlur,()=>m(!1)),onClick:te(a.onClick,()=>{_.current!=="mouse"&&y()}),onPointerUp:te(a.onPointerUp,()=>{_.current==="mouse"&&y()}),onPointerDown:te(a.onPointerDown,w=>{_.current=w.pointerType}),onPointerMove:te(a.onPointerMove,w=>{var x;_.current=w.pointerType,i?(x=c.onItemLeave)==null||x.call(c):_.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(a.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:te(a.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(IL.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});$C.displayName=Pc;var cs="SelectItemText",OC=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,...s}=e,a=Lr(cs,r),l=zr(cs,r),c=jC(cs,r),u=$L(cs,r),[d,f]=h.useState(null),p=pe(n,y=>f(y),c.onItemTextChange,y=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,y,c.value,c.disabled)}),m=d==null?void 0:d.textContent,g=h.useMemo(()=>b.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:_}=u;return He(()=>(v(g),()=>_(g)),[v,_,g]),b.jsxs(b.Fragment,{children:[b.jsx(Tt.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?xo.createPortal(s.children,a.valueNode):null]})});OC.displayName=cs;var DC="SelectItemIndicator",LC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return jC(DC,r).isSelected?b.jsx(Tt.span,{"aria-hidden":!0,...o,ref:n}):null});LC.displayName=DC;var bp="SelectScrollUpButton",zC=h.forwardRef((e,n)=>{const r=zr(bp,e.__scopeSelect),o=$m(bp,e.__scopeSelect),[i,s]=h.useState(!1),a=pe(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?b.jsx(VC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});zC.displayName=bp;var _p="SelectScrollDownButton",FC=h.forwardRef((e,n)=>{const r=zr(_p,e.__scopeSelect),o=$m(_p,e.__scopeSelect),[i,s]=h.useState(!1),a=pe(n,o.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?b.jsx(VC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});FC.displayName=_p;var VC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=zr("SelectScrollButton",r),a=h.useRef(null),l=Du(r),c=h.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),He(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),b.jsx(Tt.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:te(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:te(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:te(i.onPointerLeave,()=>{c()})})}),XL="SelectSeparator",BC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return b.jsx(Tt.div,{"aria-hidden":!0,...o,ref:n})});BC.displayName=XL;var Sp="SelectArrow",KL=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=jm(r),s=Lr(Sp,r),a=zr(Sp,r);return s.open&&a.position==="popper"?b.jsx(Au,{...i,...o,ref:n}):null});KL.displayName=Sp;var qL="SelectBubbleInput",ZL=h.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const i=h.useRef(null),s=pe(o,i),a=om(n);return h.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(f)}},[a,n]),b.jsx(Tt.select,{...r,style:{...xC,...r.style},ref:s,defaultValue:n})});ZL.displayName=qL;function HC(e){return e===""||e===void 0}function WC(e){const n=_n(e),r=h.useRef(""),o=h.useRef(0),i=h.useCallback(a=>{const l=r.current+a;n(l),function c(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>c(""),1e3))}(l)},[n]),s=h.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,s]}function UC(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=QL(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function QL(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var GC=_C,JL=CC,ez=EC,YC=kC,tz=MC,XC=IC,KC=$C,nz=OC,rz=LC,qC=zC,ZC=FC,QC=BC;const oz=h.forwardRef(({className:e,children:n,...r},o)=>b.jsxs(GC,{ref:o,className:se("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent bg-input px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground/50 data-[placeholder]:font-light focus:outline-none focus:border-ring focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,b.jsx(JL,{asChild:!0,children:b.jsx(Tb,{className:"h-4 w-4 opacity-50"})})]}));oz.displayName=GC.displayName;const JC=h.forwardRef(({className:e,...n},r)=>b.jsx(qC,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:b.jsx(gI,{className:"h-4 w-4"})}));JC.displayName=qC.displayName;const e2=h.forwardRef(({className:e,...n},r)=>b.jsx(ZC,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...n,children:b.jsx(Tb,{className:"h-4 w-4"})}));e2.displayName=ZC.displayName;const iz=h.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>b.jsx(ez,{children:b.jsxs(YC,{ref:i,className:se("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",r==="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",e),position:r,...o,children:[b.jsx(JC,{}),b.jsx(tz,{className:se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),b.jsx(e2,{})]})}));iz.displayName=YC.displayName;const sz=h.forwardRef(({className:e,...n},r)=>b.jsx(XC,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",e),...n}));sz.displayName=XC.displayName;const az=h.forwardRef(({className:e,children:n,...r},o)=>b.jsxs(KC,{ref:o,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(rz,{children:b.jsx(rm,{className:"h-4 w-4"})})}),b.jsx(nz,{children:n})]}));az.displayName=KC.displayName;const lz=h.forwardRef(({className:e,...n},r)=>b.jsx(QC,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...n}));lz.displayName=QC.displayName;var cz="Separator",Tv="horizontal",uz=["horizontal","vertical"],t2=h.forwardRef((e,n)=>{const{decorative:r,orientation:o=Tv,...i}=e,s=fz(o)?o:Tv,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return b.jsx(lt.div,{"data-orientation":s,...l,...i,ref:n})});t2.displayName=cz;function fz(e){return uz.includes(e)}var n2=t2;const dz=h.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...o},i)=>b.jsx(n2,{ref:i,decorative:r,orientation:n,className:se("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));dz.displayName=n2.displayName;const pz=dm,r2=h.forwardRef(({className:e,...n},r)=>b.jsx(ya,{className:se("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",e),...n,ref:r}));r2.displayName=ya.displayName;const hz=tm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),mz=h.forwardRef(({side:e="right",className:n,children:r,...o},i)=>b.jsxs(pz,{children:[b.jsx(r2,{}),b.jsxs(va,{ref:i,className:se(hz({side:e}),n),...o,children:[b.jsxs(b_,{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-secondary",children:[b.jsx(Db,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));mz.displayName=va.displayName;const gz=h.forwardRef(({className:e,...n},r)=>b.jsx(Su,{ref:r,className:se("text-lg font-semibold text-foreground",e),...n}));gz.displayName=Su.displayName;const yz=h.forwardRef(({className:e,...n},r)=>b.jsx(Cu,{ref:r,className:se("text-sm text-muted-foreground",e),...n}));yz.displayName=Cu.displayName;function vz(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,xz(i,...n)]}function xz(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function wz(e){const n=bz(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(Sz);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function bz(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Ez(i),l=Cz(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var _z=Symbol("radix.slottable");function Sz(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_z}function Cz(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Ez(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var kz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o2=kz.reduce((e,n)=>{const r=wz(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Lu="Switch",[Nz]=vz(Lu),[Pz,Rz]=Nz(Lu),i2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[p,m]=h.useState(null),g=pe(n,x=>m(x)),v=h.useRef(!1),_=p?d||!!p.closest("form"):!0,[y,w]=pa({prop:i,defaultProp:s??!1,onChange:u,caller:Lu});return b.jsxs(Pz,{scope:r,checked:y,disabled:l,children:[b.jsx(o2.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":c2(y),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:g,onClick:te(e.onClick,x=>{w(S=>!S),_&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),_&&b.jsx(l2,{control:p,bubbles:!v.current,name:o,value:c,checked:y,required:a,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});i2.displayName=Lu;var s2="SwitchThumb",a2=h.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,i=Rz(s2,r);return b.jsx(o2.span,{"data-state":c2(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});a2.displayName=s2;var Mz="SwitchBubbleInput",l2=h.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...i},s)=>{const a=h.useRef(null),l=pe(a,s),c=om(r),u=im(n);return h.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&m){const g=new Event("click",{bubbles:o});m.call(d,r),d.dispatchEvent(g)}},[c,r,o]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});l2.displayName=Mz;function c2(e){return e?"checked":"unchecked"}var u2=i2,Az=a2;const Tz=h.forwardRef(({className:e,...n},r)=>b.jsx(u2,{ref:r,className:se("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full 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",e),...n,children:b.jsx(Az,{className:se("pointer-events-none block h-3 w-3 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));Tz.displayName=u2.displayName;function Iz(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let Cp=1;class jz{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:o,...i}=n,s=typeof(n==null?void 0:n.id)=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Cp++,a=this.toasts.find(c=>c.id===s),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...n,id:s,title:o}),{...c,...n,id:s,dismissible:l,title:o}):c):this.addToast({title:o,...i,dismissible:l,id:s}),s},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(n instanceof Function?n():n);let s=o!==void 0,a;const l=i.then(async u=>{if(a=["resolve",u],Je.isValidElement(u))s=!1,this.create({id:o,type:"default",message:u});else if(Oz(u)&&!u.ok){s=!1;const f=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,p=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:p,...g})}else if(u instanceof Error){s=!1;const f=typeof r.error=="function"?await r.error(u):r.error,p=typeof r.description=="function"?await r.description(u):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:p,...g})}else if(r.success!==void 0){s=!1;const f=typeof r.success=="function"?await r.success(u):r.success,p=typeof r.description=="function"?await r.description(u):r.description,g=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:o,type:"success",description:p,...g})}}).catch(async u=>{if(a=["reject",u],r.error!==void 0){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,f=typeof r.description=="function"?await r.description(u):r.description,m=typeof d=="object"&&!Je.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:f,...m})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((u,d)=>l.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof o!="string"&&typeof o!="number"?{unwrap:c}:Object.assign(o,{unwrap:c})},this.custom=(n,r)=>{const o=(r==null?void 0:r.id)||Cp++;return this.create({jsx:n(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const $t=new jz,$z=(e,n)=>{const r=(n==null?void 0:n.id)||Cp++;return $t.addToast({title:e,...n,id:r}),r},Oz=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Dz=$z,Lz=()=>$t.toasts,zz=()=>$t.getActiveToasts();Object.assign(Dz,{success:$t.success,info:$t.info,warning:$t.warning,error:$t.error,custom:$t.custom,message:$t.message,promise:$t.promise,dismiss:$t.dismiss,loading:$t.loading},{getHistory:Lz,getToasts:zz});Iz("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Fz(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,Vz(i,...n)]}function Vz(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function Bz(e){const n=Hz(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(Uz);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Hz(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Yz(i),l=Gz(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Wz=Symbol("radix.slottable");function Uz(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wz}function Gz(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Yz(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Xz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zu=Xz.reduce((e,n)=>{const r=Bz(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Fu="Tabs",[Kz]=Fz(Fu,[Tu]),f2=Tu(),[qz,Om]=Kz(Fu),Zz=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=M_(l),[f,p]=pa({prop:o,onChange:i,defaultProp:s??"",caller:Fu});return b.jsx(qz,{scope:r,baseId:kt(),value:f,onValueChange:p,orientation:a,dir:d,activationMode:c,children:b.jsx(zu.div,{dir:d,"data-orientation":a,...u,ref:n})})});Zz.displayName=Fu;var d2="TabsList",p2=h.forwardRef((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=Om(d2,r),a=f2(r);return b.jsx(sS,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:b.jsx(zu.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})});p2.displayName=d2;var h2="TabsTrigger",m2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=Om(h2,r),l=f2(r),c=v2(a.baseId,o),u=x2(a.baseId,o),d=o===a.value;return b.jsx(aS,{asChild:!0,...l,focusable:!i,active:d,children:b.jsx(zu.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:n,onMouseDown:te(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:te(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:te(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!i&&f&&a.onValueChange(o)})})})});m2.displayName=h2;var g2="TabsContent",y2=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:s,...a}=e,l=Om(g2,r),c=v2(l.baseId,o),u=x2(l.baseId,o),d=o===l.value,f=h.useRef(d);return h.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),b.jsx(yt,{present:i||d,children:({present:p})=>b.jsx(zu.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});y2.displayName=g2;function v2(e,n){return`${e}-trigger-${n}`}function x2(e,n){return`${e}-content-${n}`}var w2=p2,b2=m2,_2=y2;const Qz=h.forwardRef(({className:e,...n},r)=>b.jsx(w2,{ref:r,className:se("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...n}));Qz.displayName=w2.displayName;const Jz=h.forwardRef(({className:e,...n},r)=>b.jsx(b2,{ref:r,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 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-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-sm",e),...n}));Jz.displayName=b2.displayName;const e6=h.forwardRef(({className:e,...n},r)=>b.jsx(_2,{ref:r,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));e6.displayName=_2.displayName;const t6=h.forwardRef(({className:e,...n},r)=>b.jsx("textarea",{className:se("flex min-h-[60px] w-full rounded-md border border-transparent bg-input px-3 py-2 text-base placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));t6.displayName="Textarea";function n6(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:p,children:m,...g}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>g,Object.values(g));return b.jsx(v.Provider,{value:_,children:m})};u.displayName=s+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,g=h.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,r6(i,...n)]}function r6(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function o6(e){const n=i6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(a6);if(c){const u=c.props.children,d=l.map(f=>f===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:f);return b.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,d):null})}return b.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function i6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=c6(i),l=l6(s,i.props);return i.type!==h.Fragment&&(l.ref=o?_e(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var S2=Symbol("radix.slottable");function s6(e){const n=({children:r})=>b.jsx(b.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=S2,n}function a6(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S2}function l6(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function c6(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var u6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],f6=u6.reduce((e,n)=>{const r=o6(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),[Vu]=n6("Tooltip",[Or]),Dm=Or(),d6="TooltipProvider",Iv="tooltip.open",[AX,C2]=Vu(d6),E2="Tooltip",[TX,Ea]=Vu(E2),Ep="TooltipTrigger",p6=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Ea(Ep,r),s=C2(Ep,r),a=Dm(r),l=h.useRef(null),c=pe(n,l,i.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),b.jsx(ba,{asChild:!0,...a,children:b.jsx(f6.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:te(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:te(e.onBlur,i.onClose),onClick:te(e.onClick,i.onClose)})})});p6.displayName=Ep;var Lm="TooltipPortal",[h6,m6]=Vu(Lm,{forceMount:void 0}),k2=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,s=Ea(Lm,n);return b.jsx(h6,{scope:n,forceMount:r,children:b.jsx(yt,{present:r||s.open,children:b.jsx(Ai,{asChild:!0,container:i,children:o})})})};k2.displayName=Lm;var mi="TooltipContent",N2=h.forwardRef((e,n)=>{const r=m6(mi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,a=Ea(mi,e.__scopeTooltip);return b.jsx(yt,{present:o||a.open,children:a.disableHoverableContent?b.jsx(P2,{side:i,...s,ref:n}):b.jsx(g6,{side:i,...s,ref:n})})}),g6=h.forwardRef((e,n)=>{const r=Ea(mi,e.__scopeTooltip),o=C2(mi,e.__scopeTooltip),i=h.useRef(null),s=pe(n,i),[a,l]=h.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=o,p=h.useCallback(()=>{l(null),f(!1)},[f]),m=h.useCallback((g,v)=>{const _=g.currentTarget,y={x:g.clientX,y:g.clientY},w=b6(y,_.getBoundingClientRect()),x=_6(y,w),S=S6(v.getBoundingClientRect()),C=E6([...x,...S]);l(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(c&&d){const g=_=>m(_,d),v=_=>m(_,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[c,d,m,p]),h.useEffect(()=>{if(a){const g=v=>{const _=v.target,y={x:v.clientX,y:v.clientY},w=(c==null?void 0:c.contains(_))||(d==null?void 0:d.contains(_)),x=!C6(y,a);w?p():x&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,p]),b.jsx(P2,{...e,ref:s})}),[y6,v6]=Vu(E2,{isInside:!1}),x6=s6("TooltipContent"),P2=h.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Ea(mi,r),u=Dm(r),{onClose:d}=c;return h.useEffect(()=>(document.addEventListener(Iv,d),()=>document.removeEventListener(Iv,d)),[d]),h.useEffect(()=>{if(c.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),b.jsx(Mi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:b.jsxs(Mu,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(x6,{children:o}),b.jsx(y6,{scope:r,isInside:!0,children:b.jsx(AL,{id:c.contentId,role:"tooltip",children:i||o})})]})})});N2.displayName=mi;var R2="TooltipArrow",w6=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Dm(r);return v6(R2,r).isInside?null:b.jsx(Au,{...i,...o,ref:n})});w6.displayName=R2;function b6(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,o,i,s)){case s:return"left";case i:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function _6(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function S6(e){const{top:n,right:r,bottom:o,left:i}=e;return[{x:i,y:n},{x:r,y:n},{x:r,y:o},{x:i,y:o}]}function C6(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,d=l.y,f=c.x,p=c.y;d>o!=p>o&&r<(f-u)*(o-d)/(p-d)+u&&(i=!i)}return i}function E6(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),k6(n)}function k6(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var N6=k2,M2=N2;const P6=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>b.jsx(N6,{children:b.jsx(M2,{ref:o,sideOffset:n,className:se("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));P6.displayName=M2.displayName;function R6(){const{setTheme:e,resolvedTheme:n}=zA();return b.jsxs(Lb,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(n==="dark"?"light":"dark"),children:[b.jsx(GI,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),b.jsx(TI,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),b.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function M6(){return b.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[b.jsx("circle",{cx:"6",cy:"6",r:"2.5"}),b.jsx("circle",{cx:"18",cy:"6",r:"2.5"}),b.jsx("circle",{cx:"12",cy:"14",r:"2.5"}),b.jsx("circle",{cx:"6",cy:"20",r:"1.8"}),b.jsx("circle",{cx:"18",cy:"20",r:"1.8"}),b.jsx("path",{d:"M7.6 7.6 10.7 12.5"}),b.jsx("path",{d:"M16.4 7.6 13.3 12.5"}),b.jsx("path",{d:"M10.5 15.5 7.2 19"}),b.jsx("path",{d:"M13.5 15.5 16.8 19"})]})}function A6(){return b.jsxs("header",{className:"sticky top-0 z-40 flex h-[var(--header-height)] items-center border-b bg-background/80 px-4 shadow-sm backdrop-blur-md",children:[b.jsxs("span",{className:"logo",children:[b.jsx("span",{className:"logo-icon",children:b.jsx(M6,{})}),b.jsx("span",{className:"logo-text",children:"LaunchChart"})]}),b.jsx("div",{className:"ml-auto flex items-center gap-2",children:b.jsx(R6,{})})]})}const T6=[{to:"/overview",label:"Overview",icon:MI},{to:"/modules",label:"Modules",icon:nm},{to:"/journeys",label:"User Journeys",icon:zI},{to:"/project-graph",label:"Project Graph",icon:jI},{to:"/settings",label:"Settings",icon:Ob}],I6="sidebar-nav-item active relative flex items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm bg-gradient-to-r from-sidebar-primary/20 via-transparent via-80% to-transparent font-medium text-sidebar-foreground before:absolute before:left-0 before:top-0 before:h-full before:w-[3px] before:rounded-full before:bg-sidebar-primary",j6="sidebar-nav-item relative flex w-full items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm font-normal text-sidebar-muted-foreground transition-colors duration-200 hover:text-sidebar-foreground bg-transparent border-none cursor-pointer";function $6(){return b.jsx("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:b.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:b.jsx("ul",{className:"space-y-1",children:T6.map(e=>{const n=e.icon;return b.jsx("li",{children:b.jsxs($A,{to:e.to,className:({isActive:r})=>r?I6:j6,children:[b.jsx(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.to)})})})})}function O6(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function D6(e,n,r){return n=U6(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function jv(e,n){return F6(e)||O6(e,n)||A2(e,n)||H6()}function L6(e){return z6(e)||V6(e)||A2(e)||B6()}function z6(e){if(Array.isArray(e))return kp(e)}function F6(e){if(Array.isArray(e))return e}function V6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function A2(e,n){if(e){if(typeof e=="string")return kp(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kp(e,n)}}function kp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r<n;r++)o[r]=e[r];return o}function B6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
300
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
301
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W6(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function U6(e){var n=W6(e,"string");return typeof n=="symbol"?n:String(n)}var G6=function(n,r){var o=new Set(r);return Object.assign.apply(Object,[{}].concat(L6(Object.entries(n).filter(function(i){var s=jv(i,1),a=s[0];return!o.has(a)}).map(function(i){var s=jv(i,2),a=s[0],l=s[1];return D6({},a,l)}))))};function Np(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function Y6(e){if(Array.isArray(e))return e}function X6(e){if(Array.isArray(e))return Np(e)}function K6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function q6(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function Z6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
302
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
303
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J6(e,n){return Y6(e)||q6(e,n)||T2(e,n)||Z6()}function $v(e){return X6(e)||K6(e)||T2(e)||Q6()}function T2(e,n){if(e){if(typeof e=="string")return Np(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Np(e,n):void 0}}function e8(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,o=r===void 0?"div":r,i=n.nodeMapper,s=i===void 0?function(d){return d}:i,a=n.methodNames,l=a===void 0?[]:a,c=n.initPropNames,u=c===void 0?[]:c;return h.forwardRef(function(d,f){var p=h.useRef(),m=h.useMemo(function(){var _=Object.fromEntries(u.filter(function(y){return d.hasOwnProperty(y)}).map(function(y){return[y,d[y]]}));return e(_)},[]);Ov(function(){m(s(p.current))},h.useLayoutEffect),Ov(function(){return m._destructor instanceof Function?m._destructor:void 0});var g=h.useCallback(function(_){for(var y=arguments.length,w=new Array(y>1?y-1:0),x=1;x<y;x++)w[x-1]=arguments[x];return m[_]instanceof Function?m[_].apply(m,w):void 0},[m]),v=h.useRef({});return Object.keys(G6(d,[].concat($v(l),$v(u)))).filter(function(_){return v.current[_]!==d[_]}).forEach(function(_){return g(_,d[_])}),v.current=d,h.useImperativeHandle(f,function(){return Object.fromEntries(l.map(function(_){return[_,function(){for(var y=arguments.length,w=new Array(y),x=0;x<y;x++)w[x]=arguments[x];return g.apply(void 0,[_].concat(w))}]}))},[g]),Je.createElement(o,{ref:p})})}function Ov(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.useEffect,r=h.useRef(),o=h.useRef(!1),i=h.useRef(!1),s=h.useState(0),a=J6(s,2);a[0];var l=a[1];o.current&&(i.current=!0),n(function(){return o.current||(r.current=e(),o.current=!0),l(function(c){return c+1}),function(){i.current&&r.current&&r.current()}},[])}var Pp="http://www.w3.org/1999/xhtml";const Dv={svg:"http://www.w3.org/2000/svg",xhtml:Pp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bu(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Dv.hasOwnProperty(n)?{space:Dv[n],local:e}:e}function t8(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===Pp&&n.documentElement.namespaceURI===Pp?n.createElement(e):n.createElementNS(r,e)}}function n8(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function I2(e){var n=Bu(e);return(n.local?n8:t8)(n)}function r8(){}function zm(e){return e==null?r8:function(){return this.querySelector(e)}}function o8(e){typeof e!="function"&&(e=zm(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=new Array(a),c,u,d=0;d<a;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new Rt(o,this._parents)}function i8(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function s8(){return[]}function j2(e){return e==null?s8:function(){return this.querySelectorAll(e)}}function a8(e){return function(){return i8(e.apply(this,arguments))}}function l8(e){typeof e=="function"?e=a8(e):e=j2(e);for(var n=this._groups,r=n.length,o=[],i=[],s=0;s<r;++s)for(var a=n[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),i.push(c));return new Rt(o,i)}function $2(e){return function(){return this.matches(e)}}function O2(e){return function(n){return n.matches(e)}}var c8=Array.prototype.find;function u8(e){return function(){return c8.call(this.children,e)}}function f8(){return this.firstElementChild}function d8(e){return this.select(e==null?f8:u8(typeof e=="function"?e:O2(e)))}var p8=Array.prototype.filter;function h8(){return Array.from(this.children)}function m8(e){return function(){return p8.call(this.children,e)}}function g8(e){return this.selectAll(e==null?h8:m8(typeof e=="function"?e:O2(e)))}function y8(e){typeof e!="function"&&(e=$2(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Rt(o,this._parents)}function D2(e){return new Array(e.length)}function v8(){return new Rt(this._enter||this._groups.map(D2),this._parents)}function Rc(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Rc.prototype={constructor:Rc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function x8(e){return function(){return e}}function w8(e,n,r,o,i,s){for(var a=0,l,c=n.length,u=s.length;a<u;++a)(l=n[a])?(l.__data__=s[a],o[a]=l):r[a]=new Rc(e,s[a]);for(;a<c;++a)(l=n[a])&&(i[a]=l)}function b8(e,n,r,o,i,s,a){var l,c,u=new Map,d=n.length,f=s.length,p=new Array(d),m;for(l=0;l<d;++l)(c=n[l])&&(p[l]=m=a.call(c,c.__data__,l,n)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<f;++l)m=a.call(e,s[l],l,s)+"",(c=u.get(m))?(o[l]=c,c.__data__=s[l],u.delete(m)):r[l]=new Rc(e,s[l]);for(l=0;l<d;++l)(c=n[l])&&u.get(p[l])===c&&(i[l]=c)}function _8(e){return e.__data__}function S8(e,n){if(!arguments.length)return Array.from(this,_8);var r=n?b8:w8,o=this._parents,i=this._groups;typeof e!="function"&&(e=x8(e));for(var s=i.length,a=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var d=o[u],f=i[u],p=f.length,m=C8(e.call(d,d&&d.__data__,u,o)),g=m.length,v=l[u]=new Array(g),_=a[u]=new Array(g),y=c[u]=new Array(p);r(d,f,v,_,y,m,n);for(var w=0,x=0,S,C;w<g;++w)if(S=v[w]){for(w>=x&&(x=w+1);!(C=_[x])&&++x<g;);S._next=C||null}}return a=new Rt(a,o),a._enter=l,a._exit=c,a}function C8(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E8(){return new Rt(this._exit||this._groups.map(D2),this._parents)}function k8(e,n,r){var o=this.enter(),i=this,s=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),n!=null&&(i=n(i),i&&(i=i.selection())),r==null?s.remove():r(s),o&&i?o.merge(i).order():i}function N8(e){for(var n=e.selection?e.selection():e,r=this._groups,o=n._groups,i=r.length,s=o.length,a=Math.min(i,s),l=new Array(i),c=0;c<a;++c)for(var u=r[c],d=o[c],f=u.length,p=l[c]=new Array(f),m,g=0;g<f;++g)(m=u[g]||d[g])&&(p[g]=m);for(;c<i;++c)l[c]=r[c];return new Rt(l,this._parents)}function P8(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var o=e[n],i=o.length-1,s=o[i],a;--i>=0;)(a=o[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function R8(e){e||(e=M8);function n(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s){for(var a=r[s],l=a.length,c=i[s]=new Array(l),u,d=0;d<l;++d)(u=a[d])&&(c[d]=u);c.sort(n)}return new Rt(i,this._parents).order()}function M8(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function A8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function T8(){return Array.from(this)}function I8(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length;i<s;++i){var a=o[i];if(a)return a}return null}function j8(){let e=0;for(const n of this)++e;return e}function $8(){return!this.node()}function O8(e){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var i=n[r],s=0,a=i.length,l;s<a;++s)(l=i[s])&&e.call(l,l.__data__,s,i);return this}function D8(e){return function(){this.removeAttribute(e)}}function L8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function z8(e,n){return function(){this.setAttribute(e,n)}}function F8(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function V8(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function B8(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function H8(e,n){var r=Bu(e);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?L8:D8:typeof n=="function"?r.local?B8:V8:r.local?F8:z8)(r,n))}function L2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function W8(e){return function(){this.style.removeProperty(e)}}function U8(e,n,r){return function(){this.style.setProperty(e,n,r)}}function G8(e,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function Y8(e,n,r){return arguments.length>1?this.each((n==null?W8:typeof n=="function"?G8:U8)(e,n,r??"")):gi(this.node(),e)}function gi(e,n){return e.style.getPropertyValue(n)||L2(e).getComputedStyle(e,null).getPropertyValue(n)}function X8(e){return function(){delete this[e]}}function K8(e,n){return function(){this[e]=n}}function q8(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Z8(e,n){return arguments.length>1?this.each((n==null?X8:typeof n=="function"?q8:K8)(e,n)):this.node()[e]}function z2(e){return e.trim().split(/^|\s+/)}function Fm(e){return e.classList||new F2(e)}function F2(e){this._node=e,this._names=z2(e.getAttribute("class")||"")}F2.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function V2(e,n){for(var r=Fm(e),o=-1,i=n.length;++o<i;)r.add(n[o])}function B2(e,n){for(var r=Fm(e),o=-1,i=n.length;++o<i;)r.remove(n[o])}function Q8(e){return function(){V2(this,e)}}function J8(e){return function(){B2(this,e)}}function eF(e,n){return function(){(n.apply(this,arguments)?V2:B2)(this,e)}}function tF(e,n){var r=z2(e+"");if(arguments.length<2){for(var o=Fm(this.node()),i=-1,s=r.length;++i<s;)if(!o.contains(r[i]))return!1;return!0}return this.each((typeof n=="function"?eF:n?Q8:J8)(r,n))}function nF(){this.textContent=""}function rF(e){return function(){this.textContent=e}}function oF(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function iF(e){return arguments.length?this.each(e==null?nF:(typeof e=="function"?oF:rF)(e)):this.node().textContent}function sF(){this.innerHTML=""}function aF(e){return function(){this.innerHTML=e}}function lF(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function cF(e){return arguments.length?this.each(e==null?sF:(typeof e=="function"?lF:aF)(e)):this.node().innerHTML}function uF(){this.nextSibling&&this.parentNode.appendChild(this)}function fF(){return this.each(uF)}function dF(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pF(){return this.each(dF)}function hF(e){var n=typeof e=="function"?e:I2(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function mF(){return null}function gF(e,n){var r=typeof e=="function"?e:I2(e),o=n==null?mF:typeof n=="function"?n:zm(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function yF(){var e=this.parentNode;e&&e.removeChild(this)}function vF(){return this.each(yF)}function xF(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function wF(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function bF(e){return this.select(e?wF:xF)}function _F(e){return arguments.length?this.property("__data__",e):this.node().__data__}function SF(e){return function(n){e.call(this,n,this.__data__)}}function CF(e){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function EF(e){return function(){var n=this.__on;if(n){for(var r=0,o=-1,i=n.length,s;r<i;++r)s=n[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):n[++o]=s;++o?n.length=o:delete this.__on}}}function kF(e,n,r){return function(){var o=this.__on,i,s=SF(n);if(o){for(var a=0,l=o.length;a<l;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=n;return}}this.addEventListener(e.type,s,r),i={type:e.type,name:e.name,value:n,listener:s,options:r},o?o.push(i):this.__on=[i]}}function NF(e,n,r){var o=CF(e+""),i,s=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(i=0,d=l[c];i<s;++i)if((a=o[i]).type===d.type&&a.name===d.name)return d.value}return}for(l=n?kF:EF,i=0;i<s;++i)this.each(l(o[i],n,r));return this}function H2(e,n,r){var o=L2(e),i=o.CustomEvent;typeof i=="function"?i=new i(n,r):(i=o.document.createEvent("Event"),r?(i.initEvent(n,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(n,!1,!1)),e.dispatchEvent(i)}function PF(e,n){return function(){return H2(this,e,n)}}function RF(e,n){return function(){return H2(this,e,n.apply(this,arguments))}}function MF(e,n){return this.each((typeof n=="function"?RF:PF)(e,n))}function*AF(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&(yield a)}var W2=[null];function Rt(e,n){this._groups=e,this._parents=n}function ka(){return new Rt([[document.documentElement]],W2)}function TF(){return this}Rt.prototype=ka.prototype={constructor:Rt,select:o8,selectAll:l8,selectChild:d8,selectChildren:g8,filter:y8,data:S8,enter:v8,exit:E8,join:k8,merge:N8,selection:TF,order:P8,sort:R8,call:A8,nodes:T8,node:I8,size:j8,empty:$8,each:O8,attr:H8,style:Y8,property:Z8,classed:tF,text:iF,html:cF,raise:fF,lower:pF,append:hF,insert:gF,remove:vF,clone:bF,datum:_F,on:NF,dispatch:MF,[Symbol.iterator]:AF};function tt(e){return typeof e=="string"?new Rt([[document.querySelector(e)]],[document.documentElement]):new Rt([[e]],W2)}function IF(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Ot(e,n){if(e=IF(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[e.clientX-i.left-n.clientLeft,e.clientY-i.top-n.clientTop]}}return[e.pageX,e.pageY]}var jF={value:()=>{}};function Na(){for(var e=0,n=arguments.length,r={},o;e<n;++e){if(!(o=arguments[e]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Ll(r)}function Ll(e){this._=e}function $F(e,n){return e.trim().split(/^|\s+/).map(function(r){var o="",i=r.indexOf(".");if(i>=0&&(o=r.slice(i+1),r=r.slice(0,i)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Ll.prototype=Na.prototype={constructor:Ll,on:function(e,n){var r=this._,o=$F(e+"",r),i,s=-1,a=o.length;if(arguments.length<2){for(;++s<a;)if((i=(e=o[s]).type)&&(i=OF(r[i],e.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<a;)if(i=(e=o[s]).type)r[i]=Lv(r[i],e.name,n);else if(n==null)for(i in r)r[i]=Lv(r[i],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Ll(e)},call:function(e,n){if((i=arguments.length-2)>0)for(var r=new Array(i),o=0,i,s;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],o=0,i=s.length;o<i;++o)s[o].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(n,r)}};function OF(e,n){for(var r=0,o=e.length,i;r<o;++r)if((i=e[r]).name===n)return i.value}function Lv(e,n,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===n){e[o]=jF,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:n,value:r}),e}const DF={passive:!1},Zs={capture:!0,passive:!1};function Zf(e){e.stopImmediatePropagation()}function ni(e){e.preventDefault(),e.stopImmediatePropagation()}function U2(e){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",ni,Zs);"onselectstart"in n?r.on("selectstart.drag",ni,Zs):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function G2(e,n){var r=e.document.documentElement,o=tt(e).on("dragstart.drag",null);n&&(o.on("click.drag",ni,Zs),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const al=e=>()=>e;function Rp(e,{sourceEvent:n,subject:r,target:o,identifier:i,active:s,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Rp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LF(e){return!e.ctrlKey&&!e.button}function zF(){return this.parentNode}function FF(e,n){return n??{x:e.x,y:e.y}}function VF(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vm(){var e=LF,n=zF,r=FF,o=VF,i={},s=Na("start","drag","end"),a=0,l,c,u,d,f=0;function p(S){S.on("mousedown.drag",m).filter(o).on("touchstart.drag",_).on("touchmove.drag",y,DF).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(S,C){if(!(d||!e.call(this,S,C))){var E=x(this,n.call(this,S,C),S,C,"mouse");E&&(tt(S.view).on("mousemove.drag",g,Zs).on("mouseup.drag",v,Zs),U2(S.view),Zf(S),u=!1,l=S.clientX,c=S.clientY,E("start",S))}}function g(S){if(ni(S),!u){var C=S.clientX-l,E=S.clientY-c;u=C*C+E*E>f}i.mouse("drag",S)}function v(S){tt(S.view).on("mousemove.drag mouseup.drag",null),G2(S.view,u),ni(S),i.mouse("end",S)}function _(S,C){if(e.call(this,S,C)){var E=S.changedTouches,k=n.call(this,S,C),N=E.length,A,R;for(A=0;A<N;++A)(R=x(this,k,S,C,E[A].identifier,E[A]))&&(Zf(S),R("start",S,E[A]))}}function y(S){var C=S.changedTouches,E=C.length,k,N;for(k=0;k<E;++k)(N=i[C[k].identifier])&&(ni(S),N("drag",S,C[k]))}function w(S){var C=S.changedTouches,E=C.length,k,N;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<E;++k)(N=i[C[k].identifier])&&(Zf(S),N("end",S,C[k]))}function x(S,C,E,k,N,A){var R=s.copy(),I=Ot(A||E,C),j,L,P;if((P=r.call(S,new Rp("beforestart",{sourceEvent:E,target:p,identifier:N,active:a,x:I[0],y:I[1],dx:0,dy:0,dispatch:R}),k))!=null)return j=P.x-I[0]||0,L=P.y-I[1]||0,function z($,F,T){var M=I,D;switch($){case"start":i[N]=z,D=a++;break;case"end":delete i[N],--a;case"drag":I=Ot(T||F,C),D=a;break}R.call($,S,new Rp($,{sourceEvent:F,subject:P,target:p,identifier:N,active:D,x:I[0]+j,y:I[1]+L,dx:I[0]-M[0],dy:I[1]-M[1],dispatch:R}),k)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:al(!!S),p):e},p.container=function(S){return arguments.length?(n=typeof S=="function"?S:al(S),p):n},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:al(S),p):r},p.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:al(!!S),p):o},p.on=function(){var S=s.on.apply(s,arguments);return S===s?p:S},p.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,p):Math.sqrt(f)},p}function Bm(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function Y2(e,n){var r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r}function Pa(){}var Qs=.7,Mc=1/Qs,ri="\\s*([+-]?\\d+)\\s*",Js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",BF=/^#([0-9a-f]{3,8})$/,HF=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),WF=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),UF=new RegExp(`^rgba\\(${ri},${ri},${ri},${Js}\\)$`),GF=new RegExp(`^rgba\\(${bn},${bn},${bn},${Js}\\)$`),YF=new RegExp(`^hsl\\(${Js},${bn},${bn}\\)$`),XF=new RegExp(`^hsla\\(${Js},${bn},${bn},${Js}\\)$`),zv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Bm(Pa,po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fv,formatHex:Fv,formatHex8:KF,formatHsl:qF,formatRgb:Vv,toString:Vv});function Fv(){return this.rgb().formatHex()}function KF(){return this.rgb().formatHex8()}function qF(){return X2(this).formatHsl()}function Vv(){return this.rgb().formatRgb()}function po(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=BF.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?Bv(n):r===3?new pt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?ll(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?ll(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=HF.exec(e))?new pt(n[1],n[2],n[3],1):(n=WF.exec(e))?new pt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=UF.exec(e))?ll(n[1],n[2],n[3],n[4]):(n=GF.exec(e))?ll(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=YF.exec(e))?Uv(n[1],n[2]/100,n[3]/100,1):(n=XF.exec(e))?Uv(n[1],n[2]/100,n[3]/100,n[4]):zv.hasOwnProperty(e)?Bv(zv[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Bv(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function ll(e,n,r,o){return o<=0&&(e=n=r=NaN),new pt(e,n,r,o)}function ZF(e){return e instanceof Pa||(e=po(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function Mp(e,n,r,o){return arguments.length===1?ZF(e):new pt(e,n,r,o??1)}function pt(e,n,r,o){this.r=+e,this.g=+n,this.b=+r,this.opacity=+o}Bm(pt,Mp,Y2(Pa,{brighter(e){return e=e==null?Mc:Math.pow(Mc,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(eo(this.r),eo(this.g),eo(this.b),Ac(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Hv,formatHex:Hv,formatHex8:QF,formatRgb:Wv,toString:Wv}));function Hv(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}`}function QF(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}${Zr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wv(){const e=Ac(this.opacity);return`${e===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${e===1?")":`, ${e})`}`}function Ac(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zr(e){return e=eo(e),(e<16?"0":"")+e.toString(16)}function Uv(e,n,r,o){return o<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Qt(e,n,r,o)}function X2(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);if(e instanceof Pa||(e=po(e)),!e)return new Qt;if(e instanceof Qt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,o=e.b/255,i=Math.min(n,r,o),s=Math.max(n,r,o),a=NaN,l=s-i,c=(s+i)/2;return l?(n===s?a=(r-o)/l+(r<o)*6:r===s?a=(o-n)/l+2:a=(n-r)/l+4,l/=c<.5?s+i:2-s-i,a*=60):l=c>0&&c<1?0:a,new Qt(a,l,c,e.opacity)}function JF(e,n,r,o){return arguments.length===1?X2(e):new Qt(e,n,r,o??1)}function Qt(e,n,r,o){this.h=+e,this.s=+n,this.l=+r,this.opacity=+o}Bm(Qt,JF,Y2(Pa,{brighter(e){return e=e==null?Mc:Math.pow(Mc,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,i=2*r-o;return new pt(Qf(e>=240?e-240:e+120,i,o),Qf(e,i,o),Qf(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Qt(Gv(this.h),cl(this.s),cl(this.l),Ac(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ac(this.opacity);return`${e===1?"hsl(":"hsla("}${Gv(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gv(e){return e=(e||0)%360,e<0?e+360:e}function cl(e){return Math.max(0,Math.min(1,e||0))}function Qf(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const Hm=e=>()=>e;function e9(e,n){return function(r){return e+r*n}}function t9(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(o){return Math.pow(e+o*n,r)}}function n9(e){return(e=+e)==1?K2:function(n,r){return r-n?t9(n,r,e):Hm(isNaN(n)?r:n)}}function K2(e,n){var r=n-e;return r?e9(e,r):Hm(isNaN(e)?n:e)}const Tc=function e(n){var r=n9(n);function o(i,s){var a=r((i=Mp(i)).r,(s=Mp(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),u=K2(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return o.gamma=e,o}(1);function r9(e,n){n||(n=[]);var r=e?Math.min(n.length,e.length):0,o=n.slice(),i;return function(s){for(i=0;i<r;++i)o[i]=e[i]*(1-s)+n[i]*s;return o}}function o9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function i9(e,n){var r=n?n.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),s=new Array(r),a;for(a=0;a<o;++a)i[a]=Ss(e[a],n[a]);for(;a<r;++a)s[a]=n[a];return function(l){for(a=0;a<o;++a)s[a]=i[a](l);return s}}function s9(e,n){var r=new Date;return e=+e,n=+n,function(o){return r.setTime(e*(1-o)+n*o),r}}function pn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}function a9(e,n){var r={},o={},i;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in e?r[i]=Ss(e[i],n[i]):o[i]=n[i];return function(s){for(i in r)o[i]=r[i](s);return o}}var Ap=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jf=new RegExp(Ap.source,"g");function l9(e){return function(){return e}}function c9(e){return function(n){return e(n)+""}}function q2(e,n){var r=Ap.lastIndex=Jf.lastIndex=0,o,i,s,a=-1,l=[],c=[];for(e=e+"",n=n+"";(o=Ap.exec(e))&&(i=Jf.exec(n));)(s=i.index)>r&&(s=n.slice(r,s),l[a]?l[a]+=s:l[++a]=s),(o=o[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,c.push({i:a,x:pn(o,i)})),r=Jf.lastIndex;return r<n.length&&(s=n.slice(r),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?c9(c[0].x):l9(n):(n=c.length,function(u){for(var d=0,f;d<n;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function Ss(e,n){var r=typeof n,o;return n==null||r==="boolean"?Hm(n):(r==="number"?pn:r==="string"?(o=po(n))?(n=o,Tc):q2:n instanceof po?Tc:n instanceof Date?s9:o9(n)?r9:Array.isArray(n)?i9:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?a9:pn)(e,n)}var Yv=180/Math.PI,Tp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Z2(e,n,r,o,i,s){var a,l,c;return(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a),(c=e*r+n*o)&&(r-=e*c,o-=n*c),(l=Math.sqrt(r*r+o*o))&&(r/=l,o/=l,c/=l),e*o<n*r&&(e=-e,n=-n,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(n,e)*Yv,skewX:Math.atan(c)*Yv,scaleX:a,scaleY:l}}var ul;function u9(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?Tp:Z2(n.a,n.b,n.c,n.d,n.e,n.f)}function f9(e){return e==null||(ul||(ul=document.createElementNS("http://www.w3.org/2000/svg","g")),ul.setAttribute("transform",e),!(e=ul.transform.baseVal.consolidate()))?Tp:(e=e.matrix,Z2(e.a,e.b,e.c,e.d,e.e,e.f))}function Q2(e,n,r,o){function i(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,m,g){if(u!==f||d!==p){var v=m.push("translate(",null,n,null,r);g.push({i:v-4,x:pn(u,f)},{i:v-2,x:pn(d,p)})}else(f||p)&&m.push("translate("+f+n+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(i(f)+"rotate(",null,o)-2,x:pn(u,d)})):d&&f.push(i(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(i(f)+"skewX(",null,o)-2,x:pn(u,d)}):d&&f.push(i(f)+"skewX("+d+o)}function c(u,d,f,p,m,g){if(u!==f||d!==p){var v=m.push(i(m)+"scale(",null,",",null,")");g.push({i:v-4,x:pn(u,f)},{i:v-2,x:pn(d,p)})}else(f!==1||p!==1)&&m.push(i(m)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(m){for(var g=-1,v=p.length,_;++g<v;)f[(_=p[g]).i]=_.x(m);return f.join("")}}}var d9=Q2(u9,"px, ","px)","deg)"),p9=Q2(f9,", ",")",")"),h9=1e-12;function Xv(e){return((e=Math.exp(e))+1/e)/2}function m9(e){return((e=Math.exp(e))-1/e)/2}function g9(e){return((e=Math.exp(2*e))-1)/(e+1)}const zl=function e(n,r,o){function i(s,a){var l=s[0],c=s[1],u=s[2],d=a[0],f=a[1],p=a[2],m=d-l,g=f-c,v=m*m+g*g,_,y;if(v<h9)y=Math.log(p/u)/n,_=function(k){return[l+k*m,c+k*g,u*Math.exp(n*k*y)]};else{var w=Math.sqrt(v),x=(p*p-u*u+o*v)/(2*u*r*w),S=(p*p-u*u-o*v)/(2*p*r*w),C=Math.log(Math.sqrt(x*x+1)-x),E=Math.log(Math.sqrt(S*S+1)-S);y=(E-C)/n,_=function(k){var N=k*y,A=Xv(C),R=u/(r*w)*(A*g9(n*N+C)-m9(C));return[l+R*m,c+R*g,u*A/Xv(n*N+C)]}}return _.duration=y*1e3*n/Math.SQRT2,_}return i.rho=function(s){var a=Math.max(.001,+s),l=a*a,c=l*l;return e(a,l,c)},i}(Math.SQRT2,2,4);var yi=0,us=0,Ki=0,J2=1e3,Ic,fs,jc=0,ho=0,Hu=0,ea=typeof performance=="object"&&performance.now?performance:Date,eE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wm(){return ho||(eE(y9),ho=ea.now()+Hu)}function y9(){ho=0}function $c(){this._call=this._time=this._next=null}$c.prototype=Um.prototype={constructor:$c,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Wm():+r)+(n==null?0:+n),!this._next&&fs!==this&&(fs?fs._next=this:Ic=this,fs=this),this._call=e,this._time=r,Ip()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ip())}};function Um(e,n,r){var o=new $c;return o.restart(e,n,r),o}function v9(){Wm(),++yi;for(var e=Ic,n;e;)(n=ho-e._time)>=0&&e._call.call(void 0,n),e=e._next;--yi}function Kv(){ho=(jc=ea.now())+Hu,yi=us=0;try{v9()}finally{yi=0,w9(),ho=0}}function x9(){var e=ea.now(),n=e-jc;n>J2&&(Hu-=n,jc=e)}function w9(){for(var e,n=Ic,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Ic=r);fs=e,Ip(o)}function Ip(e){if(!yi){us&&(us=clearTimeout(us));var n=e-ho;n>24?(e<1/0&&(us=setTimeout(Kv,e-ea.now()-Hu)),Ki&&(Ki=clearInterval(Ki))):(Ki||(jc=ea.now(),Ki=setInterval(x9,J2)),yi=1,eE(Kv))}}function qv(e,n,r){var o=new $c;return n=n==null?0:+n,o.restart(i=>{o.stop(),e(i+n)},n,r),o}var b9=Na("start","end","cancel","interrupt"),_9=[],tE=0,Zv=1,jp=2,Fl=3,Qv=4,$p=5,Vl=6;function Wu(e,n,r,o,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;S9(e,r,{name:n,index:o,group:i,on:b9,tween:_9,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:tE})}function Gm(e,n){var r=cn(e,n);if(r.state>tE)throw new Error("too late; already scheduled");return r}function kn(e,n){var r=cn(e,n);if(r.state>Fl)throw new Error("too late; already running");return r}function cn(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function S9(e,n,r){var o=e.__transition,i;o[n]=r,r.timer=Um(s,0,r.time);function s(u){r.state=Zv,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,m;if(r.state!==Zv)return c();for(d in o)if(m=o[d],m.name===r.name){if(m.state===Fl)return qv(a);m.state===Qv?(m.state=Vl,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[d]):+d<n&&(m.state=Vl,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[d])}if(qv(function(){r.state===Fl&&(r.state=Qv,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=jp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===jp){for(r.state=Fl,i=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(m=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++f]=m);i.length=f+1}}function l(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=$p,1),f=-1,p=i.length;++f<p;)i[f].call(e,d);r.state===$p&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Vl,r.timer.stop(),delete o[n];for(var u in o)return;delete e.__transition}}function Bl(e,n){var r=e.__transition,o,i,s=!0,a;if(r){n=n==null?null:n+"";for(a in r){if((o=r[a]).name!==n){s=!1;continue}i=o.state>jp&&o.state<$p,o.state=Vl,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete r[a]}s&&delete e.__transition}}function C9(e){return this.each(function(){Bl(this,e)})}function E9(e,n){var r,o;return function(){var i=kn(this,e),s=i.tween;if(s!==r){o=r=s;for(var a=0,l=o.length;a<l;++a)if(o[a].name===n){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function k9(e,n,r){var o,i;if(typeof r!="function")throw new Error;return function(){var s=kn(this,e),a=s.tween;if(a!==o){i=(o=a).slice();for(var l={name:n,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function N9(e,n){var r=this._id;if(e+="",arguments.length<2){for(var o=cn(this.node(),r).tween,i=0,s=o.length,a;i<s;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((n==null?E9:k9)(r,e,n))}function Ym(e,n,r){var o=e._id;return e.each(function(){var i=kn(this,o);(i.value||(i.value={}))[n]=r.apply(this,arguments)}),function(i){return cn(i,o).value[n]}}function nE(e,n){var r;return(typeof n=="number"?pn:n instanceof po?Tc:(r=po(n))?(n=r,Tc):q2)(e,n)}function P9(e){return function(){this.removeAttribute(e)}}function R9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function M9(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===o?s:s=n(o=a,r)}}function A9(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?s:s=n(o=a,r)}}function T9(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function I9(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function j9(e,n){var r=Bu(e),o=r==="transform"?p9:nE;return this.attrTween(e,typeof n=="function"?(r.local?I9:T9)(r,o,Ym(this,"attr."+e,n)):n==null?(r.local?R9:P9)(r):(r.local?A9:M9)(r,o,n))}function $9(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function O9(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function D9(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&O9(e,s)),r}return i._value=n,i}function L9(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&$9(e,s)),r}return i._value=n,i}function z9(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=Bu(e);return this.tween(r,(o.local?D9:L9)(o,n))}function F9(e,n){return function(){Gm(this,e).delay=+n.apply(this,arguments)}}function V9(e,n){return n=+n,function(){Gm(this,e).delay=n}}function B9(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?F9:V9)(n,e)):cn(this.node(),n).delay}function H9(e,n){return function(){kn(this,e).duration=+n.apply(this,arguments)}}function W9(e,n){return n=+n,function(){kn(this,e).duration=n}}function U9(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?H9:W9)(n,e)):cn(this.node(),n).duration}function G9(e,n){if(typeof n!="function")throw new Error;return function(){kn(this,e).ease=n}}function Y9(e){var n=this._id;return arguments.length?this.each(G9(n,e)):cn(this.node(),n).ease}function X9(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;kn(this,e).ease=r}}function K9(e){if(typeof e!="function")throw new Error;return this.each(X9(this._id,e))}function q9(e){typeof e!="function"&&(e=$2(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Yn(o,this._parents,this._name,this._id)}function Z9(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c=n[l],u=r[l],d=c.length,f=a[l]=new Array(d),p,m=0;m<d;++m)(p=c[m]||u[m])&&(f[m]=p);for(;l<o;++l)a[l]=n[l];return new Yn(a,this._parents,this._name,this._id)}function Q9(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function J9(e,n,r){var o,i,s=Q9(n)?Gm:kn;return function(){var a=s(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(n,r),a.on=i}}function e7(e,n){var r=this._id;return arguments.length<2?cn(this.node(),r).on.on(e):this.each(J9(r,e,n))}function t7(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function n7(){return this.on("end.remove",t7(this._id))}function r7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=zm(e));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var l=o[a],c=l.length,u=s[a]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Wu(u[p],n,r,p,u,cn(d,r)));return new Yn(s,this._parents,n,r)}function o7(e){var n=this._name,r=this._id;typeof e!="function"&&(e=j2(e));for(var o=this._groups,i=o.length,s=[],a=[],l=0;l<i;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),m,g=cn(d,r),v=0,_=p.length;v<_;++v)(m=p[v])&&Wu(m,n,r,v,p,g);s.push(p),a.push(d)}return new Yn(s,a,n,r)}var i7=ka.prototype.constructor;function s7(){return new i7(this._groups,this._parents)}function a7(e,n){var r,o,i;return function(){var s=gi(this,e),a=(this.style.removeProperty(e),gi(this,e));return s===a?null:s===r&&a===o?i:i=n(r=s,o=a)}}function rE(e){return function(){this.style.removeProperty(e)}}function l7(e,n,r){var o,i=r+"",s;return function(){var a=gi(this,e);return a===i?null:a===o?s:s=n(o=a,r)}}function c7(e,n,r){var o,i,s;return function(){var a=gi(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),gi(this,e))),a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l))}}function u7(e,n){var r,o,i,s="style."+n,a="end."+s,l;return function(){var c=kn(this,e),u=c.on,d=c.value[s]==null?l||(l=rE(n)):void 0;(u!==r||i!==d)&&(o=(r=u).copy()).on(a,i=d),c.on=o}}function f7(e,n,r){var o=(e+="")=="transform"?d9:nE;return n==null?this.styleTween(e,a7(e,o)).on("end.style."+e,rE(e)):typeof n=="function"?this.styleTween(e,c7(e,o,Ym(this,"style."+e,n))).each(u7(this._id,e)):this.styleTween(e,l7(e,o,n),r).on("end.style."+e,null)}function d7(e,n,r){return function(o){this.style.setProperty(e,n.call(this,o),r)}}function p7(e,n,r){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&d7(e,a,r)),o}return s._value=n,s}function h7(e,n,r){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,p7(e,n,r??""))}function m7(e){return function(){this.textContent=e}}function g7(e){return function(){var n=e(this);this.textContent=n??""}}function y7(e){return this.tween("text",typeof e=="function"?g7(Ym(this,"text",e)):m7(e==null?"":e+""))}function v7(e){return function(n){this.textContent=e.call(this,n)}}function x7(e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&v7(i)),n}return o._value=e,o}function w7(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,x7(e))}function b7(){for(var e=this._name,n=this._id,r=oE(),o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var d=cn(c,n);Wu(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Yn(o,this._parents,e,r)}function _7(){var e,n,r=this,o=r._id,i=r.size();return new Promise(function(s,a){var l={value:a},c={value:function(){--i===0&&s()}};r.each(function(){var u=kn(this,o),d=u.on;d!==e&&(n=(e=d).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),i===0&&s()})}var S7=0;function Yn(e,n,r,o){this._groups=e,this._parents=n,this._name=r,this._id=o}function oE(){return++S7}var Pn=ka.prototype;Yn.prototype={constructor:Yn,select:r7,selectAll:o7,selectChild:Pn.selectChild,selectChildren:Pn.selectChildren,filter:q9,merge:Z9,selection:s7,transition:b7,call:Pn.call,nodes:Pn.nodes,node:Pn.node,size:Pn.size,empty:Pn.empty,each:Pn.each,on:e7,attr:j9,attrTween:z9,style:f7,styleTween:h7,text:y7,textTween:w7,remove:n7,tween:N9,delay:B9,duration:U9,ease:Y9,easeVarying:K9,end:_7,[Symbol.iterator]:Pn[Symbol.iterator]};function C7(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var E7={time:null,delay:0,duration:250,ease:C7};function k7(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function N7(e){var n,r;e instanceof Yn?(n=e._id,e=e._name):(n=oE(),(r=E7).time=Wm(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Wu(c,e,n,u,a,r||k7(c,n));return new Yn(o,this._parents,e,n)}ka.prototype.interrupt=C9;ka.prototype.transition=N7;const fl=e=>()=>e;function P7(e,{sourceEvent:n,target:r,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Dn(e,n,r){this.k=e,this.x=n,this.y=r}Dn.prototype={constructor:Dn,scale:function(e){return e===1?this:new Dn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Dn(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Uu=new Dn(1,0,0);Kt.prototype=Dn.prototype;function Kt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Uu;return e.__zoom}function ed(e){e.stopImmediatePropagation()}function qi(e){e.preventDefault(),e.stopImmediatePropagation()}function R7(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function M7(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Jv(){return this.__zoom||Uu}function A7(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function T7(){return navigator.maxTouchPoints||"ontouchstart"in this}function I7(e,n,r){var o=e.invertX(n[0][0])-r[0][0],i=e.invertX(n[1][0])-r[1][0],s=e.invertY(n[0][1])-r[0][1],a=e.invertY(n[1][1])-r[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function Xm(){var e=R7,n=M7,r=I7,o=A7,i=T7,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=zl,u=Na("start","zoom","end"),d,f,p,m=500,g=150,v=0,_=10;function y(P){P.property("__zoom",Jv).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",R).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(P,z,$,F){var T=P.selection?P.selection():P;T.property("__zoom",Jv),P!==T?C(P,z,$,F):T.interrupt().each(function(){E(this,arguments).event(F).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},y.scaleBy=function(P,z,$,F){y.scaleTo(P,function(){var T=this.__zoom.k,M=typeof z=="function"?z.apply(this,arguments):z;return T*M},$,F)},y.scaleTo=function(P,z,$,F){y.transform(P,function(){var T=n.apply(this,arguments),M=this.__zoom,D=$==null?S(T):typeof $=="function"?$.apply(this,arguments):$,B=M.invert(D),O=typeof z=="function"?z.apply(this,arguments):z;return r(x(w(M,O),D,B),T,a)},$,F)},y.translateBy=function(P,z,$,F){y.transform(P,function(){return r(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof $=="function"?$.apply(this,arguments):$),n.apply(this,arguments),a)},null,F)},y.translateTo=function(P,z,$,F,T){y.transform(P,function(){var M=n.apply(this,arguments),D=this.__zoom,B=F==null?S(M):typeof F=="function"?F.apply(this,arguments):F;return r(Uu.translate(B[0],B[1]).scale(D.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof $=="function"?-$.apply(this,arguments):-$),M,a)},F,T)};function w(P,z){return z=Math.max(s[0],Math.min(s[1],z)),z===P.k?P:new Dn(z,P.x,P.y)}function x(P,z,$){var F=z[0]-$[0]*P.k,T=z[1]-$[1]*P.k;return F===P.x&&T===P.y?P:new Dn(P.k,F,T)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function C(P,z,$,F){P.on("start.zoom",function(){E(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(F).end()}).tween("zoom",function(){var T=this,M=arguments,D=E(T,M).event(F),B=n.apply(T,M),O=$==null?S(B):typeof $=="function"?$.apply(T,M):$,W=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),G=T.__zoom,U=typeof z=="function"?z.apply(T,M):z,X=c(G.invert(O).concat(W/G.k),U.invert(O).concat(W/U.k));return function(H){if(H===1)H=U;else{var Y=X(H),K=W/Y[2];H=new Dn(K,O[0]-Y[0]*K,O[1]-Y[1]*K)}D.zoom(null,H)}})}function E(P,z,$){return!$&&P.__zooming||new k(P,z)}function k(P,z){this.that=P,this.args=z,this.active=0,this.sourceEvent=null,this.extent=n.apply(P,z),this.taps=0}k.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,z){return this.mouse&&P!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var z=tt(this.that).datum();u.call(P,this.that,new P7(P,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),z)}};function N(P,...z){if(!e.apply(this,arguments))return;var $=E(this,z).event(P),F=this.__zoom,T=Math.max(s[0],Math.min(s[1],F.k*Math.pow(2,o.apply(this,arguments)))),M=Ot(P);if($.wheel)($.mouse[0][0]!==M[0]||$.mouse[0][1]!==M[1])&&($.mouse[1]=F.invert($.mouse[0]=M)),clearTimeout($.wheel);else{if(F.k===T)return;$.mouse=[M,F.invert(M)],Bl(this),$.start()}qi(P),$.wheel=setTimeout(D,g),$.zoom("mouse",r(x(w(F,T),$.mouse[0],$.mouse[1]),$.extent,a));function D(){$.wheel=null,$.end()}}function A(P,...z){if(p||!e.apply(this,arguments))return;var $=P.currentTarget,F=E(this,z,!0).event(P),T=tt(P.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",W,!0),M=Ot(P,$),D=P.clientX,B=P.clientY;U2(P.view),ed(P),F.mouse=[M,this.__zoom.invert(M)],Bl(this),F.start();function O(G){if(qi(G),!F.moved){var U=G.clientX-D,X=G.clientY-B;F.moved=U*U+X*X>v}F.event(G).zoom("mouse",r(x(F.that.__zoom,F.mouse[0]=Ot(G,$),F.mouse[1]),F.extent,a))}function W(G){T.on("mousemove.zoom mouseup.zoom",null),G2(G.view,F.moved),qi(G),F.event(G).end()}}function R(P,...z){if(e.apply(this,arguments)){var $=this.__zoom,F=Ot(P.changedTouches?P.changedTouches[0]:P,this),T=$.invert(F),M=$.k*(P.shiftKey?.5:2),D=r(x(w($,M),F,T),n.apply(this,z),a);qi(P),l>0?tt(this).transition().duration(l).call(C,D,F,P):tt(this).call(y.transform,D,F,P)}}function I(P,...z){if(e.apply(this,arguments)){var $=P.touches,F=$.length,T=E(this,z,P.changedTouches.length===F).event(P),M,D,B,O;for(ed(P),D=0;D<F;++D)B=$[D],O=Ot(B,this),O=[O,this.__zoom.invert(O),B.identifier],T.touch0?!T.touch1&&T.touch0[2]!==O[2]&&(T.touch1=O,T.taps=0):(T.touch0=O,M=!0,T.taps=1+!!d);d&&(d=clearTimeout(d)),M&&(T.taps<2&&(f=O[0],d=setTimeout(function(){d=null},m)),Bl(this),T.start())}}function j(P,...z){if(this.__zooming){var $=E(this,z).event(P),F=P.changedTouches,T=F.length,M,D,B,O;for(qi(P),M=0;M<T;++M)D=F[M],B=Ot(D,this),$.touch0&&$.touch0[2]===D.identifier?$.touch0[0]=B:$.touch1&&$.touch1[2]===D.identifier&&($.touch1[0]=B);if(D=$.that.__zoom,$.touch1){var W=$.touch0[0],G=$.touch0[1],U=$.touch1[0],X=$.touch1[1],H=(H=U[0]-W[0])*H+(H=U[1]-W[1])*H,Y=(Y=X[0]-G[0])*Y+(Y=X[1]-G[1])*Y;D=w(D,Math.sqrt(H/Y)),B=[(W[0]+U[0])/2,(W[1]+U[1])/2],O=[(G[0]+X[0])/2,(G[1]+X[1])/2]}else if($.touch0)B=$.touch0[0],O=$.touch0[1];else return;$.zoom("touch",r(x(D,B,O),$.extent,a))}}function L(P,...z){if(this.__zooming){var $=E(this,z).event(P),F=P.changedTouches,T=F.length,M,D;for(ed(P),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),M=0;M<T;++M)D=F[M],$.touch0&&$.touch0[2]===D.identifier?delete $.touch0:$.touch1&&$.touch1[2]===D.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(D=Ot(D,this),Math.hypot(f[0]-D[0],f[1]-D[1])<_)){var B=tt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return y.wheelDelta=function(P){return arguments.length?(o=typeof P=="function"?P:fl(+P),y):o},y.filter=function(P){return arguments.length?(e=typeof P=="function"?P:fl(!!P),y):e},y.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:fl(!!P),y):i},y.extent=function(P){return arguments.length?(n=typeof P=="function"?P:fl([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),y):n},y.scaleExtent=function(P){return arguments.length?(s[0]=+P[0],s[1]=+P[1],y):[s[0],s[1]]},y.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(P){return arguments.length?(r=P,y):r},y.duration=function(P){return arguments.length?(l=+P,y):l},y.interpolate=function(P){return arguments.length?(c=P,y):c},y.on=function(){var P=u.on.apply(u,arguments);return P===u?y:P},y.clickDistance=function(P){return arguments.length?(v=(P=+P)*P,y):Math.sqrt(v)},y.tapDistance=function(P){return arguments.length?(_=+P,y):_},y}class e0 extends Map{constructor(n,r=O7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[o,i]of n)this.set(o,i)}get(n){return super.get(t0(this,n))}has(n){return super.has(t0(this,n))}set(n,r){return super.set(j7(this,n),r)}delete(n){return super.delete($7(this,n))}}function t0({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):r}function j7({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function $7({_intern:e,_key:n},r){const o=n(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function O7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function n0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function r0(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function D7(e,n){let r=0;for(let o of e)(o=+o)&&(r+=o);return r}var L7=typeof global=="object"&&global&&global.Object===Object&&global,z7=typeof self=="object"&&self&&self.Object===Object&&self,iE=L7||z7||Function("return this")(),Oc=iE.Symbol,sE=Object.prototype,F7=sE.hasOwnProperty,V7=sE.toString,Zi=Oc?Oc.toStringTag:void 0;function B7(e){var n=F7.call(e,Zi),r=e[Zi];try{e[Zi]=void 0;var o=!0}catch{}var i=V7.call(e);return o&&(n?e[Zi]=r:delete e[Zi]),i}var H7=Object.prototype,W7=H7.toString;function U7(e){return W7.call(e)}var G7="[object Null]",Y7="[object Undefined]",o0=Oc?Oc.toStringTag:void 0;function X7(e){return e==null?e===void 0?Y7:G7:o0&&o0 in Object(e)?B7(e):U7(e)}function K7(e){return e!=null&&typeof e=="object"}var q7="[object Symbol]";function Z7(e){return typeof e=="symbol"||K7(e)&&X7(e)==q7}var Q7=/\s/;function J7(e){for(var n=e.length;n--&&Q7.test(e.charAt(n)););return n}var eV=/^\s+/;function tV(e){return e&&e.slice(0,J7(e)+1).replace(eV,"")}function Dc(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var i0=NaN,nV=/^[-+]0x[0-9a-f]+$/i,rV=/^0b[01]+$/i,oV=/^0o[0-7]+$/i,iV=parseInt;function s0(e){if(typeof e=="number")return e;if(Z7(e))return i0;if(Dc(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Dc(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=tV(e);var r=rV.test(e);return r||oV.test(e)?iV(e.slice(2),r?2:8):nV.test(e)?i0:+e}var td=function(){return iE.Date.now()},sV="Expected a function",aV=Math.max,lV=Math.min;function aE(e,n,r){var o,i,s,a,l,c,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(sV);n=s0(n)||0,Dc(r)&&(d=!!r.leading,f="maxWait"in r,s=f?aV(s0(r.maxWait)||0,n):s,p="trailing"in r?!!r.trailing:p);function m(E){var k=o,N=i;return o=i=void 0,u=E,a=e.apply(N,k),a}function g(E){return u=E,l=setTimeout(y,n),d?m(E):a}function v(E){var k=E-c,N=E-u,A=n-k;return f?lV(A,s-N):A}function _(E){var k=E-c,N=E-u;return c===void 0||k>=n||k<0||f&&N>=s}function y(){var E=td();if(_(E))return w(E);l=setTimeout(y,v(E))}function w(E){return l=void 0,p&&o?m(E):(o=i=void 0,a)}function x(){l!==void 0&&clearTimeout(l),u=0,o=c=i=l=void 0}function S(){return l===void 0?a:w(td())}function C(){var E=td(),k=_(E);if(o=arguments,i=this,c=E,k){if(l===void 0)return g(c);if(f)return clearTimeout(l),l=setTimeout(y,n),m(c)}return l===void 0&&(l=setTimeout(y,n)),a}return C.cancel=x,C.flush=S,C}var cV="Expected a function";function uV(e,n,r){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(cV);return Dc(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),aE(e,n,{leading:o,maxWait:n,trailing:i})}var to=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-to.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?to.Bounce.In(e*2)*.5:to.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ds=function(){return performance.now()},lE=function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];for(var i=0,s=r;i<s.length;i++){var a=s[i];(n=a._group)===null||n===void 0||n.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=n;o<i.length;o++){var s=i[o];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ds()),r===void 0&&(r=!0);var o=Object.keys(this._tweens);if(o.length!==0)for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<o.length;i++){var s=this._tweens[o[i]],a=!r;s&&s.update(n,a)===!1&&!r&&this.remove(s)}o=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Op={Linear:function(e,n){var r=e.length-1,o=r*n,i=Math.floor(o),s=Op.Utils.Linear;return n<0?s(e[0],e[1],o):n>1?s(e[r],e[r-1],r-o):s(e[i],e[i+1>r?r:i+1],o-i)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},cE=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Dp=new lE,a0=function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=to.Linear.None,this._interpolationFunction=Op.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=cE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=Dp,Dp.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ds()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,o,i,s){for(var a in o){var l=n[a],c=Array.isArray(l),u=c?"array":typeof l,d=!c&&Array.isArray(o[a]);if(!(u==="undefined"||u==="function")){if(d){var f=o[a];if(f.length===0)continue;for(var p=[l],m=0,g=f.length;m<g;m+=1){var v=this._handleRelativeValue(l,f[m]);if(isNaN(v)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(v)}d&&(o[a]=p)}if((u==="object"||c)&&l&&!d){r[a]=c?[]:{};var _=l;for(var y in _)r[a][y]=_[y];i[a]=c?[]:{};var f=o[a];if(!this._isDynamic){var w={};for(var y in f)w[y]=f[y];o[a]=f=w}this._setupProperties(_,r[a],f,i[a],s)}else(typeof r[a]>"u"||s)&&(r[a]=l),c||(r[a]*=1),d?i[a]=o[a].slice().reverse():i[a]=r[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=ds()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ds()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=to.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=Op.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var o=this,i;if(n===void 0&&(n=ds()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var s;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=n-this._startTime,l=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(o._duration===0||a>c)return 1;var v=Math.trunc(a/l),_=a-v*l,y=Math.min(_/o._duration,1);return y===0&&a===o._duration?1:y},d=u(),f=this._easingFunction(d);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,d),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,g=this._chainedTweens.length;m<g;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,o,i){for(var s in o)if(r[s]!==void 0){var a=r[s]||0,l=o[s],c=Array.isArray(n[s]),u=Array.isArray(l),d=!c&&u;d?n[s]=this._interpolationFunction(l,i):typeof l=="object"&&l?this._updateProperties(n[s],a,l,i):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(n[s]=a+(l-a)*i))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],o=this._valuesEnd[n];typeof o=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(o):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e}();cE.nextId;var Sn=Dp;Sn.getAll.bind(Sn);Sn.removeAll.bind(Sn);Sn.add.bind(Sn);Sn.remove.bind(Sn);Sn.update.bind(Sn);function l0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function fV(e){if(Array.isArray(e))return e}function dV(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function pV(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function hV(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function mV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
304
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gV(e,n){return fV(e)||hV(e,n)||yV(e,n)||mV()}function yV(e,n){if(e){if(typeof e=="string")return l0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l0(e,n):void 0}}var vV=pV(function e(n,r){var o=r.default,i=o===void 0?null:o,s=r.triggerUpdate,a=s===void 0?!0:s,l=r.onChange,c=l===void 0?function(u,d){}:l;dV(this,e),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=c});function Km(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,o=e.props,i=o===void 0?{}:o,s=e.methods,a=s===void 0?{}:s,l=e.aliases,c=l===void 0?{}:l,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(i).map(function(g){return new vV(g,i[g])});return function g(){for(var v=arguments.length,_=new Array(v),y=0;y<v;y++)_[y]=arguments[y];var w=!!(this instanceof g&&this.constructor),x=w?_.shift():void 0,S=_[0],C=S===void 0?{}:S,E=Object.assign({},r instanceof Function?r(C):r,{initialised:!1}),k={};function N(I){return A(I,C),R(),N}var A=function(j,L){d.call(N,j,E,L),E.initialised=!0},R=aE(function(){E.initialised&&(p.call(N,E,k),k={})},1);return m.forEach(function(I){N[I.name]=j(I);function j(L){var P=L.name,z=L.triggerUpdate,$=z===void 0?!1:z,F=L.onChange,T=F===void 0?function(B,O){}:F,M=L.defaultVal,D=M===void 0?null:M;return function(B){var O=E[P];if(!arguments.length)return O;var W=B===void 0?D:B;return E[P]=W,T.call(N,W,E,O),!k.hasOwnProperty(P)&&(k[P]=O),$&&R(),N}}}),Object.keys(a).forEach(function(I){N[I]=function(){for(var j,L=arguments.length,P=new Array(L),z=0;z<L;z++)P[z]=arguments[z];return(j=a[I]).call.apply(j,[N,E].concat(P))}}),Object.entries(c).forEach(function(I){var j=gV(I,2),L=j[0],P=j[1];return N[L]=N[P]}),N.resetProps=function(){return m.forEach(function(I){N[I.name](I.defaultVal)}),N},N.resetProps(),E._rerender=R,w&&x&&N(x),N}}var ye=function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}};function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lc(e)}var xV=/^\s+/,wV=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=bV(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,o,i,s,a,l;return r=n.r/255,o=n.g/255,i=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(n){return this._a=uE(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=u0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=u0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+o+"%, "+i+"%)":"hsva("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var n=c0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=c0(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+o+"%, "+i+"%)":"hsla("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHex:function(n){return f0(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return EV(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ke(this._r,255)*100)+"%",g:Math.round(ke(this._g,255)*100)+"%",b:Math.round(ke(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%)":"rgba("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:DV[f0(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+d0(this._r,this._g,this._b,this._a),o=r,i=this._gradientType?"GradientType = 1, ":"";if(n){var s=ae(n);o="#"+d0(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+o+")"},toString:function(n){var r=!!n;n=n||this._format;var o=!1,i=this._a<1&&this._a>=0,s=!r&&i&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(o=this.toRgbString()),n==="prgb"&&(o=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(o=this.toHexString()),n==="hex3"&&(o=this.toHexString(!0)),n==="hex4"&&(o=this.toHex8String(!0)),n==="hex8"&&(o=this.toHex8String()),n==="name"&&(o=this.toName()),n==="hsl"&&(o=this.toHslString()),n==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var o=n.apply(null,[this].concat([].slice.call(r)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(RV,arguments)},brighten:function(){return this._applyModification(MV,arguments)},darken:function(){return this._applyModification(AV,arguments)},desaturate:function(){return this._applyModification(kV,arguments)},saturate:function(){return this._applyModification(NV,arguments)},greyscale:function(){return this._applyModification(PV,arguments)},spin:function(){return this._applyModification(TV,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination($V,arguments)},complement:function(){return this._applyCombination(IV,arguments)},monochromatic:function(){return this._applyCombination(OV,arguments)},splitcomplement:function(){return this._applyCombination(jV,arguments)},triad:function(){return this._applyCombination(p0,[3])},tetrad:function(){return this._applyCombination(p0,[4])}};ae.fromRatio=function(e,n){if(Lc(e)=="object"){var r={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?r[o]=e[o]:r[o]=ps(e[o]));e=r}return ae(e,n)};function bV(e){var n={r:0,g:0,b:0},r=1,o=null,i=null,s=null,a=!1,l=!1;return typeof e=="string"&&(e=VV(e)),Lc(e)=="object"&&(Rn(e.r)&&Rn(e.g)&&Rn(e.b)?(n=_V(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Rn(e.h)&&Rn(e.s)&&Rn(e.v)?(o=ps(e.s),i=ps(e.v),n=CV(e.h,o,i),a=!0,l="hsv"):Rn(e.h)&&Rn(e.s)&&Rn(e.l)&&(o=ps(e.s),s=ps(e.l),n=SV(e.h,o,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=uE(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function _V(e,n,r){return{r:ke(e,255)*255,g:ke(n,255)*255,b:ke(r,255)*255}}function c0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=(o+i)/2;if(o==i)s=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,l}}function SV(e,n,r){var o,i,s;e=ke(e,360),n=ke(n,100),r=ke(r,100);function a(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}if(n===0)o=i=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;o=a(c,l,e+1/3),i=a(c,l,e),s=a(c,l,e-1/3)}return{r:o*255,g:i*255,b:s*255}}function u0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=o,c=o-i;if(a=o===0?0:c/o,o==i)s=0;else{switch(o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,v:l}}function CV(e,n,r){e=ke(e,360)*6,n=ke(n,100),r=ke(r,100);var o=Math.floor(e),i=e-o,s=r*(1-n),a=r*(1-i*n),l=r*(1-(1-i)*n),c=o%6,u=[r,a,s,s,l,r][c],d=[l,r,r,a,s,s][c],f=[s,s,l,r,r,a][c];return{r:u*255,g:d*255,b:f*255}}function f0(e,n,r,o){var i=[Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function EV(e,n,r,o,i){var s=[Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16)),Jt(fE(o))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function d0(e,n,r,o){var i=[Jt(fE(o)),Jt(Math.round(e).toString(16)),Jt(Math.round(n).toString(16)),Jt(Math.round(r).toString(16))];return i.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()};ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function kV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=Gu(r.s),ae(r)}function NV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=Gu(r.s),ae(r)}function PV(e){return ae(e).desaturate(100)}function RV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=Gu(r.l),ae(r)}function MV(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function AV(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=Gu(r.l),ae(r)}function TV(e,n){var r=ae(e).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,ae(r)}function IV(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function p0(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),o=[ae(e)],i=360/n,s=1;s<n;s++)o.push(ae({h:(r.h+s*i)%360,s:r.s,l:r.l}));return o}function jV(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function $V(e,n,r){n=n||6,r=r||30;var o=ae(e).toHsl(),i=360/r,s=[ae(e)];for(o.h=(o.h-(i*n>>1)+720)%360;--n;)o.h=(o.h+i)%360,s.push(ae(o));return s}function OV(e,n){n=n||6;for(var r=ae(e).toHsv(),o=r.h,i=r.s,s=r.v,a=[],l=1/n;n--;)a.push(ae({h:o,s:i,v:s})),s=(s+l)%1;return a}ae.mix=function(e,n,r){r=r===0?0:r||50;var o=ae(e).toRgb(),i=ae(n).toRgb(),s=r/100,a={r:(i.r-o.r)*s+o.r,g:(i.g-o.g)*s+o.g,b:(i.b-o.b)*s+o.b,a:(i.a-o.a)*s+o.a};return ae(a)};ae.readability=function(e,n){var r=ae(e),o=ae(n);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)};ae.isReadable=function(e,n,r){var o=ae.readability(e,n),i,s;switch(s=!1,i=BV(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=o>=4.5;break;case"AAlarge":s=o>=3;break;case"AAAsmall":s=o>=7;break}return s};ae.mostReadable=function(e,n,r){var o=null,i=0,s,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)s=ae.readability(e,n[u]),s>i&&(i=s,o=ae(n[u]));return ae.isReadable(e,o,{level:l,size:c})||!a?o:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var Lp=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},DV=ae.hexNames=LV(Lp);function LV(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function uE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ke(e,n){zV(e)&&(e="100%");var r=FV(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Gu(e){return Math.min(1,Math.max(0,e))}function bt(e){return parseInt(e,16)}function zV(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function FV(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Jt(e){return e.length==1?"0"+e:""+e}function ps(e){return e<=1&&(e=e*100+"%"),e}function fE(e){return Math.round(parseFloat(e)*255).toString(16)}function h0(e){return bt(e)/255}var Gt=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Rn(e){return!!Gt.CSS_UNIT.exec(e)}function VV(e){e=e.replace(xV,"").replace(wV,"").toLowerCase();var n=!1;if(Lp[e])e=Lp[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Gt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Gt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Gt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Gt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Gt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Gt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Gt.hex8.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),a:h0(r[4]),format:n?"name":"hex8"}:(r=Gt.hex6.exec(e))?{r:bt(r[1]),g:bt(r[2]),b:bt(r[3]),format:n?"name":"hex"}:(r=Gt.hex4.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),a:h0(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Gt.hex3.exec(e))?{r:bt(r[1]+""+r[1]),g:bt(r[2]+""+r[2]),b:bt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function BV(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function zp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function HV(e){if(Array.isArray(e))return zp(e)}function dE(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function WV(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function UV(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function It(e,n){return e.get(dE(e,n))}function m0(e,n,r){WV(e,n),n.set(e,r)}function g0(e,n,r){return e.set(dE(e,n),r),r}function GV(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,QV(o.key),o)}}function YV(e,n,r){return n&&GV(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
305
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qV(e){return HV(e)||XV(e)||JV(e)||KV()}function ZV(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function QV(e){var n=ZV(e,"string");return typeof n=="symbol"?n:n+""}function JV(e,n){if(e){if(typeof e=="string")return zp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zp(e,n):void 0}}var eB=123,tB=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},pE=function(n,r,o){return(n<<16)+(r<<8)+o},nB=function(n){var r=ae(n).toRgb(),o=r.r,i=r.g,s=r.b;return pE(o,i,s)},y0=function(n,r){return n*eB%Math.pow(2,r)},Hr=new WeakMap,Mn=new WeakMap,rB=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;UV(this,e),m0(this,Hr,void 0),m0(this,Mn,void 0),g0(Mn,this,n),this.reset()}return YV(e,[{key:"reset",value:function(){g0(Hr,this,["__reserved for background__"])}},{key:"register",value:function(r){if(It(Hr,this).length>=Math.pow(2,24-It(Mn,this)))return null;var o=It(Hr,this).length,i=y0(o,It(Mn,this)),s=tB(o+(i<<24-It(Mn,this)));return It(Hr,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var o=typeof r=="string"?nB(r):pE.apply(void 0,qV(r));if(!o)return null;var i=o&Math.pow(2,24-It(Mn,this))-1,s=o>>24-It(Mn,this)&Math.pow(2,It(Mn,this))-1;return y0(i,It(Mn,this))!==s||i>=It(Hr,this).length?null:It(Hr,this)[i]}}])}(),Ra,Pe,hE,mE,lr,v0,gE,yE,nd,Hl,Cs,vE,qm,Fp,Vp,zc={},Fc=[],oB=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yu=Array.isArray;function yn(e,n){for(var r in n)e[r]=n[r];return e}function Zm(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iB(e,n,r){var o,i,s,a={};for(s in n)s=="key"?o=n[s]:s=="ref"?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?Ra.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return Es(e,a,o,i,null)}function Es(e,n,r,o,i){var s={type:e,props:n,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++hE,__i:-1,__u:0};return i==null&&Pe.vnode!=null&&Pe.vnode(s),s}function Xu(e){return e.children}function Wl(e,n){this.props=e,this.context=n}function vi(e,n){if(n==null)return e.__?vi(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?vi(e):null}function sB(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=yn({},n);s.__v=n.__v+1,Pe.vnode&&Pe.vnode(s),Qm(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,r??vi(n),!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,_E(o,s,i),n.__e=n.__=null,s.__e!=r&&xE(s)}}function xE(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),xE(e)}function x0(e){(!e.__d&&(e.__d=!0)&&lr.push(e)&&!Vc.__r++||v0!=Pe.debounceRendering)&&((v0=Pe.debounceRendering)||gE)(Vc)}function Vc(){try{for(var e,n=1;lr.length;)lr.length>n&&lr.sort(yE),e=lr.shift(),n=lr.length,sB(e)}finally{lr.length=Vc.__r=0}}function wE(e,n,r,o,i,s,a,l,c,u,d){var f,p,m,g,v,_,y,w=o&&o.__k||Fc,x=n.length;for(c=aB(r,n,w,c,x),f=0;f<x;f++)(m=r.__k[f])!=null&&(p=m.__i!=-1&&w[m.__i]||zc,m.__i=f,_=Qm(e,m,p,i,s,a,l,c,u,d),g=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Jm(p.ref,null,m),d.push(m.ref,m.__c||g,m)),v==null&&g!=null&&(v=g),(y=!!(4&m.__u))||p.__k===m.__k?(c=bE(m,c,e,y),y&&p.__e&&(p.__e=null)):typeof m.type=="function"&&_!==void 0?c=_:g&&(c=g.nextSibling),m.__u&=-7);return r.__e=v,c}function aB(e,n,r,o,i){var s,a,l,c,u,d=r.length,f=d,p=0;for(e.__k=new Array(i),s=0;s<i;s++)(a=n[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[s]=Es(null,a,null,null,null):Yu(a)?a=e.__k[s]=Es(Xu,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=Es(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,c=s+p,a.__=e,a.__b=e.__b+1,l=null,(u=a.__i=lB(a,r,c,f))!=-1&&(f--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>d?p--:i<d&&p++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?p--:u==c+1?p++:(u>c?p--:p++,a.__u|=4))):e.__k[s]=null;if(f)for(s=0;s<d;s++)(l=r[s])!=null&&!(2&l.__u)&&(l.__e==o&&(o=vi(l)),CE(l,l));return o}function bE(e,n,r,o){var i,s;if(typeof e.type=="function"){for(i=e.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=e,n=bE(i[s],n,r,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=vi(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function lB(e,n,r,o){var i,s,a,l=e.key,c=e.type,u=n[r],d=u!=null&&(2&u.__u)==0;if(u===null&&l==null||d&&l==u.key&&c==u.type)return r;if(o>(d?1:0)){for(i=r-1,s=r+1;i>=0||s<n.length;)if((u=n[a=i>=0?i--:s++])!=null&&!(2&u.__u)&&l==u.key&&c==u.type)return a}return-1}function w0(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||oB.test(n)?r:r+"px"}function dl(e,n,r,o,i){var s,a;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)r&&n in r||w0(e.style,n,"");if(r)for(n in r)o&&r[n]==o[n]||w0(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(vE,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+s]=r,r?o?r[Cs]=o[Cs]:(r[Cs]=qm,e.addEventListener(n,s?Vp:Fp,s)):e.removeEventListener(n,s?Vp:Fp,s);else{if(i=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function b0(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Hl]==null)n[Hl]=qm++;else if(n[Hl]<r[Cs])return;return r(Pe.event?Pe.event(n):n)}}}function Qm(e,n,r,o,i,s,a,l,c,u){var d,f,p,m,g,v,_,y,w,x,S,C,E,k,N,A=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[l=n.__e=r.__e]),(d=Pe.__b)&&d(n);e:if(typeof A=="function")try{if(y=n.props,w=A.prototype&&A.prototype.render,x=(d=A.contextType)&&o[d.__c],S=d?x?x.props.value:d.__:o,r.__c?_=(f=n.__c=r.__c).__=f.__E:(w?n.__c=f=new A(y,S):(n.__c=f=new Wl(y,S),f.constructor=A,f.render=uB),x&&x.sub(f),f.state||(f.state={}),f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),w&&f.__s==null&&(f.__s=f.state),w&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=yn({},f.__s)),yn(f.__s,A.getDerivedStateFromProps(y,f.__s))),m=f.props,g=f.state,f.__v=n,p)w&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),w&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(w&&A.getDerivedStateFromProps==null&&y!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(y,S),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(y,f.__s,S)===!1){n.__v!=r.__v&&(f.props=y,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(R){R&&(R.__=n)}),Fc.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(y,f.__s,S),w&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,g,v)})}if(f.context=S,f.props=y,f.__P=e,f.__e=!1,C=Pe.__r,E=0,w)f.state=f.__s,f.__d=!1,C&&C(n),d=f.render(f.props,f.state,f.context),Fc.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,C&&C(n),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++E<25);f.state=f.__s,f.getChildContext!=null&&(o=yn(yn({},o),f.getChildContext())),w&&!p&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(m,g)),k=d!=null&&d.type===Xu&&d.key==null?SE(d.props.children):d,l=wE(e,Yu(k)?k:[k],n,r,o,i,s,a,l,c,u),f.base=n.__e,n.__u&=-161,f.__h.length&&a.push(f),_&&(f.__E=f.__=null)}catch(R){if(n.__v=null,c||s!=null)if(R.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,n.__e=l}else{for(N=s.length;N--;)Zm(s[N]);Bp(n)}else n.__e=r.__e,n.__k=r.__k,R.then||Bp(n);Pe.__e(R,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=cB(r.__e,n,r,o,i,s,a,c,u);return(d=Pe.diffed)&&d(n),128&n.__u?void 0:l}function Bp(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Bp))}function _E(e,n,r){for(var o=0;o<r.length;o++)Jm(r[o],r[++o],r[++o]);Pe.__c&&Pe.__c(n,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){Pe.__e(s,i.__v)}})}function SE(e){return typeof e!="object"||e==null||e.__b>0?e:Yu(e)?e.map(SE):yn({},e)}function cB(e,n,r,o,i,s,a,l,c){var u,d,f,p,m,g,v,_=r.props||zc,y=n.props,w=n.type;if(w=="svg"?i="http://www.w3.org/2000/svg":w=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((m=s[u])&&"setAttribute"in m==!!w&&(w?m.localName==w:m.nodeType==3)){e=m,s[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(i,w,y.is&&y),l&&(Pe.__m&&Pe.__m(n,s),l=!1),s=null}if(w==null)_===y||l&&e.data==y||(e.data=y);else{if(s=s&&Ra.call(e.childNodes),!l&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u=="dangerouslySetInnerHTML"?f=m:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||dl(e,u,null,m,i);for(u in y)m=y[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?g=m:u=="checked"?v=m:l&&typeof m!="function"||_[u]===m||dl(e,u,m,_[u],i);if(d)l||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(f&&(e.innerHTML=""),wE(n.type=="template"?e.content:e,Yu(p)?p:[p],n,r,o,w=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,a,s?s[0]:r.__k&&vi(r,0),l,c),s!=null)for(u=s.length;u--;)Zm(s[u]);l||(u="value",w=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[u]||w=="progress"&&!g||w=="option"&&g!=_[u])&&dl(e,u,g,_[u],i),u="checked",v!=null&&v!=e[u]&&dl(e,u,v,_[u],i))}return e}function Jm(e,n,r){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(i){Pe.__e(i,r)}}function CE(e,n,r){var o,i;if(Pe.unmount&&Pe.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Jm(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){Pe.__e(s,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&CE(o[i],n,r||typeof e.type!="function");r||Zm(e.__e),e.__c=e.__=e.__e=void 0}function uB(e,n,r){return this.constructor(e,r)}function fB(e,n,r){var o,i,s,a;n==document&&(n=document.documentElement),Pe.__&&Pe.__(e,n),i=(o=!1)?null:n.__k,s=[],a=[],Qm(n,e=n.__k=iB(Xu,null,[e]),i||zc,zc,n.namespaceURI,i?null:n.firstChild?Ra.call(n.childNodes):null,s,i?i.__e:n.firstChild,o,a),_E(s,e,a)}function EE(e,n,r){var o,i,s,a,l=yn({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)s=="key"?o=n[s]:s=="ref"?i=n[s]:l[s]=n[s]===void 0&&a!=null?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?Ra.call(arguments,2):r),Es(e.type,l,o||e.key,i||e.ref,null)}Ra=Fc.slice,Pe={__e:function(e,n,r,o){for(var i,s,a;n=n.__;)if((i=n.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),a=i.__d),a)return i.__E=i}catch(l){e=l}throw e}},hE=0,mE=function(e){return e!=null&&e.constructor===void 0},Wl.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=yn({},this.state),typeof e=="function"&&(e=e(yn({},r),this.props)),e&&yn(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),x0(this))},Wl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x0(this))},Wl.prototype.render=Xu,lr=[],gE=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yE=function(e,n){return e.__v.__b-n.__v.__b},Vc.__r=0,nd=Math.random().toString(8),Hl="__d"+nd,Cs="__a"+nd,vE=/(PointerCapture)$|Capture$/i,qm=0,Fp=b0(!1),Vp=b0(!0);function _0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function dB(e){if(Array.isArray(e))return e}function pB(e,n,r){return(n=xB(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function hB(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function mB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
306
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function gB(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?S0(Object(r),!0).forEach(function(o){pB(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S0(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function yB(e,n){return dB(e)||hB(e,n)||wB(e,n)||mB()}function vB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function xB(e){var n=vB(e,"string");return typeof n=="symbol"?n:n+""}function Bc(e){"@babel/helpers - typeof";return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bc(e)}function wB(e,n){if(e){if(typeof e=="string")return _0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_0(e,n):void 0}}var Hp=function(n){if(Bc(n)!=="object")return n;var r=EE(n);if(r.props){var o;r.props=gB({},r.props),r!=null&&(o=r.props)!==null&&o!==void 0&&o.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Hp):Hp(r.props.children))}return r},bB=function(n){return mE(EE(n))},_B=function(n,r){delete r.__k,fB(Hp(n),r)};function SB(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var CB=`.float-tooltip-kap {
307
- position: absolute;
308
- width: max-content; /* prevent shrinking near right edge */
309
- max-width: max(50%, 150px);
310
- padding: 3px 5px;
311
- border-radius: 3px;
312
- font: 12px sans-serif;
313
- color: #eee;
314
- background: rgba(0,0,0,0.6);
315
- pointer-events: none;
316
- }
317
- `;SB(CB);var EB=Km({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.style,s=i===void 0?{}:i,a=!!n&&Bc(n)==="object"&&!!n.node&&typeof n.node=="function",l=tt(a?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(s).forEach(function(u){var d=yB(u,2),f=d[0],p=d[1];return r.tooltipEl.style(f,p)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var d=Ot(u),f=l.node(),p=f.offsetWidth,m=f.offsetHeight,g=[r.offsetX===null||r.offsetX===void 0?"-".concat(d[0]/p*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?m>130&&m-d[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",d[0]+"px").style("top",d[1]+"px").style("transform","translate(".concat(g.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):bB(n.content)?(n.tooltipEl.text(""),_B(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function kB(e,n,r){var o,i=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function s(){var a,l=o.length,c,u=0,d=0,f=0;for(a=0;a<l;++a)c=o[a],u+=c.x||0,d+=c.y||0,f+=c.z||0;for(u=(u/l-e)*i,d=(d/l-n)*i,f=(f/l-r)*i,a=0;a<l;++a)c=o[a],u&&(c.x-=u),d&&(c.y-=d),f&&(c.z-=f)}return s.initialize=function(a){o=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(n=+a,s):n},s.z=function(a){return arguments.length?(r=+a,s):r},s.strength=function(a){return arguments.length?(i=+a,s):i},s}function NB(e){const n=+this._x.call(null,e);return kE(this.cover(n),n,e)}function kE(e,n,r){if(isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,l=e._x1,c,u,d,f,p;if(!i)return e._root=s,e;for(;i.length;)if((d=n>=(c=(a+l)/2))?a=c:l=c,o=i,!(i=i[f=+d]))return o[f]=s,e;if(u=+e._x.call(null,i.data),n===u)return s.next=i,o?o[f]=s:e._root=s,e;do o=o?o[f]=new Array(2):e._root=new Array(2),(d=n>=(c=(a+l)/2))?a=c:l=c;while((f=+d)==(p=+(u>=c)));return o[p]=i,o[f]=s,e}function PB(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let o=1/0,i=-1/0;for(let s=0,a;s<n;++s)isNaN(a=+this._x.call(null,e[s]))||(r[s]=a,a<o&&(o=a),a>i&&(i=a));if(o>i)return this;this.cover(o).cover(i);for(let s=0;s<n;++s)kE(this,r[s],e[s]);return this}function RB(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var o=r-n||1,i=this._root,s,a;n>e||e>=r;)switch(a=+(e<n),s=new Array(2),s[a]=i,i=s,o*=2,a){case 0:r=n+o;break;case 1:n=r-o;break}this._root&&this._root.length&&(this._root=i)}return this._x0=n,this._x1=r,this}function MB(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function AB(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Fn(e,n,r){this.node=e,this.x0=n,this.x1=r}function TB(e,n){var r,o=this._x0,i,s,a=this._x1,l=[],c=this._root,u,d;for(c&&l.push(new Fn(c,o,a)),n==null?n=1/0:(o=e-n,a=e+n);u=l.pop();)if(!(!(c=u.node)||(i=u.x0)>a||(s=u.x1)<o))if(c.length){var f=(i+s)/2;l.push(new Fn(c[1],f,s),new Fn(c[0],i,f)),(d=+(e>=f))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-d],l[l.length-1-d]=u)}else{var p=Math.abs(e-+this._x.call(null,c.data));p<n&&(n=p,o=e-p,a=e+p,r=c.data)}return r}function IB(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._x1,c,u,d,f,p;if(!r)return this;if(r.length)for(;;){if((d=c>=(u=(a+l)/2))?a=u:l=u,n=r,!(r=r[f=+d]))return this;if(!r.length)break;n[f+1&1]&&(o=n,p=f)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[f]=s:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(o?o[p]=r:this._root=r),this):(this._root=s,this)}function jB(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function $B(){return this._root}function OB(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function DB(e){var n=[],r,o=this._root,i,s,a;for(o&&n.push(new Fn(o,this._x0,this._x1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.x1)&&o.length){var l=(s+a)/2;(i=o[1])&&n.push(new Fn(i,l,a)),(i=o[0])&&n.push(new Fn(i,s,l))}return this}function LB(e){var n=[],r=[],o;for(this._root&&n.push(new Fn(this._root,this._x0,this._x1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.x1,c=(a+l)/2;(s=i[0])&&n.push(new Fn(s,a,c)),(s=i[1])&&n.push(new Fn(s,c,l))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.x1);return this}function zB(e){return e[0]}function FB(e){return arguments.length?(this._x=e,this):this._x}function NE(e,n){var r=new eg(n??zB,NaN,NaN);return e==null?r:r.addAll(e)}function eg(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function C0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var wt=NE.prototype=eg.prototype;wt.copy=function(){var e=new eg(this._x,this._x0,this._x1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=C0(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var i=0;i<2;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(2)}):n.target[i]=C0(o));return e};wt.add=NB;wt.addAll=PB;wt.cover=RB;wt.data=MB;wt.extent=AB;wt.find=TB;wt.remove=IB;wt.removeAll=jB;wt.root=$B;wt.size=OB;wt.visit=DB;wt.visitAfter=LB;wt.x=FB;function VB(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return PE(this.cover(n,r),n,r,e)}function PE(e,n,r,o){if(isNaN(n)||isNaN(r))return e;var i,s=e._root,a={data:o},l=e._x0,c=e._y0,u=e._x1,d=e._y1,f,p,m,g,v,_,y,w;if(!s)return e._root=a,e;for(;s.length;)if((v=n>=(f=(l+u)/2))?l=f:u=f,(_=r>=(p=(c+d)/2))?c=p:d=p,i=s,!(s=s[y=_<<1|v]))return i[y]=a,e;if(m=+e._x.call(null,s.data),g=+e._y.call(null,s.data),n===m&&r===g)return a.next=s,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(v=n>=(f=(l+u)/2))?l=f:u=f,(_=r>=(p=(c+d)/2))?c=p:d=p;while((y=_<<1|v)===(w=(g>=p)<<1|m>=f));return i[w]=s,i[y]=a,e}function BB(e){var n,r,o=e.length,i,s,a=new Array(o),l=new Array(o),c=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<o;++r)isNaN(i=+this._x.call(null,n=e[r]))||isNaN(s=+this._y.call(null,n))||(a[r]=i,l[r]=s,i<c&&(c=i),i>d&&(d=i),s<u&&(u=s),s>f&&(f=s));if(c>d||u>f)return this;for(this.cover(c,u).cover(d,f),r=0;r<o;++r)PE(this,a[r],l[r],e[r]);return this}function HB(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._x1,s=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,s=(o=Math.floor(n))+1;else{for(var a=i-r||1,l=this._root,c,u;r>e||e>=i||o>n||n>=s;)switch(u=(n<o)<<1|e<r,c=new Array(4),c[u]=l,l=c,a*=2,u){case 0:i=r+a,s=o+a;break;case 1:r=i-a,s=o+a;break;case 2:i=r+a,o=s-a;break;case 3:r=i-a,o=s-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=o,this._x1=i,this._y1=s,this}function WB(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function UB(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ot(e,n,r,o,i){this.node=e,this.x0=n,this.y0=r,this.x1=o,this.y1=i}function GB(e,n,r){var o,i=this._x0,s=this._y0,a,l,c,u,d=this._x1,f=this._y1,p=[],m=this._root,g,v;for(m&&p.push(new ot(m,i,s,d,f)),r==null?r=1/0:(i=e-r,s=n-r,d=e+r,f=n+r,r*=r);g=p.pop();)if(!(!(m=g.node)||(a=g.x0)>d||(l=g.y0)>f||(c=g.x1)<i||(u=g.y1)<s))if(m.length){var _=(a+c)/2,y=(l+u)/2;p.push(new ot(m[3],_,y,c,u),new ot(m[2],a,y,_,u),new ot(m[1],_,l,c,y),new ot(m[0],a,l,_,y)),(v=(n>=y)<<1|e>=_)&&(g=p[p.length-1],p[p.length-1]=p[p.length-1-v],p[p.length-1-v]=g)}else{var w=e-+this._x.call(null,m.data),x=n-+this._y.call(null,m.data),S=w*w+x*x;if(S<r){var C=Math.sqrt(r=S);i=e-C,s=n-C,d=e+C,f=n+C,o=m.data}}return o}function YB(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._x1,u=this._y1,d,f,p,m,g,v,_,y;if(!r)return this;if(r.length)for(;;){if((g=d>=(p=(a+c)/2))?a=p:c=p,(v=f>=(m=(l+u)/2))?l=m:u=m,n=r,!(r=r[_=v<<1|g]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(o=n,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[_]=s:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[y]=r:this._root=r),this):(this._root=s,this)}function XB(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function KB(){return this._root}function qB(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function ZB(e){var n=[],r,o=this._root,i,s,a,l,c;for(o&&n.push(new ot(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.x1,c=r.y1)&&o.length){var u=(s+l)/2,d=(a+c)/2;(i=o[3])&&n.push(new ot(i,u,d,l,c)),(i=o[2])&&n.push(new ot(i,s,d,u,c)),(i=o[1])&&n.push(new ot(i,u,a,l,d)),(i=o[0])&&n.push(new ot(i,s,a,u,d))}return this}function QB(e){var n=[],r=[],o;for(this._root&&n.push(new ot(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.x1,u=o.y1,d=(a+c)/2,f=(l+u)/2;(s=i[0])&&n.push(new ot(s,a,l,d,f)),(s=i[1])&&n.push(new ot(s,d,l,c,f)),(s=i[2])&&n.push(new ot(s,a,f,d,u)),(s=i[3])&&n.push(new ot(s,d,f,c,u))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function JB(e){return e[0]}function eH(e){return arguments.length?(this._x=e,this):this._x}function tH(e){return e[1]}function nH(e){return arguments.length?(this._y=e,this):this._y}function RE(e,n,r){var o=new tg(n??JB,r??tH,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function tg(e,n,r,o,i,s){this._x=e,this._y=n,this._x0=r,this._y0=o,this._x1=i,this._y1=s,this._root=void 0}function E0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ct=RE.prototype=tg.prototype;ct.copy=function(){var e=new tg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=E0(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var i=0;i<4;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(4)}):n.target[i]=E0(o));return e};ct.add=VB;ct.addAll=BB;ct.cover=HB;ct.data=WB;ct.extent=UB;ct.find=GB;ct.remove=YB;ct.removeAll=XB;ct.root=KB;ct.size=qB;ct.visit=ZB;ct.visitAfter=QB;ct.x=eH;ct.y=nH;function rH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),o=+this._z.call(null,e);return ME(this.cover(n,r,o),n,r,o,e)}function ME(e,n,r,o,i){if(isNaN(n)||isNaN(r)||isNaN(o))return e;var s,a=e._root,l={data:i},c=e._x0,u=e._y0,d=e._z0,f=e._x1,p=e._y1,m=e._z1,g,v,_,y,w,x,S,C,E,k,N;if(!a)return e._root=l,e;for(;a.length;)if((S=n>=(g=(c+f)/2))?c=g:f=g,(C=r>=(v=(u+p)/2))?u=v:p=v,(E=o>=(_=(d+m)/2))?d=_:m=_,s=a,!(a=a[k=E<<2|C<<1|S]))return s[k]=l,e;if(y=+e._x.call(null,a.data),w=+e._y.call(null,a.data),x=+e._z.call(null,a.data),n===y&&r===w&&o===x)return l.next=a,s?s[k]=l:e._root=l,e;do s=s?s[k]=new Array(8):e._root=new Array(8),(S=n>=(g=(c+f)/2))?c=g:f=g,(C=r>=(v=(u+p)/2))?u=v:p=v,(E=o>=(_=(d+m)/2))?d=_:m=_;while((k=E<<2|C<<1|S)===(N=(x>=_)<<2|(w>=v)<<1|y>=g));return s[N]=a,s[k]=l,e}function oH(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),o=new Float64Array(n),i=new Float64Array(n);let s=1/0,a=1/0,l=1/0,c=-1/0,u=-1/0,d=-1/0;for(let f=0,p,m,g,v;f<n;++f)isNaN(m=+this._x.call(null,p=e[f]))||isNaN(g=+this._y.call(null,p))||isNaN(v=+this._z.call(null,p))||(r[f]=m,o[f]=g,i[f]=v,m<s&&(s=m),m>c&&(c=m),g<a&&(a=g),g>u&&(u=g),v<l&&(l=v),v>d&&(d=v));if(s>c||a>u||l>d)return this;this.cover(s,a,l).cover(c,u,d);for(let f=0;f<n;++f)ME(this,r[f],o[f],i[f],e[f]);return this}function iH(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var o=this._x0,i=this._y0,s=this._z0,a=this._x1,l=this._y1,c=this._z1;if(isNaN(o))a=(o=Math.floor(e))+1,l=(i=Math.floor(n))+1,c=(s=Math.floor(r))+1;else{for(var u=a-o||1,d=this._root,f,p;o>e||e>=a||i>n||n>=l||s>r||r>=c;)switch(p=(r<s)<<2|(n<i)<<1|e<o,f=new Array(8),f[p]=d,d=f,u*=2,p){case 0:a=o+u,l=i+u,c=s+u;break;case 1:o=a-u,l=i+u,c=s+u;break;case 2:a=o+u,i=l-u,c=s+u;break;case 3:o=a-u,i=l-u,c=s+u;break;case 4:a=o+u,l=i+u,s=c-u;break;case 5:o=a-u,l=i+u,s=c-u;break;case 6:a=o+u,i=l-u,s=c-u;break;case 7:o=a-u,i=l-u,s=c-u;break}this._root&&this._root.length&&(this._root=d)}return this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this}function sH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function aH(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function xe(e,n,r,o,i,s,a){this.node=e,this.x0=n,this.y0=r,this.z0=o,this.x1=i,this.y1=s,this.z1=a}function lH(e,n,r,o){var i,s=this._x0,a=this._y0,l=this._z0,c,u,d,f,p,m,g=this._x1,v=this._y1,_=this._z1,y=[],w=this._root,x,S;for(w&&y.push(new xe(w,s,a,l,g,v,_)),o==null?o=1/0:(s=e-o,a=n-o,l=r-o,g=e+o,v=n+o,_=r+o,o*=o);x=y.pop();)if(!(!(w=x.node)||(c=x.x0)>g||(u=x.y0)>v||(d=x.z0)>_||(f=x.x1)<s||(p=x.y1)<a||(m=x.z1)<l))if(w.length){var C=(c+f)/2,E=(u+p)/2,k=(d+m)/2;y.push(new xe(w[7],C,E,k,f,p,m),new xe(w[6],c,E,k,C,p,m),new xe(w[5],C,u,k,f,E,m),new xe(w[4],c,u,k,C,E,m),new xe(w[3],C,E,d,f,p,k),new xe(w[2],c,E,d,C,p,k),new xe(w[1],C,u,d,f,E,k),new xe(w[0],c,u,d,C,E,k)),(S=(r>=k)<<2|(n>=E)<<1|e>=C)&&(x=y[y.length-1],y[y.length-1]=y[y.length-1-S],y[y.length-1-S]=x)}else{var N=e-+this._x.call(null,w.data),A=n-+this._y.call(null,w.data),R=r-+this._z.call(null,w.data),I=N*N+A*A+R*R;if(I<o){var j=Math.sqrt(o=I);s=e-j,a=n-j,l=r-j,g=e+j,v=n+j,_=r+j,i=w.data}}return i}const cH=(e,n,r,o,i,s)=>Math.sqrt((e-o)**2+(n-i)**2+(r-s)**2);function uH(e,n,r,o){const i=[],s=e-o,a=n-o,l=r-o,c=e+o,u=n+o,d=r+o;return this.visit((f,p,m,g,v,_,y)=>{if(!f.length)do{const w=f.data;cH(e,n,r,this._x(w),this._y(w),this._z(w))<=o&&i.push(w)}while(f=f.next);return p>c||m>u||g>d||v<s||_<a||y<l}),i}function fH(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(g=+this._z.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._z0,u=this._x1,d=this._y1,f=this._z1,p,m,g,v,_,y,w,x,S,C,E;if(!r)return this;if(r.length)for(;;){if((w=p>=(v=(a+u)/2))?a=v:u=v,(x=m>=(_=(l+d)/2))?l=_:d=_,(S=g>=(y=(c+f)/2))?c=y:f=y,n=r,!(r=r[C=S<<2|x<<1|w]))return this;if(!r.length)break;(n[C+1&7]||n[C+2&7]||n[C+3&7]||n[C+4&7]||n[C+5&7]||n[C+6&7]||n[C+7&7])&&(o=n,E=C)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[C]=s:delete n[C],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[E]=r:this._root=r),this):(this._root=s,this)}function dH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function pH(){return this._root}function hH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function mH(e){var n=[],r,o=this._root,i,s,a,l,c,u,d;for(o&&n.push(new xe(o,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.z0,c=r.x1,u=r.y1,d=r.z1)&&o.length){var f=(s+c)/2,p=(a+u)/2,m=(l+d)/2;(i=o[7])&&n.push(new xe(i,f,p,m,c,u,d)),(i=o[6])&&n.push(new xe(i,s,p,m,f,u,d)),(i=o[5])&&n.push(new xe(i,f,a,m,c,p,d)),(i=o[4])&&n.push(new xe(i,s,a,m,f,p,d)),(i=o[3])&&n.push(new xe(i,f,p,l,c,u,m)),(i=o[2])&&n.push(new xe(i,s,p,l,f,u,m)),(i=o[1])&&n.push(new xe(i,f,a,l,c,p,m)),(i=o[0])&&n.push(new xe(i,s,a,l,f,p,m))}return this}function gH(e){var n=[],r=[],o;for(this._root&&n.push(new xe(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.z0,u=o.x1,d=o.y1,f=o.z1,p=(a+u)/2,m=(l+d)/2,g=(c+f)/2;(s=i[0])&&n.push(new xe(s,a,l,c,p,m,g)),(s=i[1])&&n.push(new xe(s,p,l,c,u,m,g)),(s=i[2])&&n.push(new xe(s,a,m,c,p,d,g)),(s=i[3])&&n.push(new xe(s,p,m,c,u,d,g)),(s=i[4])&&n.push(new xe(s,a,l,g,p,m,f)),(s=i[5])&&n.push(new xe(s,p,l,g,u,m,f)),(s=i[6])&&n.push(new xe(s,a,m,g,p,d,f)),(s=i[7])&&n.push(new xe(s,p,m,g,u,d,f))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.z0,o.x1,o.y1,o.z1);return this}function yH(e){return e[0]}function vH(e){return arguments.length?(this._x=e,this):this._x}function xH(e){return e[1]}function wH(e){return arguments.length?(this._y=e,this):this._y}function bH(e){return e[2]}function _H(e){return arguments.length?(this._z=e,this):this._z}function AE(e,n,r,o){var i=new ng(n??yH,r??xH,o??bH,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function ng(e,n,r,o,i,s,a,l,c){this._x=e,this._y=n,this._z=r,this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this._root=void 0}function k0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Ke=AE.prototype=ng.prototype;Ke.copy=function(){var e=new ng(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=k0(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var i=0;i<8;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(8)}):n.target[i]=k0(o));return e};Ke.add=rH;Ke.addAll=oH;Ke.cover=iH;Ke.data=sH;Ke.extent=aH;Ke.find=lH;Ke.findAllWithinRadius=uH;Ke.remove=fH;Ke.removeAll=dH;Ke.root=pH;Ke.size=hH;Ke.visit=mH;Ke.visitAfter=gH;Ke.x=vH;Ke.y=wH;Ke.z=_H;function Ln(e){return function(){return e}}function jn(e){return(e()-.5)*1e-6}function SH(e){return e.index}function N0(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function CH(e){var n=SH,r=p,o,i=Ln(30),s,a,l,c,u,d,f=1;e==null&&(e=[]);function p(y){return 1/Math.min(c[y.source.index],c[y.target.index])}function m(y){for(var w=0,x=e.length;w<f;++w)for(var S=0,C,E,k,N=0,A=0,R=0,I,j;S<x;++S)C=e[S],E=C.source,k=C.target,N=k.x+k.vx-E.x-E.vx||jn(d),l>1&&(A=k.y+k.vy-E.y-E.vy||jn(d)),l>2&&(R=k.z+k.vz-E.z-E.vz||jn(d)),I=Math.sqrt(N*N+A*A+R*R),I=(I-s[S])/I*y*o[S],N*=I,A*=I,R*=I,k.vx-=N*(j=u[S]),l>1&&(k.vy-=A*j),l>2&&(k.vz-=R*j),E.vx+=N*(j=1-j),l>1&&(E.vy+=A*j),l>2&&(E.vz+=R*j)}function g(){if(a){var y,w=a.length,x=e.length,S=new Map(a.map((E,k)=>[n(E,k,a),E])),C;for(y=0,c=new Array(w);y<x;++y)C=e[y],C.index=y,typeof C.source!="object"&&(C.source=N0(S,C.source)),typeof C.target!="object"&&(C.target=N0(S,C.target)),c[C.source.index]=(c[C.source.index]||0)+1,c[C.target.index]=(c[C.target.index]||0)+1;for(y=0,u=new Array(x);y<x;++y)C=e[y],u[y]=c[C.source.index]/(c[C.source.index]+c[C.target.index]);o=new Array(x),v(),s=new Array(x),_()}}function v(){if(a)for(var y=0,w=e.length;y<w;++y)o[y]=+r(e[y],y,e)}function _(){if(a)for(var y=0,w=e.length;y<w;++y)s[y]=+i(e[y],y,e)}return m.initialize=function(y,...w){a=y,d=w.find(x=>typeof x=="function")||Math.random,l=w.find(x=>[1,2,3].includes(x))||2,g()},m.links=function(y){return arguments.length?(e=y,g(),m):e},m.id=function(y){return arguments.length?(n=y,m):n},m.iterations=function(y){return arguments.length?(f=+y,m):f},m.strength=function(y){return arguments.length?(r=typeof y=="function"?y:Ln(+y),v(),m):r},m.distance=function(y){return arguments.length?(i=typeof y=="function"?y:Ln(+y),_(),m):i},m}const EH=1664525,kH=1013904223,P0=4294967296;function NH(){let e=1;return()=>(e=(EH*e+kH)%P0)/P0}var R0=3;function rd(e){return e.x}function M0(e){return e.y}function PH(e){return e.z}var RH=10,MH=Math.PI*(3-Math.sqrt(5)),AH=Math.PI*20/(9+Math.sqrt(221));function TH(e,n){n=n||2;var r=Math.min(R0,Math.max(1,Math.round(n))),o,i=1,s=.001,a=1-Math.pow(s,1/300),l=0,c=.6,u=new Map,d=Um(m),f=Na("tick","end"),p=NH();e==null&&(e=[]);function m(){g(),f.call("tick",o),i<s&&(d.stop(),f.call("end",o))}function g(y){var w,x=e.length,S;y===void 0&&(y=1);for(var C=0;C<y;++C)for(i+=(l-i)*a,u.forEach(function(E){E(i)}),w=0;w<x;++w)S=e[w],S.fx==null?S.x+=S.vx*=c:(S.x=S.fx,S.vx=0),r>1&&(S.fy==null?S.y+=S.vy*=c:(S.y=S.fy,S.vy=0)),r>2&&(S.fz==null?S.z+=S.vz*=c:(S.z=S.fz,S.vz=0));return o}function v(){for(var y=0,w=e.length,x;y<w;++y){if(x=e[y],x.index=y,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),x.fz!=null&&(x.z=x.fz),isNaN(x.x)||r>1&&isNaN(x.y)||r>2&&isNaN(x.z)){var S=RH*(r>2?Math.cbrt(.5+y):r>1?Math.sqrt(.5+y):y),C=y*MH,E=y*AH;r===1?x.x=S:r===2?(x.x=S*Math.cos(C),x.y=S*Math.sin(C)):(x.x=S*Math.sin(C)*Math.cos(E),x.y=S*Math.cos(C),x.z=S*Math.sin(C)*Math.sin(E))}(isNaN(x.vx)||r>1&&isNaN(x.vy)||r>2&&isNaN(x.vz))&&(x.vx=0,r>1&&(x.vy=0),r>2&&(x.vz=0))}}function _(y){return y.initialize&&y.initialize(e,p,r),y}return v(),o={tick:g,restart:function(){return d.restart(m),o},stop:function(){return d.stop(),o},numDimensions:function(y){return arguments.length?(r=Math.min(R0,Math.max(1,Math.round(y))),u.forEach(_),o):r},nodes:function(y){return arguments.length?(e=y,v(),u.forEach(_),o):e},alpha:function(y){return arguments.length?(i=+y,o):i},alphaMin:function(y){return arguments.length?(s=+y,o):s},alphaDecay:function(y){return arguments.length?(a=+y,o):+a},alphaTarget:function(y){return arguments.length?(l=+y,o):l},velocityDecay:function(y){return arguments.length?(c=1-y,o):1-c},randomSource:function(y){return arguments.length?(p=y,u.forEach(_),o):p},force:function(y,w){return arguments.length>1?(w==null?u.delete(y):u.set(y,_(w)),o):u.get(y)},find:function(){var y=Array.prototype.slice.call(arguments),w=y.shift()||0,x=(r>1?y.shift():null)||0,S=(r>2?y.shift():null)||0,C=y.shift()||1/0,E=0,k=e.length,N,A,R,I,j,L;for(C*=C,E=0;E<k;++E)j=e[E],N=w-j.x,A=x-(j.y||0),R=S-(j.z||0),I=N*N+A*A+R*R,I<C&&(L=j,C=I);return L},on:function(y,w){return arguments.length>1?(f.on(y,w),o):f.on(y)}}}function IH(){var e,n,r,o,i,s=Ln(-30),a,l=1,c=1/0,u=.81;function d(g){var v,_=e.length,y=(n===1?NE(e,rd):n===2?RE(e,rd,M0):n===3?AE(e,rd,M0,PH):null).visitAfter(p);for(i=g,v=0;v<_;++v)r=e[v],y.visit(m)}function f(){if(e){var g,v=e.length,_;for(a=new Array(v),g=0;g<v;++g)_=e[g],a[_.index]=+s(_,g,e)}}function p(g){var v=0,_,y,w=0,x,S,C,E,k=g.length;if(k){for(x=S=C=E=0;E<k;++E)(_=g[E])&&(y=Math.abs(_.value))&&(v+=_.value,w+=y,x+=y*(_.x||0),S+=y*(_.y||0),C+=y*(_.z||0));v*=Math.sqrt(4/k),g.x=x/w,n>1&&(g.y=S/w),n>2&&(g.z=C/w)}else{_=g,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do v+=a[_.data.index];while(_=_.next)}g.value=v}function m(g,v,_,y,w){if(!g.value)return!0;var x=[_,y,w][n-1],S=g.x-r.x,C=n>1?g.y-r.y:0,E=n>2?g.z-r.z:0,k=x-v,N=S*S+C*C+E*E;if(k*k/u<N)return N<c&&(S===0&&(S=jn(o),N+=S*S),n>1&&C===0&&(C=jn(o),N+=C*C),n>2&&E===0&&(E=jn(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)),r.vx+=S*g.value*i/N,n>1&&(r.vy+=C*g.value*i/N),n>2&&(r.vz+=E*g.value*i/N)),!0;if(g.length||N>=c)return;(g.data!==r||g.next)&&(S===0&&(S=jn(o),N+=S*S),n>1&&C===0&&(C=jn(o),N+=C*C),n>2&&E===0&&(E=jn(o),N+=E*E),N<l&&(N=Math.sqrt(l*N)));do g.data!==r&&(k=a[g.data.index]*i/N,r.vx+=S*k,n>1&&(r.vy+=C*k),n>2&&(r.vz+=E*k));while(g=g.next)}return d.initialize=function(g,...v){e=g,o=v.find(_=>typeof _=="function")||Math.random,n=v.find(_=>[1,2,3].includes(_))||2,f()},d.strength=function(g){return arguments.length?(s=typeof g=="function"?g:Ln(+g),f(),d):s},d.distanceMin=function(g){return arguments.length?(l=g*g,d):Math.sqrt(l)},d.distanceMax=function(g){return arguments.length?(c=g*g,d):Math.sqrt(c)},d.theta=function(g){return arguments.length?(u=g*g,d):Math.sqrt(u)},d}function jH(e,n,r,o){var i,s,a=Ln(.1),l,c;typeof e!="function"&&(e=Ln(+e)),n==null&&(n=0),r==null&&(r=0),o==null&&(o=0);function u(f){for(var p=0,m=i.length;p<m;++p){var g=i[p],v=g.x-n||1e-6,_=(g.y||0)-r||1e-6,y=(g.z||0)-o||1e-6,w=Math.sqrt(v*v+_*_+y*y),x=(c[p]-w)*l[p]*f/w;g.vx+=v*x,s>1&&(g.vy+=_*x),s>2&&(g.vz+=y*x)}}function d(){if(i){var f,p=i.length;for(l=new Array(p),c=new Array(p),f=0;f<p;++f)c[f]=+e(i[f],f,i),l[f]=isNaN(c[f])?0:+a(i[f],f,i)}}return u.initialize=function(f,...p){i=f,s=p.find(m=>[1,2,3].includes(m))||2,d()},u.strength=function(f){return arguments.length?(a=typeof f=="function"?f:Ln(+f),d(),u):a},u.radius=function(f){return arguments.length?(e=typeof f=="function"?f:Ln(+f),d(),u):e},u.x=function(f){return arguments.length?(n=+f,u):n},u.y=function(f){return arguments.length?(r=+f,u):r},u.z=function(f){return arguments.length?(o=+f,u):o},u}const{abs:Qi,cos:An,sin:Po,acos:$H,atan2:Ji,sqrt:tr,pow:jt}=Math;function es(e){return e<0?-jt(-e,1/3):jt(e,1/3)}const TE=Math.PI,pl=2*TE,nr=TE/2,OH=1e-6,od=Number.MAX_SAFE_INTEGER||9007199254740991,id=Number.MIN_SAFE_INTEGER||-9007199254740991,DH={x:0,y:0,z:0},Z={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let o=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(o+=r.z*r.z),tr(o)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const o=n.length-1;if(e===1)return n[o].t=1,n[o];const i=1-e;let s=n;if(o===0)return n[0].t=e,n[0];if(o===1){const l={x:i*s[0].x+e*s[1].x,y:i*s[0].y+e*s[1].y,t:e};return r&&(l.z=i*s[0].z+e*s[1].z),l}if(o<4){let l=i*i,c=e*e,u,d,f,p=0;o===2?(s=[s[0],s[1],s[2],DH],u=l,d=i*e*2,f=c):o===3&&(u=l*i,d=l*e*3,f=i*c*3,p=e*c);const m={x:u*s[0].x+d*s[1].x+f*s[2].x+p*s[3].x,y:u*s[0].y+d*s[1].y+f*s[2].y+p*s[3].y,t:e};return r&&(m.z=u*s[0].z+d*s[1].z+f*s[2].z+p*s[3].z),m}const a=JSON.parse(JSON.stringify(n));for(;a.length>1;){for(let l=0;l<a.length-1;l++)a[l]={x:a[l].x+(a[l+1].x-a[l].x)*e,y:a[l].y+(a[l+1].y-a[l].y)*e},typeof a[l].z<"u"&&(a[l].z=a[l].z+(a[l+1].z-a[l].z)*e);a.splice(a.length-1,1)}return a[0].t=e,a[0]},computeWithRatios:function(e,n,r,o){const i=1-e,s=r,a=n;let l=s[0],c=s[1],u=s[2],d=s[3],f;if(l*=i,c*=e,a.length===2)return f=l+c,{x:(l*a[0].x+c*a[1].x)/f,y:(l*a[0].y+c*a[1].y)/f,z:o?(l*a[0].z+c*a[1].z)/f:!1,t:e};if(l*=i,c*=2*i,u*=e*e,a.length===3)return f=l+c+u,{x:(l*a[0].x+c*a[1].x+u*a[2].x)/f,y:(l*a[0].y+c*a[1].y+u*a[2].y)/f,z:o?(l*a[0].z+c*a[1].z+u*a[2].z)/f:!1,t:e};if(l*=i,c*=1.5*i,u*=3*i,d*=e*e*e,a.length===4)return f=l+c+u+d,{x:(l*a[0].x+c*a[1].x+u*a[2].x+d*a[3].x)/f,y:(l*a[0].y+c*a[1].y+u*a[2].y+d*a[3].y)/f,z:o?(l*a[0].z+c*a[1].z+u*a[2].z+d*a[3].z)/f:!1,t:e}},derive:function(e,n){const r=[];for(let o=e,i=o.length,s=i-1;i>1;i--,s--){const a=[];for(let l=0,c;l<s;l++)c={x:s*(o[l+1].x-o[l].x),y:s*(o[l+1].y-o[l].y)},n&&(c.z=s*(o[l+1].z-o[l].z)),a.push(c);r.push(a),o=a}return r},between:function(e,n,r){return n<=e&&e<=r||Z.approximately(e,n)||Z.approximately(e,r)},approximately:function(e,n,r){return Qi(e-n)<=(r||OH)},length:function(e){const r=Z.Tvalues.length;let o=0;for(let i=0,s;i<r;i++)s=.5*Z.Tvalues[i]+.5,o+=Z.Cvalues[i]*Z.arcfn(s,e);return .5*o},map:function(e,n,r,o,i){const s=r-n,a=i-o,l=e-n,c=l/s;return o+a*c},lerp:function(e,n,r){const o={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(o.z=n.z+e*(r.z-n.z)),o},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(Z.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-e.x,a=r.y-e.y,l=o*a-i*s,c=o*s+i*a;return Ji(l,c)},round:function(e,n){const r=""+e,o=r.indexOf(".");return parseFloat(r.substring(0,o+1+n))},dist:function(e,n){const r=e.x-n.x,o=e.y-n.y;return tr(r*r+o*o)},closest:function(e,n){let r=jt(2,63),o,i;return e.forEach(function(s,a){i=Z.dist(n,s),i<r&&(r=i,o=a)}),{mdist:r,mpos:o}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=jt(e,n)+jt(1-e,n),o=r-1;return Qi(o/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=jt(1-e,n),o=jt(e,n)+r;return r/o},lli8:function(e,n,r,o,i,s,a,l){const c=(e*o-n*r)*(i-a)-(e-r)*(i*l-s*a),u=(e*o-n*r)*(s-l)-(n-o)*(i*l-s*a),d=(e-r)*(s-l)-(n-o)*(i-a);return d==0?!1:{x:c/d,y:u/d}},lli4:function(e,n,r,o){const i=e.x,s=e.y,a=n.x,l=n.y,c=r.x,u=r.y,d=o.x,f=o.y;return Z.lli8(i,s,a,l,c,u,d,f)},lli:function(e,n){return Z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Ce(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=od,r=od,o=id,i=id;return e.forEach(function(s){const a=s.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),o<a.x.max&&(o=a.x.max),i<a.y.max&&(i=a.y.max)}),{x:{min:n,mid:(n+o)/2,max:o,size:o-n},y:{min:r,mid:(r+i)/2,max:i,size:i-r}}},shapeintersections:function(e,n,r,o,i){if(!Z.bboxoverlap(n,o))return[];const s=[],a=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return a.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const d=c.intersects(u,i);d.length>0&&(d.c1=c,d.c2=u,d.s1=e,d.s2=r,s.push(d))})}),s},makeshape:function(e,n,r){const o=n.points.length,i=e.points.length,s=Z.makeline(n.points[o-1],e.points[0]),a=Z.makeline(e.points[i-1],n.points[0]),l={startcap:s,forward:e,back:n,endcap:a,bbox:Z.findbbox([s,e,n,a])};return l.intersections=function(c){return Z.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let o=od,i=id,s,a;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)s=r[l],a=e.get(s),a[n]<o&&(o=a[n]),a[n]>i&&(i=a[n]);return{min:o,mid:(o+i)/2,max:i,size:i-o}},align:function(e,n){const r=n.p1.x,o=n.p1.y,i=-Ji(n.p2.y-o,n.p2.x-r),s=function(a){return{x:(a.x-r)*An(i)-(a.y-o)*Po(i),y:(a.x-r)*Po(i)+(a.y-o)*An(i)}};return e.map(s)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,o=Z.align(e,n),i=function(k){return 0<=k&&k<=1};if(r===2){const k=o[0].y,N=o[1].y,A=o[2].y,R=k-2*N+A;if(R!==0){const I=-tr(N*N-k*A),j=-k+N,L=-(I+j)/R,P=-(-I+j)/R;return[L,P].filter(i)}else if(N!==A&&R===0)return[(2*N-A)/(2*N-2*A)].filter(i);return[]}const s=o[0].y,a=o[1].y,l=o[2].y,c=o[3].y;let u=-s+3*a-3*l+c,d=3*s-6*a+3*l,f=-3*s+3*a,p=s;if(Z.approximately(u,0)){if(Z.approximately(d,0))return Z.approximately(f,0)?[]:[-p/f].filter(i);const k=tr(f*f-4*d*p),N=2*d;return[(k-f)/N,(-f-k)/N].filter(i)}d/=u,f/=u,p/=u;const m=(3*f-d*d)/3,g=m/3,v=(2*d*d*d-9*d*f+27*p)/27,_=v/2,y=_*_+g*g*g;let w,x,S,C,E;if(y<0){const k=-m/3,N=k*k*k,A=tr(N),R=-v/(2*A),I=R<-1?-1:R>1?1:R,j=$H(I),L=es(A),P=2*L;return S=P*An(j/3)-d/3,C=P*An((j+pl)/3)-d/3,E=P*An((j+2*pl)/3)-d/3,[S,C,E].filter(i)}else{if(y===0)return w=_<0?es(-_):-es(_),S=2*w-d/3,C=-w-d/3,[S,C].filter(i);{const k=tr(y);return w=es(-_+k),x=es(_+k),[w-x-d/3].filter(i)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],o=e[2],i=n-2*r+o;if(i!==0){const s=-tr(r*r-n*o),a=-n+r,l=-(s+a)/i,c=-(-s+a)/i;return[l,c]}else if(r!==o&&i===0)return[(2*r-o)/(2*(r-o))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,o,i){let s,a,l,c,u=0,d=0;const f=Z.compute(e,n),p=Z.compute(e,r),m=f.x*f.x+f.y*f.y;if(o?(s=tr(jt(f.y*p.z-p.y*f.z,2)+jt(f.z*p.x-p.z*f.x,2)+jt(f.x*p.y-p.x*f.y,2)),a=jt(m+f.z*f.z,3/2)):(s=f.x*p.y-f.y*p.x,a=jt(m,3/2)),s===0||a===0)return{k:0,r:0};if(u=s/a,d=a/s,!i){const g=Z.curvature(e-.001,n,r,o,!0).k,v=Z.curvature(e+.001,n,r,o,!0).k;c=(v-u+(u-g))/2,l=(Qi(v-u)+Qi(u-g))/2}return{k:u,r:d,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=Z.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,o=n[3].x*n[1].y,i=n[1].x*n[2].y,s=n[3].x*n[2].y,a=18*(-3*r+2*o+3*i-s),l=18*(3*r-o-3*i),c=18*(i-r);if(Z.approximately(a,0)){if(!Z.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*a;if(Z.approximately(u,0))return[];const d=l*l-4*a*c;if(d<0)return[];const f=Math.sqrt(d);return[(f-l)/u,-(l+f)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(e,n){const r=["x","y"],o=r.length;for(let i=0,s,a,l,c;i<o;i++)if(s=r[i],a=e[s].mid,l=n[s].mid,c=(e[s].size+n[s].size)/2,Qi(a-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const o=e.bbox(),i=n.bbox(),s=1e5,a=r||.5;if(o.x.size+o.y.size<a&&i.x.size+i.y.size<a)return[(s*(e._t1+e._t2)/2|0)/s+"/"+(s*(n._t1+n._t2)/2|0)/s];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(f){return Z.bboxoverlap(f.left.bbox(),f.right.bbox())});let d=[];return u.length===0||(u.forEach(function(f){d=d.concat(Z.pairiteration(f.left,f.right,a))}),d=d.filter(function(f,p){return d.indexOf(f)===p})),d},getccenter:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-n.x,a=r.y-n.y,l=o*An(nr)-i*Po(nr),c=o*Po(nr)+i*An(nr),u=s*An(nr)-a*Po(nr),d=s*Po(nr)+a*An(nr),f=(e.x+n.x)/2,p=(e.y+n.y)/2,m=(n.x+r.x)/2,g=(n.y+r.y)/2,v=f+l,_=p+c,y=m+u,w=g+d,x=Z.lli8(f,p,v,_,m,g,y,w),S=Z.dist(x,e);let C=Ji(e.y-x.y,e.x-x.x),E=Ji(n.y-x.y,n.x-x.x),k=Ji(r.y-x.y,r.x-x.x),N;return C<k?((C>E||E>k)&&(C+=pl),C>k&&(N=k,k=C,C=N)):k<E&&E<C?(N=k,k=C,C=N):k+=pl,x.s=C,x.e=k,x.r=S,x},numberSort:function(e,n){return e-n}};class ks{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return Z.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),o=1;o<n.length;o++)Z.expandbox(r,n[o].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(o){r.push(...o.offset(n))}),new ks(r)}}const{abs:ts,min:A0,max:T0,cos:LH,sin:zH,acos:FH,sqrt:ns}=Math,VH=Math.PI;class Ce{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),o=!1;if(typeof r[0]=="object"){o=r.length;const m=[];r.forEach(function(g){["x","y","z"].forEach(function(v){typeof g[v]<"u"&&m.push(g[v])})}),r=m}let i=!1;const s=r.length;if(o){if(o>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(s!==6&&s!==8&&s!==9&&s!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!i&&(s===9||s===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let m=0,g=a?3:2;m<s;m+=g){var c={x:r[m],y:r[m+1]};a&&(c.z=r[m+2]),l.push(c)}const u=this.order=l.length-1,d=this.dims=["x","y"];a&&d.push("z"),this.dimlen=d.length;const f=Z.align(l,{p1:l[0],p2:l[u]}),p=Z.dist(l[0],l[u]);this._linear=f.reduce((m,g)=>m+ts(g.y),0)<p/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,o,i){if(typeof i>"u"&&(i=.5),i===0)return new Ce(r,r,o);if(i===1)return new Ce(n,r,r);const s=Ce.getABC(2,n,r,o,i);return new Ce(n,s.A,o)}static cubicFromPoints(n,r,o,i,s){typeof i>"u"&&(i=.5);const a=Ce.getABC(3,n,r,o,i);typeof s>"u"&&(s=Z.dist(r,a.C));const l=s*(1-i)/i,c=Z.dist(n,o),u=(o.x-n.x)/c,d=(o.y-n.y)/c,f=s*u,p=s*d,m=l*u,g=l*d,v={x:r.x-f,y:r.y-p},_={x:r.x+m,y:r.y+g},y=a.A,w={x:y.x+(v.x-y.x)/(1-i),y:y.y+(v.y-y.y)/(1-i)},x={x:y.x+(_.x-y.x)/i,y:y.y+(_.y-y.y)/i},S={x:n.x+(w.x-n.x)/i,y:n.y+(w.y-n.y)/i},C={x:o.x+(x.x-o.x)/(1-i),y:o.y+(x.y-o.y)/(1-i)};return new Ce(n,S,C,o)}static getUtils(){return Z}getUtils(){return Ce.getUtils()}static get PolyBezier(){return ks}valueOf(){return this.toString()}toString(){return Z.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,o=n[0].y,i=["M",r,o,this.order===2?"Q":"C"];for(let s=1,a=n.length;s<a;s++)i.push(n[s].x),i.push(n[s].y);return i.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=Z.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=Z.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return Z.length(this.derivative.bind(this))}static getABC(n=2,r,o,i,s=.5){const a=Z.projectionratio(s,n),l=1-a,c={x:a*r.x+l*i.x,y:a*r.y+l*i.y},u=Z.abcratio(s,n);return{A:{x:o.x+(o.x-c.x)/u,y:o.y+(o.y-c.y)/u},B:o,C:c,S:r,E:i}}getABC(n,r){r=r||this.get(n);let o=this.points[0],i=this.points[this.order];return Ce.getABC(this.order,o,r,i,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,o,i;r<n;r++)i=r/(n-1),o=this.compute(i),o.t=i,this._lut.push(o);return this._lut}on(n,r){r=r||5;const o=this.getLUT(),i=[];for(let s=0,a,l=0;s<o.length;s++)a=o[s],Z.dist(a,n)<r&&(i.push(a),l+=s/o.length);return i.length?t/=i.length:!1}project(n){const r=this.getLUT(),o=r.length-1,i=Z.closest(r,n),s=i.mpos,a=(s-1)/o,l=(s+1)/o,c=.1/o;let u=i.mdist,d=a,f=d,p;u+=1;for(let m;d<l+c;d+=c)p=this.compute(d),m=Z.dist(n,p),m<u&&(u=m,f=d);return f=f<0?0:f>1?1:f,p=this.compute(f),p.t=f,p.d=u,p}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?Z.computeWithRatios(n,this.points,this.ratios,this._3d):Z.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],o=n.length;for(let i=1,s,a;i<o;i++)s=n[i],a=n[i-1],r[i]={x:(o-i)/o*s.x+i/o*a.x,y:(o-i)/o*s.y+i/o*a.y};return r[o]=n[o-1],new Ce(r)}derivative(n){return Z.compute(n,this.dpoints[0],this._3d)}dderivative(n){return Z.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new Ce(Z.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return Z.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Z.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),o=ns(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/o,y:r.x/o}}__normal3(n){const r=this.derivative(n),o=this.derivative(n+.01),i=ns(r.x*r.x+r.y*r.y+r.z*r.z),s=ns(o.x*o.x+o.y*o.y+o.z*o.z);r.x/=i,r.y/=i,r.z/=i,o.x/=s,o.y/=s,o.z/=s;const a={x:o.y*r.z-o.z*r.y,y:o.z*r.x-o.x*r.z,z:o.x*r.y-o.y*r.x},l=ns(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=l,a.y/=l,a.z/=l;const c=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,o=[],i=[],s=0;for(i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],this.order===3&&(i[s++]=r[3]);r.length>1;){o=[];for(let a=0,l,c=r.length-1;a<c;a++)l=Z.lerp(n,r[a],r[a+1]),i[s++]=l,o.push(l);r=o}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const o=this.hull(n),i={left:this.order===2?new Ce([o[0],o[3],o[5]]):new Ce([o[0],o[4],o[7],o[9]]),right:this.order===2?new Ce([o[5],o[4],o[2]]):new Ce([o[9],o[8],o[6],o[3]]),span:o};return i.left._t1=Z.map(0,0,1,this._t1,this._t2),i.left._t2=Z.map(n,0,1,this._t1,this._t2),i.right._t1=Z.map(n,0,1,this._t1,this._t2),i.right._t2=Z.map(1,0,1,this._t1,this._t2),r?(r=Z.map(r,n,1,0,1),i.right.split(r).left):i}extrema(){const n={};let r=[];return this.dims.forEach((function(o){let i=function(a){return a[o]},s=this.dpoints[0].map(i);n[o]=Z.droots(s),this.order===3&&(s=this.dpoints[1].map(i),n[o]=n[o].concat(Z.droots(s))),n[o]=n[o].filter(function(a){return a>=0&&a<=1}),r=r.concat(n[o].sort(Z.numberSort))}).bind(this)),n.values=r.sort(Z.numberSort).filter(function(o,i){return r.indexOf(o)===i}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(o){r[o]=Z.getminmax(this,o,n[o])}).bind(this)),r}overlaps(n){const r=this.bbox(),o=n.bbox();return Z.bboxoverlap(r,o)}offset(n,r){if(typeof r<"u"){const o=this.get(n),i=this.normal(n),s={c:o,n:i,x:o.x+i.x*r,y:o.y+i.y*r};return this._3d&&(s.z=o.z+i.z*r),s}if(this._linear){const o=this.normal(0),i=this.points.map(function(s){const a={x:s.x+n*o.x,y:s.y+n*o.y};return s.z&&o.z&&(a.z=s.z+n*o.z),a});return[new Ce(i)]}return this.reduce().map(function(o){return o._linear?o.offset(n)[0]:o.scale(n)})}simple(){if(this.order===3){const i=Z.angle(this.points[0],this.points[3],this.points[1]),s=Z.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&s<0||i<0&&s>0)return!1}const n=this.normal(0),r=this.normal(1);let o=n.x*r.x+n.y*r.y;return this._3d&&(o+=n.z*r.z),ts(FH(o))<VH/3}reduce(){let n,r=0,o=0,i=.01,s,a=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)o=c[n],s=this.split(r,o),s._t1=r,s._t2=o,a.push(s),r=o;return a.forEach(function(u){for(r=0,o=0;o<=1;)for(o=r+i;o<=1+i;o+=i)if(s=u.split(r,o),!s.simple()){if(o-=i,ts(r-o)<i)return[];s=u.split(r,o),s._t1=Z.map(r,0,1,u._t1,u._t2),s._t2=Z.map(o,0,1,u._t1,u._t2),l.push(s),r=o;break}r<1&&(s=u.split(r,1),s._t1=Z.map(r,0,1,u._t1,u._t2),s._t2=u._t2,l.push(s))}),l}translate(n,r,o){o=typeof o=="number"?o:r;const i=this.order;let s=this.points.map((a,l)=>(1-l/i)*r+l/i*o);return new Ce(this.points.map((a,l)=>({x:a.x+n.x*s[l],y:a.y+n.y*s[l]})))}scale(n){const r=this.order;let o=!1;if(typeof n=="function"&&(o=n),o&&r===2)return this.raise().scale(o);const i=this.clockwise,s=this.points;if(this._linear)return this.translate(this.normal(0),o?o(0):n,o?o(1):n);const a=o?o(0):n,l=o?o(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],d=Z.lli4(c[0],c[0].c,c[1],c[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const p=u[f*r]=Z.copy(s[f*r]);p.x+=(f?l:a)*c[f].n.x,p.y+=(f?l:a)*c[f].n.y}),o?([0,1].forEach(function(f){if(!(r===2&&f)){var p=s[f+1],m={x:p.x-d.x,y:p.y-d.y},g=o?o((f+1)/r):n;o&&!i&&(g=-g);var v=ns(m.x*m.x+m.y*m.y);m.x/=v,m.y/=v,u[f+1]={x:p.x+g*m.x,y:p.y+g*m.y}}}),new Ce(u)):([0,1].forEach(f=>{if(r===2&&f)return;const p=u[f*r],m=this.derivative(f),g={x:p.x+m.x,y:p.y+m.y};u[f+1]=Z.lli4(p,g,d,s[f+1])}),new Ce(u))}outline(n,r,o,i){if(r=r===void 0?n:r,this._linear){const C=this.normal(0),E=this.points[0],k=this.points[this.points.length-1];let N,A,R;o===void 0&&(o=n,i=r),N={x:E.x+C.x*n,y:E.y+C.y*n},R={x:k.x+C.x*o,y:k.y+C.y*o},A={x:(N.x+R.x)/2,y:(N.y+R.y)/2};const I=[N,A,R];N={x:E.x-C.x*r,y:E.y-C.y*r},R={x:k.x-C.x*i,y:k.y-C.y*i},A={x:(N.x+R.x)/2,y:(N.y+R.y)/2};const j=[R,A,N],L=Z.makeline(j[2],I[0]),P=Z.makeline(I[2],j[0]),z=[L,new Ce(I),P,new Ce(j)];return new ks(z)}const s=this.reduce(),a=s.length,l=[];let c=[],u,d=0,f=this.length();const p=typeof o<"u"&&typeof i<"u";function m(C,E,k,N,A){return function(R){const I=N/k,j=(N+A)/k,L=E-C;return Z.map(R,0,1,C+I*L,C+j*L)}}s.forEach(function(C){const E=C.length();p?(l.push(C.scale(m(n,o,f,d,E))),c.push(C.scale(m(-r,-i,f,d,E)))):(l.push(C.scale(n)),c.push(C.scale(-r))),d+=E}),c=c.map(function(C){return u=C.points,u[3]?C.points=[u[3],u[2],u[1],u[0]]:C.points=[u[2],u[1],u[0]],C}).reverse();const g=l[0].points[0],v=l[a-1].points[l[a-1].points.length-1],_=c[a-1].points[c[a-1].points.length-1],y=c[0].points[0],w=Z.makeline(_,g),x=Z.makeline(v,y),S=[w].concat(l).concat([x]).concat(c);return new ks(S)}outlineshapes(n,r,o){r=r||n;const i=this.outline(n,r).curves,s=[];for(let a=1,l=i.length;a<l/2;a++){const c=Z.makeshape(i[a],i[l-a],o);c.startcap.virtual=a>1,c.endcap.virtual=a<l/2-1,s.push(c)}return s}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof Ce&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=A0(n.p1.x,n.p2.x),o=A0(n.p1.y,n.p2.y),i=T0(n.p1.x,n.p2.x),s=T0(n.p1.y,n.p2.y);return Z.roots(this.points,n).filter(a=>{var l=this.get(a);return Z.between(l.x,r,i)&&Z.between(l.y,o,s)})}selfintersects(n){const r=this.reduce(),o=r.length-2,i=[];for(let s=0,a,l,c;s<o;s++)l=r.slice(s,s+1),c=r.slice(s+2),a=this.curveintersects(l,c,n),i.push(...a);return i}curveintersects(n,r,o){const i=[];n.forEach(function(a){r.forEach(function(l){a.overlaps(l)&&i.push({left:a,right:l})})});let s=[];return i.forEach(function(a){const l=Z.pairiteration(a.left,a.right,o);l.length>0&&(s=s.concat(l))}),s}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,o,i){const s=(i-o)/4,a=this.get(o+s),l=this.get(i-s),c=Z.dist(n,r),u=Z.dist(n,a),d=Z.dist(n,l);return ts(u-c)+ts(d-c)}_iterate(n,r){let o=0,i=1,s;do{s=0,i=1;let a=this.get(o),l,c,u,d,f=!1,p=!1,m,g=i,v=1;do if(p=f,d=u,g=(o+i)/2,l=this.get(g),c=this.get(i),u=Z.getccenter(a,l,c),u.interval={start:o,end:i},f=this._error(u,a,o,i)<=n,m=p&&!f,m||(v=i),f){if(i>=1){if(u.interval.end=v=1,d=u,i>1){let y={x:u.x+u.r*LH(u.e),y:u.y+u.r*zH(u.e)};u.e+=Z.angle({x:u.x,y:u.y},y,this.get(1))}break}i=i+(i-o)/2}else i=g;while(!m&&s++<100);if(s>=100)break;d=d||u,r.push(d),o=v}while(i<1);return r}}function Wp(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function BH(e){if(Array.isArray(e))return e}function HH(e){if(Array.isArray(e))return Wp(e)}function WH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UH(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function GH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
318
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
319
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XH(e,n){if(e==null)return{};var r,o,i=KH(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function KH(e,n){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.includes(o))continue;r[o]=e[o]}return r}function qH(e,n){return BH(e)||UH(e,n)||IE(e,n)||GH()}function ZH(e){return HH(e)||WH(e)||IE(e)||YH()}function QH(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function JH(e){var n=QH(e,"string");return typeof n=="symbol"?n:n+""}function IE(e,n){if(e){if(typeof e=="string")return Wp(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wp(e,n):void 0}}var eW=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),s=e.reduce(function(l,c){var u=l,d=c;return i.forEach(function(f,p){var m=f.keyAccessor,g=f.isProp,v;if(g){var _=d,y=_[m],w=XH(_,[m].map(JH));v=y,d=w}else v=m(d,p);p+1<i.length?(u.hasOwnProperty(v)||(u[v]={}),u=u[v]):r?(u.hasOwnProperty(v)||(u[v]=[]),u[v].push(d)):u[v]=d}),l},{});r instanceof Function&&function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===i.length?Object.keys(c).forEach(function(d){return c[d]=r(c[d])}):Object.values(c).forEach(function(d){return l(d,u+1)})}(s);var a=s;return o&&(a=[],function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===i.length?a.push({keys:u,vals:c}):Object.entries(c).forEach(function(d){var f=qH(d,2),p=f[0],m=f[1];return l(m,[].concat(ZH(u),[p]))})}(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a};function tW(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const I0=Symbol("implicit");function jE(){var e=new e0,n=[],r=[],o=I0;function i(s){let a=e.get(s);if(a===void 0){if(o!==I0)return o;e.set(s,a=n.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return n.slice();n=[],e=new e0;for(const a of s)e.has(a)||e.set(a,n.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(o=s,i):o},i.copy=function(){return jE(n,r).unknown(o)},tW.apply(i,arguments),i}function nW(e){for(var n=e.length/6|0,r=new Array(n),o=0;o<n;)r[o]="#"+e.slice(o*6,++o*6);return r}const rW=nW("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function oW(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var iW=`.force-graph-container canvas {
320
- display: block;
321
- user-select: none;
322
- outline: none;
323
- -webkit-tap-highlight-color: transparent;
324
- }
325
-
326
- .force-graph-container .clickable {
327
- cursor: pointer;
328
- }
329
-
330
- .force-graph-container .grabbable {
331
- cursor: move;
332
- cursor: grab;
333
- cursor: -moz-grab;
334
- cursor: -webkit-grab;
335
- }
336
-
337
- .force-graph-container .grabbable:active {
338
- cursor: grabbing;
339
- cursor: -moz-grabbing;
340
- cursor: -webkit-grabbing;
341
- }
342
- `;oW(iW);function Up(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function sW(e){if(Array.isArray(e))return e}function aW(e){if(Array.isArray(e))return Up(e)}function j0(e,n,r){if($E())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,n);var i=new(e.bind.apply(e,o));return i}function ta(e,n,r){return(n=pW(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function $E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($E=function(){return!!e})()}function lW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cW(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function uW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
343
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
344
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function Ro(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?$0(Object(r),!0).forEach(function(o){ta(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$0(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Ns(e,n){return sW(e)||cW(e,n)||OE(e,n)||uW()}function zt(e){return aW(e)||lW(e)||OE(e)||fW()}function dW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function pW(e){var n=dW(e,"string");return typeof n=="symbol"?n:n+""}function Gp(e){"@babel/helpers - typeof";return Gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gp(e)}function OE(e,n){if(e){if(typeof e=="string")return Up(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Up(e,n):void 0}}var hW=jE(rW);function O0(e,n,r){!n||typeof r!="string"||e.filter(function(o){return!o[r]}).forEach(function(o){o[r]=hW(n(o))})}function mW(e,n){var r=e.nodes,o=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.nodeFilter,a=s===void 0?function(){return!0}:s,l=i.onLoopError,c=l===void 0?function(m){throw"Invalid DAG structure! Found cycle in node path: ".concat(m.join(" -> "),".")}:l,u={};r.forEach(function(m){return u[n(m)]={data:m,out:[],depth:-1,skip:!a(m)}}),o.forEach(function(m){var g=m.source,v=m.target,_=S(g),y=S(v);if(!u.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!u.hasOwnProperty(y))throw"Missing target node with id: ".concat(y);var w=u[_],x=u[y];w.out.push(x);function S(C){return Gp(C)==="object"?n(C):C}});var d=[];p(Object.values(u));var f=Object.assign.apply(Object,[{}].concat(zt(Object.entries(u).filter(function(m){var g=Ns(m,2),v=g[1];return!v.skip}).map(function(m){var g=Ns(m,2),v=g[0],_=g[1];return ta({},v,_.depth)}))));return f;function p(m){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var S=m[y];if(g.indexOf(S)!==-1){var C=[].concat(zt(g.slice(g.indexOf(S))),[S]).map(function(E){return n(E.data)});return d.some(function(E){return E.length===C.length&&E.every(function(k,N){return k===C[N]})})||(d.push(C),c(C)),1}v>S.depth&&(S.depth=v,p(S.out,[].concat(zt(g),[S]),v+(S.skip?0:1)))},y=0,w=m.length;y<w;y++)_()}}var gW=2,Qe=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},D0=function(n,r){if(!r.isShadow){var o=ye(r.linkDirectionalParticles);r.graphData.links.forEach(function(i){var s=Math.round(Math.abs(o(i)));s?i.__photons=zt(Array(s)).map(function(){return{}}):delete i.__photons})}},Hc=Km({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,D0(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(o){return o.fx=o.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Qe},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Qe},nodeColor:{default:"color",triggerUpdate:!1,onChange:Qe},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Qe},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Qe},linkColor:{default:"color",triggerUpdate:!1,onChange:Qe},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Qe},linkWidth:{default:1,triggerUpdate:!1,onChange:Qe},linkCurvature:{default:0,triggerUpdate:!1,onChange:Qe},linkCanvasObject:{triggerUpdate:!1,onChange:Qe},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Qe},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Qe},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Qe},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Qe},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:D0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,o){return o===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,o),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),i(),!n.isShadow&&s(),!n.isShadow&&a(),o(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function o(){var l=ye(n.nodeVisibility),c=ye(n.nodeVal),u=ye(n.nodeColor),d=ye(n.nodeCanvasObjectMode),f=n.ctx,p=n.isShadow/n.globalScale,m=n.graphData.nodes.filter(l);f.save(),m.forEach(function(g){var v=d(g);if(n.nodeCanvasObject&&(v==="before"||v==="replace")&&(n.nodeCanvasObject(g,f,n.globalScale),v==="replace")){f.restore();return}var _=Math.sqrt(Math.max(0,c(g)||1))*n.nodeRelSize+p;f.beginPath(),f.arc(g.x,g.y,_,0,2*Math.PI,!1),f.fillStyle=u(g)||"rgba(31, 120, 180, 0.92)",f.fill(),n.nodeCanvasObject&&v==="after"&&n.nodeCanvasObject(g,n.ctx,n.globalScale)}),f.restore()}function i(){var l=ye(n.linkVisibility),c=ye(n.linkColor),u=ye(n.linkWidth),d=ye(n.linkLineDash),f=ye(n.linkCurvature),p=ye(n.linkCanvasObjectMode),m=n.ctx,g=n.isShadow*2,v=n.graphData.links.filter(l);v.forEach(E);var _=[],y=[],w=v;if(n.linkCanvasObject){var x=[],S=[];v.forEach(function(k){return({before:_,after:y,replace:x}[p(k)]||S).push(k)}),w=[].concat(zt(_),y,S),_=_.concat(x)}m.save(),_.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();var C=eW(w,[c,u,d]);m.save(),Object.entries(C).forEach(function(k){var N=Ns(k,2),A=N[0],R=N[1],I=!A||A==="undefined"?"rgba(0,0,0,0.15)":A;Object.entries(R).forEach(function(j){var L=Ns(j,2),P=L[0],z=L[1],$=(P||1)/n.globalScale+g;Object.entries(z).forEach(function(F){var T=Ns(F,2);T[0];var M=T[1],D=d(M[0]);m.beginPath(),M.forEach(function(B){var O=B.source,W=B.target;if(!(!O||!W||!O.hasOwnProperty("x")||!W.hasOwnProperty("x"))){m.moveTo(O.x,O.y);var G=B.__controlPoints;G?m[G.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(m,zt(G).concat([W.x,W.y])):m.lineTo(W.x,W.y)}}),m.strokeStyle=I,m.lineWidth=$,m.setLineDash(D||[]),m.stroke()})})}),m.restore(),m.save(),y.forEach(function(k){return n.linkCanvasObject(k,m,n.globalScale)}),m.restore();function E(k){var N=f(k);if(!N){k.__controlPoints=null;return}var A=k.source,R=k.target;if(!(!A||!R||!A.hasOwnProperty("x")||!R.hasOwnProperty("x"))){var I=Math.sqrt(Math.pow(R.x-A.x,2)+Math.pow(R.y-A.y,2));if(I>0){var j=Math.atan2(R.y-A.y,R.x-A.x),L=I*N,P={x:(A.x+R.x)/2+L*Math.cos(j-Math.PI/2),y:(A.y+R.y)/2+L*Math.sin(j-Math.PI/2)};k.__controlPoints=[P.x,P.y]}else{var z=N*70;k.__controlPoints=[R.x,R.y-z,R.x+z,R.y]}}}}function s(){var l=1.6,c=.2,u=ye(n.linkDirectionalArrowLength),d=ye(n.linkDirectionalArrowRelPos),f=ye(n.linkVisibility),p=ye(n.linkDirectionalArrowColor||n.linkColor),m=ye(n.nodeVal),g=n.ctx;g.save(),n.graphData.links.filter(f).forEach(function(v){var _=u(v);if(!(!_||_<0)){var y=v.source,w=v.target;if(!(!y||!w||!y.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var x=Math.sqrt(Math.max(0,m(y)||1))*n.nodeRelSize,S=Math.sqrt(Math.max(0,m(w)||1))*n.nodeRelSize,C=Math.min(1,Math.max(0,d(v))),E=p(v)||"rgba(0,0,0,0.28)",k=_/l/2,N=v.__controlPoints&&j0(Ce,[y.x,y.y].concat(zt(v.__controlPoints),[w.x,w.y])),A=N?function($){return N.get($)}:function($){return{x:y.x+(w.x-y.x)*$||0,y:y.y+(w.y-y.y)*$||0}},R=N?N.length():Math.sqrt(Math.pow(w.x-y.x,2)+Math.pow(w.y-y.y,2)),I=x+_+(R-x-S-_)*C,j=A(I/R),L=A((I-_)/R),P=A((I-_*(1-c))/R),z=Math.atan2(j.y-L.y,j.x-L.x)-Math.PI/2;g.beginPath(),g.moveTo(j.x,j.y),g.lineTo(L.x+k*Math.cos(z),L.y+k*Math.sin(z)),g.lineTo(P.x,P.y),g.lineTo(L.x-k*Math.cos(z),L.y-k*Math.sin(z)),g.fillStyle=E,g.fill()}}}),g.restore()}function a(){var l=ye(n.linkDirectionalParticles),c=ye(n.linkDirectionalParticleSpeed),u=ye(n.linkDirectionalParticleOffset),d=ye(n.linkDirectionalParticleWidth),f=ye(n.linkVisibility),p=ye(n.linkDirectionalParticleColor||n.linkColor),m=n.ctx;m.save(),n.graphData.links.filter(f).forEach(function(g){var v=l(g);if(!(!g.hasOwnProperty("__photons")||!g.__photons.length)){var _=g.source,y=g.target;if(!(!_||!y||!_.hasOwnProperty("x")||!y.hasOwnProperty("x"))){var w=c(g),x=Math.abs(u(g)),S=g.__photons||[],C=Math.max(0,d(g)/2)/Math.sqrt(n.globalScale),E=p(g)||"rgba(0,0,0,0.28)";m.fillStyle=E;var k=g.__controlPoints?j0(Ce,[_.x,_.y].concat(zt(g.__controlPoints),[y.x,y.y])):null,N=0,A=!1;S.forEach(function(R){var I=!!R.__singleHop;if(R.hasOwnProperty("__progressRatio")||(R.__progressRatio=I?0:(N+x)/v),!I&&N++,R.__progressRatio+=w,R.__progressRatio>=1)if(!I)R.__progressRatio=R.__progressRatio%1;else{A=!0;return}var j=R.__progressRatio,L=k?k.get(j):{x:_.x+(y.x-_.x)*j||0,y:_.y+(y.y-_.y)*j||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(L.x,L.y,g,m,n.globalScale):(m.beginPath(),m.arc(L.x,L.y,C,0,2*Math.PI,!1),m.fill())}),A&&(g.__photons=g.__photons.filter(function(R){return!R.__singleHop||R.__progressRatio<=1}))}}}),m.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:TH().force("link",CH()).force("charge",IH()).force("center",kB()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&O0(n.graphData.nodes,ye(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&O0(n.graphData.links,ye(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(p){p.source=p[n.linkSource],p.target=p[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var o=n.forceLayout.force("link");o&&o.id(function(p){return p[n.nodeId]}).links(n.graphData.links);var i=n.dagMode&&mW(n.graphData,function(p){return p[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,zt(Object.values(i||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*gW*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return delete p[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(m){return(i[m[n.nodeId]]-s/2)*a*(c?-1:1)},d=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return p[d]=u(p)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?jH(function(p){var m=i[p[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-m:m)*a}).strength(function(p){return n.dagNodeFilter(p)?1:0}):null);for(var f=0;f<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);f++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function DE(e,n){var r=e instanceof Array?e:[e],o=new n;return o._destructor&&o._destructor(),{linkProp:function(s){return{default:o[s](),onChange:function(l,c){r.forEach(function(u){return c[u][s](l)})},triggerUpdate:!1}},linkMethod:function(s){return function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var d=[];return r.forEach(function(f){var p=a[f],m=p[s].apply(p,c);m!==p&&d.push(m)}),d.length?d[0]:this}}}}var yW=800,vW=4,xW=5,LE=DE("forceGraph",Hc),wW=DE(["forceGraph","shadowGraph"],Hc),bW=Object.assign.apply(Object,zt(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ta({},e,LE.linkProp(e))})).concat(zt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ta({},e,wW.linkProp(e))})))),_W=Object.assign.apply(Object,zt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ta({},e,LE.linkMethod(e))})));function sd(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var o=window.devicePixelRatio;n/=o,r/=o,[e.canvas,e.shadowCanvas].forEach(function(s){s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px"),s.width=e.width*o,s.height=e.height*o,!n&&!r&&s.getContext("2d").scale(o,o)});var i=Kt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/i,(e.height-r)/2/i),e.needsRedraw=!0}}function zE(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function L0(e,n,r){e.save(),zE(e),e.clearRect(0,0,n,r),e.restore()}var SW=Km({props:Ro({width:{default:window.innerWidth,onChange:function(n,r){return sd(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return sd(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(i){return(i||[]).every(function(s){return!s.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(o),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function o(i){var s=i.type,a=i.objs;a.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:s,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},bW),aliases:{stopAnimation:"pauseAnimation"},methods:Ro({graph2ScreenCoords:function(n,r,o){var i=Kt(n.canvas);return{x:r*i.k+i.x,y:o*i.k+i.y}},screen2GraphCoords:function(n,r,o){var i=Kt(n.canvas);return{x:(r-i.x)/i.k,y:(o-i.y)/i.k}},centerAt:function(n,r,o,i){if(!n.canvas)return null;if(r!==void 0||o!==void 0){var s=Object.assign({},r!==void 0?{x:r}:{},o!==void 0?{y:o}:{});return i?n.tweenGroup.add(new a0(a()).to(s,i).easing(to.Quadratic.Out).onUpdate(l).onComplete(function(){n.tweenGroup.remove(this)}).start()):l(s),this}return a();function a(){var c=Kt(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,d=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?a().x:u,d===void 0?a().y:d),n.needsRedraw=!0}},zoom:function(n,r,o){if(!n.canvas)return null;if(r!==void 0)return o?n.tweenGroup.add(new a0({k:i()}).to({k:r},o).easing(to.Quadratic.Out).onUpdate(function(a){var l=a.k;return s(l)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):s(r),this;return i();function i(){return Kt(n.canvas).k}function s(a){n.zoom.scaleTo(n.zoom.__baseElem,a),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,s=new Array(i>3?i-3:0),a=3;a<i;a++)s[a-3]=arguments[a];var l=this.getGraphBbox.apply(this,s);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-o*2)/(l.x[1]-l.x[0]),(n.height-o*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},o=ye(n.nodeVal),i=function(l){return Math.sqrt(Math.max(0,o(l)||1))*n.nodeRelSize},s=n.graphData.nodes.filter(r).map(function(a){return{x:a.x,y:a.y,r:i(a)}});return s.length?{x:[r0(s,function(a){return a.x-a.r}),n0(s,function(a){return a.x+a.r})],y:[r0(s,function(a){return a.y-a.r}),n0(s,function(a){return a.y+a.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},_W),stateInit:function(){return{lastSetZoom:1,zoom:Xm(),forceGraph:new Hc,shadowGraph:new Hc().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new rB,tweenGroup:new lE}},init:function(n,r){var o=this;n.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",n.appendChild(i),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),i.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var s=r.canvas.getContext("2d"),a=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var f=null,p=window.devicePixelRatio,m=l.x>0&&l.y>0?a.getImageData(l.x*p,l.y*p,1,1):null;return m&&(f=r.colorTracker.lookup(m.data)),f};tt(r.canvas).call(Vm().subject(function(){if(!r.enableNodeDrag)return null;var d=c();return d&&d.type==="Node"?d.d:null}).on("start",function(d){var f=d.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},d.active||(f.fx=f.x,f.fy=f.y),r.canvas.classList.add("grabbable")}).on("drag",function(d){var f=d.subject,p=f.__initialDragPos,m=d,g=Kt(r.canvas).k,v={x:p.x+(m.x-p.x)/g-f.x,y:p.y+(m.y-p.y)/g-f.y};["x","y"].forEach(function(_){return f["f".concat(_)]=f[_]=p[_]+(m[_]-p[_])/g}),!(!f.__dragged&&xW>=Math.sqrt(D7(["x","y"].map(function(_){return Math.pow(d[_]-p[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,f.__dragged=!0,r.onNodeDrag(f,v))}).on("end",function(d){var f=d.subject,p=f.__initialDragPos,m={x:f.x-p.x,y:f.y-p.y};p.fx===void 0&&(f.fx=void 0),p.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,r.onNodeDragEnd(f,m))})),r.zoom(r.zoom.__baseElem=tt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(d){return!d.button&&r.enableZoomPanInteraction&&(d.type!=="wheel"||ye(r.enableZoomInteraction)(d))&&(d.type==="wheel"||ye(r.enablePanInteraction)(d))}).on("zoom",function(d){var f=d.transform;[s,a].forEach(function(p){zE(p),p.translate(f.x,f.y),p.scale(f.k,f.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ro(Ro({},f),o.centerAt())),r.needsRedraw=!0}).on("end",function(d){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ro(Ro({},d.transform),o.centerAt()))}),sd(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){Kt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=vW/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new EB(i),["pointermove","pointerdown"].forEach(function(d){return i.addEventListener(d,function(f){d==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=f),!r.isPointerDragging&&f.type==="pointermove"&&r.onBackgroundClick&&(f.pressure>0||r.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(g){return Math.abs(g)>1}))&&(r.isPointerDragging=!0);var p=m(i);l.x=f.pageX-p.left,l.y=f.pageY-p.top;function m(g){var v=g.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,y=window.pageYOffset||document.documentElement.scrollTop;return{top:v.top+y,left:v.left+_}}},{passive:!0})}),i.addEventListener("pointerup",function(d){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var f=[d,r.pointerDownEvent];requestAnimationFrame(function(){if(d.button===0)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"Click")];p&&p.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,f);if(d.button===2)if(r.hoverObj){var m=r["on".concat(r.hoverObj.type,"RightClick")];m&&m.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,f)})}},{passive:!0}),i.addEventListener("contextmenu",function(d){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(d.preventDefault(),!1)}),r.forceGraph(s),r.shadowGraph(a);var u=uV(function(){L0(a,r.width,r.height),r.shadowGraph.linkWidth(function(f){return ye(r.linkWidth)(f)+r.linkHoverPrecision});var d=Kt(r.canvas);r.shadowGraph.globalScale(d.k).tickFrame()},yW);r.flushShadowCanvas=u.flush,(this._animationCycle=function d(){var f=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(x){return x.__photons&&x.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var p=r.isPointerDragging?null:c();if(p!==r.hoverObj){var m=r.hoverObj,g=m?m.type:null,v=p?p.type:null;if(g&&g!==v){var _=r["on".concat(g,"Hover")];_&&_(null,m.d)}if(v){var y=r["on".concat(v,"Hover")];y&&y(p.d,g===v?m.d:null)}r.tooltip.content(p&&ye(r["".concat(p.type.toLowerCase(),"Label")])(p.d)||null),r.canvas.classList[(p&&r["on".concat(v,"Click")]||!p&&r.onBackgroundClick)&&ye(r.showPointerCursor)(p==null?void 0:p.d)?"add":"remove"]("clickable"),r.hoverObj=p}f&&u()}if(f){L0(s,r.width,r.height);var w=Kt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(d)})()},update:function(n){}}),FE={exports:{}},CW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",EW=CW,kW=EW;function VE(){}function BE(){}BE.resetWarningCache=VE;var NW=function(){function e(o,i,s,a,l,c){if(c!==kW){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function n(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:BE,resetWarningCache:VE};return r.PropTypes=r,r};FE.exports=NW();var PW=FE.exports;const V=qc(PW),Ku={width:V.number,height:V.number,graphData:V.shape({nodes:V.arrayOf(V.object).isRequired,links:V.arrayOf(V.object).isRequired}),backgroundColor:V.string,nodeRelSize:V.number,nodeId:V.string,nodeLabel:V.oneOfType([V.string,V.func]),nodeVal:V.oneOfType([V.number,V.string,V.func]),nodeVisibility:V.oneOfType([V.bool,V.string,V.func]),nodeColor:V.oneOfType([V.string,V.func]),nodeAutoColorBy:V.oneOfType([V.string,V.func]),onNodeHover:V.func,onNodeClick:V.func,linkSource:V.string,linkTarget:V.string,linkLabel:V.oneOfType([V.string,V.func]),linkVisibility:V.oneOfType([V.bool,V.string,V.func]),linkColor:V.oneOfType([V.string,V.func]),linkAutoColorBy:V.oneOfType([V.string,V.func]),linkWidth:V.oneOfType([V.number,V.string,V.func]),linkCurvature:V.oneOfType([V.number,V.string,V.func]),linkDirectionalArrowLength:V.oneOfType([V.number,V.string,V.func]),linkDirectionalArrowColor:V.oneOfType([V.string,V.func]),linkDirectionalArrowRelPos:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticles:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleSpeed:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleOffset:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleWidth:V.oneOfType([V.number,V.string,V.func]),linkDirectionalParticleColor:V.oneOfType([V.string,V.func]),onLinkHover:V.func,onLinkClick:V.func,dagMode:V.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:V.number,dagNodeFilter:V.func,onDagError:V.func,d3AlphaMin:V.number,d3AlphaDecay:V.number,d3VelocityDecay:V.number,warmupTicks:V.number,cooldownTicks:V.number,cooldownTime:V.number,onEngineTick:V.func,onEngineStop:V.func,getGraphBbox:V.func},HE={zoomToFit:V.func,onNodeRightClick:V.func,onNodeDrag:V.func,onNodeDragEnd:V.func,onLinkRightClick:V.func,linkHoverPrecision:V.number,onBackgroundClick:V.func,onBackgroundRightClick:V.func,showPointerCursor:V.oneOfType([V.bool,V.func]),enablePointerInteraction:V.bool,enableNodeDrag:V.bool},rg={showNavInfo:V.bool,nodeOpacity:V.number,nodeResolution:V.number,nodeThreeObject:V.oneOfType([V.object,V.string,V.func]),nodeThreeObjectExtend:V.oneOfType([V.bool,V.string,V.func]),nodePositionUpdate:V.func,linkOpacity:V.number,linkResolution:V.number,linkCurveRotation:V.oneOfType([V.number,V.string,V.func]),linkMaterial:V.oneOfType([V.object,V.string,V.func]),linkThreeObject:V.oneOfType([V.object,V.string,V.func]),linkThreeObjectExtend:V.oneOfType([V.bool,V.string,V.func]),linkPositionUpdate:V.func,linkDirectionalArrowResolution:V.number,linkDirectionalParticleResolution:V.number,linkDirectionalParticleThreeObject:V.oneOfType([V.object,V.string,V.func]),forceEngine:V.oneOf(["d3","ngraph"]),ngraphPhysics:V.object,numDimensions:V.oneOf([1,2,3])},RW=Object.assign({},Ku,HE,{linkLineDash:V.oneOfType([V.arrayOf(V.number),V.string,V.func]),nodeCanvasObjectMode:V.oneOfType([V.string,V.func]),nodeCanvasObject:V.func,nodePointerAreaPaint:V.func,linkCanvasObjectMode:V.oneOfType([V.string,V.func]),linkCanvasObject:V.func,linkPointerAreaPaint:V.func,linkDirectionalParticleCanvasObject:V.func,autoPauseRedraw:V.bool,minZoom:V.number,maxZoom:V.number,enableZoomInteraction:V.oneOfType([V.bool,V.func]),enablePanInteraction:V.oneOfType([V.bool,V.func]),onZoom:V.func,onZoomEnd:V.func,onRenderFramePre:V.func,onRenderFramePost:V.func});Object.assign({},Ku,HE,rg,{enableNavigationControls:V.bool,controlType:V.oneOf(["trackball","orbit","fly"]),rendererConfig:V.object,extraRenderers:V.arrayOf(V.shape({render:V.func.isRequired}))});Object.assign({},Ku,rg,{nodeDesc:V.oneOfType([V.string,V.func]),linkDesc:V.oneOfType([V.string,V.func])});Object.assign({},Ku,rg,{markerAttrs:V.object,yOffset:V.number,glScale:V.number});const og=e8(SW,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});og.displayName="ForceGraph2D";og.propTypes=RW;const rs={ui:"#60a5fa",api:"#34d399",db:"#f59e0b"},MW="rgba(244, 114, 182, 0.6)",AW="rgba(148, 163, 184, 0.25)";function TW(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(!0),[a,l]=h.useState(!1),[c,u]=h.useState(new Set(["ui","api","db"])),[d,f]=h.useState(null),p=h.useRef(null),[m,g]=h.useState({width:0,height:0}),v=(w=!1)=>{w?l(!0):s(!0),o(null),fetch(`/api/project-graph${w?"?regenerate=1":""}`).then(x=>x.json()).then(x=>{"error"in x?o(x.error):n(x)}).catch(x=>o(String(x))).finally(()=>{s(!1),l(!1)})};h.useEffect(()=>{v(!1)},[]),h.useEffect(()=>{if(!p.current)return;const w=p.current,x=()=>g({width:w.clientWidth,height:w.clientHeight});x();const S=new ResizeObserver(x);return S.observe(w),()=>S.disconnect()},[e]);const _=h.useMemo(()=>{if(!e)return{nodes:[],links:[]};const w=e.nodes.filter(C=>c.has(C.layer)),x=new Set(w.map(C=>C.id)),S=e.links.filter(C=>{const E=typeof C.source=="string"?C.source:C.source.id,k=typeof C.target=="string"?C.target:C.target.id;return x.has(E)&&x.has(k)});return{nodes:w,links:S}},[e,c]),y=w=>{const x=new Set(c);x.has(w)?x.delete(w):x.add(w),x.size!==0&&u(x)};return b.jsxs("div",{className:"flex h-full flex-col",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-sidebar-border px-6 py-3",children:[b.jsx("h1",{className:"text-lg font-semibold",children:"Project Graph"}),e&&b.jsxs("span",{className:"text-xs text-muted-foreground",children:[_.nodes.length," nodes · ",_.links.length," links"]}),b.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[["ui","api","db"].map(w=>b.jsxs("button",{type:"button",onClick:()=>y(w),className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs transition-opacity",style:{opacity:c.has(w)?1:.4,borderColor:c.has(w)?rs[w]:void 0},children:[b.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:rs[w]}}),w.toUpperCase(),e&&` (${e.stats.byLayer[w]})`]},w)),b.jsx("button",{type:"button",onClick:()=>v(!0),disabled:a||i,className:"rounded-md border border-sidebar-border px-2.5 py-1 text-xs hover:bg-sidebar-accent disabled:opacity-50",children:a?"Regenerating…":"Regenerate"})]})]}),b.jsxs("div",{ref:p,className:"relative flex-1 overflow-hidden",children:[i&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:"Loading graph…"}),r&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-destructive",children:r}),e&&m.width>0&&b.jsx(og,{width:m.width,height:m.height,graphData:_,nodeId:"id",nodeLabel:w=>`${w.layer}/${w.type}: ${w.name}`,nodeRelSize:3,nodeColor:w=>rs[w.layer],linkColor:w=>w.cross?MW:AW,linkWidth:w=>w.cross?1:.5,linkDirectionalParticles:0,cooldownTicks:120,onNodeHover:w=>f(w),backgroundColor:"transparent",nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(w,x,S)=>{if(S<1.4||w.x===void 0||w.y===void 0)return;const C=w.name,E=11/S;x.font=`${E}px -apple-system, system-ui, sans-serif`;const k=x.measureText(C).width,N=3/S,A=1.5/S;x.fillStyle="rgba(15, 15, 20, 0.75)",x.fillRect(w.x-k/2-N,w.y+5/S-A,k+N*2,E+A*2),x.textAlign="center",x.textBaseline="top",x.fillStyle=rs[w.layer],x.fillText(C,w.x,w.y+5/S)}}),d&&b.jsxs("div",{className:"pointer-events-none absolute bottom-4 left-4 max-w-md rounded-lg border border-sidebar-border bg-background/90 px-3 py-2 text-xs shadow-lg backdrop-blur",children:[b.jsxs("div",{className:"font-semibold",style:{color:rs[d.layer]},children:[d.layer.toUpperCase()," · ",d.type]}),b.jsx("div",{className:"font-mono",children:d.name}),b.jsx("div",{className:"text-muted-foreground",children:d.path}),d.module&&b.jsxs("div",{className:"text-muted-foreground",children:["module: ",d.module]})]})]})]})}function Wc(e){return e.split(/[-_]/).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function na(e){if(e.route){const n=e.route.split("/").filter(Boolean).filter(r=>!r.startsWith("(")&&!r.startsWith(":")&&!r.startsWith("["));return n.length>0?n[n.length-1].split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "):"Home"}return e.name}const IW=new Set(["page","layout"]),jW=new Set(["lib","db","config","external","middleware","server-lib","services","mcp","layout","shared-ui"]);function $W(){const[e,n]=h.useState(null),[r,o]=h.useState("loading"),[i,s]=h.useState(null),[a,l]=h.useState(!1),c=h.useCallback(async()=>{try{const p=await fetch("/api/raw-graphs");if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();n(m);const g=!!(m.ui||m.api||m.db);o(g?"ready":"empty")}catch(p){s(String(p)),o("error")}},[]);h.useEffect(()=>{c()},[c]);const u=h.useCallback(async()=>{l(!0),s(null);try{const p=await fetch("/api/generate-graph",{method:"POST"});if(!p.ok)throw new Error(`HTTP ${p.status}`);const m=await p.json();if(!m.ok)throw new Error(m.error??"Generation failed");n({ui:m.ui,api:m.api,db:m.db});const g=!!(m.ui||m.api||m.db);o(g?"ready":"empty")}catch(p){s(String(p))}finally{l(!1)}},[]),{moduleBuckets:d,counts:f}=h.useMemo(()=>{if(!(e!=null&&e.ui)||!(e!=null&&e.api)||!(e!=null&&e.db))return{moduleBuckets:[],counts:null};const p=e.ui.nodes.filter(v=>IW.has(v.type)&&v.module&&!jW.has(v.module)),m=new Map;for(const v of p){const _=v.module;m.has(_)||m.set(_,[]),m.get(_).push(v)}const g=[...m.entries()].map(([v,_])=>({module:v,screens:_})).sort((v,_)=>_.screens.length-v.screens.length);return{moduleBuckets:g,counts:{screens:p.length,modules:g.length,endpoints:e.api.nodes.length,tables:e.db.nodes.length,components:e.ui.nodes.filter(v=>v.type==="component").length}}},[e]);return r==="loading"?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading overview…"})}):r==="empty"?b.jsx(OW,{onGenerate:u,busy:a,error:i}):r==="error"?b.jsx("div",{className:"flex h-full items-center justify-center p-8",children:b.jsxs("div",{className:"max-w-md text-center",children:[b.jsx("p",{className:"text-sm text-foreground",children:"Failed to load graph"}),b.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:i}),b.jsx("button",{type:"button",onClick:c,className:"mt-4 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-foreground hover:bg-sidebar-accent",children:"Retry"})]})}):f?b.jsx("div",{className:"h-full overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-6xl px-8 py-8",children:[b.jsxs("header",{className:"mb-8 flex items-start justify-between gap-4",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Project Overview"}),b.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A high-level map of the modules, screens, and systems in this project."})]}),b.jsxs("button",{type:"button",onClick:u,disabled:a,className:"flex shrink-0 items-center gap-1.5 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",children:[b.jsx($b,{className:`h-3 w-3 ${a?"animate-spin":""}`}),a?"Regenerating…":"Regenerate graph"]})]}),i&&b.jsx("div",{className:"mb-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}),b.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 md:grid-cols-4",children:[b.jsx(hl,{icon:b.jsx(nm,{className:"h-4 w-4"}),label:"Modules",value:f.modules}),b.jsx(hl,{icon:b.jsx(yu,{className:"h-4 w-4"}),label:"Screens",value:f.screens}),b.jsx(hl,{icon:b.jsx(jb,{className:"h-4 w-4"}),label:"API endpoints",value:f.endpoints}),b.jsx(hl,{icon:b.jsx(Ib,{className:"h-4 w-4"}),label:"Database tables",value:f.tables})]}),b.jsxs("section",{children:[b.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Capability map"}),b.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:d.map(p=>b.jsx(DW,{module:p.module,screens:p.screens},p.module))})]})]})}):null}function OW({onGenerate:e,busy:n,error:r}){return b.jsx("div",{className:"flex h-full items-center justify-center p-8",children:b.jsxs("div",{className:"max-w-md text-center",children:[b.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-sidebar-primary/15 text-sidebar-primary",children:b.jsx(ZI,{className:"h-6 w-6"})}),b.jsx("h2",{className:"mt-4 text-lg font-semibold text-foreground",children:"No graph yet"}),b.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"LaunchChart hasn't generated a project graph for this workspace. Generate one to see modules, screens, API endpoints, and database tables."}),b.jsxs("button",{type:"button",onClick:e,disabled:n,className:"mt-6 inline-flex items-center gap-2 rounded-md bg-sidebar-primary px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-sidebar-primary/90 disabled:cursor-not-allowed disabled:opacity-60",children:[b.jsx($b,{className:`h-4 w-4 ${n?"animate-spin":""}`}),n?"Generating…":"Generate graph"]}),b.jsx("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"This scans your source tree — takes a few seconds."}),r&&b.jsx("div",{className:"mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:r})]})})}function hl({icon:e,label:n,value:r}){return b.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 px-4 py-3",children:[b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e,b.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:n})]}),b.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:r})]})}function DW({module:e,screens:n}){const r=n.slice(0,6),o=n.length-r.length;return b.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 p-5 transition-colors hover:border-sidebar-primary/50",children:[b.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[b.jsx("h3",{className:"text-base font-semibold text-foreground",children:Wc(e)}),b.jsxs("span",{className:"rounded bg-sidebar-accent px-2 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground",children:[n.length," screens"]})]}),b.jsxs("ul",{className:"space-y-1",children:[r.map(i=>b.jsxs("li",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[b.jsx("span",{className:"h-1 w-1 shrink-0 rounded-full bg-sidebar-primary/60"}),b.jsx("span",{className:"truncate text-foreground/90",children:na(i)})]},i.id)),o>0&&b.jsxs("li",{className:"pl-3 pt-1 text-[11px] italic text-muted-foreground",children:["+",o," more"]})]})]})}function ze(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let r=0,o;r<e.length;r++)(o=ze(e[r]))!==""&&(n+=(n&&" ")+o);else for(let r in e)e[r]&&(n+=(n&&" ")+r);return n}const Cn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},ra=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WE=["Enter"," ","Escape"],UE={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:r})=>`Moved selected node ${e}. New position, x: ${n}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var xi;(function(e){e.Strict="strict",e.Loose="loose"})(xi||(xi={}));var no;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(no||(no={}));var oa;(function(e){e.Partial="partial",e.Full="full"})(oa||(oa={}));const GE={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var fr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(fr||(fr={}));var Uc;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Uc||(Uc={}));var le;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(le||(le={}));const z0={[le.Left]:le.Right,[le.Right]:le.Left,[le.Top]:le.Bottom,[le.Bottom]:le.Top};function YE(e){return e===null?null:e?"valid":"invalid"}const XE=e=>"id"in e&&"source"in e&&"target"in e,LW=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ig=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ma=(e,n=[0,0])=>{const{width:r,height:o}=Zn(e),i=e.origin??n,s=r*i[0],a=o*i[1];return{x:e.position.x-s,y:e.position.y-a}},zW=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!n.nodeLookup&&!s?i:void 0;n.nodeLookup&&(a=s?n.nodeLookup.get(i):ig(i)?i:n.nodeLookup.get(i.id));const l=a?Gc(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return qu(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Zu(r)},Aa=(e,n={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(n.filter===void 0||n.filter(i))&&(r=qu(r,Gc(i)),o=!0)}),o?Zu(r):{x:0,y:0,width:0,height:0}},sg=(e,n,[r,o,i]=[0,0,1],s=!1,a=!1)=>{const l={...Ia(n,[r,o,i]),width:n.width/i,height:n.height/i},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(a&&!f||p)continue;const m=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,v=ia(l,bi(u)),_=(m??0)*(g??0),y=s&&v>0;(!u.internals.handleBounds||y||v>=_||u.dragging)&&c.push(u)}return c},FW=(e,n)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),n.filter(o=>r.has(o.source)||r.has(o.target))};function VW(e,n){const r=new Map,o=n!=null&&n.nodes?new Set(n.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!i.hidden)&&(!o||o.has(i.id))&&r.set(i.id,i)}),r}async function BW({nodes:e,width:n,height:r,panZoom:o,minZoom:i,maxZoom:s},a){if(e.size===0)return Promise.resolve(!0);const l=VW(e,a),c=Aa(l),u=ag(c,n,r,(a==null?void 0:a.minZoom)??i,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await o.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function KE({nodeId:e,nextPosition:n,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:i,onError:s}){const a=r.get(e),l=a.parentId?r.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??o;let f=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",Cn.error005());else{const m=l.measured.width,g=l.measured.height;m&&g&&(f=[[c,u],[c+m,u+g]])}else l&&_i(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=_i(f)?mo(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",Cn.error015())),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function HW({nodesToRemove:e=[],edgesToRemove:n=[],nodes:r,edges:o,onBeforeDelete:i}){const s=new Set(e.map(p=>p.id)),a=[];for(const p of r){if(p.deletable===!1)continue;const m=s.has(p.id),g=!m&&p.parentId&&a.find(v=>v.id===p.parentId);(m||g)&&a.push(p)}const l=new Set(n.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=FW(a,c);for(const p of c)l.has(p.id)&&!d.find(g=>g.id===p.id)&&d.push(p);if(!i)return{edges:d,nodes:a};const f=await i({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const wi=(e,n=0,r=1)=>Math.min(Math.max(e,n),r),mo=(e={x:0,y:0},n,r)=>({x:wi(e.x,n[0][0],n[1][0]-((r==null?void 0:r.width)??0)),y:wi(e.y,n[0][1],n[1][1]-((r==null?void 0:r.height)??0))});function qE(e,n,r){const{width:o,height:i}=Zn(r),{x:s,y:a}=r.internals.positionAbsolute;return mo(e,[[s,a],[s+o,a+i]],n)}const F0=(e,n,r)=>e<n?wi(Math.abs(e-n),1,n)/n:e>r?-wi(Math.abs(e-r),1,n)/n:0,ZE=(e,n,r=15,o=40)=>{const i=F0(e.x,o,n.width-o)*r,s=F0(e.y,o,n.height-o)*r;return[i,s]},qu=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Yp=({x:e,y:n,width:r,height:o})=>({x:e,y:n,x2:e+r,y2:n+o}),Zu=({x:e,y:n,x2:r,y2:o})=>({x:e,y:n,width:r-e,height:o-n}),bi=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=ig(e)?e.internals.positionAbsolute:Ma(e,n);return{x:r,y:o,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Gc=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=ig(e)?e.internals.positionAbsolute:Ma(e,n);return{x:r,y:o,x2:r+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:o+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},QE=(e,n)=>Zu(qu(Yp(e),Yp(n))),ia=(e,n)=>{const r=Math.max(0,Math.min(e.x+e.width,n.x+n.width)-Math.max(e.x,n.x)),o=Math.max(0,Math.min(e.y+e.height,n.y+n.height)-Math.max(e.y,n.y));return Math.ceil(r*o)},V0=e=>en(e.width)&&en(e.height)&&en(e.x)&&en(e.y),en=e=>!isNaN(e)&&isFinite(e),WW=(e,n)=>{},Ta=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Ia=({x:e,y:n},[r,o,i],s=!1,a=[1,1])=>{const l={x:(e-r)/i,y:(n-o)/i};return s?Ta(l,a):l},Yc=({x:e,y:n},[r,o,i])=>({x:e*i+r,y:n*i+o});function Mo(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(n*r*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function UW(e,n,r){if(typeof e=="string"||typeof e=="number"){const o=Mo(e,r),i=Mo(e,n);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=Mo(e.top??e.y??0,r),i=Mo(e.bottom??e.y??0,r),s=Mo(e.left??e.x??0,n),a=Mo(e.right??e.x??0,n);return{top:o,right:a,bottom:i,left:s,x:s+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function GW(e,n,r,o,i,s){const{x:a,y:l}=Yc(e,[n,r,o]),{x:c,y:u}=Yc({x:e.x+e.width,y:e.y+e.height},[n,r,o]),d=i-c,f=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const ag=(e,n,r,o,i,s)=>{const a=UW(s,n,r),l=(n-a.x)/e.width,c=(r-a.y)/e.height,u=Math.min(l,c),d=wi(u,o,i),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*d,g=r/2-p*d,v=GW(e,m,g,d,n,r),_={left:Math.min(v.left-a.left,0),top:Math.min(v.top-a.top,0),right:Math.min(v.right-a.right,0),bottom:Math.min(v.bottom-a.bottom,0)};return{x:m-_.left+_.right,y:g-_.top+_.bottom,zoom:d}},sa=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function _i(e){return e!=null&&e!=="parent"}function Zn(e){var n,r;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function JE(e){var n,r;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function ek(e,n={width:0,height:0},r,o,i){const s={...e},a=o.get(r);if(a){const l=a.origin||i;s.x+=a.internals.positionAbsolute.x-(n.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(n.height??0)*l[1]}return s}function B0(e,n){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}function YW(){let e,n;return{promise:new Promise((o,i)=>{e=o,n=i}),resolve:e,reject:n}}function XW(e){return{...UE,...e||{}}}function Ps(e,{snapGrid:n=[0,0],snapToGrid:r=!1,transform:o,containerBounds:i}){const{x:s,y:a}=tn(e),l=Ia({x:s-((i==null?void 0:i.left)??0),y:a-((i==null?void 0:i.top)??0)},o),{x:c,y:u}=r?Ta(l,n):l;return{xSnapped:c,ySnapped:u,...l}}const lg=e=>({width:e.offsetWidth,height:e.offsetHeight}),tk=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},KW=["INPUT","SELECT","TEXTAREA"];function nk(e){var o,i;const n=((i=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:i[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:KW.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const rk=e=>"clientX"in e,tn=(e,n)=>{var s,a;const r=rk(e),o=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((n==null?void 0:n.left)??0),y:i-((n==null?void 0:n.top)??0)}},H0=(e,n,r,o,i)=>{const s=n.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(l.left-r.left)/o,y:(l.top-r.top)/o,...lg(a)}})};function ok({sourceX:e,sourceY:n,targetX:r,targetY:o,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+i*.375+a*.375+r*.125,u=n*.125+s*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-n);return[c,u,d,f]}function ml(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function W0({pos:e,x1:n,y1:r,x2:o,y2:i,c:s}){switch(e){case le.Left:return[n-ml(n-o,s),r];case le.Right:return[n+ml(o-n,s),r];case le.Top:return[n,r-ml(r-i,s)];case le.Bottom:return[n,r+ml(i-r,s)]}}function ik({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,curvature:a=.25}){const[l,c]=W0({pos:r,x1:e,y1:n,x2:o,y2:i,c:a}),[u,d]=W0({pos:s,x1:o,y1:i,x2:e,y2:n,c:a}),[f,p,m,g]=ok({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${n} C${l},${c} ${u},${d} ${o},${i}`,f,p,m,g]}function sk({sourceX:e,sourceY:n,targetX:r,targetY:o}){const i=Math.abs(r-e)/2,s=r<e?r+i:r-i,a=Math.abs(o-n)/2,l=o<n?o+a:o-a;return[s,l,i,a]}function qW({sourceNode:e,targetNode:n,selected:r=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return o;const a=i&&r?o+1e3:o,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,n.parentId||i&&n.selected?n.internals.z:0);return a+l}function ZW({sourceNode:e,targetNode:n,width:r,height:o,transform:i}){const s=qu(Gc(e),Gc(n));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const a={x:-i[0]/i[2],y:-i[1]/i[2],width:r/i[2],height:o/i[2]};return ia(a,Zu(s))>0}const QW=({source:e,sourceHandle:n,target:r,targetHandle:o})=>`xy-edge__${e}${n||""}-${r}${o||""}`,JW=(e,n)=>n.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),eU=(e,n,r={})=>{if(!e.source||!e.target)return n;const o=r.getEdgeId||QW;let i;return XE(e)?i={...e}:i={...e,id:o(e)},JW(i,n)?n:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,n.concat(i))};function ak({sourceX:e,sourceY:n,targetX:r,targetY:o}){const[i,s,a,l]=sk({sourceX:e,sourceY:n,targetX:r,targetY:o});return[`M ${e},${n}L ${r},${o}`,i,s,a,l]}const U0={[le.Left]:{x:-1,y:0},[le.Right]:{x:1,y:0},[le.Top]:{x:0,y:-1},[le.Bottom]:{x:0,y:1}},tU=({source:e,sourcePosition:n=le.Bottom,target:r})=>n===le.Left||n===le.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},G0=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function nU({source:e,sourcePosition:n=le.Bottom,target:r,targetPosition:o=le.Top,center:i,offset:s,stepPosition:a}){const l=U0[n],c=U0[o],u={x:e.x+l.x*s,y:e.y+l.y*s},d={x:r.x+c.x*s,y:r.y+c.y*s},f=tU({source:u,sourcePosition:n,target:d}),p=f.x!==0?"x":"y",m=f[p];let g=[],v,_;const y={x:0,y:0},w={x:0,y:0},[,,x,S]=sk({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[p]*c[p]===-1){p==="x"?(v=i.x??u.x+(d.x-u.x)*a,_=i.y??(u.y+d.y)/2):(v=i.x??(u.x+d.x)/2,_=i.y??u.y+(d.y-u.y)*a);const N=[{x:v,y:u.y},{x:v,y:d.y}],A=[{x:u.x,y:_},{x:d.x,y:_}];l[p]===m?g=p==="x"?N:A:g=p==="x"?A:N}else{const N=[{x:u.x,y:d.y}],A=[{x:d.x,y:u.y}];if(p==="x"?g=l.x===m?A:N:g=l.y===m?N:A,n===o){const P=Math.abs(e[p]-r[p]);if(P<=s){const z=Math.min(s-1,s-P);l[p]===m?y[p]=(u[p]>e[p]?-1:1)*z:w[p]=(d[p]>r[p]?-1:1)*z}}if(n!==o){const P=p==="x"?"y":"x",z=l[p]===c[P],$=u[P]>d[P],F=u[P]<d[P];(l[p]===1&&(!z&&$||z&&F)||l[p]!==1&&(!z&&F||z&&$))&&(g=p==="x"?N:A)}const R={x:u.x+y.x,y:u.y+y.y},I={x:d.x+w.x,y:d.y+w.y},j=Math.max(Math.abs(R.x-g[0].x),Math.abs(I.x-g[0].x)),L=Math.max(Math.abs(R.y-g[0].y),Math.abs(I.y-g[0].y));j>=L?(v=(R.x+I.x)/2,_=g[0].y):(v=g[0].x,_=(R.y+I.y)/2)}const C={x:u.x+y.x,y:u.y+y.y},E={x:d.x+w.x,y:d.y+w.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,...E.x!==g[g.length-1].x||E.y!==g[g.length-1].y?[E]:[],r],v,_,x,S]}function rU(e,n,r,o){const i=Math.min(G0(e,n)/2,G0(n,r)/2,o),{x:s,y:a}=n;if(e.x===s&&s===r.x||e.y===a&&a===r.y)return`L${s} ${a}`;if(e.y===a){const u=e.x<r.x?-1:1,d=e.y<r.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*d}`}const l=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${s},${a+i*c}Q ${s},${a} ${s+i*l},${a}`}function Xp({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,m,g,v]=nU({source:{x:e,y:n},sourcePosition:r,target:{x:o,y:i},targetPosition:s,center:{x:l,y:c},offset:u,stepPosition:d});let _=`M${f[0].x} ${f[0].y}`;for(let y=1;y<f.length-1;y++)_+=rU(f[y-1],f[y],f[y+1],a);return _+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[_,p,m,g,v]}function Y0(e){var n;return e&&!!(e.internals.handleBounds||(n=e.handles)!=null&&n.length)&&!!(e.measured.width||e.width||e.initialWidth)}function oU(e){var f;const{sourceNode:n,targetNode:r}=e;if(!Y0(n)||!Y0(r))return null;const o=n.internals.handleBounds||X0(n.handles),i=r.internals.handleBounds||X0(r.handles),s=K0((o==null?void 0:o.source)??[],e.sourceHandle),a=K0(e.connectionMode===xi.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!a)return(f=e.onError)==null||f.call(e,"008",Cn.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||le.Bottom,c=(a==null?void 0:a.position)||le.Top,u=go(n,s,l),d=go(r,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function X0(e){if(!e)return null;const n=[],r=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?n.push(o):o.type==="target"&&r.push(o);return{source:n,target:r}}function go(e,n,r=le.Left,o=!1){const i=((n==null?void 0:n.x)??0)+e.internals.positionAbsolute.x,s=((n==null?void 0:n.y)??0)+e.internals.positionAbsolute.y,{width:a,height:l}=n??Zn(e);if(o)return{x:i+a/2,y:s+l/2};switch((n==null?void 0:n.position)??r){case le.Top:return{x:i+a/2,y:s};case le.Right:return{x:i+a,y:s+l/2};case le.Bottom:return{x:i+a/2,y:s+l};case le.Left:return{x:i,y:s+l/2}}}function K0(e,n){return e&&(n?e.find(r=>r.id===n):e[0])||null}function Kp(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function iU(e,{id:n,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:i}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const u=Kp(c,n);s.has(u)||(a.push({id:u,color:c.color||r,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const lk=1e3,sU=10,cg={nodeOrigin:[0,0],nodeExtent:ra,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},aU={...cg,checkEquality:!0};function ug(e,n){const r={...e};for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r}function lU(e,n,r){const o=ug(cg,r);for(const i of e.values())if(i.parentId)dg(i,e,n,o);else{const s=Ma(i,o.nodeOrigin),a=_i(i.extent)?i.extent:o.nodeExtent,l=mo(s,a,Zn(i));i.internals.positionAbsolute=l}}function cU(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const r=[],o=[];for(const i of e.handles){const s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?r.push(s):i.type==="target"&&o.push(s)}return{source:r,target:o}}function fg(e){return e==="manual"}function qp(e,n,r,o={}){var d,f;const i=ug(aU,o),s={i:0},a=new Map(n),l=i!=null&&i.elevateNodesOnSelect&&!fg(i.zIndexMode)?lk:0;let c=e.length>0,u=!1;n.clear(),r.clear();for(const p of e){let m=a.get(p.id);if(i.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const g=Ma(p,i.nodeOrigin),v=_i(p.extent)?p.extent:i.nodeExtent,_=mo(g,v,Zn(p));m={...i.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:_,handleBounds:cU(p,m),z:ck(p,l,i.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),p.parentId&&dg(m,n,r,o,s),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function uU(e,n){if(!e.parentId)return;const r=n.get(e.parentId);r?r.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function dg(e,n,r,o,i){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=ug(cg,o),u=e.parentId,d=n.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}uU(e,r),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*sU),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const f=s&&!fg(c)?lk:0,{x:p,y:m,z:g}=fU(e,d,a,l,f,c),{positionAbsolute:v}=e.internals,_=p!==v.x||m!==v.y;(_||g!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:p,y:m}:v,z:g}})}function ck(e,n,r){const o=en(e.zIndex)?e.zIndex:0;return fg(r)?o:o+(e.selected?n:0)}function fU(e,n,r,o,i,s){const{x:a,y:l}=n.internals.positionAbsolute,c=Zn(e),u=Ma(e,r),d=_i(e.extent)?mo(u,e.extent,c):u;let f=mo({x:a+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=qE(f,c,n));const p=ck(e,i,s),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function pg(e,n,r,o=[0,0]){var a;const i=[],s=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??bi(c),d=QE(u,l.rect);s.set(l.parentId,{expandedRect:d,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var x;const d=c.internals.positionAbsolute,f=Zn(c),p=c.origin??o,m=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,g=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,v=Math.max(f.width,Math.round(l.width)),_=Math.max(f.height,Math.round(l.height)),y=(v-f.width)*p[0],w=(_-f.height)*p[1];(m>0||g>0||y||w)&&(i.push({id:u,type:"position",position:{x:c.position.x-m+y,y:c.position.y-g+w}}),(x=r.get(u))==null||x.forEach(S=>{e.some(C=>C.id===S.id)||i.push({id:S.id,type:"position",position:{x:S.position.x+m,y:S.position.y+g}})})),(f.width<l.width||f.height<l.height||m||g)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:v+(m?p[0]*m-y:0),height:_+(g?p[1]*g-w:0)}})}),i}function dU(e,n,r,o,i,s,a){const l=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const g=n.get(m.id);if(!g)continue;if(g.hidden){n.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const v=lg(m.nodeElement),_=g.measured.width!==v.width||g.measured.height!==v.height;if(!!(v.width&&v.height&&(_||!g.internals.handleBounds||m.force))){const w=m.nodeElement.getBoundingClientRect(),x=_i(g.extent)?g.extent:s;let{positionAbsolute:S}=g.internals;g.parentId&&g.extent==="parent"?S=qE(S,v,n.get(g.parentId)):x&&(S=mo(S,x,v));const C={...g,measured:v,internals:{...g.internals,positionAbsolute:S,handleBounds:{source:H0("source",m.nodeElement,w,f,g.id),target:H0("target",m.nodeElement,w,f,g.id)}}};n.set(g.id,C),g.parentId&&dg(C,n,r,{nodeOrigin:i,zIndexMode:a}),c=!0,_&&(u.push({id:g.id,type:"dimensions",dimensions:v}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:bi(C,i)}))}}if(p.length>0){const m=pg(p,n,r,i);u.push(...m)}return{changes:u,updatedInternals:c}}async function pU({delta:e,panZoom:n,transform:r,translateExtent:o,width:i,height:s}){if(!n||!e.x&&!e.y)return Promise.resolve(!1);const a=await n.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[i,s]],o),l=!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2]);return Promise.resolve(l)}function q0(e,n,r,o,i,s){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(r,n)),a=`${i}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(r,n)),s){a=`${i}-${e}-${s}`;const u=o.get(a)||new Map;o.set(a,u.set(r,n))}}function uk(e,n,r){e.clear(),n.clear();for(const o of r){const{source:i,target:s,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:i,target:s,sourceHandle:a,targetHandle:l},u=`${i}-${a}--${s}-${l}`,d=`${s}-${l}--${i}-${a}`;q0("source",c,d,e,i,a),q0("target",c,u,e,s,l),n.set(o.id,o)}}function fk(e,n){if(!e.parentId)return!1;const r=n.get(e.parentId);return r?r.selected?!0:fk(r,n):!1}function Z0(e,n,r){var i;let o=e;do{if((i=o==null?void 0:o.matches)!=null&&i.call(o,n))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function hU(e,n,r,o){const i=new Map;for(const[s,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!fk(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const l=e.get(s);l&&i.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function ad({nodeId:e,dragItems:n,nodeLookup:r,dragging:o=!0}){var a,l,c;const i=[];for(const[u,d]of n){const f=(a=r.get(u))==null?void 0:a.internals.userNode;f&&i.push({...f,position:d.position,dragging:o})}if(!e)return[i[0],i];const s=(l=r.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=n.get(e))==null?void 0:c.position)||s.position,dragging:o}:i[0],i]}function mU({dragItems:e,snapGrid:n,x:r,y:o}){const i=e.values().next().value;if(!i)return null;const s={x:r-i.distance.x,y:o-i.distance.y},a=Ta(s,n);return{x:a.x-s.x,y:a.y-s.y}}function gU({onNodeMouseDown:e,getStoreItems:n,onDragStart:r,onDrag:o,onDragStop:i}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,m=!1,g=!1,v=null;function _({noDragClassName:w,handleSelector:x,domNode:S,isSelectable:C,nodeId:E,nodeClickDistance:k=0}){p=tt(S);function N({x:j,y:L}){const{nodeLookup:P,nodeExtent:z,snapGrid:$,snapToGrid:F,nodeOrigin:T,onNodeDrag:M,onSelectionDrag:D,onError:B,updateNodePositions:O}=n();s={x:j,y:L};let W=!1;const G=l.size>1,U=G&&z?Yp(Aa(l)):null,X=G&&F?mU({dragItems:l,snapGrid:$,x:j,y:L}):null;for(const[H,Y]of l){if(!P.has(H))continue;let K={x:j-Y.distance.x,y:L-Y.distance.y};F&&(K=X?{x:Math.round(K.x+X.x),y:Math.round(K.y+X.y)}:Ta(K,$));let ee=null;if(G&&z&&!Y.extent&&U){const{positionAbsolute:ne}=Y.internals,ce=ne.x-U.x+z[0][0],ge=ne.x+Y.measured.width-U.x2+z[1][0],fe=ne.y-U.y+z[0][1],$e=ne.y+Y.measured.height-U.y2+z[1][1];ee=[[ce,fe],[ge,$e]]}const{position:J,positionAbsolute:Q}=KE({nodeId:H,nextPosition:K,nodeLookup:P,nodeExtent:ee||z,nodeOrigin:T,onError:B});W=W||Y.position.x!==J.x||Y.position.y!==J.y,Y.position=J,Y.internals.positionAbsolute=Q}if(g=g||W,!!W&&(O(l,!0),v&&(o||M||!E&&D))){const[H,Y]=ad({nodeId:E,dragItems:l,nodeLookup:P});o==null||o(v,l,H,Y),M==null||M(v,H,Y),E||D==null||D(v,Y)}}async function A(){if(!d)return;const{transform:j,panBy:L,autoPanSpeed:P,autoPanOnNodeDrag:z}=n();if(!z){c=!1,cancelAnimationFrame(a);return}const[$,F]=ZE(u,d,P);($!==0||F!==0)&&(s.x=(s.x??0)-$/j[2],s.y=(s.y??0)-F/j[2],await L({x:$,y:F})&&N(s)),a=requestAnimationFrame(A)}function R(j){var G;const{nodeLookup:L,multiSelectionActive:P,nodesDraggable:z,transform:$,snapGrid:F,snapToGrid:T,selectNodesOnDrag:M,onNodeDragStart:D,onSelectionDragStart:B,unselectNodesAndEdges:O}=n();f=!0,(!M||!C)&&!P&&E&&((G=L.get(E))!=null&&G.selected||O()),C&&M&&E&&(e==null||e(E));const W=Ps(j.sourceEvent,{transform:$,snapGrid:F,snapToGrid:T,containerBounds:d});if(s=W,l=hU(L,z,W,E),l.size>0&&(r||D||!E&&B)){const[U,X]=ad({nodeId:E,dragItems:l,nodeLookup:L});r==null||r(j.sourceEvent,l,U,X),D==null||D(j.sourceEvent,U,X),E||B==null||B(j.sourceEvent,X)}}const I=Vm().clickDistance(k).on("start",j=>{const{domNode:L,nodeDragThreshold:P,transform:z,snapGrid:$,snapToGrid:F}=n();d=(L==null?void 0:L.getBoundingClientRect())||null,m=!1,g=!1,v=j.sourceEvent,P===0&&R(j),s=Ps(j.sourceEvent,{transform:z,snapGrid:$,snapToGrid:F,containerBounds:d}),u=tn(j.sourceEvent,d)}).on("drag",j=>{const{autoPanOnNodeDrag:L,transform:P,snapGrid:z,snapToGrid:$,nodeDragThreshold:F,nodeLookup:T}=n(),M=Ps(j.sourceEvent,{transform:P,snapGrid:z,snapToGrid:$,containerBounds:d});if(v=j.sourceEvent,(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1||E&&!T.has(E))&&(m=!0),!m){if(!c&&L&&f&&(c=!0,A()),!f){const D=tn(j.sourceEvent,d),B=D.x-u.x,O=D.y-u.y;Math.sqrt(B*B+O*O)>F&&R(j)}(s.x!==M.xSnapped||s.y!==M.ySnapped)&&l&&f&&(u=tn(j.sourceEvent,d),N(M))}}).on("end",j=>{if(!(!f||m)&&(c=!1,f=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:L,updateNodePositions:P,onNodeDragStop:z,onSelectionDragStop:$}=n();if(g&&(P(l,!1),g=!1),i||z||!E&&$){const[F,T]=ad({nodeId:E,dragItems:l,nodeLookup:L,dragging:!1});i==null||i(j.sourceEvent,l,F,T),z==null||z(j.sourceEvent,F,T),E||$==null||$(j.sourceEvent,T)}}}).filter(j=>{const L=j.target;return!j.button&&(!w||!Z0(L,`.${w}`,S))&&(!x||Z0(L,x,S))});p.call(I)}function y(){p==null||p.on(".drag",null)}return{update:_,destroy:y}}function yU(e,n,r){const o=[],i={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const s of n.values())ia(i,bi(s))>0&&o.push(s);return o}const vU=250;function xU(e,n,r,o){var l,c;let i=[],s=1/0;const a=yU(e,r,n+vU);for(const u of a){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(o.nodeId===f.nodeId&&o.type===f.type&&o.id===f.id)continue;const{x:p,y:m}=go(u,f,f.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));g>n||(g<s?(i=[{...f,x:p,y:m}],s=g):g===s&&i.push({...f,x:p,y:m}))}}if(!i.length)return null;if(i.length>1){const u=o.type==="source"?"target":"source";return i.find(d=>d.type===u)??i[0]}return i[0]}function dk(e,n,r,o,i,s=!1){var u,d,f;const a=o.get(e);if(!a)return null;const l=i==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],c=(r?l==null?void 0:l.find(p=>p.id===r):l==null?void 0:l[0])??null;return c&&s?{...c,...go(a,c,c.position,!0)}:c}function pk(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function wU(e,n){let r=null;return n?r=!0:e&&!n&&(r=!1),r}const hk=()=>!0;function bU(e,{connectionMode:n,connectionRadius:r,handleId:o,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:m,onConnectStart:g,onConnect:v,onConnectEnd:_,isValidConnection:y=hk,onReconnectEnd:w,updateConnection:x,getTransform:S,getFromHandle:C,autoPanSpeed:E,dragThreshold:k=1,handleDomNode:N}){const A=tk(e.target);let R=0,I;const{x:j,y:L}=tn(e),P=pk(s,N),z=l==null?void 0:l.getBoundingClientRect();let $=!1;if(!z||!P)return;const F=dk(i,P,o,c,n);if(!F)return;let T=tn(e,z),M=!1,D=null,B=!1,O=null;function W(){if(!d||!z)return;const[J,Q]=ZE(T,z,E);p({x:J,y:Q}),R=requestAnimationFrame(W)}const G={...F,nodeId:i,type:P,position:F.position},U=c.get(i);let H={inProgress:!0,isValid:null,from:go(U,G,le.Left,!0),fromHandle:G,fromPosition:G.position,fromNode:U,to:T,toHandle:null,toPosition:z0[G.position],toNode:null,pointer:T};function Y(){$=!0,x(H),g==null||g(e,{nodeId:i,handleId:o,handleType:P})}k===0&&Y();function K(J){if(!$){const{x:$e,y:un}=tn(J),ut=$e-j,Fr=un-L;if(!(ut*ut+Fr*Fr>k*k))return;Y()}if(!C()||!G){ee(J);return}const Q=S();T=tn(J,z),I=xU(Ia(T,Q,!1,[1,1]),r,c,G),M||(W(),M=!0);const ne=mk(J,{handle:I,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a?"target":"source",isValidConnection:y,doc:A,lib:u,flowId:f,nodeLookup:c});O=ne.handleDomNode,D=ne.connection,B=wU(!!I,ne.isValid);const ce=c.get(i),ge=ce?go(ce,G,le.Left,!0):H.from,fe={...H,from:ge,isValid:B,to:ne.toHandle&&B?Yc({x:ne.toHandle.x,y:ne.toHandle.y},Q):T,toHandle:ne.toHandle,toPosition:B&&ne.toHandle?ne.toHandle.position:z0[G.position],toNode:ne.toHandle?c.get(ne.toHandle.nodeId):null,pointer:T};x(fe),H=fe}function ee(J){if(!("touches"in J&&J.touches.length>0)){if($){(I||O)&&D&&B&&(v==null||v(D));const{inProgress:Q,...ne}=H,ce={...ne,toPosition:H.toHandle?H.toPosition:null};_==null||_(J,ce),s&&(w==null||w(J,ce))}m(),cancelAnimationFrame(R),M=!1,B=!1,D=null,O=null,A.removeEventListener("mousemove",K),A.removeEventListener("mouseup",ee),A.removeEventListener("touchmove",K),A.removeEventListener("touchend",ee)}}A.addEventListener("mousemove",K),A.addEventListener("mouseup",ee),A.addEventListener("touchmove",K),A.addEventListener("touchend",ee)}function mk(e,{handle:n,connectionMode:r,fromNodeId:o,fromHandleId:i,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=hk,nodeLookup:d}){const f=s==="target",p=n?a.querySelector(`.${l}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:g}=tn(e),v=a.elementFromPoint(m,g),_=v!=null&&v.classList.contains(`${l}-flow__handle`)?v:p,y={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const w=pk(void 0,_),x=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),C=_.classList.contains("connectable"),E=_.classList.contains("connectableend");if(!x||!w)return y;const k={source:f?x:o,sourceHandle:f?S:i,target:f?o:x,targetHandle:f?i:S};y.connection=k;const A=C&&E&&(r===xi.Strict?f&&w==="source"||!f&&w==="target":x!==o||S!==i);y.isValid=A&&u(k),y.toHandle=dk(x,w,S,d,r,!0)}return y}const Zp={onPointerDown:bU,isValid:mk};function _U({domNode:e,panZoom:n,getTransform:r,getViewScale:o}){const i=tt(e);function s({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const g=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const S=r(),C=x.sourceEvent.ctrlKey&&sa()?10:1,E=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*d,k=S[2]*Math.pow(2,E*C);n.scaleTo(k)};let v=[0,0];const _=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(v=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},y=x=>{const S=r();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const C=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],E=[C[0]-v[0],C[1]-v[1]];v=C;const k=o()*Math.max(S[2],Math.log(S[2]))*(m?-1:1),N={x:S[0]-E[0]*k,y:S[1]-E[1]*k},A=[[0,0],[c,u]];n.setViewportConstrained({x:N.x,y:N.y,zoom:S[2]},A,l)},w=Xm().on("start",_).on("zoom",f?y:null).on("zoom.wheel",p?g:null);i.call(w,{})}function a(){i.on("zoom",null)}return{update:s,destroy:a,pointer:Ot}}const Qu=e=>({x:e.x,y:e.y,zoom:e.k}),ld=({x:e,y:n,zoom:r})=>Uu.translate(e,n).scale(r),Go=(e,n)=>e.target.closest(`.${n}`),gk=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),SU=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,cd=(e,n=0,r=SU,o=()=>{})=>{const i=typeof n=="number"&&n>0;return i||o(),i?e.transition().duration(n).ease(r).on("end",o):e},yk=e=>{const n=e.ctrlKey&&sa()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function CU({zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Go(d,n))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=r.property("__zoom").k||1;if(d.ctrlKey&&a){const _=Ot(d),y=yk(d),w=f*Math.pow(2,y);o.scaleTo(r,w,_,d);return}const p=d.deltaMode===1?20:1;let m=i===no.Vertical?0:d.deltaX*p,g=i===no.Horizontal?0:d.deltaY*p;!sa()&&d.shiftKey&&i!==no.Vertical&&(m=d.deltaY*p,g=0),o.translateBy(r,-(m/f)*s,-(g/f)*s,{internal:!0});const v=Qu(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,v),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,v))}}function EU({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}){return function(o,i){const s=o.type==="wheel",a=!n&&s&&!o.ctrlKey,l=Go(o,e);if(o.ctrlKey&&s&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,i)}}function kU({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}){return o=>{var s,a,l;if((s=o.sourceEvent)!=null&&s.internal)return;const i=Qu(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=o.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),r&&(r==null||r(o.sourceEvent,i))}}function NU({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:o,onPanZoom:i}){return s=>{var a,l;e.usedRightMouseButton=!!(r&&gk(n,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||o([s.transform.x,s.transform.y,s.transform.k]),i&&!((l=s.sourceEvent)!=null&&l.internal)&&(i==null||i(s.sourceEvent,Qu(s.transform)))}}function PU({zoomPanValues:e,panOnDrag:n,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&gk(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){const c=Qu(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(a.sourceEvent,c)},r?150:0)}}}function RU({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var _;const p=e||n,m=r&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Go(f,`${u}-flow__node`)||Go(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!i&&!s&&!r||a||d&&!g||Go(f,l)&&g||Go(f,c)&&(!g||i&&g&&!e)||!r&&f.ctrlKey&&g)return!1;if(!r&&f.type==="touchstart"&&((_=f.touches)==null?void 0:_.length)>1)return f.preventDefault(),!1;if(!p&&!i&&!m&&g||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const v=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&v}}function MU({domNode:e,minZoom:n,maxZoom:r,translateExtent:o,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=Xm().scaleExtent([n,r]).translateExtent(o),p=tt(e).call(f);w({x:i.x,y:i.y,zoom:wi(i.zoom,n,r)},[[0,0],[d.width,d.height]],o);const m=p.on("wheel.zoom"),g=p.on("dblclick.zoom");f.wheelDelta(yk);function v(I,j){return p?new Promise(L=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?Ss:zl).transform(cd(p,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>L(!0)),I)}):Promise.resolve(!1)}function _({noWheelClassName:I,noPanClassName:j,onPaneContextMenu:L,userSelectionActive:P,panOnScroll:z,panOnDrag:$,panOnScrollMode:F,panOnScrollSpeed:T,preventScrolling:M,zoomOnPinch:D,zoomOnScroll:B,zoomOnDoubleClick:O,zoomActivationKeyPressed:W,lib:G,onTransformChange:U,connectionInProgress:X,paneClickDistance:H,selectionOnDrag:Y}){P&&!u.isZoomingOrPanning&&y();const K=z&&!W&&!P;f.clickDistance(Y?1/0:!en(H)||H<0?0:H);const ee=K?CU({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:F,panOnScrollSpeed:T,zoomOnPinch:D,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):EU({noWheelClassName:I,preventScrolling:M,d3ZoomHandler:m});if(p.on("wheel.zoom",ee,{passive:!1}),!P){const Q=kU({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",Q);const ne=NU({zoomPanValues:u,panOnDrag:$,onPaneContextMenu:!!L,onPanZoom:s,onTransformChange:U});f.on("zoom",ne);const ce=PU({zoomPanValues:u,panOnDrag:$,panOnScroll:z,onPaneContextMenu:L,onPanZoomEnd:l,onDraggingChange:c});f.on("end",ce)}const J=RU({zoomActivationKeyPressed:W,panOnDrag:$,zoomOnScroll:B,panOnScroll:z,zoomOnDoubleClick:O,zoomOnPinch:D,userSelectionActive:P,noPanClassName:j,noWheelClassName:I,lib:G,connectionInProgress:X});f.filter(J),O?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function w(I,j,L){const P=ld(I),z=f==null?void 0:f.constrain()(P,j,L);return z&&await v(z),new Promise($=>$(z))}async function x(I,j){const L=ld(I);return await v(L,j),new Promise(P=>P(L))}function S(I){if(p){const j=ld(I),L=p.property("__zoom");(L.k!==I.zoom||L.x!==I.x||L.y!==I.y)&&(f==null||f.transform(p,j,null,{sync:!0}))}}function C(){const I=p?Kt(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function E(I,j){return p?new Promise(L=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?Ss:zl).scaleTo(cd(p,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>L(!0)),I)}):Promise.resolve(!1)}function k(I,j){return p?new Promise(L=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?Ss:zl).scaleBy(cd(p,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>L(!0)),I)}):Promise.resolve(!1)}function N(I){f==null||f.scaleExtent(I)}function A(I){f==null||f.translateExtent(I)}function R(I){const j=!en(I)||I<0?0:I;f==null||f.clickDistance(j)}return{update:_,destroy:y,setViewport:x,setViewportConstrained:w,getViewport:C,scaleTo:E,scaleBy:k,setScaleExtent:N,setTranslateExtent:A,syncViewport:S,setClickDistance:R}}var Si;(function(e){e.Line="line",e.Handle="handle"})(Si||(Si={}));function AU({width:e,prevWidth:n,height:r,prevHeight:o,affectsX:i,affectsY:s}){const a=e-n,l=r-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&i&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function Q0(e){const n=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:n,isVertical:r,affectsX:o,affectsY:i}}function rr(e,n){return Math.max(0,n-e)}function or(e,n){return Math.max(0,e-n)}function gl(e,n,r){return Math.max(0,n-e,e-r)}function J0(e,n){return e?!n:n}function TU(e,n,r,o,i,s,a,l){let{affectsX:c,affectsY:u}=n;const{isHorizontal:d,isVertical:f}=n,p=d&&f,{xSnapped:m,ySnapped:g}=r,{minWidth:v,maxWidth:_,minHeight:y,maxHeight:w}=o,{x,y:S,width:C,height:E,aspectRatio:k}=e;let N=Math.floor(d?m-e.pointerX:0),A=Math.floor(f?g-e.pointerY:0);const R=C+(c?-N:N),I=E+(u?-A:A),j=-s[0]*C,L=-s[1]*E;let P=gl(R,v,_),z=gl(I,y,w);if(a){let T=0,M=0;c&&N<0?T=rr(x+N+j,a[0][0]):!c&&N>0&&(T=or(x+R+j,a[1][0])),u&&A<0?M=rr(S+A+L,a[0][1]):!u&&A>0&&(M=or(S+I+L,a[1][1])),P=Math.max(P,T),z=Math.max(z,M)}if(l){let T=0,M=0;c&&N>0?T=or(x+N,l[0][0]):!c&&N<0&&(T=rr(x+R,l[1][0])),u&&A>0?M=or(S+A,l[0][1]):!u&&A<0&&(M=rr(S+I,l[1][1])),P=Math.max(P,T),z=Math.max(z,M)}if(i){if(d){const T=gl(R/k,y,w)*k;if(P=Math.max(P,T),a){let M=0;!c&&!u||c&&!u&&p?M=or(S+L+R/k,a[1][1])*k:M=rr(S+L+(c?N:-N)/k,a[0][1])*k,P=Math.max(P,M)}if(l){let M=0;!c&&!u||c&&!u&&p?M=rr(S+R/k,l[1][1])*k:M=or(S+(c?N:-N)/k,l[0][1])*k,P=Math.max(P,M)}}if(f){const T=gl(I*k,v,_)/k;if(z=Math.max(z,T),a){let M=0;!c&&!u||u&&!c&&p?M=or(x+I*k+j,a[1][0])/k:M=rr(x+(u?A:-A)*k+j,a[0][0])/k,z=Math.max(z,M)}if(l){let M=0;!c&&!u||u&&!c&&p?M=rr(x+I*k,l[1][0])/k:M=or(x+(u?A:-A)*k,l[0][0])/k,z=Math.max(z,M)}}}A=A+(A<0?z:-z),N=N+(N<0?P:-P),i&&(p?R>I*k?A=(J0(c,u)?-N:N)/k:N=(J0(c,u)?-A:A)*k:d?(A=N/k,u=c):(N=A*k,c=u));const $=c?x+N:x,F=u?S+A:S;return{width:C+(c?-N:N),height:E+(u?-A:A),x:s[0]*N*(c?-1:1)+$,y:s[1]*A*(u?-1:1)+F}}const vk={width:0,height:0,x:0,y:0},IU={...vk,pointerX:0,pointerY:0,aspectRatio:1};function jU(e){return[[0,0],[e.measured.width,e.measured.height]]}function $U(e,n,r){const o=n.position.x+e.position.x,i=n.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=r[0]*s,c=r[1]*a;return[[o-l,i-c],[o+s-l,i+a-c]]}function OU({domNode:e,nodeId:n,getStoreItems:r,onChange:o,onEnd:i}){const s=tt(e);let a={controlDirection:Q0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:g,onResizeEnd:v,shouldResize:_}){let y={...vk},w={...IU};a={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:Q0(u)};let x,S=null,C=[],E,k,N,A=!1;const R=Vm().on("start",I=>{const{nodeLookup:j,transform:L,snapGrid:P,snapToGrid:z,nodeOrigin:$,paneDomNode:F}=r();if(x=j.get(n),!x)return;S=(F==null?void 0:F.getBoundingClientRect())??null;const{xSnapped:T,ySnapped:M}=Ps(I.sourceEvent,{transform:L,snapGrid:P,snapToGrid:z,containerBounds:S});y={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},w={...y,pointerX:T,pointerY:M,aspectRatio:y.width/y.height},E=void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(E=j.get(x.parentId),k=E&&x.extent==="parent"?jU(E):void 0),C=[],N=void 0;for(const[D,B]of j)if(B.parentId===n&&(C.push({id:D,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const O=$U(B,x,B.origin??$);N?N=[[Math.min(O[0][0],N[0][0]),Math.min(O[0][1],N[0][1])],[Math.max(O[1][0],N[1][0]),Math.max(O[1][1],N[1][1])]]:N=O}m==null||m(I,{...y})}).on("drag",I=>{const{transform:j,snapGrid:L,snapToGrid:P,nodeOrigin:z}=r(),$=Ps(I.sourceEvent,{transform:j,snapGrid:L,snapToGrid:P,containerBounds:S}),F=[];if(!x)return;const{x:T,y:M,width:D,height:B}=y,O={},W=x.origin??z,{width:G,height:U,x:X,y:H}=TU(w,a.controlDirection,$,a.boundaries,a.keepAspectRatio,W,k,N),Y=G!==D,K=U!==B,ee=X!==T&&Y,J=H!==M&&K;if(!ee&&!J&&!Y&&!K)return;if((ee||J||W[0]===1||W[1]===1)&&(O.x=ee?X:y.x,O.y=J?H:y.y,y.x=O.x,y.y=O.y,C.length>0)){const ge=X-T,fe=H-M;for(const $e of C)$e.position={x:$e.position.x-ge+W[0]*(G-D),y:$e.position.y-fe+W[1]*(U-B)},F.push($e)}if((Y||K)&&(O.width=Y&&(!a.resizeDirection||a.resizeDirection==="horizontal")?G:y.width,O.height=K&&(!a.resizeDirection||a.resizeDirection==="vertical")?U:y.height,y.width=O.width,y.height=O.height),E&&x.expandParent){const ge=W[0]*(O.width??0);O.x&&O.x<ge&&(y.x=ge,w.x=w.x-(O.x-ge));const fe=W[1]*(O.height??0);O.y&&O.y<fe&&(y.y=fe,w.y=w.y-(O.y-fe))}const Q=AU({width:y.width,prevWidth:D,height:y.height,prevHeight:B,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ne={...y,direction:Q};(_==null?void 0:_(I,ne))!==!1&&(A=!0,g==null||g(I,ne),o(O,F))}).on("end",I=>{A&&(v==null||v(I,{...y}),i==null||i({...y}),A=!1)});s.call(R)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var xk={exports:{}},wk={};/**
345
- * @license React
346
- * use-sync-external-store-shim/with-selector.production.js
347
- *
348
- * Copyright (c) Meta Platforms, Inc. and affiliates.
349
- *
350
- * This source code is licensed under the MIT license found in the
351
- * LICENSE file in the root directory of this source tree.
352
- */var Ju=h,DU=bb;function LU(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var zU=typeof Object.is=="function"?Object.is:LU,FU=DU.useSyncExternalStore,VU=Ju.useRef,BU=Ju.useEffect,HU=Ju.useMemo,WU=Ju.useDebugValue;wk.useSyncExternalStoreWithSelector=function(e,n,r,o,i){var s=VU(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=HU(function(){function c(m){if(!u){if(u=!0,d=m,m=o(m),i!==void 0&&a.hasValue){var g=a.value;if(i(g,m))return f=g}return f=m}if(g=f,zU(d,m))return g;var v=o(m);return i!==void 0&&i(g,v)?(d=m,g):(d=m,f=v)}var u=!1,d,f,p=r===void 0?null:r;return[function(){return c(n())},p===null?void 0:function(){return c(p())}]},[n,r,o,i]);var l=FU(e,s[0],s[1]);return BU(function(){a.hasValue=!0,a.value=l},[l]),WU(l),l};xk.exports=wk;var UU=xk.exports;const GU=qc(UU),YU={},ex=e=>{let n;const r=new Set,o=(d,f)=>{const p=typeof d=="function"?d(n):d;if(!Object.is(p,n)){const m=n;n=f??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(g=>g(n,m))}},i=()=>n,c={setState:o,getState:i,getInitialState:()=>u,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(YU?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=n=e(o,i,c);return c},XU=e=>e?ex(e):ex,{useDebugValue:KU}=Je,{useSyncExternalStoreWithSelector:qU}=GU,ZU=e=>e;function bk(e,n=ZU,r){const o=qU(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,r);return KU(o),o}const tx=(e,n)=>{const r=XU(e),o=(i,s=n)=>bk(r,i,s);return Object.assign(o,r),o},QU=(e,n)=>e?tx(e,n):tx;function Re(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[o,i]of e)if(!Object.is(i,n.get(o)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const o of e)if(!n.has(o))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(n,o)||!Object.is(e[o],n[o]))return!1;return!0}const ef=h.createContext(null),JU=ef.Provider,_k=Cn.error001();function he(e,n){const r=h.useContext(ef);if(r===null)throw new Error(_k);return bk(r,e,n)}function Me(){const e=h.useContext(ef);if(e===null)throw new Error(_k);return h.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const nx={display:"none"},eG={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Sk="react-flow__node-desc",Ck="react-flow__edge-desc",tG="react-flow__aria-live",nG=e=>e.ariaLiveMessage,rG=e=>e.ariaLabelConfig;function oG({rfId:e}){const n=he(nG);return b.jsx("div",{id:`${tG}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:eG,children:n})}function iG({rfId:e,disableKeyboardA11y:n}){const r=he(rG);return b.jsxs(b.Fragment,{children:[b.jsx("div",{id:`${Sk}-${e}`,style:nx,children:n?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),b.jsx("div",{id:`${Ck}-${e}`,style:nx,children:r["edge.a11yDescription.default"]}),!n&&b.jsx(oG,{rfId:e})]})}const tf=h.forwardRef(({position:e="top-left",children:n,className:r,style:o,...i},s)=>{const a=`${e}`.split("-");return b.jsx("div",{className:ze(["react-flow__panel",r,...a]),style:o,ref:s,...i,children:n})});tf.displayName="Panel";function sG({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:b.jsx(tf,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:b.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const aG=e=>{const n=[],r=[];for(const[,o]of e.nodeLookup)o.selected&&n.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&r.push(o);return{selectedNodes:n,selectedEdges:r}},yl=e=>e.id;function lG(e,n){return Re(e.selectedNodes.map(yl),n.selectedNodes.map(yl))&&Re(e.selectedEdges.map(yl),n.selectedEdges.map(yl))}function cG({onSelectionChange:e}){const n=Me(),{selectedNodes:r,selectedEdges:o}=he(aG,lG);return h.useEffect(()=>{const i={nodes:r,edges:o};e==null||e(i),n.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[r,o,e]),null}const uG=e=>!!e.onSelectionChangeHandlers;function fG({onSelectionChange:e}){const n=he(uG);return e||n?b.jsx(cG,{onSelectionChange:e}):null}const Qp=typeof window<"u"?h.useLayoutEffect:h.useEffect,Ek=[0,0],dG={x:0,y:0,zoom:1},pG=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],rx=[...pG,"rfId"],hG=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),ox={translateExtent:ra,nodeOrigin:Ek,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function mG(e){const{setNodes:n,setEdges:r,setMinZoom:o,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=he(hG,Re),u=Me();Qp(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=ox,l()}),[]);const d=h.useRef(ox);return Qp(()=>{for(const f of rx){const p=e[f],m=d.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?n(p):f==="edges"?r(p):f==="minZoom"?o(p):f==="maxZoom"?i(p):f==="translateExtent"?s(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:XW(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},rx.map(f=>e[f])),null}function ix(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function gG(e){var o;const[n,r]=h.useState(e==="system"?null:e);return h.useEffect(()=>{if(e!=="system"){r(e);return}const i=ix(),s=()=>r(i!=null&&i.matches?"dark":"light");return s(),i==null||i.addEventListener("change",s),()=>{i==null||i.removeEventListener("change",s)}},[e]),n!==null?n:(o=ix())!=null&&o.matches?"dark":"light"}const sx=typeof document<"u"?document:null;function aa(e=null,n={target:sx,actInsideInputWithModifier:!0}){const[r,o]=h.useState(!1),i=h.useRef(!1),s=h.useRef(new Set([])),[a,l]=h.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
353
- `).replace(`
354
-
355
- `,`
356
- +`).split(`
357
- `)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return h.useEffect(()=>{const c=(n==null?void 0:n.target)??sx,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var _,y;if(i.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!i.current||i.current&&!u)&&nk(m))return!1;const v=lx(m.code,l);if(s.current.add(m[v]),ax(a,s.current,!1)){const w=((y=(_=m.composedPath)==null?void 0:_.call(m))==null?void 0:y[0])||m.target,x=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(i.current||!x)&&m.preventDefault(),o(!0)}},f=m=>{const g=lx(m.code,l);ax(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(m[g]),m.key==="Meta"&&s.current.clear(),i.current=!1},p=()=>{s.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),r}function ax(e,n,r){return e.filter(o=>r||o.length===n.size).some(o=>o.every(i=>n.has(i)))}function lx(e,n){return n.includes(e)?"code":"key"}const yG=()=>{const e=Me();return h.useMemo(()=>({zoomIn:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,n):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,n):Promise.resolve(!1)},zoomTo:(n,r)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(n,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(n,r)=>{const{transform:[o,i,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??o,y:n.y??i,zoom:n.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,r,o]=e.getState().transform;return{x:n,y:r,zoom:o}},setCenter:async(n,r,o)=>e.getState().setCenter(n,r,o),fitBounds:async(n,r)=>{const{width:o,height:i,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=ag(n,o,i,s,a,(r==null?void 0:r.padding)??.1);return l?(await l.setViewport(c,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,r={})=>{const{transform:o,snapGrid:i,snapToGrid:s,domNode:a}=e.getState();if(!a)return n;const{x:l,y:c}=a.getBoundingClientRect(),u={x:n.x-l,y:n.y-c},d=r.snapGrid??i,f=r.snapToGrid??s;return Ia(u,o,f,d)},flowToScreenPosition:n=>{const{transform:r,domNode:o}=e.getState();if(!o)return n;const{x:i,y:s}=o.getBoundingClientRect(),a=Yc(n,r);return{x:a.x+i,y:a.y+s}}}),[])};function kk(e,n){const r=[],o=new Map,i=[];for(const s of e)if(s.type==="add"){i.push(s);continue}else if(s.type==="remove"||s.type==="replace")o.set(s.id,[s]);else{const a=o.get(s.id);a?a.push(s):o.set(s.id,[s])}for(const s of n){const a=o.get(s.id);if(!a){r.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){r.push({...a[0].item});continue}const l={...s};for(const c of a)vG(c,l);r.push(l)}return i.length&&i.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function vG(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function xG(e,n){return kk(e,n)}function wG(e,n){return kk(e,n)}function Yr(e,n){return{id:e,type:"select",selected:n}}function Yo(e,n=new Set,r=!1){const o=[];for(const[i,s]of e){const a=n.has(i);!(s.selected===void 0&&!a)&&s.selected!==a&&(r&&(s.selected=a),o.push(Yr(s.id,a)))}return o}function cx({items:e=[],lookup:n}){var i;const r=[],o=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=n.get(a.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==a&&r.push({id:a.id,item:a,type:"replace"}),c===void 0&&r.push({item:a,type:"add",index:s})}for(const[s]of n)o.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function ux(e){return{id:e.id,type:"remove"}}const fx=e=>LW(e),bG=e=>XE(e);function Nk(e){return h.forwardRef(e)}function dx(e){const[n,r]=h.useState(BigInt(0)),[o]=h.useState(()=>_G(()=>r(i=>i+BigInt(1))));return Qp(()=>{const i=o.get();i.length&&(e(i),o.reset())},[n]),o}function _G(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:r=>{n.push(r),e()}}}const Pk=h.createContext(null);function SG({children:e}){const n=Me(),r=h.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:g}=n.getState();let v=c;for(const y of l)v=typeof y=="function"?y(v):y;let _=cx({items:v,lookup:p});for(const y of g.values())_=y(_);d&&u(v),_.length>0?f==null||f(_):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:w,setNodes:x}=n.getState();y&&x(w)})},[]),o=dx(r),i=h.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const g of l)m=typeof g=="function"?g(m):g;d?u(m):f&&f(cx({items:m,lookup:p}))},[]),s=dx(i),a=h.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return b.jsx(Pk.Provider,{value:a,children:e})}function CG(){const e=h.useContext(Pk);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const EG=e=>!!e.panZoom;function hg(){const e=yG(),n=Me(),r=CG(),o=he(EG),i=h.useMemo(()=>{const s=f=>n.getState().nodeLookup.get(f),a=f=>{r.nodeQueue.push(f)},l=f=>{r.edgeQueue.push(f)},c=f=>{var y,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),g=fx(f)?f:p.get(f.id),v=g.parentId?ek(g.position,g.measured,g.parentId,p,m):g.position,_={...g,position:v,width:((y=g.measured)==null?void 0:y.width)??g.width,height:((w=g.measured)==null?void 0:w.height)??g.height};return bi(_)},u=(f,p,m={replace:!1})=>{a(g=>g.map(v=>{if(v.id===f){const _=typeof p=="function"?p(v):p;return m.replace&&fx(_)?_:{...v,..._}}return v}))},d=(f,p,m={replace:!1})=>{l(g=>g.map(v=>{if(v.id===f){const _=typeof p=="function"?p(v):p;return m.replace&&bG(_)?_:{...v,..._}}return v}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=s(f))==null?void 0:p.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(p=>({...p}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];r.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];r.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=n.getState(),[g,v,_]=m;return{nodes:f.map(y=>({...y})),edges:p.map(y=>({...y})),viewport:{x:g,y:v,zoom:_}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:g,onNodesDelete:v,onEdgesDelete:_,triggerNodeChanges:y,triggerEdgeChanges:w,onDelete:x,onBeforeDelete:S}=n.getState(),{nodes:C,edges:E}=await HW({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:g,onBeforeDelete:S}),k=E.length>0,N=C.length>0;if(k){const A=E.map(ux);_==null||_(E),w(A)}if(N){const A=C.map(ux);v==null||v(C),y(A)}return(N||k)&&(x==null||x({nodes:C,edges:E})),{deletedNodes:C,deletedEdges:E}},getIntersectingNodes:(f,p=!0,m)=>{const g=V0(f),v=g?f:c(f),_=m!==void 0;return v?(m||n.getState().nodes).filter(y=>{const w=n.getState().nodeLookup.get(y.id);if(w&&!g&&(y.id===f.id||!w.internals.positionAbsolute))return!1;const x=bi(_?y:w),S=ia(x,v);return p&&S>0||S>=x.width*x.height||S>=v.width*v.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const v=V0(f)?f:c(f);if(!v)return!1;const _=ia(v,p);return m&&_>0||_>=p.width*p.height||_>=v.width*v.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,g=>{const v=typeof p=="function"?p(g):p;return m.replace?{...g,data:v}:{...g,data:{...g.data,...v}}},m)},updateEdge:d,updateEdgeData:(f,p,m={replace:!1})=>{d(f,g=>{const v=typeof p=="function"?p(g):p;return m.replace?{...g,data:v}:{...g,data:{...g.data,...v}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return zW(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var g;return Array.from(((g=n.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var g;return Array.from(((g=n.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const p=n.getState().fitViewResolver??YW();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),r.nodeQueue.push(m=>[...m]),p.promise}}},[]);return h.useMemo(()=>({...i,...e,viewportInitialized:o}),[o])}const px=e=>e.selected,kG=typeof window<"u"?window:void 0;function NG({deleteKeyCode:e,multiSelectionKeyCode:n}){const r=Me(),{deleteElements:o}=hg(),i=aa(e,{actInsideInputWithModifier:!1}),s=aa(n,{target:kG});h.useEffect(()=>{if(i){const{edges:a,nodes:l}=r.getState();o({nodes:l.filter(px),edges:a.filter(px)}),r.setState({nodesSelectionActive:!1})}},[i]),h.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function PG(e){const n=Me();h.useEffect(()=>{const r=()=>{var i,s,a,l;if(!e.current||!(((s=(i=e.current).checkVisibility)==null?void 0:s.call(i))??!0))return!1;const o=lg(e.current);(o.height===0||o.width===0)&&((l=(a=n.getState()).onError)==null||l.call(a,"004",Cn.error004())),n.setState({width:o.width||500,height:o.height||500})};if(e.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(e.current),()=>{window.removeEventListener("resize",r),o&&e.current&&o.unobserve(e.current)}}},[])}const nf={position:"absolute",width:"100%",height:"100%",top:0,left:0},RG=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function MG({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=no.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:g,noWheelClassName:v,noPanClassName:_,onViewportChange:y,isControlledViewport:w,paneClickDistance:x,selectionOnDrag:S}){const C=Me(),E=h.useRef(null),{userSelectionActive:k,lib:N,connectionInProgress:A}=he(RG,Re),R=aa(p),I=h.useRef();PG(E);const j=h.useCallback(L=>{y==null||y({x:L[0],y:L[1],zoom:L[2]}),w||C.setState({transform:L})},[y,w]);return h.useEffect(()=>{if(E.current){I.current=MU({domNode:E.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:$=>C.setState(F=>F.paneDragging===$?F:{paneDragging:$}),onPanZoomStart:($,F)=>{const{onViewportChangeStart:T,onMoveStart:M}=C.getState();M==null||M($,F),T==null||T(F)},onPanZoom:($,F)=>{const{onViewportChange:T,onMove:M}=C.getState();M==null||M($,F),T==null||T(F)},onPanZoomEnd:($,F)=>{const{onViewportChangeEnd:T,onMoveEnd:M}=C.getState();M==null||M($,F),T==null||T(F)}});const{x:L,y:P,zoom:z}=I.current.getViewport();return C.setState({panZoom:I.current,transform:[L,P,z],domNode:E.current.closest(".react-flow")}),()=>{var $;($=I.current)==null||$.destroy()}}},[]),h.useEffect(()=>{var L;(L=I.current)==null||L.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:R,preventScrolling:m,noPanClassName:_,userSelectionActive:k,noWheelClassName:v,lib:N,onTransformChange:j,connectionInProgress:A,selectionOnDrag:S,paneClickDistance:x})},[e,n,r,o,i,s,a,l,R,m,_,k,v,N,j,A,S,x]),b.jsx("div",{className:"react-flow__renderer",ref:E,style:nf,children:g})}const AG=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function TG(){const{userSelectionActive:e,userSelectionRect:n}=he(AG,Re);return e&&n?b.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const ud=(e,n)=>r=>{r.target===n.current&&(e==null||e(r))},IG=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function jG({isSelecting:e,selectionKeyPressed:n,selectionMode:r=oa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:g}){const v=Me(),{userSelectionActive:_,elementsSelectable:y,dragging:w,connectionInProgress:x}=he(IG,Re),S=y&&(e||_),C=h.useRef(null),E=h.useRef(),k=h.useRef(new Set),N=h.useRef(new Set),A=h.useRef(!1),R=T=>{if(A.current||x){A.current=!1;return}c==null||c(T),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},I=T=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){T.preventDefault();return}u==null||u(T)},j=d?T=>d(T):void 0,L=T=>{A.current&&(T.stopPropagation(),A.current=!1)},P=T=>{var U,X;const{domNode:M}=v.getState();if(E.current=M==null?void 0:M.getBoundingClientRect(),!E.current)return;const D=T.target===C.current;if(!D&&!!T.target.closest(".nokey")||!e||!(s&&D||n)||T.button!==0||!T.isPrimary)return;(X=(U=T.target)==null?void 0:U.setPointerCapture)==null||X.call(U,T.pointerId),A.current=!1;const{x:W,y:G}=tn(T.nativeEvent,E.current);v.setState({userSelectionRect:{width:0,height:0,startX:W,startY:G,x:W,y:G}}),D||(T.stopPropagation(),T.preventDefault())},z=T=>{const{userSelectionRect:M,transform:D,nodeLookup:B,edgeLookup:O,connectionLookup:W,triggerNodeChanges:G,triggerEdgeChanges:U,defaultEdgeOptions:X,resetSelectedElements:H}=v.getState();if(!E.current||!M)return;const{x:Y,y:K}=tn(T.nativeEvent,E.current),{startX:ee,startY:J}=M;if(!A.current){const fe=n?0:i;if(Math.hypot(Y-ee,K-J)<=fe)return;H(),a==null||a(T)}A.current=!0;const Q={startX:ee,startY:J,x:Y<ee?Y:ee,y:K<J?K:J,width:Math.abs(Y-ee),height:Math.abs(K-J)},ne=k.current,ce=N.current;k.current=new Set(sg(B,Q,D,r===oa.Partial,!0).map(fe=>fe.id)),N.current=new Set;const ge=(X==null?void 0:X.selectable)??!0;for(const fe of k.current){const $e=W.get(fe);if($e)for(const{edgeId:un}of $e.values()){const ut=O.get(un);ut&&(ut.selectable??ge)&&N.current.add(un)}}if(!B0(ne,k.current)){const fe=Yo(B,k.current,!0);G(fe)}if(!B0(ce,N.current)){const fe=Yo(O,N.current);U(fe)}v.setState({userSelectionRect:Q,userSelectionActive:!0,nodesSelectionActive:!1})},$=T=>{var M,D;T.button===0&&((D=(M=T.target)==null?void 0:M.releasePointerCapture)==null||D.call(M,T.pointerId),!_&&T.target===C.current&&v.getState().userSelectionRect&&(R==null||R(T)),v.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(l==null||l(T),v.setState({nodesSelectionActive:k.current.size>0})))},F=o===!0||Array.isArray(o)&&o.includes(0);return b.jsxs("div",{className:ze(["react-flow__pane",{draggable:F,dragging:w,selection:e}]),onClick:S?void 0:ud(R,C),onContextMenu:ud(I,C),onWheel:ud(j,C),onPointerEnter:S?void 0:f,onPointerMove:S?z:p,onPointerUp:S?$:void 0,onPointerDownCapture:S?P:void 0,onClickCapture:S?L:void 0,onPointerLeave:m,ref:C,style:nf,children:[g,b.jsx(TG,{})]})}function Jp({id:e,store:n,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=n.getState(),u=l.get(e);if(!u){c==null||c("012",Cn.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=o==null?void 0:o.current)==null?void 0:d.blur()})):i([e])}function Rk({nodeRef:e,disabled:n=!1,noDragClassName:r,handleSelector:o,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=Me(),[c,u]=h.useState(!1),d=h.useRef();return h.useEffect(()=>{d.current=gU({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Jp({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),h.useEffect(()=>{if(!(n||!e.current||!d.current))return d.current.update({noDragClassName:r,handleSelector:o,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{var f;(f=d.current)==null||f.destroy()}},[r,o,n,s,e,i,a]),c}const $G=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function Mk(){const e=Me();return h.useCallback(r=>{const{nodeExtent:o,snapToGrid:i,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=$G(a),m=i?s[0]:5,g=i?s[1]:5,v=r.direction.x*m*r.factor,_=r.direction.y*g*r.factor;for(const[,y]of u){if(!p(y))continue;let w={x:y.internals.positionAbsolute.x+v,y:y.internals.positionAbsolute.y+_};i&&(w=Ta(w,s));const{position:x,positionAbsolute:S}=KE({nodeId:y.id,nextPosition:w,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});y.position=x,y.internals.positionAbsolute=S,f.set(y.id,y)}c(f)},[])}const mg=h.createContext(null),OG=mg.Provider;mg.Consumer;const Ak=()=>h.useContext(mg),DG=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),LG=(e,n,r)=>o=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===r;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===r,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===n&&(i==null?void 0:i.type)===r,isPossibleEndHandle:s===xi.Strict?(l==null?void 0:l.type)!==r:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&u}};function zG({type:e="source",position:n=le.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},m){var z,$;const g=a||null,v=e==="target",_=Me(),y=Ak(),{connectOnClick:w,noPanClassName:x,rfId:S}=he(DG,Re),{connectingFrom:C,connectingTo:E,clickConnecting:k,isPossibleEndHandle:N,connectionInProcess:A,clickConnectionInProcess:R,valid:I}=he(LG(y,g,e),Re);y||($=(z=_.getState()).onError)==null||$.call(z,"010",Cn.error010());const j=F=>{const{defaultEdgeOptions:T,onConnect:M,hasDefaultEdges:D}=_.getState(),B={...T,...F};if(D){const{edges:O,setEdges:W}=_.getState();W(eU(B,O))}M==null||M(B),l==null||l(B)},L=F=>{if(!y)return;const T=rk(F.nativeEvent);if(i&&(T&&F.button===0||!T)){const M=_.getState();Zp.onPointerDown(F.nativeEvent,{handleDomNode:F.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:v,handleId:g,nodeId:y,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...D)=>{var B,O;return(O=(B=_.getState()).onConnectEnd)==null?void 0:O.call(B,...D)},updateConnection:M.updateConnection,onConnect:j,isValidConnection:r||((...D)=>{var B,O;return((O=(B=_.getState()).isValidConnection)==null?void 0:O.call(B,...D))??!0}),getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}T?d==null||d(F):f==null||f(F)},P=F=>{const{onClickConnectStart:T,onClickConnectEnd:M,connectionClickStartHandle:D,connectionMode:B,isValidConnection:O,lib:W,rfId:G,nodeLookup:U,connection:X}=_.getState();if(!y||!D&&!i)return;if(!D){T==null||T(F.nativeEvent,{nodeId:y,handleId:g,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:y,type:e,id:g}});return}const H=tk(F.target),Y=r||O,{connection:K,isValid:ee}=Zp.isValid(F.nativeEvent,{handle:{nodeId:y,id:g,type:e},connectionMode:B,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:Y,flowId:G,doc:H,lib:W,nodeLookup:U});ee&&K&&j(K);const J=structuredClone(X);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,M==null||M(F,J),_.setState({connectionClickStartHandle:null})};return b.jsx("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":n,"data-id":`${S}-${y}-${g}-${e}`,className:ze(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!v,target:v,connectable:o,connectablestart:i,connectableend:s,clickconnecting:k,connectingfrom:C,connectingto:E,valid:I,connectionindicator:o&&(!A||N)&&(A||R?s:i)}]),onMouseDown:L,onTouchStart:L,onClick:w?P:void 0,ref:m,...p,children:c})}const Xc=h.memo(Nk(zG));function FG({data:e,isConnectable:n,sourcePosition:r=le.Bottom}){return b.jsxs(b.Fragment,{children:[e==null?void 0:e.label,b.jsx(Xc,{type:"source",position:r,isConnectable:n})]})}function VG({data:e,isConnectable:n,targetPosition:r=le.Top,sourcePosition:o=le.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(Xc,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label,b.jsx(Xc,{type:"source",position:o,isConnectable:n})]})}function BG(){return null}function HG({data:e,isConnectable:n,targetPosition:r=le.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(Xc,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label]})}const Kc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},hx={input:FG,default:VG,output:HG,group:BG};function WG(e){var n,r,o,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const UG=e=>{const{width:n,height:r,x:o,y:i}=Aa(e.nodeLookup,{filter:s=>!!s.selected});return{width:en(n)?n:null,height:en(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function GG({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=Me(),{width:i,height:s,transformString:a,userSelectionActive:l}=he(UG,Re),c=Mk(),u=h.useRef(null);h.useEffect(()=>{var m;r||(m=u.current)==null||m.focus({preventScroll:!0})},[r]);const d=!l&&i!==null&&s!==null;if(Rk({nodeRef:u,disabled:!d}),!d)return null;const f=e?m=>{const g=o.getState().nodes.filter(v=>v.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Kc,m.key)&&(m.preventDefault(),c({direction:Kc[m.key],factor:m.shiftKey?4:1}))};return b.jsx("div",{className:ze(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:b.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:s}})})}const mx=typeof window<"u"?window:void 0,YG=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Tk({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:g,panActivationKeyCode:v,zoomActivationKeyCode:_,elementsSelectable:y,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:N,defaultViewport:A,translateExtent:R,minZoom:I,maxZoom:j,preventScrolling:L,onSelectionContextMenu:P,noWheelClassName:z,noPanClassName:$,disableKeyboardA11y:F,onViewportChange:T,isControlledViewport:M}){const{nodesSelectionActive:D,userSelectionActive:B}=he(YG,Re),O=aa(u,{target:mx}),W=aa(v,{target:mx}),G=W||N,U=W||S,X=d&&G!==!0,H=O||B||X;return NG({deleteKeyCode:c,multiSelectionKeyCode:g}),b.jsx(MG,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:U,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!O&&G,defaultViewport:A,translateExtent:R,minZoom:I,maxZoom:j,zoomActivationKeyCode:_,preventScrolling:L,noWheelClassName:z,noPanClassName:$,onViewportChange:T,isControlledViewport:M,paneClickDistance:l,selectionOnDrag:X,children:b.jsxs(jG,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:G,isSelecting:!!H,selectionMode:f,selectionKeyPressed:O,paneClickDistance:l,selectionOnDrag:X,children:[e,D&&b.jsx(GG,{onSelectionContextMenu:P,noPanClassName:$,disableKeyboardA11y:F})]})})}Tk.displayName="FlowRenderer";const XG=h.memo(Tk),KG=e=>n=>e?sg(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(r=>r.id):Array.from(n.nodeLookup.keys());function qG(e){return he(h.useCallback(KG(e),[e]),Re)}const ZG=e=>e.updateNodeInternals;function QG(){const e=he(ZG),[n]=h.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(i=>{const s=i.target.getAttribute("data-id");o.set(s,{id:s,nodeElement:i.target,force:!0})}),e(o)}));return h.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function JG({node:e,nodeType:n,hasDimensions:r,resizeObserver:o}){const i=Me(),s=h.useRef(null),a=h.useRef(null),l=h.useRef(e.sourcePosition),c=h.useRef(e.targetPosition),u=h.useRef(n),d=r&&!!e.internals.handleBounds;return h.useEffect(()=>{s.current&&!e.hidden&&(!d||a.current!==s.current)&&(a.current&&(o==null||o.unobserve(a.current)),o==null||o.observe(s.current),a.current=s.current)},[d,e.hidden]),h.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),h.useEffect(()=>{if(s.current){const f=u.current!==n,p=l.current!==e.sourcePosition,m=c.current!==e.targetPosition;(f||p||m)&&(u.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),s}function eY({id:e,onClick:n,onMouseEnter:r,onMouseMove:o,onMouseLeave:i,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:g,rfId:v,nodeTypes:_,nodeClickDistance:y,onError:w}){const{node:x,internals:S,isParent:C}=he(Y=>{const K=Y.nodeLookup.get(e),ee=Y.parentLookup.has(e);return{node:K,internals:K.internals,isParent:ee}},Re);let E=x.type||"default",k=(_==null?void 0:_[E])||hx[E];k===void 0&&(w==null||w("003",Cn.error003(E)),E="default",k=(_==null?void 0:_.default)||hx.default);const N=!!(x.draggable||l&&typeof x.draggable>"u"),A=!!(x.selectable||c&&typeof x.selectable>"u"),R=!!(x.connectable||u&&typeof x.connectable>"u"),I=!!(x.focusable||d&&typeof x.focusable>"u"),j=Me(),L=JE(x),P=JG({node:x,nodeType:E,hasDimensions:L,resizeObserver:f}),z=Rk({nodeRef:P,disabled:x.hidden||!N,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:A,nodeClickDistance:y}),$=Mk();if(x.hidden)return null;const F=Zn(x),T=WG(x),M=A||N||n||r||o||i,D=r?Y=>r(Y,{...S.userNode}):void 0,B=o?Y=>o(Y,{...S.userNode}):void 0,O=i?Y=>i(Y,{...S.userNode}):void 0,W=s?Y=>s(Y,{...S.userNode}):void 0,G=a?Y=>a(Y,{...S.userNode}):void 0,U=Y=>{const{selectNodesOnDrag:K,nodeDragThreshold:ee}=j.getState();A&&(!K||!N||ee>0)&&Jp({id:e,store:j,nodeRef:P}),n&&n(Y,{...S.userNode})},X=Y=>{if(!(nk(Y.nativeEvent)||g)){if(WE.includes(Y.key)&&A){const K=Y.key==="Escape";Jp({id:e,store:j,unselect:K,nodeRef:P})}else if(N&&x.selected&&Object.prototype.hasOwnProperty.call(Kc,Y.key)){Y.preventDefault();const{ariaLabelConfig:K}=j.getState();j.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),$({direction:Kc[Y.key],factor:Y.shiftKey?4:1})}}},H=()=>{var ce;if(g||!((ce=P.current)!=null&&ce.matches(":focus-visible")))return;const{transform:Y,width:K,height:ee,autoPanOnNodeFocus:J,setCenter:Q}=j.getState();if(!J)return;sg(new Map([[e,x]]),{x:0,y:0,width:K,height:ee},Y,!0).length>0||Q(x.position.x+F.width/2,x.position.y+F.height/2,{zoom:Y[2]})};return b.jsx("div",{className:ze(["react-flow__node",`react-flow__node-${E}`,{[m]:N},x.className,{selected:x.selected,selectable:A,parent:C,draggable:N,dragging:z}]),ref:P,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:L?"visible":"hidden",...x.style,...T},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:B,onMouseLeave:O,onContextMenu:W,onClick:U,onDoubleClick:G,onKeyDown:I?X:void 0,tabIndex:I?0:void 0,onFocus:I?H:void 0,role:x.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${Sk}-${v}`,"aria-label":x.ariaLabel,...x.domAttributes,children:b.jsx(OG,{value:e,children:b.jsx(k,{id:e,data:x.data,type:E,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:x.selected??!1,selectable:A,draggable:N,deletable:x.deletable??!0,isConnectable:R,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:z,dragHandle:x.dragHandle,zIndex:S.z,parentId:x.parentId,...F})})})}var tY=h.memo(eY);const nY=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Ik(e){const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,onError:s}=he(nY,Re),a=qG(e.onlyRenderVisibleElements),l=QG();return b.jsx("div",{className:"react-flow__nodes",style:nf,children:a.map(c=>b.jsx(tY,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}Ik.displayName="NodeRenderer";const rY=h.memo(Ik);function oY(e){return he(h.useCallback(r=>{if(!e)return r.edges.map(i=>i.id);const o=[];if(r.width&&r.height)for(const i of r.edges){const s=r.nodeLookup.get(i.source),a=r.nodeLookup.get(i.target);s&&a&&ZW({sourceNode:s,targetNode:a,width:r.width,height:r.height,transform:r.transform})&&o.push(i.id)}return o},[e]),Re)}const iY=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e}};return b.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},sY=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e,fill:e}};return b.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},gx={[Uc.Arrow]:iY,[Uc.ArrowClosed]:sY};function aY(e){const n=Me();return h.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(gx,e)?gx[e]:((s=(i=n.getState()).onError)==null||s.call(i,"009",Cn.error009(e)),null)},[e])}const lY=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=aY(n);return c?b.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:b.jsx(c,{color:r,strokeWidth:a})}):null},jk=({defaultColor:e,rfId:n})=>{const r=he(s=>s.edges),o=he(s=>s.defaultEdgeOptions),i=h.useMemo(()=>iU(r,{id:n,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[r,o,n,e]);return i.length?b.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:b.jsx("defs",{children:i.map(s=>b.jsx(lY,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};jk.displayName="MarkerDefinitions";var cY=h.memo(jk);function $k({x:e,y:n,label:r,labelStyle:o,labelShowBg:i=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=h.useState({x:1,y:0,width:0,height:0}),m=ze(["react-flow__edge-textwrapper",u]),g=h.useRef(null);return h.useEffect(()=>{if(g.current){const v=g.current.getBBox();p({x:v.x,y:v.y,width:v.width,height:v.height})}},[r]),r?b.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...d,children:[i&&b.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),b.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:o,children:r}),c]}):null}$k.displayName="EdgeText";const uY=h.memo($k);function rf({path:e,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return b.jsxs(b.Fragment,{children:[b.jsx("path",{...d,d:e,fill:"none",className:ze(["react-flow__edge-path",d.className])}),u?b.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&en(n)&&en(r)?b.jsx(uY,{x:n,y:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function yx({pos:e,x1:n,y1:r,x2:o,y2:i}){return e===le.Left||e===le.Right?[.5*(n+o),r]:[n,.5*(r+i)]}function Ok({sourceX:e,sourceY:n,sourcePosition:r=le.Bottom,targetX:o,targetY:i,targetPosition:s=le.Top}){const[a,l]=yx({pos:r,x1:e,y1:n,x2:o,y2:i}),[c,u]=yx({pos:s,x1:o,y1:i,x2:e,y2:n}),[d,f,p,m]=ok({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${l} ${c},${u} ${o},${i}`,d,f,p,m]}function Dk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,interactionWidth:y})=>{const[w,x,S]=Ok({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),C=e.isInternal?void 0:n;return b.jsx(rf,{id:C,path:w,labelX:x,labelY:S,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,interactionWidth:y})})}const fY=Dk({isInternal:!1}),Lk=Dk({isInternal:!0});fY.displayName="SimpleBezierEdge";Lk.displayName="SimpleBezierEdgeInternal";function zk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=le.Bottom,targetPosition:g=le.Top,markerEnd:v,markerStart:_,pathOptions:y,interactionWidth:w})=>{const[x,S,C]=Xp({sourceX:r,sourceY:o,sourcePosition:m,targetX:i,targetY:s,targetPosition:g,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),E=e.isInternal?void 0:n;return b.jsx(rf,{id:E,path:x,labelX:S,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:v,markerStart:_,interactionWidth:w})})}const Fk=zk({isInternal:!1}),Vk=zk({isInternal:!0});Fk.displayName="SmoothStepEdge";Vk.displayName="SmoothStepEdgeInternal";function Bk(e){return h.memo(({id:n,...r})=>{var i;const o=e.isInternal?void 0:n;return b.jsx(Fk,{...r,id:o,pathOptions:h.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(i=r.pathOptions)==null?void 0:i.offset])})})}const dY=Bk({isInternal:!1}),Hk=Bk({isInternal:!0});dY.displayName="StepEdge";Hk.displayName="StepEdgeInternal";function Wk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:v})=>{const[_,y,w]=ak({sourceX:r,sourceY:o,targetX:i,targetY:s}),x=e.isInternal?void 0:n;return b.jsx(rf,{id:x,path:_,labelX:y,labelY:w,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:g,interactionWidth:v})})}const pY=Wk({isInternal:!1}),Uk=Wk({isInternal:!0});pY.displayName="StraightEdge";Uk.displayName="StraightEdgeInternal";function Gk(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a=le.Bottom,targetPosition:l=le.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,pathOptions:y,interactionWidth:w})=>{const[x,S,C]=ik({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l,curvature:y==null?void 0:y.curvature}),E=e.isInternal?void 0:n;return b.jsx(rf,{id:E,path:x,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,interactionWidth:w})})}const hY=Gk({isInternal:!1}),Yk=Gk({isInternal:!0});hY.displayName="BezierEdge";Yk.displayName="BezierEdgeInternal";const vx={default:Yk,straight:Uk,step:Hk,smoothstep:Vk,simplebezier:Lk},xx={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},mY=(e,n,r)=>r===le.Left?e-n:r===le.Right?e+n:e,gY=(e,n,r)=>r===le.Top?e-n:r===le.Bottom?e+n:e,wx="react-flow__edgeupdater";function bx({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:l}){return b.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:ze([wx,`${wx}-${l}`]),cx:mY(n,o,e),cy:gY(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function yY({isReconnectable:e,reconnectRadius:n,edge:r,sourceX:o,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const g=Me(),v=(S,C)=>{if(S.button!==0)return;const{autoPanOnConnect:E,domNode:k,connectionMode:N,connectionRadius:A,lib:R,onConnectStart:I,cancelConnection:j,nodeLookup:L,rfId:P,panBy:z,updateConnection:$}=g.getState(),F=C.type==="target",T=(B,O)=>{p(!1),f==null||f(B,r,C.type,O)},M=B=>u==null?void 0:u(r,B),D=(B,O)=>{p(!0),d==null||d(S,r,C.type),I==null||I(B,O)};Zp.onPointerDown(S.nativeEvent,{autoPanOnConnect:E,connectionMode:N,connectionRadius:A,domNode:k,handleId:C.id,nodeId:C.nodeId,nodeLookup:L,isTarget:F,edgeUpdaterType:C.type,lib:R,flowId:P,cancelConnection:j,panBy:z,isValidConnection:(...B)=>{var O,W;return((W=(O=g.getState()).isValidConnection)==null?void 0:W.call(O,...B))??!0},onConnect:M,onConnectStart:D,onConnectEnd:(...B)=>{var O,W;return(W=(O=g.getState()).onConnectEnd)==null?void 0:W.call(O,...B)},onReconnectEnd:T,updateConnection:$,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},_=S=>v(S,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),y=S=>v(S,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),w=()=>m(!0),x=()=>m(!1);return b.jsxs(b.Fragment,{children:[(e===!0||e==="source")&&b.jsx(bx,{position:l,centerX:o,centerY:i,radius:n,onMouseDown:_,onMouseEnter:w,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&b.jsx(bx,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:y,onMouseEnter:w,onMouseOut:x,type:"target"})]})}function vY({id:e,edgesFocusable:n,edgesReconnectable:r,elementsSelectable:o,onClick:i,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:g,edgeTypes:v,noPanClassName:_,onError:y,disableKeyboardA11y:w}){let x=he(Q=>Q.edgeLookup.get(e));const S=he(Q=>Q.defaultEdgeOptions);x=S?{...S,...x}:x;let C=x.type||"default",E=(v==null?void 0:v[C])||vx[C];E===void 0&&(y==null||y("011",Cn.error011(C)),C="default",E=(v==null?void 0:v.default)||vx.default);const k=!!(x.focusable||n&&typeof x.focusable>"u"),N=typeof f<"u"&&(x.reconnectable||r&&typeof x.reconnectable>"u"),A=!!(x.selectable||o&&typeof x.selectable>"u"),R=h.useRef(null),[I,j]=h.useState(!1),[L,P]=h.useState(!1),z=Me(),{zIndex:$,sourceX:F,sourceY:T,targetX:M,targetY:D,sourcePosition:B,targetPosition:O}=he(h.useCallback(Q=>{const ne=Q.nodeLookup.get(x.source),ce=Q.nodeLookup.get(x.target);if(!ne||!ce)return{zIndex:x.zIndex,...xx};const ge=oU({id:e,sourceNode:ne,targetNode:ce,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:Q.connectionMode,onError:y});return{zIndex:qW({selected:x.selected,zIndex:x.zIndex,sourceNode:ne,targetNode:ce,elevateOnSelect:Q.elevateEdgesOnSelect,zIndexMode:Q.zIndexMode}),...ge||xx}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Re),W=h.useMemo(()=>x.markerStart?`url('#${Kp(x.markerStart,g)}')`:void 0,[x.markerStart,g]),G=h.useMemo(()=>x.markerEnd?`url('#${Kp(x.markerEnd,g)}')`:void 0,[x.markerEnd,g]);if(x.hidden||F===null||T===null||M===null||D===null)return null;const U=Q=>{var fe;const{addSelectedEdges:ne,unselectNodesAndEdges:ce,multiSelectionActive:ge}=z.getState();A&&(z.setState({nodesSelectionActive:!1}),x.selected&&ge?(ce({nodes:[],edges:[x]}),(fe=R.current)==null||fe.blur()):ne([e])),i&&i(Q,x)},X=s?Q=>{s(Q,{...x})}:void 0,H=a?Q=>{a(Q,{...x})}:void 0,Y=l?Q=>{l(Q,{...x})}:void 0,K=c?Q=>{c(Q,{...x})}:void 0,ee=u?Q=>{u(Q,{...x})}:void 0,J=Q=>{var ne;if(!w&&WE.includes(Q.key)&&A){const{unselectNodesAndEdges:ce,addSelectedEdges:ge}=z.getState();Q.key==="Escape"?((ne=R.current)==null||ne.blur(),ce({edges:[x]})):ge([e])}};return b.jsx("svg",{style:{zIndex:$},children:b.jsxs("g",{className:ze(["react-flow__edge",`react-flow__edge-${C}`,x.className,_,{selected:x.selected,animated:x.animated,inactive:!A&&!i,updating:I,selectable:A}]),onClick:U,onDoubleClick:X,onContextMenu:H,onMouseEnter:Y,onMouseMove:K,onMouseLeave:ee,onKeyDown:k?J:void 0,tabIndex:k?0:void 0,role:x.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":k?`${Ck}-${g}`:void 0,ref:R,...x.domAttributes,children:[!L&&b.jsx(E,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:A,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:F,sourceY:T,targetX:M,targetY:D,sourcePosition:B,targetPosition:O,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:W,markerEnd:G,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),N&&b.jsx(yY,{edge:x,isReconnectable:N,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:F,sourceY:T,targetX:M,targetY:D,sourcePosition:B,targetPosition:O,setUpdateHover:j,setReconnecting:P})]})})}var xY=h.memo(vY);const wY=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Xk({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:r,edgeTypes:o,noPanClassName:i,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,disableKeyboardA11y:v}){const{edgesFocusable:_,edgesReconnectable:y,elementsSelectable:w,onError:x}=he(wY,Re),S=oY(n);return b.jsxs("div",{className:"react-flow__edges",children:[b.jsx(cY,{defaultColor:e,rfId:r}),S.map(C=>b.jsx(xY,{id:C,edgesFocusable:_,edgesReconnectable:y,elementsSelectable:w,noPanClassName:i,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:g,rfId:r,onError:x,edgeTypes:o,disableKeyboardA11y:v},C))]})}Xk.displayName="EdgeRenderer";const bY=h.memo(Xk),_Y=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function SY({children:e}){const n=he(_Y);return b.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function CY(e){const n=hg(),r=h.useRef(!1);h.useEffect(()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},[e,n.viewportInitialized])}const EY=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function kY(e){const n=he(EY),r=Me();return h.useEffect(()=>{e&&(n==null||n(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function NY(e){return e.connection.inProgress?{...e.connection,to:Ia(e.connection.to,e.transform)}:{...e.connection}}function PY(e){return NY}function RY(e){const n=PY();return he(n,Re)}const MY=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function AY({containerStyle:e,style:n,type:r,component:o}){const{nodesConnectable:i,width:s,height:a,isValid:l,inProgress:c}=he(MY,Re);return!(s&&i&&c)?null:b.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:b.jsx("g",{className:ze(["react-flow__connection",YE(l)]),children:b.jsx(Kk,{style:n,type:r,CustomComponent:o,isValid:l})})})}const Kk=({style:e,type:n=fr.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:i,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:m}=RY();if(!i)return;if(r)return b.jsx(r,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:YE(o),toNode:d,toHandle:f,pointer:m});let g="";const v={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case fr.Bezier:[g]=ik(v);break;case fr.SimpleBezier:[g]=Ok(v);break;case fr.Step:[g]=Xp({...v,borderRadius:0});break;case fr.SmoothStep:[g]=Xp(v);break;default:[g]=ak(v)}return b.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};Kk.displayName="ConnectionLine";const TY={};function _x(e=TY){h.useRef(e),Me(),h.useEffect(()=>{},[e])}function IY(){Me(),h.useRef(!1),h.useEffect(()=>{},[])}function qk({nodeTypes:e,edgeTypes:n,onInit:r,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:g,connectionLineStyle:v,connectionLineComponent:_,connectionLineContainerStyle:y,selectionKeyCode:w,selectionOnDrag:x,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:N,onlyRenderVisibleElements:A,elementsSelectable:R,defaultViewport:I,translateExtent:j,minZoom:L,maxZoom:P,preventScrolling:z,defaultMarkerColor:$,zoomOnScroll:F,zoomOnPinch:T,panOnScroll:M,panOnScrollSpeed:D,panOnScrollMode:B,zoomOnDoubleClick:O,panOnDrag:W,onPaneClick:G,onPaneMouseEnter:U,onPaneMouseMove:X,onPaneMouseLeave:H,onPaneScroll:Y,onPaneContextMenu:K,paneClickDistance:ee,nodeClickDistance:J,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ce,onEdgeMouseLeave:ge,reconnectRadius:fe,onReconnect:$e,onReconnectStart:un,onReconnectEnd:ut,noDragClassName:Fr,noWheelClassName:$i,noPanClassName:Oi,disableKeyboardA11y:Di,nodeExtent:of,rfId:ja,viewport:So,onViewportChange:Li}){return _x(e),_x(n),IY(),CY(r),kY(So),b.jsx(XG,{onPaneClick:G,onPaneMouseEnter:U,onPaneMouseMove:X,onPaneMouseLeave:H,onPaneContextMenu:K,onPaneScroll:Y,paneClickDistance:ee,deleteKeyCode:N,selectionKeyCode:w,selectionOnDrag:x,selectionMode:S,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:R,zoomOnScroll:F,zoomOnPinch:T,zoomOnDoubleClick:O,panOnScroll:M,panOnScrollSpeed:D,panOnScrollMode:B,panOnDrag:W,defaultViewport:I,translateExtent:j,minZoom:L,maxZoom:P,onSelectionContextMenu:f,preventScrolling:z,noDragClassName:Fr,noWheelClassName:$i,noPanClassName:Oi,disableKeyboardA11y:Di,onViewportChange:Li,isControlledViewport:!!So,children:b.jsxs(SY,{children:[b.jsx(bY,{edgeTypes:n,onEdgeClick:i,onEdgeDoubleClick:a,onReconnect:$e,onReconnectStart:un,onReconnectEnd:ut,onlyRenderVisibleElements:A,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ce,onEdgeMouseLeave:ge,reconnectRadius:fe,defaultMarkerColor:$,noPanClassName:Oi,disableKeyboardA11y:Di,rfId:ja}),b.jsx(AY,{style:v,type:g,component:_,containerStyle:y}),b.jsx("div",{className:"react-flow__edgelabel-renderer"}),b.jsx(rY,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:J,onlyRenderVisibleElements:A,noPanClassName:Oi,noDragClassName:Fr,disableKeyboardA11y:Di,nodeExtent:of,rfId:ja}),b.jsx("div",{className:"react-flow__viewport-portal"})]})})}qk.displayName="GraphView";const jY=h.memo(qk),Sx=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,g=new Map,v=new Map,_=new Map,y=o??n??[],w=r??e??[],x=d??[0,0],S=f??ra;uk(v,_,y);const{nodesInitialized:C}=qp(w,m,g,{nodeOrigin:x,nodeExtent:S,zIndexMode:p});let E=[0,0,1];if(a&&i&&s){const k=Aa(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:N,y:A,zoom:R}=ag(k,i,s,c,u,(l==null?void 0:l.padding)??.1);E=[N,A,R]}return{rfId:"1",width:i??0,height:s??0,transform:E,nodes:w,nodesInitialized:C,nodeLookup:m,parentLookup:g,edges:y,edgeLookup:_,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:ra,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:xi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...GE},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:WW,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:UE,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},$Y=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>QU((m,g)=>{async function v(){const{nodeLookup:_,panZoom:y,fitViewOptions:w,fitViewResolver:x,width:S,height:C,minZoom:E,maxZoom:k}=g();y&&(await BW({nodes:_,width:S,height:C,panZoom:y,minZoom:E,maxZoom:k},w),x==null||x.resolve(!0),m({fitViewResolver:null}))}return{...Sx({nodes:e,edges:n,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:r,defaultEdges:o,zIndexMode:p}),setNodes:_=>{const{nodeLookup:y,parentLookup:w,nodeOrigin:x,elevateNodesOnSelect:S,fitViewQueued:C,zIndexMode:E,nodesSelectionActive:k}=g(),{nodesInitialized:N,hasSelectedNodes:A}=qp(_,y,w,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:E}),R=k&&A;C&&N?(v(),m({nodes:_,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:R})):m({nodes:_,nodesInitialized:N,nodesSelectionActive:R})},setEdges:_=>{const{connectionLookup:y,edgeLookup:w}=g();uk(y,w,_),m({edges:_})},setDefaultNodesAndEdges:(_,y)=>{if(_){const{setNodes:w}=g();w(_),m({hasDefaultNodes:!0})}if(y){const{setEdges:w}=g();w(y),m({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:y,nodeLookup:w,parentLookup:x,domNode:S,nodeOrigin:C,nodeExtent:E,debug:k,fitViewQueued:N,zIndexMode:A}=g(),{changes:R,updatedInternals:I}=dU(_,w,x,S,C,E,A);I&&(lU(w,x,{nodeOrigin:C,nodeExtent:E,zIndexMode:A}),N?(v(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(R==null?void 0:R.length)>0&&(k&&console.log("React Flow: trigger node changes",R),y==null||y(R)))},updateNodePositions:(_,y=!1)=>{const w=[];let x=[];const{nodeLookup:S,triggerNodeChanges:C,connection:E,updateConnection:k,onNodesChangeMiddlewareMap:N}=g();for(const[A,R]of _){const I=S.get(A),j=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(R!=null&&R.position)),L={id:A,type:"position",position:j?{x:Math.max(0,R.position.x),y:Math.max(0,R.position.y)}:R.position,dragging:y};if(I&&E.inProgress&&E.fromNode.id===I.id){const P=go(I,E.fromHandle,le.Left,!0);k({...E,from:P})}j&&I.parentId&&w.push({id:A,parentId:I.parentId,rect:{...R.internals.positionAbsolute,width:R.measured.width??0,height:R.measured.height??0}}),x.push(L)}if(w.length>0){const{parentLookup:A,nodeOrigin:R}=g(),I=pg(w,S,A,R);x.push(...I)}for(const A of N.values())x=A(x);C(x)},triggerNodeChanges:_=>{const{onNodesChange:y,setNodes:w,nodes:x,hasDefaultNodes:S,debug:C}=g();if(_!=null&&_.length){if(S){const E=xG(_,x);w(E)}C&&console.log("React Flow: trigger node changes",_),y==null||y(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:y,setEdges:w,edges:x,hasDefaultEdges:S,debug:C}=g();if(_!=null&&_.length){if(S){const E=wG(_,x);w(E)}C&&console.log("React Flow: trigger edge changes",_),y==null||y(_)}},addSelectedNodes:_=>{const{multiSelectionActive:y,edgeLookup:w,nodeLookup:x,triggerNodeChanges:S,triggerEdgeChanges:C}=g();if(y){const E=_.map(k=>Yr(k,!0));S(E);return}S(Yo(x,new Set([..._]),!0)),C(Yo(w))},addSelectedEdges:_=>{const{multiSelectionActive:y,edgeLookup:w,nodeLookup:x,triggerNodeChanges:S,triggerEdgeChanges:C}=g();if(y){const E=_.map(k=>Yr(k,!0));C(E);return}C(Yo(w,new Set([..._]))),S(Yo(x,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:y}={})=>{const{edges:w,nodes:x,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:E}=g(),k=_||x,N=y||w,A=[];for(const I of k){if(!I.selected)continue;const j=S.get(I.id);j&&(j.selected=!1),A.push(Yr(I.id,!1))}const R=[];for(const I of N)I.selected&&R.push(Yr(I.id,!1));C(A),E(R)},setMinZoom:_=>{const{panZoom:y,maxZoom:w}=g();y==null||y.setScaleExtent([_,w]),m({minZoom:_})},setMaxZoom:_=>{const{panZoom:y,minZoom:w}=g();y==null||y.setScaleExtent([w,_]),m({maxZoom:_})},setTranslateExtent:_=>{var y;(y=g().panZoom)==null||y.setTranslateExtent(_),m({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:y,triggerNodeChanges:w,triggerEdgeChanges:x,elementsSelectable:S}=g();if(!S)return;const C=y.reduce((k,N)=>N.selected?[...k,Yr(N.id,!1)]:k,[]),E=_.reduce((k,N)=>N.selected?[...k,Yr(N.id,!1)]:k,[]);w(C),x(E)},setNodeExtent:_=>{const{nodes:y,nodeLookup:w,parentLookup:x,nodeOrigin:S,elevateNodesOnSelect:C,nodeExtent:E,zIndexMode:k}=g();_[0][0]===E[0][0]&&_[0][1]===E[0][1]&&_[1][0]===E[1][0]&&_[1][1]===E[1][1]||(qp(y,w,x,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:k}),m({nodeExtent:_}))},panBy:_=>{const{transform:y,width:w,height:x,panZoom:S,translateExtent:C}=g();return pU({delta:_,panZoom:S,transform:y,translateExtent:C,width:w,height:x})},setCenter:async(_,y,w)=>{const{width:x,height:S,maxZoom:C,panZoom:E}=g();if(!E)return Promise.resolve(!1);const k=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:C;return await E.setViewport({x:x/2-_*k,y:S/2-y*k,zoom:k},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...GE}})},updateConnection:_=>{m({connection:_})},reset:()=>m({...Sx()})}},Object.is);function gg({initialNodes:e,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:m}){const[g]=h.useState(()=>$Y({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return b.jsx(JU,{value:g,children:b.jsx(SG,{children:m})})}function OY({children:e,nodes:n,edges:r,defaultNodes:o,defaultEdges:i,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return h.useContext(ef)?b.jsx(b.Fragment,{children:e}):b.jsx(gg,{initialNodes:n,initialEdges:r,defaultNodes:o,defaultEdges:i,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const DY={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function LY({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:g,onConnectEnd:v,onClickConnectStart:_,onClickConnectEnd:y,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:A,onNodesDelete:R,onEdgesDelete:I,onDelete:j,onSelectionChange:L,onSelectionDragStart:P,onSelectionDrag:z,onSelectionDragStop:$,onSelectionContextMenu:F,onSelectionStart:T,onSelectionEnd:M,onBeforeDelete:D,connectionMode:B,connectionLineType:O=fr.Bezier,connectionLineStyle:W,connectionLineComponent:G,connectionLineContainerStyle:U,deleteKeyCode:X="Backspace",selectionKeyCode:H="Shift",selectionOnDrag:Y=!1,selectionMode:K=oa.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:J=sa()?"Meta":"Control",zoomActivationKeyCode:Q=sa()?"Meta":"Control",snapToGrid:ne,snapGrid:ce,onlyRenderVisibleElements:ge=!1,selectNodesOnDrag:fe,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:ut,nodesFocusable:Fr,nodeOrigin:$i=Ek,edgesFocusable:Oi,edgesReconnectable:Di,elementsSelectable:of=!0,defaultViewport:ja=dG,minZoom:So=.5,maxZoom:Li=2,translateExtent:yg=ra,preventScrolling:rN=!0,nodeExtent:sf,defaultMarkerColor:oN="#b1b1b7",zoomOnScroll:iN=!0,zoomOnPinch:sN=!0,panOnScroll:aN=!1,panOnScrollSpeed:lN=.5,panOnScrollMode:cN=no.Free,zoomOnDoubleClick:uN=!0,panOnDrag:fN=!0,onPaneClick:dN,onPaneMouseEnter:pN,onPaneMouseMove:hN,onPaneMouseLeave:mN,onPaneScroll:gN,onPaneContextMenu:yN,paneClickDistance:vN=1,nodeClickDistance:xN=0,children:wN,onReconnect:bN,onReconnectStart:_N,onReconnectEnd:SN,onEdgeContextMenu:CN,onEdgeDoubleClick:EN,onEdgeMouseEnter:kN,onEdgeMouseMove:NN,onEdgeMouseLeave:PN,reconnectRadius:RN=10,onNodesChange:MN,onEdgesChange:AN,noDragClassName:TN="nodrag",noWheelClassName:IN="nowheel",noPanClassName:vg="nopan",fitView:xg,fitViewOptions:wg,connectOnClick:jN,attributionPosition:$N,proOptions:ON,defaultEdgeOptions:DN,elevateNodesOnSelect:LN=!0,elevateEdgesOnSelect:zN=!1,disableKeyboardA11y:bg=!1,autoPanOnConnect:FN,autoPanOnNodeDrag:VN,autoPanSpeed:BN,connectionRadius:HN,isValidConnection:WN,onError:UN,style:GN,id:_g,nodeDragThreshold:YN,connectionDragThreshold:XN,viewport:KN,onViewportChange:qN,width:ZN,height:QN,colorMode:JN="light",debug:eP,onScroll:$a,ariaLabelConfig:tP,zIndexMode:Sg="basic",...nP},rP){const af=_g||"1",oP=gG(JN),iP=h.useCallback(Cg=>{Cg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),$a==null||$a(Cg)},[$a]);return b.jsx("div",{"data-testid":"rf__wrapper",...nP,onScroll:iP,style:{...GN,...DY},ref:rP,className:ze(["react-flow",i,oP]),id:_g,role:"application",children:b.jsxs(OY,{nodes:e,edges:n,width:ZN,height:QN,fitView:xg,fitViewOptions:wg,minZoom:So,maxZoom:Li,nodeOrigin:$i,nodeExtent:sf,zIndexMode:Sg,children:[b.jsx(mG,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:m,onConnectStart:g,onConnectEnd:v,onClickConnectStart:_,onClickConnectEnd:y,nodesDraggable:$e,autoPanOnNodeFocus:un,nodesConnectable:ut,nodesFocusable:Fr,edgesFocusable:Oi,edgesReconnectable:Di,elementsSelectable:of,elevateNodesOnSelect:LN,elevateEdgesOnSelect:zN,minZoom:So,maxZoom:Li,nodeExtent:sf,onNodesChange:MN,onEdgesChange:AN,snapToGrid:ne,snapGrid:ce,connectionMode:B,translateExtent:yg,connectOnClick:jN,defaultEdgeOptions:DN,fitView:xg,fitViewOptions:wg,onNodesDelete:R,onEdgesDelete:I,onDelete:j,onNodeDragStart:k,onNodeDrag:N,onNodeDragStop:A,onSelectionDrag:z,onSelectionDragStart:P,onSelectionDragStop:$,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:vg,nodeOrigin:$i,rfId:af,autoPanOnConnect:FN,autoPanOnNodeDrag:VN,autoPanSpeed:BN,onError:UN,connectionRadius:HN,isValidConnection:WN,selectNodesOnDrag:fe,nodeDragThreshold:YN,connectionDragThreshold:XN,onBeforeDelete:D,debug:eP,ariaLabelConfig:tP,zIndexMode:Sg}),b.jsx(jY,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:E,nodeTypes:s,edgeTypes:a,connectionLineType:O,connectionLineStyle:W,connectionLineComponent:G,connectionLineContainerStyle:U,selectionKeyCode:H,selectionOnDrag:Y,selectionMode:K,deleteKeyCode:X,multiSelectionKeyCode:J,panActivationKeyCode:ee,zoomActivationKeyCode:Q,onlyRenderVisibleElements:ge,defaultViewport:ja,translateExtent:yg,minZoom:So,maxZoom:Li,preventScrolling:rN,zoomOnScroll:iN,zoomOnPinch:sN,zoomOnDoubleClick:uN,panOnScroll:aN,panOnScrollSpeed:lN,panOnScrollMode:cN,panOnDrag:fN,onPaneClick:dN,onPaneMouseEnter:pN,onPaneMouseMove:hN,onPaneMouseLeave:mN,onPaneScroll:gN,onPaneContextMenu:yN,paneClickDistance:vN,nodeClickDistance:xN,onSelectionContextMenu:F,onSelectionStart:T,onSelectionEnd:M,onReconnect:bN,onReconnectStart:_N,onReconnectEnd:SN,onEdgeContextMenu:CN,onEdgeDoubleClick:EN,onEdgeMouseEnter:kN,onEdgeMouseMove:NN,onEdgeMouseLeave:PN,reconnectRadius:RN,defaultMarkerColor:oN,noDragClassName:TN,noWheelClassName:IN,noPanClassName:vg,rfId:af,disableKeyboardA11y:bg,nodeExtent:sf,viewport:KN,onViewportChange:qN}),b.jsx(fG,{onSelectionChange:L}),wN,b.jsx(sG,{proOptions:ON,position:$N}),b.jsx(iG,{rfId:af,disableKeyboardA11y:bg})]})})}var Zk=Nk(LY);function zY({dimensions:e,lineWidth:n,variant:r,className:o}){return b.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ze(["react-flow__background-pattern",r,o])})}function FY({radius:e,className:n}){return b.jsx("circle",{cx:e,cy:e,r:e,className:ze(["react-flow__background-pattern","dots",n])})}var Er;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Er||(Er={}));const VY={[Er.Dots]:1,[Er.Lines]:1,[Er.Cross]:6},BY=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Qk({id:e,variant:n=Er.Dots,gap:r=20,size:o,lineWidth:i=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=h.useRef(null),{transform:p,patternId:m}=he(BY,Re),g=o||VY[n],v=n===Er.Dots,_=n===Er.Cross,y=Array.isArray(r)?r:[r,r],w=[y[0]*p[2]||1,y[1]*p[2]||1],x=g*p[2],S=Array.isArray(s)?s:[s,s],C=_?[x,x]:w,E=[S[0]*p[2]||1+C[0]/2,S[1]*p[2]||1+C[1]/2],k=`${m}${e||""}`;return b.jsxs("svg",{className:ze(["react-flow__background",u]),style:{...c,...nf,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[b.jsx("pattern",{id:k,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:v?b.jsx(FY,{radius:x/2,className:d}):b.jsx(zY,{dimensions:C,lineWidth:i,variant:n,className:d})}),b.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}Qk.displayName="Background";const Jk=h.memo(Qk);function HY(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:b.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function WY(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:b.jsx("path",{d:"M0 0h32v4.2H0z"})})}function UY(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:b.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function GY(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function YY(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function vl({children:e,className:n,...r}){return b.jsx("button",{type:"button",className:ze(["react-flow__controls-button",n]),...r,children:e})}const XY=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function eN({style:e,showZoom:n=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const g=Me(),{isInteractive:v,minZoomReached:_,maxZoomReached:y,ariaLabelConfig:w}=he(XY,Re),{zoomIn:x,zoomOut:S,fitView:C}=hg(),E=()=>{x(),s==null||s()},k=()=>{S(),a==null||a()},N=()=>{C(i),l==null||l()},A=()=>{g.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),c==null||c(!v)},R=p==="horizontal"?"horizontal":"vertical";return b.jsxs(tf,{className:ze(["react-flow__controls",R,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&b.jsxs(b.Fragment,{children:[b.jsx(vl,{onClick:E,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:y,children:b.jsx(HY,{})}),b.jsx(vl,{onClick:k,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:_,children:b.jsx(WY,{})})]}),r&&b.jsx(vl,{className:"react-flow__controls-fitview",onClick:N,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:b.jsx(UY,{})}),o&&b.jsx(vl,{className:"react-flow__controls-interactive",onClick:A,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:v?b.jsx(YY,{}):b.jsx(GY,{})}),d]})}eN.displayName="Controls";const tN=h.memo(eN);function KY({id:e,x:n,y:r,width:o,height:i,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:m}){const{background:g,backgroundColor:v}=s||{},_=a||g||v;return b.jsx("rect",{className:ze(["react-flow__minimap-node",{selected:p},u]),x:n,y:r,rx:d,ry:d,width:o,height:i,style:{fill:_,stroke:l,strokeWidth:c},shapeRendering:f,onClick:m?y=>m(y,e):void 0})}const qY=h.memo(KY),ZY=e=>e.nodes.map(n=>n.id),fd=e=>e instanceof Function?e:()=>e;function QY({nodeStrokeColor:e,nodeColor:n,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:s=qY,onClick:a}){const l=he(ZY,Re),c=fd(n),u=fd(e),d=fd(r),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return b.jsx(b.Fragment,{children:l.map(p=>b.jsx(eX,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:f},p))})}function JY({id:e,nodeColorFunc:n,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:m}=he(g=>{const v=g.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const _=v.internals.userNode,{x:y,y:w}=v.internals.positionAbsolute,{width:x,height:S}=Zn(_);return{node:_,x:y,y:w,width:x,height:S}},Re);return!u||u.hidden||!JE(u)?null:b.jsx(l,{x:d,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:o(u),color:n(u),borderRadius:i,strokeColor:r(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const eX=h.memo(JY);var tX=h.memo(QY);const nX=200,rX=150,oX=e=>!e.hidden,iX=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?QE(Aa(e.nodeLookup,{filter:oX}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},sX="react-flow__minimap-desc";function nN({style:e,className:n,nodeStrokeColor:r,nodeColor:o,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:g,pannable:v=!1,zoomable:_=!1,ariaLabel:y,inversePan:w,zoomStep:x=1,offsetScale:S=5}){const C=Me(),E=h.useRef(null),{boundingRect:k,viewBB:N,rfId:A,panZoom:R,translateExtent:I,flowWidth:j,flowHeight:L,ariaLabelConfig:P}=he(iX,Re),z=(e==null?void 0:e.width)??nX,$=(e==null?void 0:e.height)??rX,F=k.width/z,T=k.height/$,M=Math.max(F,T),D=M*z,B=M*$,O=S*M,W=k.x-(D-k.width)/2-O,G=k.y-(B-k.height)/2-O,U=D+O*2,X=B+O*2,H=`${sX}-${A}`,Y=h.useRef(0),K=h.useRef();Y.current=M,h.useEffect(()=>{if(E.current&&R)return K.current=_U({domNode:E.current,panZoom:R,getTransform:()=>C.getState().transform,getViewScale:()=>Y.current}),()=>{var ne;(ne=K.current)==null||ne.destroy()}},[R]),h.useEffect(()=>{var ne;(ne=K.current)==null||ne.update({translateExtent:I,width:j,height:L,inversePan:w,pannable:v,zoomStep:x,zoomable:_})},[v,_,w,x,I,j,L]);const ee=m?ne=>{var fe;const[ce,ge]=((fe=K.current)==null?void 0:fe.pointer(ne))||[0,0];m(ne,{x:ce,y:ge})}:void 0,J=g?h.useCallback((ne,ce)=>{const ge=C.getState().nodeLookup.get(ce).internals.userNode;g(ne,ge)},[]):void 0,Q=y??P["minimap.ariaLabel"];return b.jsx(tf,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*M:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:ze(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:b.jsxs("svg",{width:z,height:$,viewBox:`${W} ${G} ${U} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":H,ref:E,onClick:ee,children:[Q&&b.jsx("title",{id:H,children:Q}),b.jsx(tX,{onClick:J,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:a,nodeComponent:l}),b.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-O},${G-O}h${U+O*2}v${X+O*2}h${-U-O*2}z
358
- M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}nN.displayName="MiniMap";h.memo(nN);const aX=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,lX={[Si.Line]:"right",[Si.Handle]:"bottom-right"};function cX({nodeId:e,position:n,variant:r=Si.Handle,className:o,style:i=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:g,onResizeStart:v,onResize:_,onResizeEnd:y}){const w=Ak(),x=typeof e=="string"?e:w,S=Me(),C=h.useRef(null),E=r===Si.Handle,k=he(h.useCallback(aX(E&&m),[E,m]),Re),N=h.useRef(null),A=n??lX[r];h.useEffect(()=>{if(!(!C.current||!x))return N.current||(N.current=OU({domNode:C.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:I,transform:j,snapGrid:L,snapToGrid:P,nodeOrigin:z,domNode:$}=S.getState();return{nodeLookup:I,transform:j,snapGrid:L,snapToGrid:P,nodeOrigin:z,paneDomNode:$}},onChange:(I,j)=>{const{triggerNodeChanges:L,nodeLookup:P,parentLookup:z,nodeOrigin:$}=S.getState(),F=[],T={x:I.x,y:I.y},M=P.get(x);if(M&&M.expandParent&&M.parentId){const D=M.origin??$,B=I.width??M.measured.width??0,O=I.height??M.measured.height??0,W={id:M.id,parentId:M.parentId,rect:{width:B,height:O,...ek({x:I.x??M.position.x,y:I.y??M.position.y},{width:B,height:O},M.parentId,P,D)}},G=pg([W],P,z,$);F.push(...G),T.x=I.x?Math.max(D[0]*B,I.x):void 0,T.y=I.y?Math.max(D[1]*O,I.y):void 0}if(T.x!==void 0&&T.y!==void 0){const D={id:x,type:"position",position:{...T}};F.push(D)}if(I.width!==void 0&&I.height!==void 0){const B={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};F.push(B)}for(const D of j){const B={...D,type:"position"};F.push(B)}L(F)},onEnd:({width:I,height:j})=>{const L={id:x,type:"dimensions",resizing:!1,dimensions:{width:I,height:j}};S.getState().triggerNodeChanges([L])}})),N.current.update({controlPosition:A,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:v,onResize:_,onResizeEnd:y,shouldResize:g}),()=>{var I;(I=N.current)==null||I.destroy()}},[A,l,c,u,d,f,v,_,y,g]);const R=A.split("-");return b.jsx("div",{className:ze(["react-flow__resize-control","nodrag",...R,r,o]),ref:C,style:{...i,scale:k,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:s})}h.memo(cX);const Cx=3,xl={screen:0,hook:160,api:340,table:520},eh=220,Ex=40;function wl(e,n){const r=new Map,o=e.length,s=-(o*eh+(o-1)*Ex)/2;return e.forEach((a,l)=>{r.set(a,{x:s+l*(eh+Ex),y:n})}),r}function bl(e){const n={width:eh,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e==="screen"?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:e==="api"?{...n,borderColor:"rgba(139, 92, 246, 0.55)"}:e==="table"?{...n,borderColor:"rgba(34, 197, 94, 0.55)",background:"rgba(38, 58, 48, 0.96)"}:n}function _l(e,n,r){const o=e==="screen"?yu:e==="hook"?kI:e==="api"?jb:Ib;return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx(o,{style:{width:12,height:12,opacity:.7}}),b.jsx("span",{style:{fontWeight:600},children:n})]}),r&&b.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})]})}function uX({screen:e,graphs:n}){const{nodes:r,edges:o,empty:i}=h.useMemo(()=>{if(!n.ui||!n.api||!n.db)return{nodes:[],edges:[],empty:!0};const f=new Map;for(const L of n.ui.edges)L.type==="imports"&&(f.has(L.source)||f.set(L.source,[]),f.get(L.source).push(L.target));const p=new Set([e.id]);{let L=[e.id];for(let P=0;P<Cx&&L.length>0;P++){const z=[];for(const $ of L)for(const F of f.get($)??[])p.has(F)||(p.add(F),z.push(F));L=z}}const m=new Map;for(const L of n.ui.cross_refs??[])L.type!=="calls_api"&&L.type!=="references_api"||L.layer!=="api"||p.has(L.source)&&(m.has(L.source)||m.set(L.source,[]),m.get(L.source).push(L.target));const g=new Set;for(const L of m.values())for(const P of L)g.add(P);if(g.size===0)return{nodes:[],edges:[],empty:!0};const v=(f.get(e.id)??[]).filter(L=>L!==e.id),_=[],y=new Map;for(const L of v){const P=new Set([L]);let z=[L];for(let F=0;F<Cx&&z.length>0;F++){const T=[];for(const M of z)for(const D of f.get(M)??[])P.has(D)||(P.add(D),T.push(D));z=T}const $=new Set;for(const F of P)for(const T of m.get(F)??[])$.add(T);$.size>0&&(_.push(L),y.set(L,$))}const w=new Set(m.get(e.id)??[]),x=n.api.nodes.filter(L=>g.has(L.id)),S=new Set,C=new Map;for(const L of x){const P=(L.db_models??[]).map(z=>z);C.set(L.id,P);for(const z of P)S.add(z)}const E=n.db.nodes.filter(L=>S.has(L.name)||S.has(L.name.toLowerCase())),k=new Map;for(const L of E)k.set(L.name,L.id),k.set(L.name.toLowerCase(),L.id);const N=[],A=[],R=wl([e.id],xl.screen);if(N.push({id:`screen:${e.id}`,position:R.get(e.id),data:{label:_l("screen",na(e),e.route??void 0)},style:bl("screen"),sourcePosition:"bottom",targetPosition:"top"}),_.length>0){const L=wl(_,xl.hook);for(const P of _){const z=P.split("/").pop()??P;N.push({id:`hook:${P}`,position:L.get(P),data:{label:_l("hook",z.replace(/\.tsx?$/,""),P)},style:bl("hook"),sourcePosition:"bottom",targetPosition:"top"}),A.push({id:`e:screen-${P}`,source:`screen:${e.id}`,target:`hook:${P}`,animated:!1,style:{stroke:"rgba(139,92,246,0.95)"}})}}const I=x.map(L=>L.id);if(I.length>0){const L=wl(I,xl.api);for(const P of x)N.push({id:`api:${P.id}`,position:L.get(P.id),data:{label:_l("api",`${P.methods.join(",")} ${P.path.split("/").pop()||"/"}`,P.path)},style:bl("api"),sourcePosition:"bottom",targetPosition:"top"});for(const P of w)g.has(P)&&A.push({id:`e:screen-api-${P}`,source:`screen:${e.id}`,target:`api:${P}`,style:{stroke:"rgba(139,92,246,0.95)"}});for(const[P,z]of y.entries())for(const $ of z)A.push({id:`e:${P}-${$}`,source:`hook:${P}`,target:`api:${$}`,style:{stroke:"rgba(139,92,246,0.95)"}})}const j=E.map(L=>L.id);if(j.length>0){const L=wl(j,xl.table);for(const P of E)N.push({id:`table:${P.id}`,position:L.get(P.id),data:{label:_l("table",P.name)},style:bl("table"),sourcePosition:"bottom",targetPosition:"top"});for(const P of x){const z=C.get(P.id)??[];for(const $ of z){const F=k.get($)??k.get($.toLowerCase());F&&A.push({id:`e:${P.id}-${F}`,source:`api:${P.id}`,target:`table:${F}`,style:{stroke:"rgba(34,197,94,0.95)"}})}}}return{nodes:N,edges:A,empty:!1}},[e,n]),[s,a]=h.useState(null),{displayNodes:l,displayEdges:c}=h.useMemo(()=>{if(!s)return{displayNodes:r,displayEdges:o};const f=new Set([s]);for(const g of o)g.source===s&&f.add(g.target),g.target===s&&f.add(g.source);const p=r.map(g=>{const v=f.has(g.id);return{...g,style:{...g.style??{},opacity:v?1:.15,transition:"opacity 120ms ease"}}}),m=o.map(g=>{const v=g.source===s||g.target===s;return{...g,animated:v,style:{...g.style??{},opacity:v?1:.08,transition:"opacity 120ms ease"}}});return{displayNodes:p,displayEdges:m}},[r,o,s]),u=(f,p)=>a(p.id),d=()=>a(null);return i?b.jsx("div",{className:"flex h-full items-center justify-center p-8",children:b.jsxs("div",{className:"text-center",children:[b.jsx("h3",{className:"text-sm font-semibold text-foreground",children:na(e)}),b.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"No API or database dependencies detected for this screen."})]})}):b.jsx("div",{className:"h-full w-full",children:b.jsx(gg,{children:b.jsxs(Zk,{nodes:l,edges:c,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:u,onNodeMouseLeave:d,children:[b.jsx(Jk,{color:"rgba(255,255,255,0.05)",gap:24}),b.jsx(tN,{showInteractive:!1})]})})})}const Ul=220,kx=40,fX=110,dX=0,pX=180,Ao=6;function Nx(e){const n={width:Ul,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:{...n,cursor:"pointer"}}function Px(e,n,r){const o=r?nm:yu;return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[b.jsx(o,{style:{width:12,height:12,opacity:.7}}),b.jsx("span",{style:{fontWeight:600},children:e})]}),n&&b.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]})}function hX({module:e,screens:n,onScreenClick:r}){const{nodes:o,edges:i}=h.useMemo(()=>{const a=[],l=[];Math.max(1,Math.ceil(n.length/Ao)),Math.min(Ao,n.length);const c=0;return a.push({id:`module:${e}`,position:{x:c-Ul/2,y:dX},data:{label:Px(Wc(e),`${n.length} screens`,!0)},style:Nx(!0),sourcePosition:"bottom",targetPosition:"top",selectable:!1,draggable:!1}),n.forEach((u,d)=>{const f=Math.floor(d/Ao),p=d%Ao,m=Math.min(Ao,n.length-f*Ao),g=m*Ul+(m-1)*kx,_=c-g/2+p*(Ul+kx),y=pX+f*fX;a.push({id:`screen:${u.id}`,position:{x:_,y},data:{label:Px(na(u),u.route??void 0,!1),screenId:u.id},style:Nx(!1),sourcePosition:"bottom",targetPosition:"top",draggable:!1}),l.push({id:`e:module-${u.id}`,source:`module:${e}`,target:`screen:${u.id}`,style:{stroke:"rgba(139,92,246,0.95)"}})}),{nodes:a,edges:l}},[e,n]),s=(a,l)=>{const c=l.data.screenId;c&&r(c)};return b.jsx("div",{className:"h-full w-full",children:b.jsx(gg,{children:b.jsxs(Zk,{nodes:o,edges:i,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesConnectable:!1,onNodeClick:s,children:[b.jsx(Jk,{color:"rgba(255,255,255,0.05)",gap:24}),b.jsx(tN,{showInteractive:!1})]})})})}const mX=new Set(["page","layout"]);function gX(){var m;const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null);h.useEffect(()=>{fetch("/api/raw-graphs").then(g=>{if(!g.ok)throw new Error(`HTTP ${g.status}`);return g.json()}).then(g=>n(g)).catch(g=>o(String(g)))},[]);const c=h.useMemo(()=>e!=null&&e.ui?e.ui.nodes.filter(g=>mX.has(g.type)&&g.module):[],[e]),u=h.useMemo(()=>{const g=new Map;for(const v of c){const _=v.module;g.has(_)||g.set(_,[]),g.get(_).push(v)}return[...g.entries()].map(([v,_])=>({module:v,screens:_})).sort((v,_)=>_.screens.length-v.screens.length)},[c]),d=i??((m=u[0])==null?void 0:m.module)??null,f=h.useMemo(()=>{var g;return d?((g=u.find(v=>v.module===d))==null?void 0:g.screens)??[]:[]},[u,d]),p=h.useMemo(()=>!(e!=null&&e.ui)||!a?null:e.ui.nodes.find(g=>g.id===a)??null,[e,a]);return r?b.jsx(vX,{message:r}):e?b.jsxs("div",{className:"flex h-full min-h-0",children:[b.jsxs("div",{className:"flex w-64 flex-col border-r border-sidebar-border bg-sidebar-background/40",children:[b.jsxs("div",{className:"border-b border-sidebar-border px-4 py-3",children:[b.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Modules"}),b.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[u.length," modules · ",c.length," screens"]})]}),b.jsx("ul",{className:"flex-1 overflow-y-auto px-2 py-2",children:u.map(g=>{const v=g.module===d;return b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:()=>{s(g.module),l(null)},className:`flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors ${v?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"}`,children:[b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx(yu,{className:"h-3.5 w-3.5 shrink-0 opacity-70"}),Wc(g.module)]}),b.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:g.screens.length})]})},g.module)})})]}),b.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:p?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-3 border-b border-sidebar-border px-6 py-4",children:[b.jsxs("button",{type:"button",onClick:()=>l(null),className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground",children:[b.jsx(cI,{className:"h-3 w-3"}),"Back"]}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("h1",{className:"truncate text-lg font-semibold text-foreground",children:na(p)}),p.route&&b.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:p.route})]})]}),b.jsx("div",{className:"flex-1 min-h-0",children:b.jsx(uX,{screen:p,graphs:e})})]}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"border-b border-sidebar-border px-6 py-4",children:[b.jsx("h1",{className:"text-lg font-semibold text-foreground",children:d?Wc(d):"Select a module"}),b.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[f.length," screens · click a screen to drill in"]})]}),b.jsx("div",{className:"flex-1 min-h-0",children:d&&f.length>0?b.jsx(hX,{module:d,screens:f,onScreenClick:l},d):b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No screens in this module.":"Select a module."})})})]})})]}):b.jsx(yX,{})}function yX(){return b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph data…"})})}function vX({message:e}){return b.jsx("div",{className:"flex h-full items-center justify-center p-8",children:b.jsxs("div",{className:"max-w-md text-center",children:[b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Failed to load graph"}),b.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e})]})})}function xX(){return b.jsx("div",{className:"flex h-full items-center justify-center p-8",children:b.jsxs("div",{className:"text-center",children:[b.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"User Journeys"}),b.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"User journey flowcharts coming soon."})]})})}function wX(){const[e,n]=h.useState(null),[r,o]=h.useState(!0),[i,s]=h.useState(!1),[a,l]=h.useState(!1),[c,u]=h.useState(null),[d,f]=h.useState(new Set),[p,m]=h.useState("fetch-resolver"),[g,v]=h.useState([]),[_,y]=h.useState(""),[w,x]=h.useState("crosslayer"),S=h.useCallback(async()=>{var R,I,j,L;try{const P=await fetch("/api/parser-config");if(!P.ok)throw new Error(`HTTP ${P.status}`);const z=await P.json();n(z),f(new Set(((R=z.config.parsers)==null?void 0:R.disabled)??[])),m(((j=(I=z.config.parsers)==null?void 0:I.primary)==null?void 0:j.crosslayer)??"fetch-resolver"),v(((L=z.config.parsers)==null?void 0:L.custom)??[]),o(!1)}catch(P){u(String(P)),o(!1)}},[]);h.useEffect(()=>{S()},[S]);const C=h.useCallback(async()=>{s(!0),l(!1),u(null);try{const R={parsers:{primary:{crosslayer:p},disabled:[...d],custom:g.length>0?g:void 0}};R.parsers.disabled.length===0&&delete R.parsers.disabled,R.parsers.custom||delete R.parsers.custom;const I=await fetch("/api/parser-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});if(!I.ok)throw new Error(`HTTP ${I.status}`);l(!0),setTimeout(()=>l(!1),3e3)}catch(R){u(String(R))}finally{s(!1)}},[p,d,g]),E=R=>{f(I=>{const j=new Set(I);return j.has(R)?j.delete(R):j.add(R),j})},k=()=>{_.trim()&&(v(R=>[...R,{path:_.trim(),layer:w}]),y(""))},N=R=>{v(I=>I.filter((j,L)=>L!==R))};if(r)return b.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading configuration..."});const A=[...((e==null?void 0:e.detection)??[]).map(R=>({...R,kind:"standard"})),...((e==null?void 0:e.crosslayerParsers)??[]).map(R=>({id:R.id,layer:"crosslayer",label:R.label,detected:!0,kind:"crosslayer"}))];return b.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx(Ob,{className:"h-6 w-6 text-muted-foreground"}),b.jsx("h1",{className:"text-xl font-semibold",children:"Parser Configuration"})]}),b.jsxs("button",{onClick:C,disabled:i,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors disabled:opacity-50",children:[a?b.jsx(ev,{className:"h-4 w-4"}):b.jsx(VI,{className:"h-4 w-4"}),i?"Saving...":a?"Saved":"Save"]})]}),c&&b.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[b.jsx(vI,{className:"h-4 w-4 shrink-0"}),c]}),b.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[b.jsxs("div",{className:"space-y-6",children:[b.jsxs("section",{className:"space-y-3",children:[b.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Stack Detection"}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 xl:grid-cols-1 gap-2",children:((e==null?void 0:e.detection)??[]).map(R=>b.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${R.detected?"border-green-500/30 bg-green-500/5":"border-border/50 bg-muted/20 opacity-50"}`,children:[R.detected?b.jsx(ev,{className:"h-4 w-4 text-green-500 shrink-0"}):b.jsx(bI,{className:"h-4 w-4 text-muted-foreground shrink-0"}),b.jsxs("div",{children:[b.jsx("div",{className:"text-sm font-medium",children:R.label}),b.jsxs("div",{className:"text-xs text-muted-foreground",children:[R.layer," layer"]})]})]},R.id))})]}),b.jsxs("section",{className:"space-y-3",children:[b.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Primary Cross-Layer Parser"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:'API calls detected by other parsers but not by the primary will be flagged as "out of pattern".'}),b.jsx("div",{className:"space-y-2",children:((e==null?void 0:e.crosslayerParsers)??[]).map(R=>b.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${p===R.id?"border-purple-500/50 bg-purple-500/5":"border-border/50 bg-card hover:border-border"}`,children:[b.jsx("input",{type:"radio",name:"primary",value:R.id,checked:p===R.id,onChange:()=>m(R.id),className:"accent-purple-600"}),b.jsxs("div",{children:[b.jsx("div",{className:"text-sm font-medium",children:R.label}),b.jsx("div",{className:"text-xs text-muted-foreground",children:R.id})]})]},R.id))})]})]}),b.jsxs("div",{className:"space-y-6",children:[b.jsxs("section",{className:"space-y-3",children:[b.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Parsers"}),b.jsx("div",{className:"space-y-2",children:A.map(R=>b.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:()=>E(R.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${d.has(R.id)?"bg-muted":"bg-purple-600"}`,children:b.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${d.has(R.id)?"left-0.5":"left-[22px]"}`})}),b.jsxs("div",{children:[b.jsx("div",{className:"text-sm font-medium",children:R.label}),b.jsxs("div",{className:"text-xs text-muted-foreground",children:[R.id," — ",R.layer]})]})]}),R.kind==="crosslayer"&&b.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:"cross-layer"})]},R.id))})]}),b.jsxs("section",{className:"space-y-3",children:[b.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Custom Parsers"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"JS files exporting a parser object. Path relative to project root."}),g.length>0&&b.jsx("div",{className:"space-y-2",children:g.map((R,I)=>b.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[b.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:R.path}),b.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:R.layer}),b.jsx("button",{onClick:()=>N(I),className:"text-red-400 hover:text-red-300",children:b.jsx(XI,{className:"h-3.5 w-3.5"})})]},I))}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("input",{type:"text",value:_,onChange:R=>y(R.target.value),placeholder:"./parsers/my-parser.js",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:R=>R.key==="Enter"&&k()}),b.jsxs("select",{value:w,onChange:R=>x(R.target.value),className:"px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground",children:[b.jsx("option",{value:"crosslayer",children:"crosslayer"}),b.jsx("option",{value:"ui",children:"ui"}),b.jsx("option",{value:"api",children:"api"}),b.jsx("option",{value:"db",children:"db"})]}),b.jsx("button",{onClick:k,className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:b.jsx(OI,{className:"h-4 w-4"})})]})]})]})]})]})}function bX(){return b.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[b.jsx(A6,{}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx($6,{}),b.jsx("main",{className:"flex-1 min-h-0 overflow-hidden content-gradient",children:b.jsxs(SA,{children:[b.jsx(Gr,{path:"/overview",element:b.jsx($W,{})}),b.jsx(Gr,{path:"/modules",element:b.jsx(gX,{})}),b.jsx(Gr,{path:"/journeys",element:b.jsx(xX,{})}),b.jsx(Gr,{path:"/project-graph",element:b.jsx(TW,{})}),b.jsx(Gr,{path:"/settings",element:b.jsx(wX,{})}),b.jsx(Gr,{path:"*",element:b.jsx(bA,{to:"/overview",replace:!0})})]})})]})]})}dd.createRoot(document.getElementById("root")).render(b.jsx(Je.StrictMode,{children:b.jsx(AA,{children:b.jsx(VA,{children:b.jsx(bX,{})})})}));