var oie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var oze=oie((Ei,$i)=>{function lie(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var uie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function PK(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cie(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Aj={exports:{}},ly={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var TM;function die(){if(TM)return ly;TM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:a}}return ly.Fragment=t,ly.jsx=n,ly.jsxs=n,ly}var AM;function fie(){return AM||(AM=1,Aj.exports=die()),Aj.exports}var d=fie(),kj={exports:{}},uy={},Nj={exports:{}},Lj={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var kM;function hie(){return kM||(kM=1,(function(e){function t(X,pe){var xe=X.length;X.push(pe);e:for(;0<xe;){var be=xe-1>>>1,Y=X[be];if(0<s(Y,pe))X[be]=pe,X[xe]=Y,xe=be;else break e}}function n(X){return X.length===0?null:X[0]}function r(X){if(X.length===0)return null;var pe=X[0],xe=X.pop();if(xe!==pe){X[0]=xe;e:for(var be=0,Y=X.length,se=Y>>>1;be<se;){var Oe=2*(be+1)-1,de=X[Oe],_e=Oe+1,Le=X[_e];if(0>s(de,xe))_e<Y&&0>s(Le,de)?(X[be]=Le,X[_e]=xe,be=_e):(X[be]=de,X[Oe]=xe,be=Oe);else if(_e<Y&&0>s(Le,xe))X[be]=Le,X[_e]=xe,be=_e;else break e}}return pe}function s(X,pe){var xe=X.sortIndex-pe.sortIndex;return xe!==0?xe:X.id-pe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var u=[],f=[],h=1,g=null,v=3,w=!1,C=!1,_=!1,E=!1,$=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function M(X){for(var pe=n(f);pe!==null;){if(pe.callback===null)r(f);else if(pe.startTime<=X)r(f),pe.sortIndex=pe.expirationTime,t(u,pe);else break;pe=n(f)}}function L(X){if(_=!1,M(X),!C)if(n(u)!==null)C=!0,k||(k=!0,re());else{var pe=n(f);pe!==null&&he(L,pe.startTime-X)}}var k=!1,T=-1,P=5,V=-1;function q(){return E?!0:!(e.unstable_now()-V<P)}function K(){if(E=!1,k){var X=e.unstable_now();V=X;var pe=!0;try{e:{C=!1,_&&(_=!1,O(T),T=-1),w=!0;var xe=v;try{t:{for(M(X),g=n(u);g!==null&&!(g.expirationTime>X&&q());){var be=g.callback;if(typeof be=="function"){g.callback=null,v=g.priorityLevel;var Y=be(g.expirationTime<=X);if(X=e.unstable_now(),typeof Y=="function"){g.callback=Y,M(X),pe=!0;break t}g===n(u)&&r(u),M(X)}else r(u);g=n(u)}if(g!==null)pe=!0;else{var se=n(f);se!==null&&he(L,se.startTime-X),pe=!1}}break e}finally{g=null,v=xe,w=!1}pe=void 0}}finally{pe?re():k=!1}}}var re;if(typeof N=="function")re=function(){N(K)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ue=ee.port2;ee.port1.onmessage=K,re=function(){ue.postMessage(null)}}else re=function(){$(K,0)};function he(X,pe){T=$(function(){X(e.unstable_now())},pe)}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(X){X.callback=null},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var pe=3;break;default:pe=v}var xe=v;v=pe;try{return X()}finally{v=xe}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(X,pe){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var xe=v;v=X;try{return pe()}finally{v=xe}},e.unstable_scheduleCallback=function(X,pe,xe){var be=e.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?be+xe:be):xe=be,X){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=xe+Y,X={id:h++,callback:pe,priorityLevel:X,startTime:xe,expirationTime:Y,sortIndex:-1},xe>be?(X.sortIndex=xe,t(f,X),n(u)===null&&X===n(f)&&(_?(O(T),T=-1):_=!0,he(L,xe-be))):(X.sortIndex=Y,t(u,X),C||w||(C=!0,k||(k=!0,re()))),X},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(X){var pe=v;return function(){var xe=v;v=pe;try{return X.apply(this,arguments)}finally{v=xe}}}})(Lj)),Lj}var NM;function pie(){return NM||(NM=1,Nj.exports=hie()),Nj.exports}var Mj={exports:{}},ln={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var LM;function mie(){if(LM)return ln;LM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.iterator;function v(Y){return Y===null||typeof Y!="object"?null:(Y=g&&Y[g]||Y["@@iterator"],typeof Y=="function"?Y:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function E(Y,se,Oe){this.props=Y,this.context=se,this.refs=_,this.updater=Oe||w}E.prototype.isReactComponent={},E.prototype.setState=function(Y,se){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,se,"setState")},E.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function $(){}$.prototype=E.prototype;function O(Y,se,Oe){this.props=Y,this.context=se,this.refs=_,this.updater=Oe||w}var N=O.prototype=new $;N.constructor=O,C(N,E.prototype),N.isPureReactComponent=!0;var M=Array.isArray,L={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function T(Y,se,Oe,de,_e,Le){return Oe=Le.ref,{$$typeof:e,type:Y,key:se,ref:Oe!==void 0?Oe:null,props:Le}}function P(Y,se){return T(Y.type,se,void 0,void 0,void 0,Y.props)}function V(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function q(Y){var se={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(Oe){return se[Oe]})}var K=/\/+/g;function re(Y,se){return typeof Y=="object"&&Y!==null&&Y.key!=null?q(""+Y.key):se.toString(36)}function ee(){}function ue(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(ee,ee):(Y.status="pending",Y.then(function(se){Y.status==="pending"&&(Y.status="fulfilled",Y.value=se)},function(se){Y.status==="pending"&&(Y.status="rejected",Y.reason=se)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function he(Y,se,Oe,de,_e){var Le=typeof Y;(Le==="undefined"||Le==="boolean")&&(Y=null);var Re=!1;if(Y===null)Re=!0;else switch(Le){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(Y.$$typeof){case e:case t:Re=!0;break;case h:return Re=Y._init,he(Re(Y._payload),se,Oe,de,_e)}}if(Re)return _e=_e(Y),Re=de===""?"."+re(Y,0):de,M(_e)?(Oe="",Re!=null&&(Oe=Re.replace(K,"$&/")+"/"),he(_e,se,Oe,"",function(Je){return Je})):_e!=null&&(V(_e)&&(_e=P(_e,Oe+(_e.key==null||Y&&Y.key===_e.key?"":(""+_e.key).replace(K,"$&/")+"/")+Re)),se.push(_e)),1;Re=0;var Ye=de===""?".":de+":";if(M(Y))for(var Xe=0;Xe<Y.length;Xe++)de=Y[Xe],Le=Ye+re(de,Xe),Re+=he(de,se,Oe,Le,_e);else if(Xe=v(Y),typeof Xe=="function")for(Y=Xe.call(Y),Xe=0;!(de=Y.next()).done;)de=de.value,Le=Ye+re(de,Xe++),Re+=he(de,se,Oe,Le,_e);else if(Le==="object"){if(typeof Y.then=="function")return he(ue(Y),se,Oe,de,_e);throw se=String(Y),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Re}function X(Y,se,Oe){if(Y==null)return Y;var de=[],_e=0;return he(Y,de,"","",function(Le){return se.call(Oe,Le,_e++)}),de}function pe(Y){if(Y._status===-1){var se=Y._result;se=se(),se.then(function(Oe){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=Oe)},function(Oe){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=Oe)}),Y._status===-1&&(Y._status=0,Y._result=se)}if(Y._status===1)return Y._result.default;throw Y._result}var xe=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)};function be(){}return ln.Children={map:X,forEach:function(Y,se,Oe){X(Y,function(){se.apply(this,arguments)},Oe)},count:function(Y){var se=0;return X(Y,function(){se++}),se},toArray:function(Y){return X(Y,function(se){return se})||[]},only:function(Y){if(!V(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}},ln.Component=E,ln.Fragment=n,ln.Profiler=s,ln.PureComponent=O,ln.StrictMode=r,ln.Suspense=u,ln.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,ln.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return L.H.useMemoCache(Y)}},ln.cache=function(Y){return function(){return Y.apply(null,arguments)}},ln.cloneElement=function(Y,se,Oe){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var de=C({},Y.props),_e=Y.key,Le=void 0;if(se!=null)for(Re in se.ref!==void 0&&(Le=void 0),se.key!==void 0&&(_e=""+se.key),se)!k.call(se,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&se.ref===void 0||(de[Re]=se[Re]);var Re=arguments.length-2;if(Re===1)de.children=Oe;else if(1<Re){for(var Ye=Array(Re),Xe=0;Xe<Re;Xe++)Ye[Xe]=arguments[Xe+2];de.children=Ye}return T(Y.type,_e,void 0,void 0,Le,de)},ln.createContext=function(Y){return Y={$$typeof:i,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:a,_context:Y},Y},ln.createElement=function(Y,se,Oe){var de,_e={},Le=null;if(se!=null)for(de in se.key!==void 0&&(Le=""+se.key),se)k.call(se,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(_e[de]=se[de]);var Re=arguments.length-2;if(Re===1)_e.children=Oe;else if(1<Re){for(var Ye=Array(Re),Xe=0;Xe<Re;Xe++)Ye[Xe]=arguments[Xe+2];_e.children=Ye}if(Y&&Y.defaultProps)for(de in Re=Y.defaultProps,Re)_e[de]===void 0&&(_e[de]=Re[de]);return T(Y,Le,void 0,void 0,null,_e)},ln.createRef=function(){return{current:null}},ln.forwardRef=function(Y){return{$$typeof:l,render:Y}},ln.isValidElement=V,ln.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:pe}},ln.memo=function(Y,se){return{$$typeof:f,type:Y,compare:se===void 0?null:se}},ln.startTransition=function(Y){var se=L.T,Oe={};L.T=Oe;try{var de=Y(),_e=L.S;_e!==null&&_e(Oe,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(be,xe)}catch(Le){xe(Le)}finally{L.T=se}},ln.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},ln.use=function(Y){return L.H.use(Y)},ln.useActionState=function(Y,se,Oe){return L.H.useActionState(Y,se,Oe)},ln.useCallback=function(Y,se){return L.H.useCallback(Y,se)},ln.useContext=function(Y){return L.H.useContext(Y)},ln.useDebugValue=function(){},ln.useDeferredValue=function(Y,se){return L.H.useDeferredValue(Y,se)},ln.useEffect=function(Y,se,Oe){var de=L.H;if(typeof Oe=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return de.useEffect(Y,se)},ln.useId=function(){return L.H.useId()},ln.useImperativeHandle=function(Y,se,Oe){return L.H.useImperativeHandle(Y,se,Oe)},ln.useInsertionEffect=function(Y,se){return L.H.useInsertionEffect(Y,se)},ln.useLayoutEffect=function(Y,se){return L.H.useLayoutEffect(Y,se)},ln.useMemo=function(Y,se){return L.H.useMemo(Y,se)},ln.useOptimistic=function(Y,se){return L.H.useOptimistic(Y,se)},ln.useReducer=function(Y,se,Oe){return L.H.useReducer(Y,se,Oe)},ln.useRef=function(Y){return L.H.useRef(Y)},ln.useState=function(Y){return L.H.useState(Y)},ln.useSyncExternalStore=function(Y,se,Oe){return L.H.useSyncExternalStore(Y,se,Oe)},ln.useTransition=function(){return L.H.useTransition()},ln.version="19.1.1",ln}var MM;function Yk(){return MM||(MM=1,Mj.exports=mie()),Mj.exports}var Ij={exports:{}},ta={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var IM;function gie(){if(IM)return ta;IM=1;var e=Yk();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(u,f,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:u,containerInfo:f,implementation:h}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ta.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ta.createPortal=function(u,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(u,f,null,h)},ta.flushSync=function(u){var f=i.T,h=r.p;try{if(i.T=null,r.p=2,u)return u()}finally{i.T=f,r.p=h,r.d.f()}},ta.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},ta.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},ta.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var h=f.as,g=l(h,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:w}):h==="script"&&r.d.X(u,{crossOrigin:g,integrity:v,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ta.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=l(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},ta.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,g=l(h,f.crossOrigin);r.d.L(u,h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ta.preloadModule=function(u,f){if(typeof u=="string")if(f){var h=l(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},ta.requestFormReset=function(u){r.d.r(u)},ta.unstable_batchedUpdates=function(u,f){return u(f)},ta.useFormState=function(u,f,h){return i.H.useFormState(u,f,h)},ta.useFormStatus=function(){return i.H.useHostTransitionStatus()},ta.version="19.1.1",ta}var PM;function vie(){if(PM)return Ij.exports;PM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ij.exports=gie(),Ij.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var DM;function yie(){if(DM)return uy;DM=1;var e=pie(),t=Yk(),n=vie();function r(o){var c="https://react.dev/errors/"+o;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)c+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+o+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var c=o,p=o;if(o.alternate)for(;c.return;)c=c.return;else{o=c;do c=o,(c.flags&4098)!==0&&(p=c.return),o=c.return;while(o)}return c.tag===3?p:null}function i(o){if(o.tag===13){var c=o.memoizedState;if(c===null&&(o=o.alternate,o!==null&&(c=o.memoizedState)),c!==null)return c.dehydrated}return null}function l(o){if(a(o)!==o)throw Error(r(188))}function u(o){var c=o.alternate;if(!c){if(c=a(o),c===null)throw Error(r(188));return c!==o?null:o}for(var p=o,x=c;;){var S=p.return;if(S===null)break;var R=S.alternate;if(R===null){if(x=S.return,x!==null){p=x;continue}break}if(S.child===R.child){for(R=S.child;R;){if(R===p)return l(S),o;if(R===x)return l(S),c;R=R.sibling}throw Error(r(188))}if(p.return!==x.return)p=S,x=R;else{for(var I=!1,F=S.child;F;){if(F===p){I=!0,p=S,x=R;break}if(F===x){I=!0,x=S,p=R;break}F=F.sibling}if(!I){for(F=R.child;F;){if(F===p){I=!0,p=R,x=S;break}if(F===x){I=!0,x=R,p=S;break}F=F.sibling}if(!I)throw Error(r(189))}}if(p.alternate!==x)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?o:c}function f(o){var c=o.tag;if(c===5||c===26||c===27||c===6)return o;for(o=o.child;o!==null;){if(c=f(o),c!==null)return c;o=o.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),N=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function re(o){return o===null||typeof o!="object"?null:(o=K&&o[K]||o["@@iterator"],typeof o=="function"?o:null)}var ee=Symbol.for("react.client.reference");function ue(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===ee?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case E:return"Profiler";case _:return"StrictMode";case L:return"Suspense";case k:return"SuspenseList";case V:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case N:return(o.displayName||"Context")+".Provider";case O:return(o._context.displayName||"Context")+".Consumer";case M:var c=o.render;return o=o.displayName,o||(o=c.displayName||c.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case T:return c=o.displayName||null,c!==null?c:ue(o.type)||"Memo";case P:c=o._payload,o=o._init;try{return ue(o(c))}catch{}}return null}var he=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},be=[],Y=-1;function se(o){return{current:o}}function Oe(o){0>Y||(o.current=be[Y],be[Y]=null,Y--)}function de(o,c){Y++,be[Y]=o.current,o.current=c}var _e=se(null),Le=se(null),Re=se(null),Ye=se(null);function Xe(o,c){switch(de(Re,c),de(Le,o),de(_e,null),c.nodeType){case 9:case 11:o=(o=c.documentElement)&&(o=o.namespaceURI)?gr(o):0;break;default:if(o=c.tagName,c=c.namespaceURI)c=gr(c),o=yr(c,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}Oe(_e),de(_e,o)}function Je(){Oe(_e),Oe(Le),Oe(Re)}function Ot(o){o.memoizedState!==null&&de(Ye,o);var c=_e.current,p=yr(c,o.type);c!==p&&(de(Le,o),de(_e,p))}function tn(o){Le.current===o&&(Oe(_e),Oe(Le)),Ye.current===o&&(Oe(Ye),rd._currentValue=xe)}var an=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Wt=e.unstable_cancelCallback,Lt=e.unstable_shouldYield,Ln=e.unstable_requestPaint,Ge=e.unstable_now,dt=e.unstable_getCurrentPriorityLevel,Z=e.unstable_ImmediatePriority,oe=e.unstable_UserBlockingPriority,me=e.unstable_NormalPriority,He=e.unstable_LowPriority,ze=e.unstable_IdlePriority,Ke=e.log,at=e.unstable_setDisableYieldValue,Dt=null,ht=null;function Jt(o){if(typeof Ke=="function"&&at(o),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Dt,o)}catch{}}var jn=Math.clz32?Math.clz32:cs,dr=Math.log,fa=Math.LN2;function cs(o){return o>>>=0,o===0?32:31-(dr(o)/fa|0)|0}var er=256,Zn=4194304;function Nn(o){var c=o&42;if(c!==0)return c;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function ha(o,c,p){var x=o.pendingLanes;if(x===0)return 0;var S=0,R=o.suspendedLanes,I=o.pingedLanes;o=o.warmLanes;var F=x&134217727;return F!==0?(x=F&~R,x!==0?S=Nn(x):(I&=F,I!==0?S=Nn(I):p||(p=F&~o,p!==0&&(S=Nn(p))))):(F=x&~R,F!==0?S=Nn(F):I!==0?S=Nn(I):p||(p=x&~o,p!==0&&(S=Nn(p)))),S===0?0:c!==0&&c!==S&&(c&R)===0&&(R=S&-S,p=c&-c,R>=p||R===32&&(p&4194048)!==0)?c:S}function ps(o,c){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&c)===0}function Jo(o,c){switch(o){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function el(){var o=er;return er<<=1,(er&4194048)===0&&(er=256),o}function go(){var o=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),o}function li(o){for(var c=[],p=0;31>p;p++)c.push(o);return c}function pa(o,c){o.pendingLanes|=c,c!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function iu(o,c,p,x,S,R){var I=o.pendingLanes;o.pendingLanes=p,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=p,o.entangledLanes&=p,o.errorRecoveryDisabledLanes&=p,o.shellSuspendCounter=0;var F=o.entanglements,J=o.expirationTimes,ve=o.hiddenUpdates;for(p=I&~p;0<p;){var $e=31-jn(p),Ve=1<<$e;F[$e]=0,J[$e]=-1;var Ce=ve[$e];if(Ce!==null)for(ve[$e]=null,$e=0;$e<Ce.length;$e++){var ye=Ce[$e];ye!==null&&(ye.lane&=-536870913)}p&=~Ve}x!==0&&ou(o,x,0),R!==0&&S===0&&o.tag!==0&&(o.suspendedLanes|=R&~(I&~c))}function ou(o,c,p){o.pendingLanes|=c,o.suspendedLanes&=~c;var x=31-jn(c);o.entangledLanes|=c,o.entanglements[x]=o.entanglements[x]|1073741824|p&4194090}function Tr(o,c){var p=o.entangledLanes|=c;for(o=o.entanglements;p;){var x=31-jn(p),S=1<<x;S&c|o[x]&c&&(o[x]|=c),p&=~S}}function ms(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function jt(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function vn(){var o=pe.p;return o!==0?o:(o=window.event,o===void 0?32:Pw(o.type))}function ws(o,c){var p=pe.p;try{return pe.p=o,c()}finally{pe.p=p}}var gs=Math.random().toString(36).slice(2),Qe="__reactFiber$"+gs,ft="__reactProps$"+gs,Et="__reactContainer$"+gs,vr="__reactEvents$"+gs,ts="__reactListeners$"+gs,Pa="__reactHandles$"+gs,ma="__reactResources$"+gs,Ar="__reactMarker$"+gs;function Cs(o){delete o[Qe],delete o[ft],delete o[vr],delete o[ts],delete o[Pa]}function Pn(o){var c=o[Qe];if(c)return c;for(var p=o.parentNode;p;){if(c=p[Et]||p[Qe]){if(p=c.alternate,c.child!==null||p!==null&&p.child!==null)for(o=jw(o);o!==null;){if(p=o[Qe])return p;o=jw(o)}return c}o=p,p=o.parentNode}return null}function ga(o){if(o=o[Qe]||o[Et]){var c=o.tag;if(c===5||c===6||c===13||c===26||c===27||c===3)return o}return null}function tl(o){var c=o.tag;if(c===5||c===26||c===27||c===6)return o.stateNode;throw Error(r(33))}function nl(o){var c=o[ma];return c||(c=o[ma]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function kr(o){o[Ar]=!0}var Gd=new Set,zd={};function Pi(o,c){vo(o,c),vo(o+"Capture",c)}function vo(o,c){for(zd[o]=c,o=0;o<c.length;o++)Gd.add(c[o])}var Sn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Da={},yo={};function lu(o){return an.call(yo,o)?!0:an.call(Da,o)?!1:Sn.test(o)?yo[o]=!0:(Da[o]=!0,!1)}function fc(o,c,p){if(lu(c))if(p===null)o.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":o.removeAttribute(c);return;case"boolean":var x=c.toLowerCase().slice(0,5);if(x!=="data-"&&x!=="aria-"){o.removeAttribute(c);return}}o.setAttribute(c,""+p)}}function rl(o,c,p){if(p===null)o.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttribute(c,""+p)}}function Di(o,c,p,x){if(x===null)o.removeAttribute(p);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(p);return}o.setAttributeNS(c,p,""+x)}}var zh,vv;function hc(o){if(zh===void 0)try{throw Error()}catch(p){var c=p.stack.trim().match(/\n( *(at )?)/);zh=c&&c[1]||"",vv=-1<p.stack.indexOf(`
    at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
`+zh+o+vv}var yv=!1;function xv(o,c){if(!o||yv)return"";yv=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var x={DetermineComponentFrameRoot:function(){try{if(c){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(ye){var Ce=ye}Reflect.construct(o,[],Ve)}else{try{Ve.call()}catch(ye){Ce=ye}o.call(Ve.prototype)}}else{try{throw Error()}catch(ye){Ce=ye}(Ve=o())&&typeof Ve.catch=="function"&&Ve.catch(function(){})}}catch(ye){if(ye&&Ce&&typeof ye.stack=="string")return[ye.stack,Ce.stack]}return[null,null]}};x.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(x.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(x.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=x.DetermineComponentFrameRoot(),I=R[0],F=R[1];if(I&&F){var J=I.split(`
`),ve=F.split(`
`);for(S=x=0;x<J.length&&!J[x].includes("DetermineComponentFrameRoot");)x++;for(;S<ve.length&&!ve[S].includes("DetermineComponentFrameRoot");)S++;if(x===J.length||S===ve.length)for(x=J.length-1,S=ve.length-1;1<=x&&0<=S&&J[x]!==ve[S];)S--;for(;1<=x&&0<=S;x--,S--)if(J[x]!==ve[S]){if(x!==1||S!==1)do if(x--,S--,0>S||J[x]!==ve[S]){var $e=`
`+J[x].replace(" at new "," at ");return o.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",o.displayName)),$e}while(1<=x&&0<=S);break}}}finally{yv=!1,Error.prepareStackTrace=p}return(p=o?o.displayName||o.name:"")?hc(p):""}function $_(o){switch(o.tag){case 26:case 27:case 5:return hc(o.type);case 16:return hc("Lazy");case 13:return hc("Suspense");case 19:return hc("SuspenseList");case 0:case 15:return xv(o.type,!1);case 11:return xv(o.type.render,!1);case 1:return xv(o.type,!0);case 31:return hc("Activity");default:return""}}function bv(o){try{var c="";do c+=$_(o),o=o.return;while(o);return c}catch(p){return`
Error generating stack: `+p.message+`
`+p.stack}}function va(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function wv(o){var c=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Cv(o){var c=wv(o)?"checked":"value",p=Object.getOwnPropertyDescriptor(o.constructor.prototype,c),x=""+o[c];if(!o.hasOwnProperty(c)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var S=p.get,R=p.set;return Object.defineProperty(o,c,{configurable:!0,get:function(){return S.call(this)},set:function(I){x=""+I,R.call(this,I)}}),Object.defineProperty(o,c,{enumerable:p.enumerable}),{getValue:function(){return x},setValue:function(I){x=""+I},stopTracking:function(){o._valueTracker=null,delete o[c]}}}}function Hh(o){o._valueTracker||(o._valueTracker=Cv(o))}function Sv(o){if(!o)return!1;var c=o._valueTracker;if(!c)return!0;var p=c.getValue(),x="";return o&&(x=wv(o)?o.checked?"true":"false":o.value),o=x,o!==p?(c.setValue(o),!0):!1}function uu(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Ex=/[\n"\\]/g;function Va(o){return o.replace(Ex,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function qh(o,c,p,x,S,R,I,F){o.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?o.type=I:o.removeAttribute("type"),c!=null?I==="number"?(c===0&&o.value===""||o.value!=c)&&(o.value=""+va(c)):o.value!==""+va(c)&&(o.value=""+va(c)):I!=="submit"&&I!=="reset"||o.removeAttribute("value"),c!=null?Hd(o,I,va(c)):p!=null?Hd(o,I,va(p)):x!=null&&o.removeAttribute("value"),S==null&&R!=null&&(o.defaultChecked=!!R),S!=null&&(o.checked=S&&typeof S!="function"&&typeof S!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?o.name=""+va(F):o.removeAttribute("name")}function _v(o,c,p,x,S,R,I,F){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(o.type=R),c!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||c!=null))return;p=p!=null?""+va(p):"",c=c!=null?""+va(c):p,F||c===o.value||(o.value=c),o.defaultValue=c}x=x??S,x=typeof x!="function"&&typeof x!="symbol"&&!!x,o.checked=F?o.checked:!!x,o.defaultChecked=!!x,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(o.name=I)}function Hd(o,c,p){c==="number"&&uu(o.ownerDocument)===o||o.defaultValue===""+p||(o.defaultValue=""+p)}function pc(o,c,p,x){if(o=o.options,c){c={};for(var S=0;S<p.length;S++)c["$"+p[S]]=!0;for(p=0;p<o.length;p++)S=c.hasOwnProperty("$"+o[p].value),o[p].selected!==S&&(o[p].selected=S),S&&x&&(o[p].defaultSelected=!0)}else{for(p=""+va(p),c=null,S=0;S<o.length;S++){if(o[S].value===p){o[S].selected=!0,x&&(o[S].defaultSelected=!0);return}c!==null||o[S].disabled||(c=o[S])}c!==null&&(c.selected=!0)}}function jv(o,c,p){if(c!=null&&(c=""+va(c),c!==o.value&&(o.value=c),p==null)){o.defaultValue!==c&&(o.defaultValue=c);return}o.defaultValue=p!=null?""+va(p):""}function Kh(o,c,p,x){if(c==null){if(x!=null){if(p!=null)throw Error(r(92));if(he(x)){if(1<x.length)throw Error(r(93));x=x[0]}p=x}p==null&&(p=""),c=p}p=va(c),o.defaultValue=p,x=o.textContent,x===p&&x!==""&&x!==null&&(o.value=x)}function sl(o,c){if(c){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=c;return}}o.textContent=c}var mc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ev(o,c,p){var x=c.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?x?o.setProperty(c,""):c==="float"?o.cssFloat="":o[c]="":x?o.setProperty(c,p):typeof p!="number"||p===0||mc.has(c)?c==="float"?o.cssFloat=p:o[c]=(""+p).trim():o[c]=p+"px"}function $v(o,c,p){if(c!=null&&typeof c!="object")throw Error(r(62));if(o=o.style,p!=null){for(var x in p)!p.hasOwnProperty(x)||c!=null&&c.hasOwnProperty(x)||(x.indexOf("--")===0?o.setProperty(x,""):x==="float"?o.cssFloat="":o[x]="");for(var S in c)x=c[S],c.hasOwnProperty(S)&&p[S]!==x&&Ev(o,S,x)}else for(var R in c)c.hasOwnProperty(R)&&Ev(o,R,c[R])}function Rv(o){if(o.indexOf("-")===-1)return!1;switch(o){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 $x=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Rx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qd(o){return Rx.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var Yh=null;function Ov(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var gc=null,vc=null;function Tv(o){var c=ga(o);if(c&&(o=c.stateNode)){var p=o[ft]||null;e:switch(o=c.stateNode,c.type){case"input":if(qh(o,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),c=p.name,p.type==="radio"&&c!=null){for(p=o;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Va(""+c)+'"][type="radio"]'),c=0;c<p.length;c++){var x=p[c];if(x!==o&&x.form===o.form){var S=x[ft]||null;if(!S)throw Error(r(90));qh(x,S.value,S.defaultValue,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name)}}for(c=0;c<p.length;c++)x=p[c],x.form===o.form&&Sv(x)}break e;case"textarea":jv(o,p.value,p.defaultValue);break e;case"select":c=p.value,c!=null&&pc(o,!!p.multiple,c,!1)}}}var Av=!1;function Ox(o,c,p){if(Av)return o(c,p);Av=!0;try{var x=o(c);return x}finally{if(Av=!1,(gc!==null||vc!==null)&&(Yp(),gc&&(c=gc,o=vc,vc=gc=null,Tv(c),o)))for(c=0;c<o.length;c++)Tv(o[c])}}function Kd(o,c){var p=o.stateNode;if(p===null)return null;var x=p[ft]||null;if(x===null)return null;p=x[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(o=o.type,x=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!x;break e;default:o=!1}if(o)return null;if(p&&typeof p!="function")throw Error(r(231,c,typeof p));return p}var xo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yd=!1;if(xo)try{var Zd={};Object.defineProperty(Zd,"passive",{get:function(){Yd=!0}}),window.addEventListener("test",Zd,Zd),window.removeEventListener("test",Zd,Zd)}catch{Yd=!1}var al=null,kv=null,Zh=null;function Tx(){if(Zh)return Zh;var o,c=kv,p=c.length,x,S="value"in al?al.value:al.textContent,R=S.length;for(o=0;o<p&&c[o]===S[o];o++);var I=p-o;for(x=1;x<=I&&c[p-x]===S[R-x];x++);return Zh=S.slice(o,1<x?1-x:void 0)}function Xn(o){var c=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&c===13&&(o=13)):o=c,o===10&&(o=13),32<=o||o===13?o:0}function Un(){return!0}function Ax(){return!1}function Us(o){function c(p,x,S,R,I){this._reactName=p,this._targetInst=S,this.type=x,this.nativeEvent=R,this.target=I,this.currentTarget=null;for(var F in o)o.hasOwnProperty(F)&&(p=o[F],this[F]=p?p(R):R[F]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?Un:Ax,this.isPropagationStopped=Ax,this}return h(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=Un)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),c}var cu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xh=Us(cu),Xd=h({},cu,{view:0,detail:0}),R_=Us(Xd),Wh,Nv,Nr,yc=h({},Xd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vi,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Nr&&(Nr&&o.type==="mousemove"?(Wh=o.screenX-Nr.screenX,Nv=o.screenY-Nr.screenY):Nv=Wh=0,Nr=o),Wh)},movementY:function(o){return"movementY"in o?o.movementY:Nv}}),il=Us(yc),kx=h({},yc,{dataTransfer:0}),Lv=Us(kx),Ba=h({},Xd,{relatedTarget:0}),Qh=Us(Ba),Nx=h({},cu,{animationName:0,elapsedTime:0,pseudoElement:0}),Lx=Us(Nx),Mx=h({},cu,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Ix=Us(Mx),Px=h({},cu,{data:0}),Gs=Us(Px),O_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fa={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"},T_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dx(o){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(o):(o=T_[o])?!!c[o]:!1}function Vi(){return Dx}var Jh=h({},Xd,{key:function(o){if(o.key){var c=O_[o.key]||o.key;if(c!=="Unidentified")return c}return o.type==="keypress"?(o=Xn(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Fa[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vi,charCode:function(o){return o.type==="keypress"?Xn(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Xn(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Mv=Us(Jh),fr=h({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bo=Us(fr),Iv=h({},Xd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vi}),A_=Us(Iv),Pv=h({},cu,{propertyName:0,elapsedTime:0,pseudoElement:0}),k_=Us(Pv),N_=h({},yc,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),L_=Us(N_),Vx=h({},cu,{newState:0,oldState:0}),ep=Us(Vx),xc=[9,13,27,32],Dv=xo&&"CompositionEvent"in window,bc=null;xo&&"documentMode"in document&&(bc=document.documentMode);var Bx=xo&&"TextEvent"in window&&!bc,tp=xo&&(!Dv||bc&&8<bc&&11>=bc),np=" ",Vv=!1;function Fx(o,c){switch(o){case"keyup":return xc.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rp(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ol=!1;function M_(o,c){switch(o){case"compositionend":return rp(c);case"keypress":return c.which!==32?null:(Vv=!0,np);case"textInput":return o=c.data,o===np&&Vv?null:o;default:return null}}function Ux(o,c){if(ol)return o==="compositionend"||!Dv&&Fx(o,c)?(o=Tx(),Zh=kv=al=null,ol=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return tp&&c.locale!=="ko"?null:c.data;default:return null}}var ya={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 sp(o){var c=o&&o.nodeName&&o.nodeName.toLowerCase();return c==="input"?!!ya[o.type]:c==="textarea"}function wc(o,c,p,x){gc?vc?vc.push(x):vc=[x]:gc=x,c=tm(c,"onChange"),0<c.length&&(p=new Xh("onChange","change",null,p,x),o.push({event:p,listeners:c}))}var Cc=null,Sc=null;function I_(o){vw(o,0)}function ap(o){var c=tl(o);if(Sv(c))return o}function Gx(o,c){if(o==="change")return c}var zx=!1;if(xo){var Bv;if(xo){var ll="oninput"in document;if(!ll){var Hx=document.createElement("div");Hx.setAttribute("oninput","return;"),ll=typeof Hx.oninput=="function"}Bv=ll}else Bv=!1;zx=Bv&&(!document.documentMode||9<document.documentMode)}function qx(){Cc&&(Cc.detachEvent("onpropertychange",ip),Sc=Cc=null)}function ip(o){if(o.propertyName==="value"&&ap(Sc)){var c=[];wc(c,Sc,o,Ov(o)),Ox(I_,c)}}function Kx(o,c,p){o==="focusin"?(qx(),Cc=c,Sc=p,Cc.attachEvent("onpropertychange",ip)):o==="focusout"&&qx()}function ul(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return ap(Sc)}function op(o,c){if(o==="click")return ap(c)}function P_(o,c){if(o==="input"||o==="change")return ap(c)}function D_(o,c){return o===c&&(o!==0||1/o===1/c)||o!==o&&c!==c}var xa=typeof Object.is=="function"?Object.is:D_;function Bi(o,c){if(xa(o,c))return!0;if(typeof o!="object"||o===null||typeof c!="object"||c===null)return!1;var p=Object.keys(o),x=Object.keys(c);if(p.length!==x.length)return!1;for(x=0;x<p.length;x++){var S=p[x];if(!an.call(c,S)||!xa(o[S],c[S]))return!1}return!0}function Ua(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Fv(o,c){var p=Ua(o);o=0;for(var x;p;){if(p.nodeType===3){if(x=o+p.textContent.length,o<=c&&x>=c)return{node:p,offset:c-o};o=x}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Ua(p)}}function Yx(o,c){return o&&c?o===c?!0:o&&o.nodeType===3?!1:c&&c.nodeType===3?Yx(o,c.parentNode):"contains"in o?o.contains(c):o.compareDocumentPosition?!!(o.compareDocumentPosition(c)&16):!1:!1}function Zx(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var c=uu(o.document);c instanceof o.HTMLIFrameElement;){try{var p=typeof c.contentWindow.location.href=="string"}catch{p=!1}if(p)o=c.contentWindow;else break;c=uu(o.document)}return c}function Uv(o){var c=o&&o.nodeName&&o.nodeName.toLowerCase();return c&&(c==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||c==="textarea"||o.contentEditable==="true")}var V_=xo&&"documentMode"in document&&11>=document.documentMode,_c=null,cl=null,le=null,Ee=!1;function Se(o,c,p){var x=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Ee||_c==null||_c!==uu(x)||(x=_c,"selectionStart"in x&&Uv(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),le&&Bi(le,x)||(le=x,x=tm(cl,"onSelect"),0<x.length&&(c=new Xh("onSelect","select",null,c,p),o.push({event:c,listeners:x}),c.target=_c)))}function nt(o,c){var p={};return p[o.toLowerCase()]=c.toLowerCase(),p["Webkit"+o]="webkit"+c,p["Moz"+o]="moz"+c,p}var Mt={animationend:nt("Animation","AnimationEnd"),animationiteration:nt("Animation","AnimationIteration"),animationstart:nt("Animation","AnimationStart"),transitionrun:nt("Transition","TransitionRun"),transitionstart:nt("Transition","TransitionStart"),transitioncancel:nt("Transition","TransitionCancel"),transitionend:nt("Transition","TransitionEnd")},En={},Dr={};xo&&(Dr=document.createElement("div").style,"AnimationEvent"in window||(delete Mt.animationend.animation,delete Mt.animationiteration.animation,delete Mt.animationstart.animation),"TransitionEvent"in window||delete Mt.transitionend.transition);function $n(o){if(En[o])return En[o];if(!Mt[o])return o;var c=Mt[o],p;for(p in c)if(c.hasOwnProperty(p)&&p in Dr)return En[o]=c[p];return o}var lp=$n("animationend"),Xx=$n("animationiteration"),ba=$n("animationstart"),up=$n("transitionrun"),B_=$n("transitionstart"),jc=$n("transitioncancel"),Wd=$n("transitionend"),Qd=new Map,Mn="abort auxClick beforeToggle 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(" ");Mn.push("scrollEnd");function ui(o,c){Qd.set(o,c),Pi(c,[o])}var Gv=new WeakMap;function Ss(o,c){if(typeof o=="object"&&o!==null){var p=Gv.get(o);return p!==void 0?p:(c={value:o,source:c,stack:bv(c)},Gv.set(o,c),c)}return{value:o,source:c,stack:bv(c)}}var Ga=[],Ec=0,zv=0;function du(){for(var o=Ec,c=zv=Ec=0;c<o;){var p=Ga[c];Ga[c++]=null;var x=Ga[c];Ga[c++]=null;var S=Ga[c];Ga[c++]=null;var R=Ga[c];if(Ga[c++]=null,x!==null&&S!==null){var I=x.pending;I===null?S.next=S:(S.next=I.next,I.next=S),x.pending=S}R!==0&&Jd(p,S,R)}}function ci(o,c,p,x){Ga[Ec++]=o,Ga[Ec++]=c,Ga[Ec++]=p,Ga[Ec++]=x,zv|=x,o.lanes|=x,o=o.alternate,o!==null&&(o.lanes|=x)}function $c(o,c,p,x){return ci(o,c,p,x),ef(o)}function fu(o,c){return ci(o,null,null,c),ef(o)}function Jd(o,c,p){o.lanes|=p;var x=o.alternate;x!==null&&(x.lanes|=p);for(var S=!1,R=o.return;R!==null;)R.childLanes|=p,x=R.alternate,x!==null&&(x.childLanes|=p),R.tag===22&&(o=R.stateNode,o===null||o._visibility&1||(S=!0)),o=R,R=R.return;return o.tag===3?(R=o.stateNode,S&&c!==null&&(S=31-jn(p),o=R.hiddenUpdates,x=o[S],x===null?o[S]=[c]:x.push(c),c.lane=p|536870912),R):null}function ef(o){if(50<Zc)throw Zc=0,D0=null,Error(r(185));for(var c=o.return;c!==null;)o=c,c=o.return;return o.tag===3?o.stateNode:null}var hu={};function cp(o,c,p,x){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zs(o,c,p,x){return new cp(o,c,p,x)}function pu(o){return o=o.prototype,!(!o||!o.isReactComponent)}function _s(o,c){var p=o.alternate;return p===null?(p=zs(o.tag,c,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=c,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&65011712,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,c=o.dependencies,p.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p.refCleanup=o.refCleanup,p}function tf(o,c){o.flags&=65011714;var p=o.alternate;return p===null?(o.childLanes=0,o.lanes=c,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=p.childLanes,o.lanes=p.lanes,o.child=p.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=p.memoizedProps,o.memoizedState=p.memoizedState,o.updateQueue=p.updateQueue,o.type=p.type,c=p.dependencies,o.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),o}function dp(o,c,p,x,S,R){var I=0;if(x=o,typeof o=="function")pu(o)&&(I=1);else if(typeof o=="string")I=vj(o,p,_e.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case V:return o=zs(31,p,c,S),o.elementType=V,o.lanes=R,o;case C:return mu(p.children,S,R,c);case _:I=8,S|=24;break;case E:return o=zs(12,p,c,S|2),o.elementType=E,o.lanes=R,o;case L:return o=zs(13,p,c,S),o.elementType=L,o.lanes=R,o;case k:return o=zs(19,p,c,S),o.elementType=k,o.lanes=R,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case $:case N:I=10;break e;case O:I=9;break e;case M:I=11;break e;case T:I=14;break e;case P:I=16,x=null;break e}I=29,p=Error(r(130,o===null?"null":typeof o,"")),x=null}return c=zs(I,p,c,S),c.elementType=o,c.type=x,c.lanes=R,c}function mu(o,c,p,x){return o=zs(7,o,x,c),o.lanes=p,o}function Hv(o,c,p){return o=zs(6,o,null,c),o.lanes=p,o}function Rc(o,c,p){return c=zs(4,o.children!==null?o.children:[],o.key,c),c.lanes=p,c.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},c}var wo=[],dl=0,fp=null,nf=0,za=[],Ha=0,or=null,hr=1,Co="";function gu(o,c){wo[dl++]=nf,wo[dl++]=fp,fp=o,nf=c}function qv(o,c,p){za[Ha++]=hr,za[Ha++]=Co,za[Ha++]=or,or=o;var x=hr;o=Co;var S=32-jn(x)-1;x&=~(1<<S),p+=1;var R=32-jn(c)+S;if(30<R){var I=S-S%5;R=(x&(1<<I)-1).toString(32),x>>=I,S-=I,hr=1<<32-jn(c)+S|p<<S|x,Co=R+o}else hr=1<<R|p<<S|x,Co=o}function Kv(o){o.return!==null&&(gu(o,1),qv(o,1,0))}function rf(o){for(;o===fp;)fp=wo[--dl],wo[dl]=null,nf=wo[--dl],wo[dl]=null;for(;o===or;)or=za[--Ha],za[Ha]=null,Co=za[--Ha],za[Ha]=null,hr=za[--Ha],za[Ha]=null}var zr=null,pr=null,yn=!1,di=null,Hs=!1,Oc=Error(r(519));function qa(o){var c=Error(r(418,""));throw fl(Ss(c,o)),Oc}function Wx(o){var c=o.stateNode,p=o.type,x=o.memoizedProps;switch(c[Qe]=o,c[ft]=x,p){case"dialog":mn("cancel",c),mn("close",c);break;case"iframe":case"object":case"embed":mn("load",c);break;case"video":case"audio":for(p=0;p<qf.length;p++)mn(qf[p],c);break;case"source":mn("error",c);break;case"img":case"image":case"link":mn("error",c),mn("load",c);break;case"details":mn("toggle",c);break;case"input":mn("invalid",c),_v(c,x.value,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name,!0),Hh(c);break;case"select":mn("invalid",c);break;case"textarea":mn("invalid",c),Kh(c,x.value,x.defaultValue,x.children),Hh(c)}p=x.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||c.textContent===""+p||x.suppressHydrationWarning===!0||bw(c.textContent,p)?(x.popover!=null&&(mn("beforetoggle",c),mn("toggle",c)),x.onScroll!=null&&mn("scroll",c),x.onScrollEnd!=null&&mn("scrollend",c),x.onClick!=null&&(c.onclick=nm),c=!0):c=!1,c||qa(o)}function Qx(o){for(zr=o.return;zr;)switch(zr.tag){case 5:case 13:Hs=!1;return;case 27:case 3:Hs=!0;return;default:zr=zr.return}}function sf(o){if(o!==zr)return!1;if(!yn)return Qx(o),yn=!0,!1;var c=o.tag,p;if((p=c!==3&&c!==27)&&((p=c===5)&&(p=o.type,p=!(p!=="form"&&p!=="button")||sm(o.type,o.memoizedProps)),p=!p),p&&pr&&qa(o),Qx(o),c===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,c=0;o;){if(o.nodeType===8)if(p=o.data,p==="/$"){if(c===0){pr=vi(o.nextSibling);break e}c--}else p!=="$"&&p!=="$!"&&p!=="$?"||c++;o=o.nextSibling}pr=null}}else c===27?(c=pr,Qa(o.type)?(o=Q0,Q0=null,pr=o):pr=c):pr=zr?vi(o.stateNode.nextSibling):null;return!0}function af(){pr=zr=null,yn=!1}function Jx(){var o=di;return o!==null&&(Js===null?Js=o:Js.push.apply(Js,o),di=null),o}function fl(o){di===null?di=[o]:di.push(o)}var vu=se(null),hl=null,B=null;function wa(o,c,p){de(vu,c._currentValue),c._currentValue=p}function Ka(o){o._currentValue=vu.current,Oe(vu)}function qs(o,c,p){for(;o!==null;){var x=o.alternate;if((o.childLanes&c)!==c?(o.childLanes|=c,x!==null&&(x.childLanes|=c)):x!==null&&(x.childLanes&c)!==c&&(x.childLanes|=c),o===p)break;o=o.return}}function un(o,c,p,x){var S=o.child;for(S!==null&&(S.return=o);S!==null;){var R=S.dependencies;if(R!==null){var I=S.child;R=R.firstContext;e:for(;R!==null;){var F=R;R=S;for(var J=0;J<c.length;J++)if(F.context===c[J]){R.lanes|=p,F=R.alternate,F!==null&&(F.lanes|=p),qs(R.return,p,o),x||(I=null);break e}R=F.next}}else if(S.tag===18){if(I=S.return,I===null)throw Error(r(341));I.lanes|=p,R=I.alternate,R!==null&&(R.lanes|=p),qs(I,p,o),I=null}else I=S.child;if(I!==null)I.return=S;else for(I=S;I!==null;){if(I===o){I=null;break}if(S=I.sibling,S!==null){S.return=I.return,I=S;break}I=I.return}S=I}}function of(o,c,p,x){o=null;for(var S=c,R=!1;S!==null;){if(!R){if((S.flags&524288)!==0)R=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var I=S.alternate;if(I===null)throw Error(r(387));if(I=I.memoizedProps,I!==null){var F=S.type;xa(S.pendingProps.value,I.value)||(o!==null?o.push(F):o=[F])}}else if(S===Ye.current){if(I=S.alternate,I===null)throw Error(r(387));I.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(o!==null?o.push(rd):o=[rd])}S=S.return}o!==null&&un(c,o,p,x),c.flags|=262144}function hp(o){for(o=o.firstContext;o!==null;){if(!xa(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function yu(o){hl=o,B=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Sr(o){return eb(hl,o)}function pp(o,c){return hl===null&&yu(o),eb(o,c)}function eb(o,c){var p=c._currentValue;if(c={context:c,memoizedValue:p,next:null},B===null){if(o===null)throw Error(r(308));B=c,o.dependencies={lanes:0,firstContext:c},o.flags|=524288}else B=B.next=c;return p}var F_=typeof AbortController<"u"?AbortController:function(){var o=[],c=this.signal={aborted:!1,addEventListener:function(p,x){o.push(x)}};this.abort=function(){c.aborted=!0,o.forEach(function(p){return p()})}},U_=e.unstable_scheduleCallback,G_=e.unstable_NormalPriority,tr={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yv(){return{controller:new F_,data:new Map,refCount:0}}function lf(o){o.refCount--,o.refCount===0&&U_(G_,function(){o.controller.abort()})}var uf=null,Zv=0,Tc=0,Ks=null;function z_(o,c){if(uf===null){var p=uf=[];Zv=0,Tc=em(),Ks={status:"pending",value:void 0,then:function(x){p.push(x)}}}return Zv++,c.then(tb,tb),c}function tb(){if(--Zv===0&&uf!==null){Ks!==null&&(Ks.status="fulfilled");var o=uf;uf=null,Tc=0,Ks=null;for(var c=0;c<o.length;c++)(0,o[c])()}}function H_(o,c){var p=[],x={status:"pending",value:null,reason:null,then:function(S){p.push(S)}};return o.then(function(){x.status="fulfilled",x.value=c;for(var S=0;S<p.length;S++)(0,p[S])(c)},function(S){for(x.status="rejected",x.reason=S,S=0;S<p.length;S++)(0,p[S])(void 0)}),x}var nb=X.S;X.S=function(o,c){typeof c=="object"&&c!==null&&typeof c.then=="function"&&z_(o,c),nb!==null&&nb(o,c)};var xu=se(null);function So(){var o=xu.current;return o!==null?o:ar.pooledCache}function mp(o,c){c===null?de(xu,xu.current):de(xu,c.pool)}function rb(){var o=So();return o===null?null:{parent:tr._currentValue,pool:o}}var js=Error(r(460)),sb=Error(r(474)),gp=Error(r(542)),Xv={then:function(){}};function ab(o){return o=o.status,o==="fulfilled"||o==="rejected"}function vp(){}function Wv(o,c,p){switch(p=o[p],p===void 0?o.push(c):p!==c&&(c.then(vp,vp),c=p),c.status){case"fulfilled":return c.value;case"rejected":throw o=c.reason,ob(o),o;default:if(typeof c.status=="string")c.then(vp,vp);else{if(o=ar,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=c,o.status="pending",o.then(function(x){if(c.status==="pending"){var S=c;S.status="fulfilled",S.value=x}},function(x){if(c.status==="pending"){var S=c;S.status="rejected",S.reason=x}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw o=c.reason,ob(o),o}throw Ac=c,js}}var Ac=null;function ib(){if(Ac===null)throw Error(r(459));var o=Ac;return Ac=null,o}function ob(o){if(o===js||o===gp)throw Error(r(483))}var Fi=!1;function bu(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kc(o,c){o=o.updateQueue,c.updateQueue===o&&(c.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function pl(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function _o(o,c,p){var x=o.updateQueue;if(x===null)return null;if(x=x.shared,(zn&2)!==0){var S=x.pending;return S===null?c.next=c:(c.next=S.next,S.next=c),x.pending=c,c=ef(o),Jd(o,null,p),c}return ci(o,x,c,p),ef(o)}function cf(o,c,p){if(c=c.updateQueue,c!==null&&(c=c.shared,(p&4194048)!==0)){var x=c.lanes;x&=o.pendingLanes,p|=x,c.lanes=p,Tr(o,p)}}function fi(o,c){var p=o.updateQueue,x=o.alternate;if(x!==null&&(x=x.updateQueue,p===x)){var S=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var I={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?S=R=I:R=R.next=I,p=p.next}while(p!==null);R===null?S=R=c:R=R.next=c}else S=R=c;p={baseState:x.baseState,firstBaseUpdate:S,lastBaseUpdate:R,shared:x.shared,callbacks:x.callbacks},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=c:o.next=c,p.lastBaseUpdate=c}var df=!1;function hi(){if(df){var o=Ks;if(o!==null)throw o}}function vs(o,c,p,x){df=!1;var S=o.updateQueue;Fi=!1;var R=S.firstBaseUpdate,I=S.lastBaseUpdate,F=S.shared.pending;if(F!==null){S.shared.pending=null;var J=F,ve=J.next;J.next=null,I===null?R=ve:I.next=ve,I=J;var $e=o.alternate;$e!==null&&($e=$e.updateQueue,F=$e.lastBaseUpdate,F!==I&&(F===null?$e.firstBaseUpdate=ve:F.next=ve,$e.lastBaseUpdate=J))}if(R!==null){var Ve=S.baseState;I=0,$e=ve=J=null,F=R;do{var Ce=F.lane&-536870913,ye=Ce!==F.lane;if(ye?(_n&Ce)===Ce:(x&Ce)===Ce){Ce!==0&&Ce===Tc&&(df=!0),$e!==null&&($e=$e.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});e:{var Tt=o,$t=F;Ce=c;var Qn=p;switch($t.tag){case 1:if(Tt=$t.payload,typeof Tt=="function"){Ve=Tt.call(Qn,Ve,Ce);break e}Ve=Tt;break e;case 3:Tt.flags=Tt.flags&-65537|128;case 0:if(Tt=$t.payload,Ce=typeof Tt=="function"?Tt.call(Qn,Ve,Ce):Tt,Ce==null)break e;Ve=h({},Ve,Ce);break e;case 2:Fi=!0}}Ce=F.callback,Ce!==null&&(o.flags|=64,ye&&(o.flags|=8192),ye=S.callbacks,ye===null?S.callbacks=[Ce]:ye.push(Ce))}else ye={lane:Ce,tag:F.tag,payload:F.payload,callback:F.callback,next:null},$e===null?(ve=$e=ye,J=Ve):$e=$e.next=ye,I|=Ce;if(F=F.next,F===null){if(F=S.shared.pending,F===null)break;ye=F,F=ye.next,ye.next=null,S.lastBaseUpdate=ye,S.shared.pending=null}}while(!0);$e===null&&(J=Ve),S.baseState=J,S.firstBaseUpdate=ve,S.lastBaseUpdate=$e,R===null&&(S.shared.lanes=0),Sl|=I,o.lanes=I,o.memoizedState=Ve}}function lb(o,c){if(typeof o!="function")throw Error(r(191,o));o.call(c)}function Qv(o,c){var p=o.callbacks;if(p!==null)for(o.callbacks=null,o=0;o<p.length;o++)lb(p[o],c)}var wu=se(null),ml=se(0);function jo(o,c){o=Lo,de(ml,o),de(wu,c),Lo=o|c.baseLanes}function yp(){de(ml,Lo),de(wu,wu.current)}function Jv(){Lo=ml.current,Oe(wu),Oe(ml)}var pi=0,on=null,Gn=null,xn=null,Nc=!1,Cu=!1,ys=!1,Lc=0,gl=0,Ya=null,ub=0;function wn(){throw Error(r(321))}function ff(o,c){if(c===null)return!1;for(var p=0;p<c.length&&p<o.length;p++)if(!xa(o[p],c[p]))return!1;return!0}function e0(o,c,p,x,S,R){return pi=R,on=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,X.H=o===null||o.memoizedState===null?Cb:y0,ys=!1,R=p(x,S),ys=!1,Cu&&(R=db(c,p,x,S)),cb(o),R}function cb(o){X.H=Sf;var c=Gn!==null&&Gn.next!==null;if(pi=0,xn=Gn=on=null,Nc=!1,gl=0,Ya=null,c)throw Error(r(300));o===null||ns||(o=o.dependencies,o!==null&&hp(o)&&(ns=!0))}function db(o,c,p,x){on=o;var S=0;do{if(Cu&&(Ya=null),gl=0,Cu=!1,25<=S)throw Error(r(301));if(S+=1,xn=Gn=null,o.updateQueue!=null){var R=o.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}X.H=Sb,R=c(p,x)}while(Cu);return R}function t0(){var o=X.H,c=o.useState()[0];return c=typeof c.then=="function"?hf(c):c,o=o.useState()[0],(Gn!==null?Gn.memoizedState:null)!==o&&(on.flags|=1024),c}function n0(){var o=Lc!==0;return Lc=0,o}function Su(o,c,p){c.updateQueue=o.updateQueue,c.flags&=-2053,o.lanes&=~p}function xp(o){if(Nc){for(o=o.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}Nc=!1}pi=0,xn=Gn=on=null,Cu=!1,gl=Lc=0,Ya=null}function Ys(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xn===null?on.memoizedState=xn=o:xn=xn.next=o,xn}function Vr(){if(Gn===null){var o=on.alternate;o=o!==null?o.memoizedState:null}else o=Gn.next;var c=xn===null?on.memoizedState:xn.next;if(c!==null)xn=c,Gn=o;else{if(o===null)throw on.alternate===null?Error(r(467)):Error(r(310));Gn=o,o={memoizedState:Gn.memoizedState,baseState:Gn.baseState,baseQueue:Gn.baseQueue,queue:Gn.queue,next:null},xn===null?on.memoizedState=xn=o:xn=xn.next=o}return xn}function _u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hf(o){var c=gl;return gl+=1,Ya===null&&(Ya=[]),o=Wv(Ya,o,c),c=on,(xn===null?c.memoizedState:xn.next)===null&&(c=c.alternate,X.H=c===null||c.memoizedState===null?Cb:y0),o}function bp(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return hf(o);if(o.$$typeof===N)return Sr(o)}throw Error(r(438,String(o)))}function pf(o){var c=null,p=on.updateQueue;if(p!==null&&(c=p.memoCache),c==null){var x=on.alternate;x!==null&&(x=x.updateQueue,x!==null&&(x=x.memoCache,x!=null&&(c={data:x.data.map(function(S){return S.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),p===null&&(p=_u(),on.updateQueue=p),p.memoCache=c,p=c.data[c.index],p===void 0)for(p=c.data[c.index]=Array(o),x=0;x<o;x++)p[x]=q;return c.index++,p}function Ui(o,c){return typeof c=="function"?c(o):c}function wp(o){var c=Vr();return r0(c,Gn,o)}function r0(o,c,p){var x=o.queue;if(x===null)throw Error(r(311));x.lastRenderedReducer=p;var S=o.baseQueue,R=x.pending;if(R!==null){if(S!==null){var I=S.next;S.next=R.next,R.next=I}c.baseQueue=S=R,x.pending=null}if(R=o.baseState,S===null)o.memoizedState=R;else{c=S.next;var F=I=null,J=null,ve=c,$e=!1;do{var Ve=ve.lane&-536870913;if(Ve!==ve.lane?(_n&Ve)===Ve:(pi&Ve)===Ve){var Ce=ve.revertLane;if(Ce===0)J!==null&&(J=J.next={lane:0,revertLane:0,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),Ve===Tc&&($e=!0);else if((pi&Ce)===Ce){ve=ve.next,Ce===Tc&&($e=!0);continue}else Ve={lane:0,revertLane:ve.revertLane,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},J===null?(F=J=Ve,I=R):J=J.next=Ve,on.lanes|=Ce,Sl|=Ce;Ve=ve.action,ys&&p(R,Ve),R=ve.hasEagerState?ve.eagerState:p(R,Ve)}else Ce={lane:Ve,revertLane:ve.revertLane,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},J===null?(F=J=Ce,I=R):J=J.next=Ce,on.lanes|=Ve,Sl|=Ve;ve=ve.next}while(ve!==null&&ve!==c);if(J===null?I=R:J.next=F,!xa(R,o.memoizedState)&&(ns=!0,$e&&(p=Ks,p!==null)))throw p;o.memoizedState=R,o.baseState=I,o.baseQueue=J,x.lastRenderedState=R}return S===null&&(x.lanes=0),[o.memoizedState,x.dispatch]}function s0(o){var c=Vr(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=o;var x=p.dispatch,S=p.pending,R=c.memoizedState;if(S!==null){p.pending=null;var I=S=S.next;do R=o(R,I.action),I=I.next;while(I!==S);xa(R,c.memoizedState)||(ns=!0),c.memoizedState=R,c.baseQueue===null&&(c.baseState=R),p.lastRenderedState=R}return[R,x]}function a0(o,c,p){var x=on,S=Vr(),R=yn;if(R){if(p===void 0)throw Error(r(407));p=p()}else p=c();var I=!xa((Gn||S).memoizedState,p);I&&(S.memoizedState=p,ns=!0),S=S.queue;var F=Sp.bind(null,x,S,o);if(vf(2048,8,F,[o]),S.getSnapshot!==c||I||xn!==null&&xn.memoizedState.tag&1){if(x.flags|=2048,Mc(9,Rp(),fb.bind(null,x,S,p,c),null),ar===null)throw Error(r(349));R||(pi&124)!==0||Cp(x,c,p)}return p}function Cp(o,c,p){o.flags|=16384,o={getSnapshot:c,value:p},c=on.updateQueue,c===null?(c=_u(),on.updateQueue=c,c.stores=[o]):(p=c.stores,p===null?c.stores=[o]:p.push(o))}function fb(o,c,p,x){c.value=p,c.getSnapshot=x,i0(c)&&o0(o)}function Sp(o,c,p){return p(function(){i0(c)&&o0(o)})}function i0(o){var c=o.getSnapshot;o=o.value;try{var p=c();return!xa(o,p)}catch{return!0}}function o0(o){var c=fu(o,2);c!==null&&Ea(c,o,2)}function _p(o){var c=Ys();if(typeof o=="function"){var p=o;if(o=p(),ys){Jt(!0);try{p()}finally{Jt(!1)}}}return c.memoizedState=c.baseState=o,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:o},c}function mf(o,c,p,x){return o.baseState=p,r0(o,Gn,typeof x=="function"?x:Ui)}function q_(o,c,p,x,S){if(kp(o))throw Error(r(485));if(o=c.action,o!==null){var R={payload:S,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){R.listeners.push(I)}};X.T!==null?p(!0):R.isTransition=!1,x(R),p=c.pending,p===null?(R.next=c.pending=R,l0(c,R)):(R.next=p.next,c.pending=p.next=R)}}function l0(o,c){var p=c.action,x=c.payload,S=o.state;if(c.isTransition){var R=X.T,I={};X.T=I;try{var F=p(S,x),J=X.S;J!==null&&J(I,F),u0(o,c,F)}catch(ve){jp(o,c,ve)}finally{X.T=R}}else try{R=p(S,x),u0(o,c,R)}catch(ve){jp(o,c,ve)}}function u0(o,c,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(x){hb(o,c,x)},function(x){return jp(o,c,x)}):hb(o,c,p)}function hb(o,c,p){c.status="fulfilled",c.value=p,pb(c),o.state=p,c=o.pending,c!==null&&(p=c.next,p===c?o.pending=null:(p=p.next,c.next=p,l0(o,p)))}function jp(o,c,p){var x=o.pending;if(o.pending=null,x!==null){x=x.next;do c.status="rejected",c.reason=p,pb(c),c=c.next;while(c!==x)}o.action=null}function pb(o){o=o.listeners;for(var c=0;c<o.length;c++)(0,o[c])()}function Ep(o,c){return c}function c0(o,c){if(yn){var p=ar.formState;if(p!==null){e:{var x=on;if(yn){if(pr){t:{for(var S=pr,R=Hs;S.nodeType!==8;){if(!R){S=null;break t}if(S=vi(S.nextSibling),S===null){S=null;break t}}R=S.data,S=R==="F!"||R==="F"?S:null}if(S){pr=vi(S.nextSibling),x=S.data==="F!";break e}}qa(x)}x=!1}x&&(c=p[0])}}return p=Ys(),p.memoizedState=p.baseState=c,x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ep,lastRenderedState:c},p.queue=x,p=m0.bind(null,on,x),x.dispatch=p,x=_p(!1),R=g0.bind(null,on,!1,x.queue),x=Ys(),S={state:c,dispatch:null,action:o,pending:null},x.queue=S,p=q_.bind(null,on,S,R,p),S.dispatch=p,x.memoizedState=o,[c,p,!1]}function $p(o){var c=Vr();return mb(c,Gn,o)}function mb(o,c,p){if(c=r0(o,c,Ep)[0],o=wp(Ui)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var x=hf(c)}catch(I){throw I===js?gp:I}else x=c;c=Vr();var S=c.queue,R=S.dispatch;return p!==c.memoizedState&&(on.flags|=2048,Mc(9,Rp(),d0.bind(null,S,p),null)),[x,R,o]}function d0(o,c){o.action=c}function nn(o){var c=Vr(),p=Gn;if(p!==null)return mb(c,p,o);Vr(),c=c.memoizedState,p=Vr();var x=p.queue.dispatch;return p.memoizedState=o,[c,x,!1]}function Mc(o,c,p,x){return o={tag:o,create:p,deps:x,inst:c,next:null},c=on.updateQueue,c===null&&(c=_u(),on.updateQueue=c),p=c.lastEffect,p===null?c.lastEffect=o.next=o:(x=p.next,p.next=o,o.next=x,c.lastEffect=o),o}function Rp(){return{destroy:void 0,resource:void 0}}function Ic(){return Vr().memoizedState}function gf(o,c,p,x){var S=Ys();x=x===void 0?null:x,on.flags|=o,S.memoizedState=Mc(1|c,Rp(),p,x)}function vf(o,c,p,x){var S=Vr();x=x===void 0?null:x;var R=S.memoizedState.inst;Gn!==null&&x!==null&&ff(x,Gn.memoizedState.deps)?S.memoizedState=Mc(c,R,p,x):(on.flags|=o,S.memoizedState=Mc(1|c,R,p,x))}function gb(o,c){gf(8390656,8,o,c)}function Ca(o,c){vf(2048,8,o,c)}function vb(o,c){return vf(4,2,o,c)}function yf(o,c){return vf(4,4,o,c)}function Op(o,c){if(typeof c=="function"){o=o();var p=c(o);return function(){typeof p=="function"?p():c(null)}}if(c!=null)return o=o(),c.current=o,function(){c.current=null}}function f0(o,c,p){p=p!=null?p.concat([o]):null,vf(4,4,Op.bind(null,c,o),p)}function Tp(){}function Zs(o,c){var p=Vr();c=c===void 0?null:c;var x=p.memoizedState;return c!==null&&ff(c,x[1])?x[0]:(p.memoizedState=[o,c],o)}function Eo(o,c){var p=Vr();c=c===void 0?null:c;var x=p.memoizedState;if(c!==null&&ff(c,x[1]))return x[0];if(x=o(),ys){Jt(!0);try{o()}finally{Jt(!1)}}return p.memoizedState=[x,c],x}function xf(o,c,p){return p===void 0||(pi&1073741824)!==0?o.memoizedState=c:(o.memoizedState=p,o=Xb(),on.lanes|=o,Sl|=o,p)}function h0(o,c,p,x){return xa(p,c)?p:wu.current!==null?(o=xf(o,p,x),xa(o,c)||(ns=!0),o):(pi&42)===0?(ns=!0,o.memoizedState=p):(o=Xb(),on.lanes|=o,Sl|=o,c)}function bf(o,c,p,x,S){var R=pe.p;pe.p=R!==0&&8>R?R:8;var I=X.T,F={};X.T=F,g0(o,!1,c,p);try{var J=S(),ve=X.S;if(ve!==null&&ve(F,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var $e=H_(J,x);ju(o,c,$e,bs(o))}else ju(o,c,x,bs(o))}catch(Ve){ju(o,c,{then:function(){},status:"rejected",reason:Ve},bs())}finally{pe.p=R,X.T=I}}function yb(){}function wf(o,c,p,x){if(o.tag!==5)throw Error(r(476));var S=p0(o).queue;bf(o,S,c,xe,p===null?yb:function(){return Ap(o),p(x)})}function p0(o){var c=o.memoizedState;if(c!==null)return c;c={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:xe},next:null};var p={};return c.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:p},next:null},o.memoizedState=c,o=o.alternate,o!==null&&(o.memoizedState=c),c}function Ap(o){var c=p0(o).next.queue;ju(o,c,{},bs())}function Cf(){return Sr(rd)}function $o(){return Vr().memoizedState}function xb(){return Vr().memoizedState}function vl(o){for(var c=o.return;c!==null;){switch(c.tag){case 24:case 3:var p=bs();o=pl(p);var x=_o(c,o,p);x!==null&&(Ea(x,c,p),cf(x,c,p)),c={cache:Yv()},o.payload=c;return}c=c.return}}function bb(o,c,p){var x=bs();p={lane:x,revertLane:0,action:p,hasEagerState:!1,eagerState:null,next:null},kp(o)?wb(c,p):(p=$c(o,c,p,x),p!==null&&(Ea(p,o,x),v0(p,c,x)))}function m0(o,c,p){var x=bs();ju(o,c,p,x)}function ju(o,c,p,x){var S={lane:x,revertLane:0,action:p,hasEagerState:!1,eagerState:null,next:null};if(kp(o))wb(c,S);else{var R=o.alternate;if(o.lanes===0&&(R===null||R.lanes===0)&&(R=c.lastRenderedReducer,R!==null))try{var I=c.lastRenderedState,F=R(I,p);if(S.hasEagerState=!0,S.eagerState=F,xa(F,I))return ci(o,c,S,0),ar===null&&du(),!1}catch{}finally{}if(p=$c(o,c,S,x),p!==null)return Ea(p,o,x),v0(p,c,x),!0}return!1}function g0(o,c,p,x){if(x={lane:2,revertLane:em(),action:x,hasEagerState:!1,eagerState:null,next:null},kp(o)){if(c)throw Error(r(479))}else c=$c(o,p,x,2),c!==null&&Ea(c,o,2)}function kp(o){var c=o.alternate;return o===on||c!==null&&c===on}function wb(o,c){Cu=Nc=!0;var p=o.pending;p===null?c.next=c:(c.next=p.next,p.next=c),o.pending=c}function v0(o,c,p){if((p&4194048)!==0){var x=c.lanes;x&=o.pendingLanes,p|=x,c.lanes=p,Tr(o,p)}}var Sf={readContext:Sr,use:bp,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useLayoutEffect:wn,useInsertionEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useSyncExternalStore:wn,useId:wn,useHostTransitionStatus:wn,useFormState:wn,useActionState:wn,useOptimistic:wn,useMemoCache:wn,useCacheRefresh:wn},Cb={readContext:Sr,use:bp,useCallback:function(o,c){return Ys().memoizedState=[o,c===void 0?null:c],o},useContext:Sr,useEffect:gb,useImperativeHandle:function(o,c,p){p=p!=null?p.concat([o]):null,gf(4194308,4,Op.bind(null,c,o),p)},useLayoutEffect:function(o,c){return gf(4194308,4,o,c)},useInsertionEffect:function(o,c){gf(4,2,o,c)},useMemo:function(o,c){var p=Ys();c=c===void 0?null:c;var x=o();if(ys){Jt(!0);try{o()}finally{Jt(!1)}}return p.memoizedState=[x,c],x},useReducer:function(o,c,p){var x=Ys();if(p!==void 0){var S=p(c);if(ys){Jt(!0);try{p(c)}finally{Jt(!1)}}}else S=c;return x.memoizedState=x.baseState=S,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:S},x.queue=o,o=o.dispatch=bb.bind(null,on,o),[x.memoizedState,o]},useRef:function(o){var c=Ys();return o={current:o},c.memoizedState=o},useState:function(o){o=_p(o);var c=o.queue,p=m0.bind(null,on,c);return c.dispatch=p,[o.memoizedState,p]},useDebugValue:Tp,useDeferredValue:function(o,c){var p=Ys();return xf(p,o,c)},useTransition:function(){var o=_p(!1);return o=bf.bind(null,on,o.queue,!0,!1),Ys().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,c,p){var x=on,S=Ys();if(yn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=c(),ar===null)throw Error(r(349));(_n&124)!==0||Cp(x,c,p)}S.memoizedState=p;var R={value:p,getSnapshot:c};return S.queue=R,gb(Sp.bind(null,x,R,o),[o]),x.flags|=2048,Mc(9,Rp(),fb.bind(null,x,R,p,c),null),p},useId:function(){var o=Ys(),c=ar.identifierPrefix;if(yn){var p=Co,x=hr;p=(x&~(1<<32-jn(x)-1)).toString(32)+p,c="«"+c+"R"+p,p=Lc++,0<p&&(c+="H"+p.toString(32)),c+="»"}else p=ub++,c="«"+c+"r"+p.toString(32)+"»";return o.memoizedState=c},useHostTransitionStatus:Cf,useFormState:c0,useActionState:c0,useOptimistic:function(o){var c=Ys();c.memoizedState=c.baseState=o;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=p,c=g0.bind(null,on,!0,p),p.dispatch=c,[o,c]},useMemoCache:pf,useCacheRefresh:function(){return Ys().memoizedState=vl.bind(null,on)}},y0={readContext:Sr,use:bp,useCallback:Zs,useContext:Sr,useEffect:Ca,useImperativeHandle:f0,useInsertionEffect:vb,useLayoutEffect:yf,useMemo:Eo,useReducer:wp,useRef:Ic,useState:function(){return wp(Ui)},useDebugValue:Tp,useDeferredValue:function(o,c){var p=Vr();return h0(p,Gn.memoizedState,o,c)},useTransition:function(){var o=wp(Ui)[0],c=Vr().memoizedState;return[typeof o=="boolean"?o:hf(o),c]},useSyncExternalStore:a0,useId:$o,useHostTransitionStatus:Cf,useFormState:$p,useActionState:$p,useOptimistic:function(o,c){var p=Vr();return mf(p,Gn,o,c)},useMemoCache:pf,useCacheRefresh:xb},Sb={readContext:Sr,use:bp,useCallback:Zs,useContext:Sr,useEffect:Ca,useImperativeHandle:f0,useInsertionEffect:vb,useLayoutEffect:yf,useMemo:Eo,useReducer:s0,useRef:Ic,useState:function(){return s0(Ui)},useDebugValue:Tp,useDeferredValue:function(o,c){var p=Vr();return Gn===null?xf(p,o,c):h0(p,Gn.memoizedState,o,c)},useTransition:function(){var o=s0(Ui)[0],c=Vr().memoizedState;return[typeof o=="boolean"?o:hf(o),c]},useSyncExternalStore:a0,useId:$o,useHostTransitionStatus:Cf,useFormState:nn,useActionState:nn,useOptimistic:function(o,c){var p=Vr();return Gn!==null?mf(p,Gn,o,c):(p.baseState=o,[o,p.queue.dispatch])},useMemoCache:pf,useCacheRefresh:xb},Hr=null,Xs=0;function Np(o){var c=Xs;return Xs+=1,Hr===null&&(Hr=[]),Wv(Hr,o,c)}function _f(o,c){c=c.props.ref,o.ref=c!==void 0?c:null}function Eu(o,c){throw c.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(c),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":o)))}function $u(o){var c=o._init;return c(o._payload)}function x0(o){function c(ce,ie){if(o){var ge=ce.deletions;ge===null?(ce.deletions=[ie],ce.flags|=16):ge.push(ie)}}function p(ce,ie){if(!o)return null;for(;ie!==null;)c(ce,ie),ie=ie.sibling;return null}function x(ce){for(var ie=new Map;ce!==null;)ce.key!==null?ie.set(ce.key,ce):ie.set(ce.index,ce),ce=ce.sibling;return ie}function S(ce,ie){return ce=_s(ce,ie),ce.index=0,ce.sibling=null,ce}function R(ce,ie,ge){return ce.index=ge,o?(ge=ce.alternate,ge!==null?(ge=ge.index,ge<ie?(ce.flags|=67108866,ie):ge):(ce.flags|=67108866,ie)):(ce.flags|=1048576,ie)}function I(ce){return o&&ce.alternate===null&&(ce.flags|=67108866),ce}function F(ce,ie,ge,Te){return ie===null||ie.tag!==6?(ie=Hv(ge,ce.mode,Te),ie.return=ce,ie):(ie=S(ie,ge),ie.return=ce,ie)}function J(ce,ie,ge,Te){var lt=ge.type;return lt===C?$e(ce,ie,ge.props.children,Te,ge.key):ie!==null&&(ie.elementType===lt||typeof lt=="object"&&lt!==null&&lt.$$typeof===P&&$u(lt)===ie.type)?(ie=S(ie,ge.props),_f(ie,ge),ie.return=ce,ie):(ie=dp(ge.type,ge.key,ge.props,null,ce.mode,Te),_f(ie,ge),ie.return=ce,ie)}function ve(ce,ie,ge,Te){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ge.containerInfo||ie.stateNode.implementation!==ge.implementation?(ie=Rc(ge,ce.mode,Te),ie.return=ce,ie):(ie=S(ie,ge.children||[]),ie.return=ce,ie)}function $e(ce,ie,ge,Te,lt){return ie===null||ie.tag!==7?(ie=mu(ge,ce.mode,Te,lt),ie.return=ce,ie):(ie=S(ie,ge),ie.return=ce,ie)}function Ve(ce,ie,ge){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Hv(""+ie,ce.mode,ge),ie.return=ce,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ge=dp(ie.type,ie.key,ie.props,null,ce.mode,ge),_f(ge,ie),ge.return=ce,ge;case w:return ie=Rc(ie,ce.mode,ge),ie.return=ce,ie;case P:var Te=ie._init;return ie=Te(ie._payload),Ve(ce,ie,ge)}if(he(ie)||re(ie))return ie=mu(ie,ce.mode,ge,null),ie.return=ce,ie;if(typeof ie.then=="function")return Ve(ce,Np(ie),ge);if(ie.$$typeof===N)return Ve(ce,pp(ce,ie),ge);Eu(ce,ie)}return null}function Ce(ce,ie,ge,Te){var lt=ie!==null?ie.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return lt!==null?null:F(ce,ie,""+ge,Te);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:return ge.key===lt?J(ce,ie,ge,Te):null;case w:return ge.key===lt?ve(ce,ie,ge,Te):null;case P:return lt=ge._init,ge=lt(ge._payload),Ce(ce,ie,ge,Te)}if(he(ge)||re(ge))return lt!==null?null:$e(ce,ie,ge,Te,null);if(typeof ge.then=="function")return Ce(ce,ie,Np(ge),Te);if(ge.$$typeof===N)return Ce(ce,ie,pp(ce,ge),Te);Eu(ce,ge)}return null}function ye(ce,ie,ge,Te,lt){if(typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint")return ce=ce.get(ge)||null,F(ie,ce,""+Te,lt);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case v:return ce=ce.get(Te.key===null?ge:Te.key)||null,J(ie,ce,Te,lt);case w:return ce=ce.get(Te.key===null?ge:Te.key)||null,ve(ie,ce,Te,lt);case P:var cn=Te._init;return Te=cn(Te._payload),ye(ce,ie,ge,Te,lt)}if(he(Te)||re(Te))return ce=ce.get(ge)||null,$e(ie,ce,Te,lt,null);if(typeof Te.then=="function")return ye(ce,ie,ge,Np(Te),lt);if(Te.$$typeof===N)return ye(ce,ie,ge,pp(ie,Te),lt);Eu(ie,Te)}return null}function Tt(ce,ie,ge,Te){for(var lt=null,cn=null,xt=ie,At=ie=0,as=null;xt!==null&&At<ge.length;At++){xt.index>At?(as=xt,xt=null):as=xt.sibling;var Rn=Ce(ce,xt,ge[At],Te);if(Rn===null){xt===null&&(xt=as);break}o&&xt&&Rn.alternate===null&&c(ce,xt),ie=R(Rn,ie,At),cn===null?lt=Rn:cn.sibling=Rn,cn=Rn,xt=as}if(At===ge.length)return p(ce,xt),yn&&gu(ce,At),lt;if(xt===null){for(;At<ge.length;At++)xt=Ve(ce,ge[At],Te),xt!==null&&(ie=R(xt,ie,At),cn===null?lt=xt:cn.sibling=xt,cn=xt);return yn&&gu(ce,At),lt}for(xt=x(xt);At<ge.length;At++)as=ye(xt,ce,At,ge[At],Te),as!==null&&(o&&as.alternate!==null&&xt.delete(as.key===null?At:as.key),ie=R(as,ie,At),cn===null?lt=as:cn.sibling=as,cn=as);return o&&xt.forEach(function(Nl){return c(ce,Nl)}),yn&&gu(ce,At),lt}function $t(ce,ie,ge,Te){if(ge==null)throw Error(r(151));for(var lt=null,cn=null,xt=ie,At=ie=0,as=null,Rn=ge.next();xt!==null&&!Rn.done;At++,Rn=ge.next()){xt.index>At?(as=xt,xt=null):as=xt.sibling;var Nl=Ce(ce,xt,Rn.value,Te);if(Nl===null){xt===null&&(xt=as);break}o&&xt&&Nl.alternate===null&&c(ce,xt),ie=R(Nl,ie,At),cn===null?lt=Nl:cn.sibling=Nl,cn=Nl,xt=as}if(Rn.done)return p(ce,xt),yn&&gu(ce,At),lt;if(xt===null){for(;!Rn.done;At++,Rn=ge.next())Rn=Ve(ce,Rn.value,Te),Rn!==null&&(ie=R(Rn,ie,At),cn===null?lt=Rn:cn.sibling=Rn,cn=Rn);return yn&&gu(ce,At),lt}for(xt=x(xt);!Rn.done;At++,Rn=ge.next())Rn=ye(xt,ce,At,Rn.value,Te),Rn!==null&&(o&&Rn.alternate!==null&&xt.delete(Rn.key===null?At:Rn.key),ie=R(Rn,ie,At),cn===null?lt=Rn:cn.sibling=Rn,cn=Rn);return o&&xt.forEach(function(Rj){return c(ce,Rj)}),yn&&gu(ce,At),lt}function Qn(ce,ie,ge,Te){if(typeof ge=="object"&&ge!==null&&ge.type===C&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:e:{for(var lt=ge.key;ie!==null;){if(ie.key===lt){if(lt=ge.type,lt===C){if(ie.tag===7){p(ce,ie.sibling),Te=S(ie,ge.props.children),Te.return=ce,ce=Te;break e}}else if(ie.elementType===lt||typeof lt=="object"&&lt!==null&&lt.$$typeof===P&&$u(lt)===ie.type){p(ce,ie.sibling),Te=S(ie,ge.props),_f(Te,ge),Te.return=ce,ce=Te;break e}p(ce,ie);break}else c(ce,ie);ie=ie.sibling}ge.type===C?(Te=mu(ge.props.children,ce.mode,Te,ge.key),Te.return=ce,ce=Te):(Te=dp(ge.type,ge.key,ge.props,null,ce.mode,Te),_f(Te,ge),Te.return=ce,ce=Te)}return I(ce);case w:e:{for(lt=ge.key;ie!==null;){if(ie.key===lt)if(ie.tag===4&&ie.stateNode.containerInfo===ge.containerInfo&&ie.stateNode.implementation===ge.implementation){p(ce,ie.sibling),Te=S(ie,ge.children||[]),Te.return=ce,ce=Te;break e}else{p(ce,ie);break}else c(ce,ie);ie=ie.sibling}Te=Rc(ge,ce.mode,Te),Te.return=ce,ce=Te}return I(ce);case P:return lt=ge._init,ge=lt(ge._payload),Qn(ce,ie,ge,Te)}if(he(ge))return Tt(ce,ie,ge,Te);if(re(ge)){if(lt=re(ge),typeof lt!="function")throw Error(r(150));return ge=lt.call(ge),$t(ce,ie,ge,Te)}if(typeof ge.then=="function")return Qn(ce,ie,Np(ge),Te);if(ge.$$typeof===N)return Qn(ce,ie,pp(ce,ge),Te);Eu(ce,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,ie!==null&&ie.tag===6?(p(ce,ie.sibling),Te=S(ie,ge),Te.return=ce,ce=Te):(p(ce,ie),Te=Hv(ge,ce.mode,Te),Te.return=ce,ce=Te),I(ce)):p(ce,ie)}return function(ce,ie,ge,Te){try{Xs=0;var lt=Qn(ce,ie,ge,Te);return Hr=null,lt}catch(xt){if(xt===js||xt===gp)throw xt;var cn=zs(29,xt,null,ce.mode);return cn.lanes=Te,cn.return=ce,cn}finally{}}}var Ru=x0(!0),_b=x0(!1),Sa=se(null),Es=null;function Za(o){var c=o.alternate;de(_r,_r.current&1),de(Sa,o),Es===null&&(c===null||wu.current!==null||c.memoizedState!==null)&&(Es=o)}function jb(o){if(o.tag===22){if(de(_r,_r.current),de(Sa,o),Es===null){var c=o.alternate;c!==null&&c.memoizedState!==null&&(Es=o)}}else Ro()}function Ro(){de(_r,_r.current),de(Sa,Sa.current)}function Gi(o){Oe(Sa),Es===o&&(Es=null),Oe(_r)}var _r=se(0);function jf(o){for(var c=o;c!==null;){if(c.tag===13){var p=c.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||Rs(p)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}function Pc(o,c,p,x){c=o.memoizedState,p=p(x,c),p=p==null?c:h({},c,p),o.memoizedState=p,o.lanes===0&&(o.updateQueue.baseState=p)}var Ef={enqueueSetState:function(o,c,p){o=o._reactInternals;var x=bs(),S=pl(x);S.payload=c,p!=null&&(S.callback=p),c=_o(o,S,x),c!==null&&(Ea(c,o,x),cf(c,o,x))},enqueueReplaceState:function(o,c,p){o=o._reactInternals;var x=bs(),S=pl(x);S.tag=1,S.payload=c,p!=null&&(S.callback=p),c=_o(o,S,x),c!==null&&(Ea(c,o,x),cf(c,o,x))},enqueueForceUpdate:function(o,c){o=o._reactInternals;var p=bs(),x=pl(p);x.tag=2,c!=null&&(x.callback=c),c=_o(o,x,p),c!==null&&(Ea(c,o,p),cf(c,o,p))}};function $f(o,c,p,x,S,R,I){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(x,R,I):c.prototype&&c.prototype.isPureReactComponent?!Bi(p,x)||!Bi(S,R):!0}function Eb(o,c,p,x){o=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(p,x),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(p,x),c.state!==o&&Ef.enqueueReplaceState(c,c.state,null)}function yl(o,c){var p=c;if("ref"in c){p={};for(var x in c)x!=="ref"&&(p[x]=c[x])}if(o=o.defaultProps){p===c&&(p=h({},p));for(var S in o)p[S]===void 0&&(p[S]=o[S])}return p}var Ou=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function b0(o){Ou(o)}function Lp(o){console.error(o)}function $b(o){Ou(o)}function Rf(o,c){try{var p=o.onUncaughtError;p(c.value,{componentStack:c.stack})}catch(x){setTimeout(function(){throw x})}}function zi(o,c,p){try{var x=o.onCaughtError;x(p.value,{componentStack:p.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function Mp(o,c,p){return p=pl(p),p.tag=3,p.payload={element:null},p.callback=function(){Rf(o,c)},p}function w0(o){return o=pl(o),o.tag=3,o}function Rb(o,c,p,x){var S=p.type.getDerivedStateFromError;if(typeof S=="function"){var R=x.value;o.payload=function(){return S(R)},o.callback=function(){zi(c,p,x)}}var I=p.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(o.callback=function(){zi(c,p,x),typeof S!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var F=x.stack;this.componentDidCatch(x.value,{componentStack:F!==null?F:""})})}function Ob(o,c,p,x,S){if(p.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){if(c=p.alternate,c!==null&&of(c,p,S,!0),p=Sa.current,p!==null){switch(p.tag){case 13:return Es===null?B0():p.alternate===null&&jr===0&&(jr=3),p.flags&=-257,p.flags|=65536,p.lanes=S,x===Xv?p.flags|=16384:(c=p.updateQueue,c===null?p.updateQueue=new Set([x]):c.add(x),G0(o,x,S)),!1;case 22:return p.flags|=65536,x===Xv?p.flags|=16384:(c=p.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([x])},p.updateQueue=c):(p=c.retryQueue,p===null?c.retryQueue=new Set([x]):p.add(x)),G0(o,x,S)),!1}throw Error(r(435,p.tag))}return G0(o,x,S),B0(),!1}if(yn)return c=Sa.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=S,x!==Oc&&(o=Error(r(422),{cause:x}),fl(Ss(o,p)))):(x!==Oc&&(c=Error(r(423),{cause:x}),fl(Ss(c,p))),o=o.current.alternate,o.flags|=65536,S&=-S,o.lanes|=S,x=Ss(x,p),S=Mp(o.stateNode,x,S),fi(o,S),jr!==4&&(jr=2)),!1;var R=Error(r(520),{cause:x});if(R=Ss(R,p),Df===null?Df=[R]:Df.push(R),jr!==4&&(jr=2),c===null)return!0;x=Ss(x,p),p=c;do{switch(p.tag){case 3:return p.flags|=65536,o=S&-S,p.lanes|=o,o=Mp(p.stateNode,x,o),fi(p,o),!1;case 1:if(c=p.type,R=p.stateNode,(p.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(_l===null||!_l.has(R))))return p.flags|=65536,S&=-S,p.lanes|=S,S=w0(S),Rb(S,o,p,x),fi(p,S),!1}p=p.return}while(p!==null);return!1}var Tb=Error(r(461)),ns=!1;function lr(o,c,p,x){c.child=o===null?_b(c,null,p,x):Ru(c,o.child,p,x)}function Ip(o,c,p,x,S){p=p.render;var R=c.ref;if("ref"in x){var I={};for(var F in x)F!=="ref"&&(I[F]=x[F])}else I=x;return yu(c),x=e0(o,c,p,I,R,S),F=n0(),o!==null&&!ns?(Su(o,c,S),Oo(o,c,S)):(yn&&F&&Kv(c),c.flags|=1,lr(o,c,x,S),c.child)}function Pp(o,c,p,x,S){if(o===null){var R=p.type;return typeof R=="function"&&!pu(R)&&R.defaultProps===void 0&&p.compare===null?(c.tag=15,c.type=R,Dp(o,c,R,x,S)):(o=dp(p.type,null,x,c,c.mode,S),o.ref=c.ref,o.return=c,c.child=o)}if(R=o.child,!mi(o,S)){var I=R.memoizedProps;if(p=p.compare,p=p!==null?p:Bi,p(I,x)&&o.ref===c.ref)return Oo(o,c,S)}return c.flags|=1,o=_s(R,x),o.ref=c.ref,o.return=c,c.child=o}function Dp(o,c,p,x,S){if(o!==null){var R=o.memoizedProps;if(Bi(R,x)&&o.ref===c.ref)if(ns=!1,c.pendingProps=x=R,mi(o,S))(o.flags&131072)!==0&&(ns=!0);else return c.lanes=o.lanes,Oo(o,c,S)}return Dc(o,c,p,x,S)}function Of(o,c,p){var x=c.pendingProps,S=x.children,R=o!==null?o.memoizedState:null;if(x.mode==="hidden"){if((c.flags&128)!==0){if(x=R!==null?R.baseLanes|p:p,o!==null){for(S=c.child=o.child,R=0;S!==null;)R=R|S.lanes|S.childLanes,S=S.sibling;c.childLanes=R&~x}else c.childLanes=0,c.child=null;return Tu(o,c,x,p)}if((p&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},o!==null&&mp(c,R!==null?R.cachePool:null),R!==null?jo(c,R):yp(),jb(c);else return c.lanes=c.childLanes=536870912,Tu(o,c,R!==null?R.baseLanes|p:p,p)}else R!==null?(mp(c,R.cachePool),jo(c,R),Ro(),c.memoizedState=null):(o!==null&&mp(c,null),yp(),Ro());return lr(o,c,S,p),c.child}function Tu(o,c,p,x){var S=So();return S=S===null?null:{parent:tr._currentValue,pool:S},c.memoizedState={baseLanes:p,cachePool:S},o!==null&&mp(c,null),yp(),jb(c),o!==null&&of(o,c,x,!0),null}function St(o,c){var p=c.ref;if(p===null)o!==null&&o.ref!==null&&(c.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(o===null||o.ref!==p)&&(c.flags|=4194816)}}function Dc(o,c,p,x,S){return yu(c),p=e0(o,c,p,x,void 0,S),x=n0(),o!==null&&!ns?(Su(o,c,S),Oo(o,c,S)):(yn&&x&&Kv(c),c.flags|=1,lr(o,c,p,S),c.child)}function Vp(o,c,p,x,S,R){return yu(c),c.updateQueue=null,p=db(c,x,p,S),cb(o),x=n0(),o!==null&&!ns?(Su(o,c,R),Oo(o,c,R)):(yn&&x&&Kv(c),c.flags|=1,lr(o,c,p,R),c.child)}function xl(o,c,p,x,S){if(yu(c),c.stateNode===null){var R=hu,I=p.contextType;typeof I=="object"&&I!==null&&(R=Sr(I)),R=new p(x,R),c.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Ef,c.stateNode=R,R._reactInternals=c,R=c.stateNode,R.props=x,R.state=c.memoizedState,R.refs={},bu(c),I=p.contextType,R.context=typeof I=="object"&&I!==null?Sr(I):hu,R.state=c.memoizedState,I=p.getDerivedStateFromProps,typeof I=="function"&&(Pc(c,p,I,x),R.state=c.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(I=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),I!==R.state&&Ef.enqueueReplaceState(R,R.state,null),vs(c,x,R,S),hi(),R.state=c.memoizedState),typeof R.componentDidMount=="function"&&(c.flags|=4194308),x=!0}else if(o===null){R=c.stateNode;var F=c.memoizedProps,J=yl(p,F);R.props=J;var ve=R.context,$e=p.contextType;I=hu,typeof $e=="object"&&$e!==null&&(I=Sr($e));var Ve=p.getDerivedStateFromProps;$e=typeof Ve=="function"||typeof R.getSnapshotBeforeUpdate=="function",F=c.pendingProps!==F,$e||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F||ve!==I)&&Eb(c,R,x,I),Fi=!1;var Ce=c.memoizedState;R.state=Ce,vs(c,x,R,S),hi(),ve=c.memoizedState,F||Ce!==ve||Fi?(typeof Ve=="function"&&(Pc(c,p,Ve,x),ve=c.memoizedState),(J=Fi||$f(c,p,J,x,Ce,ve,I))?($e||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=x,c.memoizedState=ve),R.props=x,R.state=ve,R.context=I,x=J):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),x=!1)}else{R=c.stateNode,kc(o,c),I=c.memoizedProps,$e=yl(p,I),R.props=$e,Ve=c.pendingProps,Ce=R.context,ve=p.contextType,J=hu,typeof ve=="object"&&ve!==null&&(J=Sr(ve)),F=p.getDerivedStateFromProps,(ve=typeof F=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(I!==Ve||Ce!==J)&&Eb(c,R,x,J),Fi=!1,Ce=c.memoizedState,R.state=Ce,vs(c,x,R,S),hi();var ye=c.memoizedState;I!==Ve||Ce!==ye||Fi||o!==null&&o.dependencies!==null&&hp(o.dependencies)?(typeof F=="function"&&(Pc(c,p,F,x),ye=c.memoizedState),($e=Fi||$f(c,p,$e,x,Ce,ye,J)||o!==null&&o.dependencies!==null&&hp(o.dependencies))?(ve||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(x,ye,J),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(x,ye,J)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||I===o.memoizedProps&&Ce===o.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||I===o.memoizedProps&&Ce===o.memoizedState||(c.flags|=1024),c.memoizedProps=x,c.memoizedState=ye),R.props=x,R.state=ye,R.context=J,x=$e):(typeof R.componentDidUpdate!="function"||I===o.memoizedProps&&Ce===o.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||I===o.memoizedProps&&Ce===o.memoizedState||(c.flags|=1024),x=!1)}return R=x,St(o,c),x=(c.flags&128)!==0,R||x?(R=c.stateNode,p=x&&typeof p.getDerivedStateFromError!="function"?null:R.render(),c.flags|=1,o!==null&&x?(c.child=Ru(c,o.child,null,S),c.child=Ru(c,null,p,S)):lr(o,c,p,S),c.memoizedState=R.state,o=c.child):o=Oo(o,c,S),o}function Ab(o,c,p,x){return af(),c.flags|=256,lr(o,c,p,x),c.child}var Tf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bp(o){return{baseLanes:o,cachePool:rb()}}function rs(o,c,p){return o=o!==null?o.childLanes&~p:0,c&&(o|=Wa),o}function kb(o,c,p){var x=c.pendingProps,S=!1,R=(c.flags&128)!==0,I;if((I=R)||(I=o!==null&&o.memoizedState===null?!1:(_r.current&2)!==0),I&&(S=!0,c.flags&=-129),I=(c.flags&32)!==0,c.flags&=-33,o===null){if(yn){if(S?Za(c):Ro(),yn){var F=pr,J;if(J=F){e:{for(J=F,F=Hs;J.nodeType!==8;){if(!F){F=null;break e}if(J=vi(J.nextSibling),J===null){F=null;break e}}F=J}F!==null?(c.memoizedState={dehydrated:F,treeContext:or!==null?{id:hr,overflow:Co}:null,retryLane:536870912,hydrationErrors:null},J=zs(18,null,null,0),J.stateNode=F,J.return=c,c.child=J,zr=c,pr=null,J=!0):J=!1}J||qa(c)}if(F=c.memoizedState,F!==null&&(F=F.dehydrated,F!==null))return Rs(F)?c.lanes=32:c.lanes=536870912,null;Gi(c)}return F=x.children,x=x.fallback,S?(Ro(),S=c.mode,F=Af({mode:"hidden",children:F},S),x=mu(x,S,p,null),F.return=c,x.return=c,F.sibling=x,c.child=F,S=c.child,S.memoizedState=Bp(p),S.childLanes=rs(o,I,p),c.memoizedState=Tf,x):(Za(c),C0(c,F))}if(J=o.memoizedState,J!==null&&(F=J.dehydrated,F!==null)){if(R)c.flags&256?(Za(c),c.flags&=-257,c=S0(o,c,p)):c.memoizedState!==null?(Ro(),c.child=o.child,c.flags|=128,c=null):(Ro(),S=x.fallback,F=c.mode,x=Af({mode:"visible",children:x.children},F),S=mu(S,F,p,null),S.flags|=2,x.return=c,S.return=c,x.sibling=S,c.child=x,Ru(c,o.child,null,p),x=c.child,x.memoizedState=Bp(p),x.childLanes=rs(o,I,p),c.memoizedState=Tf,c=S);else if(Za(c),Rs(F)){if(I=F.nextSibling&&F.nextSibling.dataset,I)var ve=I.dgst;I=ve,x=Error(r(419)),x.stack="",x.digest=I,fl({value:x,source:null,stack:null}),c=S0(o,c,p)}else if(ns||of(o,c,p,!1),I=(p&o.childLanes)!==0,ns||I){if(I=ar,I!==null&&(x=p&-p,x=(x&42)!==0?1:ms(x),x=(x&(I.suspendedLanes|p))!==0?0:x,x!==0&&x!==J.retryLane))throw J.retryLane=x,fu(o,x),Ea(I,o,x),Tb;F.data==="$?"||B0(),c=S0(o,c,p)}else F.data==="$?"?(c.flags|=192,c.child=o.child,c=null):(o=J.treeContext,pr=vi(F.nextSibling),zr=c,yn=!0,di=null,Hs=!1,o!==null&&(za[Ha++]=hr,za[Ha++]=Co,za[Ha++]=or,hr=o.id,Co=o.overflow,or=c),c=C0(c,x.children),c.flags|=4096);return c}return S?(Ro(),S=x.fallback,F=c.mode,J=o.child,ve=J.sibling,x=_s(J,{mode:"hidden",children:x.children}),x.subtreeFlags=J.subtreeFlags&65011712,ve!==null?S=_s(ve,S):(S=mu(S,F,p,null),S.flags|=2),S.return=c,x.return=c,x.sibling=S,c.child=x,x=S,S=c.child,F=o.child.memoizedState,F===null?F=Bp(p):(J=F.cachePool,J!==null?(ve=tr._currentValue,J=J.parent!==ve?{parent:ve,pool:ve}:J):J=rb(),F={baseLanes:F.baseLanes|p,cachePool:J}),S.memoizedState=F,S.childLanes=rs(o,I,p),c.memoizedState=Tf,x):(Za(c),p=o.child,o=p.sibling,p=_s(p,{mode:"visible",children:x.children}),p.return=c,p.sibling=null,o!==null&&(I=c.deletions,I===null?(c.deletions=[o],c.flags|=16):I.push(o)),c.child=p,c.memoizedState=null,p)}function C0(o,c){return c=Af({mode:"visible",children:c},o.mode),c.return=o,o.child=c}function Af(o,c){return o=zs(22,o,null,c),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function S0(o,c,p){return Ru(c,o.child,null,p),o=C0(c,c.pendingProps.children),o.flags|=2,c.memoizedState=null,o}function _0(o,c,p){o.lanes|=c;var x=o.alternate;x!==null&&(x.lanes|=c),qs(o.return,c,p)}function j0(o,c,p,x,S){var R=o.memoizedState;R===null?o.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:x,tail:p,tailMode:S}:(R.isBackwards=c,R.rendering=null,R.renderingStartTime=0,R.last=x,R.tail=p,R.tailMode=S)}function Nb(o,c,p){var x=c.pendingProps,S=x.revealOrder,R=x.tail;if(lr(o,c,x.children,p),x=_r.current,(x&2)!==0)x=x&1|2,c.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=c.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&_0(o,p,c);else if(o.tag===19)_0(o,p,c);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===c)break e;for(;o.sibling===null;){if(o.return===null||o.return===c)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}x&=1}switch(de(_r,x),S){case"forwards":for(p=c.child,S=null;p!==null;)o=p.alternate,o!==null&&jf(o)===null&&(S=p),p=p.sibling;p=S,p===null?(S=c.child,c.child=null):(S=p.sibling,p.sibling=null),j0(c,!1,S,p,R);break;case"backwards":for(p=null,S=c.child,c.child=null;S!==null;){if(o=S.alternate,o!==null&&jf(o)===null){c.child=S;break}o=S.sibling,S.sibling=p,p=S,S=o}j0(c,!0,p,null,R);break;case"together":j0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Oo(o,c,p){if(o!==null&&(c.dependencies=o.dependencies),Sl|=c.lanes,(p&c.childLanes)===0)if(o!==null){if(of(o,c,p,!1),(p&c.childLanes)===0)return null}else return null;if(o!==null&&c.child!==o.child)throw Error(r(153));if(c.child!==null){for(o=c.child,p=_s(o,o.pendingProps),c.child=p,p.return=c;o.sibling!==null;)o=o.sibling,p=p.sibling=_s(o,o.pendingProps),p.return=c;p.sibling=null}return c.child}function mi(o,c){return(o.lanes&c)!==0?!0:(o=o.dependencies,!!(o!==null&&hp(o)))}function $s(o,c,p){switch(c.tag){case 3:Xe(c,c.stateNode.containerInfo),wa(c,tr,o.memoizedState.cache),af();break;case 27:case 5:Ot(c);break;case 4:Xe(c,c.stateNode.containerInfo);break;case 10:wa(c,c.type,c.memoizedProps.value);break;case 13:var x=c.memoizedState;if(x!==null)return x.dehydrated!==null?(Za(c),c.flags|=128,null):(p&c.child.childLanes)!==0?kb(o,c,p):(Za(c),o=Oo(o,c,p),o!==null?o.sibling:null);Za(c);break;case 19:var S=(o.flags&128)!==0;if(x=(p&c.childLanes)!==0,x||(of(o,c,p,!1),x=(p&c.childLanes)!==0),S){if(x)return Nb(o,c,p);c.flags|=128}if(S=c.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),de(_r,_r.current),x)break;return null;case 22:case 23:return c.lanes=0,Of(o,c,p);case 24:wa(c,tr,o.memoizedState.cache)}return Oo(o,c,p)}function Fp(o,c,p){if(o!==null)if(o.memoizedProps!==c.pendingProps)ns=!0;else{if(!mi(o,p)&&(c.flags&128)===0)return ns=!1,$s(o,c,p);ns=(o.flags&131072)!==0}else ns=!1,yn&&(c.flags&1048576)!==0&&qv(c,nf,c.index);switch(c.lanes=0,c.tag){case 16:e:{o=c.pendingProps;var x=c.elementType,S=x._init;if(x=S(x._payload),c.type=x,typeof x=="function")pu(x)?(o=yl(x,o),c.tag=1,c=xl(null,c,x,o,p)):(c.tag=0,c=Dc(null,c,x,o,p));else{if(x!=null){if(S=x.$$typeof,S===M){c.tag=11,c=Ip(null,c,x,o,p);break e}else if(S===T){c.tag=14,c=Pp(null,c,x,o,p);break e}}throw c=ue(x)||x,Error(r(306,c,""))}}return c;case 0:return Dc(o,c,c.type,c.pendingProps,p);case 1:return x=c.type,S=yl(x,c.pendingProps),xl(o,c,x,S,p);case 3:e:{if(Xe(c,c.stateNode.containerInfo),o===null)throw Error(r(387));x=c.pendingProps;var R=c.memoizedState;S=R.element,kc(o,c),vs(c,x,null,p);var I=c.memoizedState;if(x=I.cache,wa(c,tr,x),x!==R.cache&&un(c,[tr],p,!0),hi(),x=I.element,R.isDehydrated)if(R={element:x,isDehydrated:!1,cache:I.cache},c.updateQueue.baseState=R,c.memoizedState=R,c.flags&256){c=Ab(o,c,x,p);break e}else if(x!==S){S=Ss(Error(r(424)),c),fl(S),c=Ab(o,c,x,p);break e}else{switch(o=c.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(pr=vi(o.firstChild),zr=c,yn=!0,di=null,Hs=!0,p=_b(c,null,x,p),c.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(af(),x===S){c=Oo(o,c,p);break e}lr(o,c,x,p)}c=c.child}return c;case 26:return St(o,c),o===null?(p=Ow(c.type,null,c.pendingProps,null))?c.memoizedState=p:yn||(p=c.type,o=c.pendingProps,x=Nu(Re.current).createElement(p),x[Qe]=c,x[ft]=o,Yr(x,p,o),kr(x),c.stateNode=x):c.memoizedState=Ow(c.type,o.memoizedProps,c.pendingProps,o.memoizedState),null;case 27:return Ot(c),o===null&&yn&&(x=c.stateNode=Ew(c.type,c.pendingProps,Re.current),zr=c,Hs=!0,S=pr,Qa(c.type)?(Q0=S,pr=vi(x.firstChild)):pr=S),lr(o,c,c.pendingProps.children,p),St(o,c),o===null&&(c.flags|=4194304),c.child;case 5:return o===null&&yn&&((S=x=pr)&&(x=_w(x,c.type,c.pendingProps,Hs),x!==null?(c.stateNode=x,zr=c,pr=vi(x.firstChild),Hs=!1,S=!0):S=!1),S||qa(c)),Ot(c),S=c.type,R=c.pendingProps,I=o!==null?o.memoizedProps:null,x=R.children,sm(S,R)?x=null:I!==null&&sm(S,I)&&(c.flags|=32),c.memoizedState!==null&&(S=e0(o,c,t0,null,null,p),rd._currentValue=S),St(o,c),lr(o,c,x,p),c.child;case 6:return o===null&&yn&&((o=p=pr)&&(p=im(p,c.pendingProps,Hs),p!==null?(c.stateNode=p,zr=c,pr=null,o=!0):o=!1),o||qa(c)),null;case 13:return kb(o,c,p);case 4:return Xe(c,c.stateNode.containerInfo),x=c.pendingProps,o===null?c.child=Ru(c,null,x,p):lr(o,c,x,p),c.child;case 11:return Ip(o,c,c.type,c.pendingProps,p);case 7:return lr(o,c,c.pendingProps,p),c.child;case 8:return lr(o,c,c.pendingProps.children,p),c.child;case 12:return lr(o,c,c.pendingProps.children,p),c.child;case 10:return x=c.pendingProps,wa(c,c.type,x.value),lr(o,c,x.children,p),c.child;case 9:return S=c.type._context,x=c.pendingProps.children,yu(c),S=Sr(S),x=x(S),c.flags|=1,lr(o,c,x,p),c.child;case 14:return Pp(o,c,c.type,c.pendingProps,p);case 15:return Dp(o,c,c.type,c.pendingProps,p);case 19:return Nb(o,c,p);case 31:return x=c.pendingProps,p=c.mode,x={mode:x.mode,children:x.children},o===null?(p=Af(x,p),p.ref=c.ref,c.child=p,p.return=c,c=p):(p=_s(o.child,x),p.ref=c.ref,c.child=p,p.return=c,c=p),c;case 22:return Of(o,c,p);case 24:return yu(c),x=Sr(tr),o===null?(S=So(),S===null&&(S=ar,R=Yv(),S.pooledCache=R,R.refCount++,R!==null&&(S.pooledCacheLanes|=p),S=R),c.memoizedState={parent:x,cache:S},bu(c),wa(c,tr,S)):((o.lanes&p)!==0&&(kc(o,c),vs(c,null,null,p),hi()),S=o.memoizedState,R=c.memoizedState,S.parent!==x?(S={parent:x,cache:x},c.memoizedState=S,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=S),wa(c,tr,x)):(x=R.cache,wa(c,tr,x),x!==S.cache&&un(c,[tr],p,!0))),lr(o,c,c.pendingProps.children,p),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function To(o){o.flags|=4}function Up(o,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!Zr(c)){if(c=Sa.current,c!==null&&((_n&4194048)===_n?Es!==null:(_n&62914560)!==_n&&(_n&536870912)===0||c!==Es))throw Ac=Xv,sb;o.flags|=8192}}function Gp(o,c){c!==null&&(o.flags|=4),o.flags&16384&&(c=o.tag!==22?go():536870912,o.lanes|=c,Hc|=c)}function kf(o,c){if(!yn)switch(o.tailMode){case"hidden":c=o.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var x=null;p!==null;)p.alternate!==null&&(x=p),p=p.sibling;x===null?c||o.tail===null?o.tail=null:o.tail.sibling=null:x.sibling=null}}function nr(o){var c=o.alternate!==null&&o.alternate.child===o.child,p=0,x=0;if(c)for(var S=o.child;S!==null;)p|=S.lanes|S.childLanes,x|=S.subtreeFlags&65011712,x|=S.flags&65011712,S.return=o,S=S.sibling;else for(S=o.child;S!==null;)p|=S.lanes|S.childLanes,x|=S.subtreeFlags,x|=S.flags,S.return=o,S=S.sibling;return o.subtreeFlags|=x,o.childLanes=p,c}function Lb(o,c,p){var x=c.pendingProps;switch(rf(c),c.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nr(c),null;case 1:return nr(c),null;case 3:return p=c.stateNode,x=null,o!==null&&(x=o.memoizedState.cache),c.memoizedState.cache!==x&&(c.flags|=2048),Ka(tr),Je(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(sf(c)?To(c):o===null||o.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Jx())),nr(c),null;case 26:return p=c.memoizedState,o===null?(To(c),p!==null?(nr(c),Up(c,p)):(nr(c),c.flags&=-16777217)):p?p!==o.memoizedState?(To(c),nr(c),Up(c,p)):(nr(c),c.flags&=-16777217):(o.memoizedProps!==x&&To(c),nr(c),c.flags&=-16777217),null;case 27:tn(c),p=Re.current;var S=c.type;if(o!==null&&c.stateNode!=null)o.memoizedProps!==x&&To(c);else{if(!x){if(c.stateNode===null)throw Error(r(166));return nr(c),null}o=_e.current,sf(c)?Wx(c):(o=Ew(S,x,p),c.stateNode=o,To(c))}return nr(c),null;case 5:if(tn(c),p=c.type,o!==null&&c.stateNode!=null)o.memoizedProps!==x&&To(c);else{if(!x){if(c.stateNode===null)throw Error(r(166));return nr(c),null}if(o=_e.current,sf(c))Wx(c);else{switch(S=Nu(Re.current),o){case 1:o=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:o=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":o=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":o=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":o=S.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof x.is=="string"?S.createElement("select",{is:x.is}):S.createElement("select"),x.multiple?o.multiple=!0:x.size&&(o.size=x.size);break;default:o=typeof x.is=="string"?S.createElement(p,{is:x.is}):S.createElement(p)}}o[Qe]=c,o[ft]=x;e:for(S=c.child;S!==null;){if(S.tag===5||S.tag===6)o.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===c)break e;for(;S.sibling===null;){if(S.return===null||S.return===c)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}c.stateNode=o;e:switch(Yr(o,p,x),p){case"button":case"input":case"select":case"textarea":o=!!x.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&To(c)}}return nr(c),c.flags&=-16777217,null;case 6:if(o&&c.stateNode!=null)o.memoizedProps!==x&&To(c);else{if(typeof x!="string"&&c.stateNode===null)throw Error(r(166));if(o=Re.current,sf(c)){if(o=c.stateNode,p=c.memoizedProps,x=null,S=zr,S!==null)switch(S.tag){case 27:case 5:x=S.memoizedProps}o[Qe]=c,o=!!(o.nodeValue===p||x!==null&&x.suppressHydrationWarning===!0||bw(o.nodeValue,p)),o||qa(c)}else o=Nu(o).createTextNode(x),o[Qe]=c,c.stateNode=o}return nr(c),null;case 13:if(x=c.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(S=sf(c),x!==null&&x.dehydrated!==null){if(o===null){if(!S)throw Error(r(318));if(S=c.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Qe]=c}else af(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;nr(c),S=!1}else S=Jx(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=S),S=!0;if(!S)return c.flags&256?(Gi(c),c):(Gi(c),null)}if(Gi(c),(c.flags&128)!==0)return c.lanes=p,c;if(p=x!==null,o=o!==null&&o.memoizedState!==null,p){x=c.child,S=null,x.alternate!==null&&x.alternate.memoizedState!==null&&x.alternate.memoizedState.cachePool!==null&&(S=x.alternate.memoizedState.cachePool.pool);var R=null;x.memoizedState!==null&&x.memoizedState.cachePool!==null&&(R=x.memoizedState.cachePool.pool),R!==S&&(x.flags|=2048)}return p!==o&&p&&(c.child.flags|=8192),Gp(c,c.updateQueue),nr(c),null;case 4:return Je(),o===null&&Y0(c.stateNode.containerInfo),nr(c),null;case 10:return Ka(c.type),nr(c),null;case 19:if(Oe(_r),S=c.memoizedState,S===null)return nr(c),null;if(x=(c.flags&128)!==0,R=S.rendering,R===null)if(x)kf(S,!1);else{if(jr!==0||o!==null&&(o.flags&128)!==0)for(o=c.child;o!==null;){if(R=jf(o),R!==null){for(c.flags|=128,kf(S,!1),o=R.updateQueue,c.updateQueue=o,Gp(c,o),c.subtreeFlags=0,o=p,p=c.child;p!==null;)tf(p,o),p=p.sibling;return de(_r,_r.current&1|2),c.child}o=o.sibling}S.tail!==null&&Ge()>qc&&(c.flags|=128,x=!0,kf(S,!1),c.lanes=4194304)}else{if(!x)if(o=jf(R),o!==null){if(c.flags|=128,x=!0,o=o.updateQueue,c.updateQueue=o,Gp(c,o),kf(S,!0),S.tail===null&&S.tailMode==="hidden"&&!R.alternate&&!yn)return nr(c),null}else 2*Ge()-S.renderingStartTime>qc&&p!==536870912&&(c.flags|=128,x=!0,kf(S,!1),c.lanes=4194304);S.isBackwards?(R.sibling=c.child,c.child=R):(o=S.last,o!==null?o.sibling=R:c.child=R,S.last=R)}return S.tail!==null?(c=S.tail,S.rendering=c,S.tail=c.sibling,S.renderingStartTime=Ge(),c.sibling=null,o=_r.current,de(_r,x?o&1|2:o&1),c):(nr(c),null);case 22:case 23:return Gi(c),Jv(),x=c.memoizedState!==null,o!==null?o.memoizedState!==null!==x&&(c.flags|=8192):x&&(c.flags|=8192),x?(p&536870912)!==0&&(c.flags&128)===0&&(nr(c),c.subtreeFlags&6&&(c.flags|=8192)):nr(c),p=c.updateQueue,p!==null&&Gp(c,p.retryQueue),p=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==p&&(c.flags|=2048),o!==null&&Oe(xu),null;case 24:return p=null,o!==null&&(p=o.memoizedState.cache),c.memoizedState.cache!==p&&(c.flags|=2048),Ka(tr),nr(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function Mb(o,c){switch(rf(c),c.tag){case 1:return o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 3:return Ka(tr),Je(),o=c.flags,(o&65536)!==0&&(o&128)===0?(c.flags=o&-65537|128,c):null;case 26:case 27:case 5:return tn(c),null;case 13:if(Gi(c),o=c.memoizedState,o!==null&&o.dehydrated!==null){if(c.alternate===null)throw Error(r(340));af()}return o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 19:return Oe(_r),null;case 4:return Je(),null;case 10:return Ka(c.type),null;case 22:case 23:return Gi(c),Jv(),o!==null&&Oe(xu),o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 24:return Ka(tr),null;case 25:return null;default:return null}}function Ib(o,c){switch(rf(c),c.tag){case 3:Ka(tr),Je();break;case 26:case 27:case 5:tn(c);break;case 4:Je();break;case 13:Gi(c);break;case 19:Oe(_r);break;case 10:Ka(c.type);break;case 22:case 23:Gi(c),Jv(),o!==null&&Oe(xu);break;case 24:Ka(tr)}}function Nf(o,c){try{var p=c.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var S=x.next;p=S;do{if((p.tag&o)===o){x=void 0;var R=p.create,I=p.inst;x=R(),I.destroy=x}p=p.next}while(p!==S)}}catch(F){rr(c,c.return,F)}}function bl(o,c,p){try{var x=c.updateQueue,S=x!==null?x.lastEffect:null;if(S!==null){var R=S.next;x=R;do{if((x.tag&o)===o){var I=x.inst,F=I.destroy;if(F!==void 0){I.destroy=void 0,S=c;var J=p,ve=F;try{ve()}catch($e){rr(S,J,$e)}}}x=x.next}while(x!==R)}}catch($e){rr(c,c.return,$e)}}function Pb(o){var c=o.updateQueue;if(c!==null){var p=o.stateNode;try{Qv(c,p)}catch(x){rr(o,o.return,x)}}}function E0(o,c,p){p.props=yl(o.type,o.memoizedProps),p.state=o.memoizedState;try{p.componentWillUnmount()}catch(x){rr(o,c,x)}}function Vc(o,c){try{var p=o.ref;if(p!==null){switch(o.tag){case 26:case 27:case 5:var x=o.stateNode;break;case 30:x=o.stateNode;break;default:x=o.stateNode}typeof p=="function"?o.refCleanup=p(x):p.current=x}}catch(S){rr(o,c,S)}}function Hi(o,c){var p=o.ref,x=o.refCleanup;if(p!==null)if(typeof x=="function")try{x()}catch(S){rr(o,c,S)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(S){rr(o,c,S)}else p.current=null}function zp(o){var c=o.type,p=o.memoizedProps,x=o.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":p.autoFocus&&x.focus();break e;case"img":p.src?x.src=p.src:p.srcSet&&(x.srcset=p.srcSet)}}catch(S){rr(o,o.return,S)}}function Hp(o,c,p){try{var x=o.stateNode;oj(x,o.type,p,c),x[ft]=c}catch(S){rr(o,o.return,S)}}function Bc(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Qa(o.type)||o.tag===4}function Lf(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Bc(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Qa(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function qp(o,c,p){var x=o.tag;if(x===5||x===6)o=o.stateNode,c?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(o,c):(c=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,c.appendChild(o),p=p._reactRootContainer,p!=null||c.onclick!==null||(c.onclick=nm));else if(x!==4&&(x===27&&Qa(o.type)&&(p=o.stateNode,c=null),o=o.child,o!==null))for(qp(o,c,p),o=o.sibling;o!==null;)qp(o,c,p),o=o.sibling}function Mf(o,c,p){var x=o.tag;if(x===5||x===6)o=o.stateNode,c?p.insertBefore(o,c):p.appendChild(o);else if(x!==4&&(x===27&&Qa(o.type)&&(p=o.stateNode),o=o.child,o!==null))for(Mf(o,c,p),o=o.sibling;o!==null;)Mf(o,c,p),o=o.sibling}function If(o){var c=o.stateNode,p=o.memoizedProps;try{for(var x=o.type,S=c.attributes;S.length;)c.removeAttributeNode(S[0]);Yr(c,x,p),c[Qe]=o,c[ft]=p}catch(R){rr(o,o.return,R)}}var qi=!1,Dn=!1,Ao=!1,Db=typeof WeakSet=="function"?WeakSet:Set,qr=null;function K_(o,c){if(o=o.containerInfo,gi=cm,o=Zx(o),Uv(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var x=p.getSelection&&p.getSelection();if(x&&x.rangeCount!==0){p=x.anchorNode;var S=x.anchorOffset,R=x.focusNode;x=x.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var I=0,F=-1,J=-1,ve=0,$e=0,Ve=o,Ce=null;t:for(;;){for(var ye;Ve!==p||S!==0&&Ve.nodeType!==3||(F=I+S),Ve!==R||x!==0&&Ve.nodeType!==3||(J=I+x),Ve.nodeType===3&&(I+=Ve.nodeValue.length),(ye=Ve.firstChild)!==null;)Ce=Ve,Ve=ye;for(;;){if(Ve===o)break t;if(Ce===p&&++ve===S&&(F=I),Ce===R&&++$e===x&&(J=I),(ye=Ve.nextSibling)!==null)break;Ve=Ce,Ce=Ve.parentNode}Ve=ye}p=F===-1||J===-1?null:{start:F,end:J}}else p=null}p=p||{start:0,end:0}}else p=null;for(rm={focusedElem:o,selectionRange:p},cm=!1,qr=c;qr!==null;)if(c=qr,o=c.child,(c.subtreeFlags&1024)!==0&&o!==null)o.return=c,qr=o;else for(;qr!==null;){switch(c=qr,R=c.alternate,o=c.flags,c.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&R!==null){o=void 0,p=c,S=R.memoizedProps,R=R.memoizedState,x=p.stateNode;try{var Tt=yl(p.type,S,p.elementType===p.type);o=x.getSnapshotBeforeUpdate(Tt,R),x.__reactInternalSnapshotBeforeUpdate=o}catch($t){rr(p,p.return,$t)}}break;case 3:if((o&1024)!==0){if(o=c.stateNode.containerInfo,p=o.nodeType,p===9)W0(o);else if(p===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":W0(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=c.sibling,o!==null){o.return=c.return,qr=o;break}qr=c.return}}function Vb(o,c,p){var x=p.flags;switch(p.tag){case 0:case 11:case 15:wl(o,p),x&4&&Nf(5,p);break;case 1:if(wl(o,p),x&4)if(o=p.stateNode,c===null)try{o.componentDidMount()}catch(I){rr(p,p.return,I)}else{var S=yl(p.type,c.memoizedProps);c=c.memoizedState;try{o.componentDidUpdate(S,c,o.__reactInternalSnapshotBeforeUpdate)}catch(I){rr(p,p.return,I)}}x&64&&Pb(p),x&512&&Vc(p,p.return);break;case 3:if(wl(o,p),x&64&&(o=p.updateQueue,o!==null)){if(c=null,p.child!==null)switch(p.child.tag){case 27:case 5:c=p.child.stateNode;break;case 1:c=p.child.stateNode}try{Qv(o,c)}catch(I){rr(p,p.return,I)}}break;case 27:c===null&&x&4&&If(p);case 26:case 5:wl(o,p),c===null&&x&4&&zp(p),x&512&&Vc(p,p.return);break;case 12:wl(o,p);break;case 13:wl(o,p),x&4&&Ub(o,p),x&64&&(o=p.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(p=Wp.bind(null,p),Qc(o,p))));break;case 22:if(x=p.memoizedState!==null||qi,!x){c=c!==null&&c.memoizedState!==null||Dn,S=qi;var R=Dn;qi=x,(Dn=c)&&!R?No(o,p,(p.subtreeFlags&8772)!==0):wl(o,p),qi=S,Dn=R}break;case 30:break;default:wl(o,p)}}function Bb(o){var c=o.alternate;c!==null&&(o.alternate=null,Bb(c)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(c=o.stateNode,c!==null&&Cs(c)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var mr=null,Ws=!1;function ko(o,c,p){for(p=p.child;p!==null;)Fb(o,c,p),p=p.sibling}function Fb(o,c,p){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Dt,p)}catch{}switch(p.tag){case 26:Dn||Hi(p,c),ko(o,c,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Dn||Hi(p,c);var x=mr,S=Ws;Qa(p.type)&&(mr=p.stateNode,Ws=!1),ko(o,c,p),Kf(p.stateNode),mr=x,Ws=S;break;case 5:Dn||Hi(p,c);case 6:if(x=mr,S=Ws,mr=null,ko(o,c,p),mr=x,Ws=S,mr!==null)if(Ws)try{(mr.nodeType===9?mr.body:mr.nodeName==="HTML"?mr.ownerDocument.body:mr).removeChild(p.stateNode)}catch(R){rr(p,c,R)}else try{mr.removeChild(p.stateNode)}catch(R){rr(p,c,R)}break;case 18:mr!==null&&(Ws?(o=mr,am(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,p.stateNode),th(o)):am(mr,p.stateNode));break;case 4:x=mr,S=Ws,mr=p.stateNode.containerInfo,Ws=!0,ko(o,c,p),mr=x,Ws=S;break;case 0:case 11:case 14:case 15:Dn||bl(2,p,c),Dn||bl(4,p,c),ko(o,c,p);break;case 1:Dn||(Hi(p,c),x=p.stateNode,typeof x.componentWillUnmount=="function"&&E0(p,c,x)),ko(o,c,p);break;case 21:ko(o,c,p);break;case 22:Dn=(x=Dn)||p.memoizedState!==null,ko(o,c,p),Dn=x;break;default:ko(o,c,p)}}function Ub(o,c){if(c.memoizedState===null&&(o=c.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{th(o)}catch(p){rr(c,c.return,p)}}function Y_(o){switch(o.tag){case 13:case 19:var c=o.stateNode;return c===null&&(c=o.stateNode=new Db),c;case 22:return o=o.stateNode,c=o._retryCache,c===null&&(c=o._retryCache=new Db),c;default:throw Error(r(435,o.tag))}}function $0(o,c){var p=Y_(o);c.forEach(function(x){var S=ej.bind(null,o,x);p.has(x)||(p.add(x),x.then(S,S))})}function _a(o,c){var p=c.deletions;if(p!==null)for(var x=0;x<p.length;x++){var S=p[x],R=o,I=c,F=I;e:for(;F!==null;){switch(F.tag){case 27:if(Qa(F.type)){mr=F.stateNode,Ws=!1;break e}break;case 5:mr=F.stateNode,Ws=!1;break e;case 3:case 4:mr=F.stateNode.containerInfo,Ws=!0;break e}F=F.return}if(mr===null)throw Error(r(160));Fb(R,I,S),mr=null,Ws=!1,R=S.alternate,R!==null&&(R.return=null),S.return=null}if(c.subtreeFlags&13878)for(c=c.child;c!==null;)R0(c,o),c=c.sibling}var Xa=null;function R0(o,c){var p=o.alternate,x=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:_a(c,o),Qs(o),x&4&&(bl(3,o,o.return),Nf(3,o),bl(5,o,o.return));break;case 1:_a(c,o),Qs(o),x&512&&(Dn||p===null||Hi(p,p.return)),x&64&&qi&&(o=o.updateQueue,o!==null&&(x=o.callbacks,x!==null&&(p=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=p===null?x:p.concat(x))));break;case 26:var S=Xa;if(_a(c,o),Qs(o),x&512&&(Dn||p===null||Hi(p,p.return)),x&4){var R=p!==null?p.memoizedState:null;if(x=o.memoizedState,p===null)if(x===null)if(o.stateNode===null){e:{x=o.type,p=o.memoizedProps,S=S.ownerDocument||S;t:switch(x){case"title":R=S.getElementsByTagName("title")[0],(!R||R[Ar]||R[Qe]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=S.createElement(x),S.head.insertBefore(R,S.querySelector("head > title"))),Yr(R,x,p),R[Qe]=o,kr(R),x=R;break e;case"link":var I=kw("link","href",S).get(x+(p.href||""));if(I){for(var F=0;F<I.length;F++)if(R=I[F],R.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&R.getAttribute("rel")===(p.rel==null?null:p.rel)&&R.getAttribute("title")===(p.title==null?null:p.title)&&R.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){I.splice(F,1);break t}}R=S.createElement(x),Yr(R,x,p),S.head.appendChild(R);break;case"meta":if(I=kw("meta","content",S).get(x+(p.content||""))){for(F=0;F<I.length;F++)if(R=I[F],R.getAttribute("content")===(p.content==null?null:""+p.content)&&R.getAttribute("name")===(p.name==null?null:p.name)&&R.getAttribute("property")===(p.property==null?null:p.property)&&R.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&R.getAttribute("charset")===(p.charSet==null?null:p.charSet)){I.splice(F,1);break t}}R=S.createElement(x),Yr(R,x,p),S.head.appendChild(R);break;default:throw Error(r(468,x))}R[Qe]=o,kr(R),x=R}o.stateNode=x}else Nw(S,o.type,o.stateNode);else o.stateNode=Aw(S,x,o.memoizedProps);else R!==x?(R===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):R.count--,x===null?Nw(S,o.type,o.stateNode):Aw(S,x,o.memoizedProps)):x===null&&o.stateNode!==null&&Hp(o,o.memoizedProps,p.memoizedProps)}break;case 27:_a(c,o),Qs(o),x&512&&(Dn||p===null||Hi(p,p.return)),p!==null&&x&4&&Hp(o,o.memoizedProps,p.memoizedProps);break;case 5:if(_a(c,o),Qs(o),x&512&&(Dn||p===null||Hi(p,p.return)),o.flags&32){S=o.stateNode;try{sl(S,"")}catch(ye){rr(o,o.return,ye)}}x&4&&o.stateNode!=null&&(S=o.memoizedProps,Hp(o,S,p!==null?p.memoizedProps:S)),x&1024&&(Ao=!0);break;case 6:if(_a(c,o),Qs(o),x&4){if(o.stateNode===null)throw Error(r(162));x=o.memoizedProps,p=o.stateNode;try{p.nodeValue=x}catch(ye){rr(o,o.return,ye)}}break;case 3:if(nd=null,S=Xa,Xa=Kt(c.containerInfo),_a(c,o),Xa=S,Qs(o),x&4&&p!==null&&p.memoizedState.isDehydrated)try{th(c.containerInfo)}catch(ye){rr(o,o.return,ye)}Ao&&(Ao=!1,Gb(o));break;case 4:x=Xa,Xa=Kt(o.stateNode.containerInfo),_a(c,o),Qs(o),Xa=x;break;case 12:_a(c,o),Qs(o);break;case 13:_a(c,o),Qs(o),o.child.flags&8192&&o.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(M0=Ge()),x&4&&(x=o.updateQueue,x!==null&&(o.updateQueue=null,$0(o,x)));break;case 22:S=o.memoizedState!==null;var J=p!==null&&p.memoizedState!==null,ve=qi,$e=Dn;if(qi=ve||S,Dn=$e||J,_a(c,o),Dn=$e,qi=ve,Qs(o),x&8192)e:for(c=o.stateNode,c._visibility=S?c._visibility&-2:c._visibility|1,S&&(p===null||J||qi||Dn||Au(o)),p=null,c=o;;){if(c.tag===5||c.tag===26){if(p===null){J=p=c;try{if(R=J.stateNode,S)I=R.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{F=J.stateNode;var Ve=J.memoizedProps.style,Ce=Ve!=null&&Ve.hasOwnProperty("display")?Ve.display:null;F.style.display=Ce==null||typeof Ce=="boolean"?"":(""+Ce).trim()}}catch(ye){rr(J,J.return,ye)}}}else if(c.tag===6){if(p===null){J=c;try{J.stateNode.nodeValue=S?"":J.memoizedProps}catch(ye){rr(J,J.return,ye)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===o)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break e;for(;c.sibling===null;){if(c.return===null||c.return===o)break e;p===c&&(p=null),c=c.return}p===c&&(p=null),c.sibling.return=c.return,c=c.sibling}x&4&&(x=o.updateQueue,x!==null&&(p=x.retryQueue,p!==null&&(x.retryQueue=null,$0(o,p))));break;case 19:_a(c,o),Qs(o),x&4&&(x=o.updateQueue,x!==null&&(o.updateQueue=null,$0(o,x)));break;case 30:break;case 21:break;default:_a(c,o),Qs(o)}}function Qs(o){var c=o.flags;if(c&2){try{for(var p,x=o.return;x!==null;){if(Bc(x)){p=x;break}x=x.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var S=p.stateNode,R=Lf(o);Mf(o,R,S);break;case 5:var I=p.stateNode;p.flags&32&&(sl(I,""),p.flags&=-33);var F=Lf(o);Mf(o,F,I);break;case 3:case 4:var J=p.stateNode.containerInfo,ve=Lf(o);qp(o,ve,J);break;default:throw Error(r(161))}}catch($e){rr(o,o.return,$e)}o.flags&=-3}c&4096&&(o.flags&=-4097)}function Gb(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var c=o;Gb(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),o=o.sibling}}function wl(o,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)Vb(o,c.alternate,c),c=c.sibling}function Au(o){for(o=o.child;o!==null;){var c=o;switch(c.tag){case 0:case 11:case 14:case 15:bl(4,c,c.return),Au(c);break;case 1:Hi(c,c.return);var p=c.stateNode;typeof p.componentWillUnmount=="function"&&E0(c,c.return,p),Au(c);break;case 27:Kf(c.stateNode);case 26:case 5:Hi(c,c.return),Au(c);break;case 22:c.memoizedState===null&&Au(c);break;case 30:Au(c);break;default:Au(c)}o=o.sibling}}function No(o,c,p){for(p=p&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var x=c.alternate,S=o,R=c,I=R.flags;switch(R.tag){case 0:case 11:case 15:No(S,R,p),Nf(4,R);break;case 1:if(No(S,R,p),x=R,S=x.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ve){rr(x,x.return,ve)}if(x=R,S=x.updateQueue,S!==null){var F=x.stateNode;try{var J=S.shared.hiddenCallbacks;if(J!==null)for(S.shared.hiddenCallbacks=null,S=0;S<J.length;S++)lb(J[S],F)}catch(ve){rr(x,x.return,ve)}}p&&I&64&&Pb(R),Vc(R,R.return);break;case 27:If(R);case 26:case 5:No(S,R,p),p&&x===null&&I&4&&zp(R),Vc(R,R.return);break;case 12:No(S,R,p);break;case 13:No(S,R,p),p&&I&4&&Ub(S,R);break;case 22:R.memoizedState===null&&No(S,R,p),Vc(R,R.return);break;case 30:break;default:No(S,R,p)}c=c.sibling}}function O0(o,c){var p=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),o=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(o=c.memoizedState.cachePool.pool),o!==p&&(o!=null&&o.refCount++,p!=null&&lf(p))}function T0(o,c){o=null,c.alternate!==null&&(o=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==o&&(c.refCount++,o!=null&&lf(o))}function Ki(o,c,p,x){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)zb(o,c,p,x),c=c.sibling}function zb(o,c,p,x){var S=c.flags;switch(c.tag){case 0:case 11:case 15:Ki(o,c,p,x),S&2048&&Nf(9,c);break;case 1:Ki(o,c,p,x);break;case 3:Ki(o,c,p,x),S&2048&&(o=null,c.alternate!==null&&(o=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==o&&(c.refCount++,o!=null&&lf(o)));break;case 12:if(S&2048){Ki(o,c,p,x),o=c.stateNode;try{var R=c.memoizedProps,I=R.id,F=R.onPostCommit;typeof F=="function"&&F(I,c.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(J){rr(c,c.return,J)}}else Ki(o,c,p,x);break;case 13:Ki(o,c,p,x);break;case 23:break;case 22:R=c.stateNode,I=c.alternate,c.memoizedState!==null?R._visibility&2?Ki(o,c,p,x):Pf(o,c):R._visibility&2?Ki(o,c,p,x):(R._visibility|=2,Fc(o,c,p,x,(c.subtreeFlags&10256)!==0)),S&2048&&O0(I,c);break;case 24:Ki(o,c,p,x),S&2048&&T0(c.alternate,c);break;default:Ki(o,c,p,x)}}function Fc(o,c,p,x,S){for(S=S&&(c.subtreeFlags&10256)!==0,c=c.child;c!==null;){var R=o,I=c,F=p,J=x,ve=I.flags;switch(I.tag){case 0:case 11:case 15:Fc(R,I,F,J,S),Nf(8,I);break;case 23:break;case 22:var $e=I.stateNode;I.memoizedState!==null?$e._visibility&2?Fc(R,I,F,J,S):Pf(R,I):($e._visibility|=2,Fc(R,I,F,J,S)),S&&ve&2048&&O0(I.alternate,I);break;case 24:Fc(R,I,F,J,S),S&&ve&2048&&T0(I.alternate,I);break;default:Fc(R,I,F,J,S)}c=c.sibling}}function Pf(o,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var p=o,x=c,S=x.flags;switch(x.tag){case 22:Pf(p,x),S&2048&&O0(x.alternate,x);break;case 24:Pf(p,x),S&2048&&T0(x.alternate,x);break;default:Pf(p,x)}c=c.sibling}}var xs=8192;function Uc(o){if(o.subtreeFlags&xs)for(o=o.child;o!==null;)Hb(o),o=o.sibling}function Hb(o){switch(o.tag){case 26:Uc(o),o.flags&xs&&o.memoizedState!==null&&xj(Xa,o.memoizedState,o.memoizedProps);break;case 5:Uc(o);break;case 3:case 4:var c=Xa;Xa=Kt(o.stateNode.containerInfo),Uc(o),Xa=c;break;case 22:o.memoizedState===null&&(c=o.alternate,c!==null&&c.memoizedState!==null?(c=xs,xs=16777216,Uc(o),xs=c):Uc(o));break;default:Uc(o)}}function qb(o){var c=o.alternate;if(c!==null&&(o=c.child,o!==null)){c.child=null;do c=o.sibling,o.sibling=null,o=c;while(o!==null)}}function Gc(o){var c=o.deletions;if((o.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var x=c[p];qr=x,Yb(x,o)}qb(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Kb(o),o=o.sibling}function Kb(o){switch(o.tag){case 0:case 11:case 15:Gc(o),o.flags&2048&&bl(9,o,o.return);break;case 3:Gc(o);break;case 12:Gc(o);break;case 22:var c=o.stateNode;o.memoizedState!==null&&c._visibility&2&&(o.return===null||o.return.tag!==13)?(c._visibility&=-3,Kp(o)):Gc(o);break;default:Gc(o)}}function Kp(o){var c=o.deletions;if((o.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var x=c[p];qr=x,Yb(x,o)}qb(o)}for(o=o.child;o!==null;){switch(c=o,c.tag){case 0:case 11:case 15:bl(8,c,c.return),Kp(c);break;case 22:p=c.stateNode,p._visibility&2&&(p._visibility&=-3,Kp(c));break;default:Kp(c)}o=o.sibling}}function Yb(o,c){for(;qr!==null;){var p=qr;switch(p.tag){case 0:case 11:case 15:bl(8,p,c);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var x=p.memoizedState.cachePool.pool;x!=null&&x.refCount++}break;case 24:lf(p.memoizedState.cache)}if(x=p.child,x!==null)x.return=p,qr=x;else e:for(p=o;qr!==null;){x=qr;var S=x.sibling,R=x.return;if(Bb(x),x===p){qr=null;break e}if(S!==null){S.return=R,qr=S;break e}qr=R}}}var Z_={getCacheForType:function(o){var c=Sr(tr),p=c.data.get(o);return p===void 0&&(p=o(),c.data.set(o,p)),p}},A0=typeof WeakMap=="function"?WeakMap:Map,zn=0,ar=null,pn=null,_n=0,Hn=0,ja=null,Cl=!1,zc=!1,k0=!1,Lo=0,jr=0,Sl=0,ku=0,N0=0,Wa=0,Hc=0,Df=null,Js=null,L0=!1,M0=0,qc=1/0,Vf=null,_l=null,ds=0,jl=null,Kc=null,Yc=0,I0=0,P0=null,Zb=null,Zc=0,D0=null;function bs(){if((zn&2)!==0&&_n!==0)return _n&-_n;if(X.T!==null){var o=Tc;return o!==0?o:em()}return vn()}function Xb(){Wa===0&&(Wa=(_n&536870912)===0||yn?el():536870912);var o=Sa.current;return o!==null&&(o.flags|=32),Wa}function Ea(o,c,p){(o===ar&&(Hn===2||Hn===9)||o.cancelPendingCommit!==null)&&(Xc(o,0),El(o,_n,Wa,!1)),pa(o,p),((zn&2)===0||o!==ar)&&(o===ar&&((zn&2)===0&&(ku|=p),jr===4&&El(o,_n,Wa,!1)),Yi(o))}function Wb(o,c,p){if((zn&6)!==0)throw Error(r(327));var x=!p&&(c&124)===0&&(c&o.expiredLanes)===0||ps(o,c),S=x?Q_(o,c):F0(o,c,!0),R=x;do{if(S===0){zc&&!x&&El(o,c,0,!1);break}else{if(p=o.current.alternate,R&&!X_(p)){S=F0(o,c,!1),R=!1;continue}if(S===2){if(R=c,o.errorRecoveryDisabledLanes&R)var I=0;else I=o.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){c=I;e:{var F=o;S=Df;var J=F.current.memoizedState.isDehydrated;if(J&&(Xc(F,I).flags|=256),I=F0(F,I,!1),I!==2){if(k0&&!J){F.errorRecoveryDisabledLanes|=R,ku|=R,S=4;break e}R=Js,Js=S,R!==null&&(Js===null?Js=R:Js.push.apply(Js,R))}S=I}if(R=!1,S!==2)continue}}if(S===1){Xc(o,0),El(o,c,0,!0);break}e:{switch(x=o,R=S,R){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:El(x,c,Wa,!Cl);break e;case 2:Js=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(S=M0+300-Ge(),10<S)){if(El(x,c,Wa,!Cl),ha(x,0,!0)!==0)break e;x.timeoutHandle=ww(Qb.bind(null,x,p,Js,Vf,L0,c,Wa,ku,Hc,Cl,R,2,-0,0),S);break e}Qb(x,p,Js,Vf,L0,c,Wa,ku,Hc,Cl,R,0,-0,0)}}break}while(!0);Yi(o)}function Qb(o,c,p,x,S,R,I,F,J,ve,$e,Ve,Ce,ye){if(o.timeoutHandle=-1,Ve=c.subtreeFlags,(Ve&8192||(Ve&16785408)===16785408)&&(ss={stylesheets:null,count:0,unsuspend:yj},Hb(c),Ve=bj(),Ve!==null)){o.cancelPendingCommit=Ve(Bf.bind(null,o,c,R,p,x,S,I,F,J,$e,1,Ce,ye)),El(o,R,I,!ve);return}Bf(o,c,R,p,x,S,I,F,J)}function X_(o){for(var c=o;;){var p=c.tag;if((p===0||p===11||p===15)&&c.flags&16384&&(p=c.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var x=0;x<p.length;x++){var S=p[x],R=S.getSnapshot;S=S.value;try{if(!xa(R(),S))return!1}catch{return!1}}if(p=c.child,c.subtreeFlags&16384&&p!==null)p.return=c,c=p;else{if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function El(o,c,p,x){c&=~N0,c&=~ku,o.suspendedLanes|=c,o.pingedLanes&=~c,x&&(o.warmLanes|=c),x=o.expirationTimes;for(var S=c;0<S;){var R=31-jn(S),I=1<<R;x[R]=-1,S&=~I}p!==0&&ou(o,p,c)}function Yp(){return(zn&6)===0?(Gf(0),!1):!0}function V0(){if(pn!==null){if(Hn===0)var o=pn.return;else o=pn,B=hl=null,xp(o),Hr=null,Xs=0,o=pn;for(;o!==null;)Ib(o.alternate,o),o=o.return;pn=null}}function Xc(o,c){var p=o.timeoutHandle;p!==-1&&(o.timeoutHandle=-1,uj(p)),p=o.cancelPendingCommit,p!==null&&(o.cancelPendingCommit=null,p()),V0(),ar=o,pn=p=_s(o.current,null),_n=c,Hn=0,ja=null,Cl=!1,zc=ps(o,c),k0=!1,Hc=Wa=N0=ku=Sl=jr=0,Js=Df=null,L0=!1,(c&8)!==0&&(c|=c&32);var x=o.entangledLanes;if(x!==0)for(o=o.entanglements,x&=c;0<x;){var S=31-jn(x),R=1<<S;c|=o[S],x&=~R}return Lo=c,du(),p}function Jb(o,c){on=null,X.H=Sf,c===js||c===gp?(c=ib(),Hn=3):c===sb?(c=ib(),Hn=4):Hn=c===Tb?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,ja=c,pn===null&&(jr=1,Rf(o,Ss(c,o.current)))}function ew(){var o=X.H;return X.H=Sf,o===null?Sf:o}function tw(){var o=X.A;return X.A=Z_,o}function B0(){jr=4,Cl||(_n&4194048)!==_n&&Sa.current!==null||(zc=!0),(Sl&134217727)===0&&(ku&134217727)===0||ar===null||El(ar,_n,Wa,!1)}function F0(o,c,p){var x=zn;zn|=2;var S=ew(),R=tw();(ar!==o||_n!==c)&&(Vf=null,Xc(o,c)),c=!1;var I=jr;e:do try{if(Hn!==0&&pn!==null){var F=pn,J=ja;switch(Hn){case 8:V0(),I=6;break e;case 3:case 2:case 9:case 6:Sa.current===null&&(c=!0);var ve=Hn;if(Hn=0,ja=null,Wc(o,F,J,ve),p&&zc){I=0;break e}break;default:ve=Hn,Hn=0,ja=null,Wc(o,F,J,ve)}}W_(),I=jr;break}catch($e){Jb(o,$e)}while(!0);return c&&o.shellSuspendCounter++,B=hl=null,zn=x,X.H=S,X.A=R,pn===null&&(ar=null,_n=0,du()),I}function W_(){for(;pn!==null;)U0(pn)}function Q_(o,c){var p=zn;zn|=2;var x=ew(),S=tw();ar!==o||_n!==c?(Vf=null,qc=Ge()+500,Xc(o,c)):zc=ps(o,c);e:do try{if(Hn!==0&&pn!==null){c=pn;var R=ja;t:switch(Hn){case 1:Hn=0,ja=null,Wc(o,c,R,1);break;case 2:case 9:if(ab(R)){Hn=0,ja=null,rw(c);break}c=function(){Hn!==2&&Hn!==9||ar!==o||(Hn=7),Yi(o)},R.then(c,c);break e;case 3:Hn=7;break e;case 4:Hn=5;break e;case 7:ab(R)?(Hn=0,ja=null,rw(c)):(Hn=0,ja=null,Wc(o,c,R,7));break;case 5:var I=null;switch(pn.tag){case 26:I=pn.memoizedState;case 5:case 27:var F=pn;if(!I||Zr(I)){Hn=0,ja=null;var J=F.sibling;if(J!==null)pn=J;else{var ve=F.return;ve!==null?(pn=ve,Zp(ve)):pn=null}break t}}Hn=0,ja=null,Wc(o,c,R,5);break;case 6:Hn=0,ja=null,Wc(o,c,R,6);break;case 8:V0(),jr=6;break e;default:throw Error(r(462))}}nw();break}catch($e){Jb(o,$e)}while(!0);return B=hl=null,X.H=x,X.A=S,zn=p,pn!==null?0:(ar=null,_n=0,du(),jr)}function nw(){for(;pn!==null&&!Lt();)U0(pn)}function U0(o){var c=Fp(o.alternate,o,Lo);o.memoizedProps=o.pendingProps,c===null?Zp(o):pn=c}function rw(o){var c=o,p=c.alternate;switch(c.tag){case 15:case 0:c=Vp(p,c,c.pendingProps,c.type,void 0,_n);break;case 11:c=Vp(p,c,c.pendingProps,c.type.render,c.ref,_n);break;case 5:xp(c);default:Ib(p,c),c=pn=tf(c,Lo),c=Fp(p,c,Lo)}o.memoizedProps=o.pendingProps,c===null?Zp(o):pn=c}function Wc(o,c,p,x){B=hl=null,xp(c),Hr=null,Xs=0;var S=c.return;try{if(Ob(o,S,c,p,_n)){jr=1,Rf(o,Ss(p,o.current)),pn=null;return}}catch(R){if(S!==null)throw pn=S,R;jr=1,Rf(o,Ss(p,o.current)),pn=null;return}c.flags&32768?(yn||x===1?o=!0:zc||(_n&536870912)!==0?o=!1:(Cl=o=!0,(x===2||x===9||x===3||x===6)&&(x=Sa.current,x!==null&&x.tag===13&&(x.flags|=16384))),sw(c,o)):Zp(c)}function Zp(o){var c=o;do{if((c.flags&32768)!==0){sw(c,Cl);return}o=c.return;var p=Lb(c.alternate,c,Lo);if(p!==null){pn=p;return}if(c=c.sibling,c!==null){pn=c;return}pn=c=o}while(c!==null);jr===0&&(jr=5)}function sw(o,c){do{var p=Mb(o.alternate,o);if(p!==null){p.flags&=32767,pn=p;return}if(p=o.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!c&&(o=o.sibling,o!==null)){pn=o;return}pn=o=p}while(o!==null);jr=6,pn=null}function Bf(o,c,p,x,S,R,I,F,J){o.cancelPendingCommit=null;do Xp();while(ds!==0);if((zn&6)!==0)throw Error(r(327));if(c!==null){if(c===o.current)throw Error(r(177));if(R=c.lanes|c.childLanes,R|=zv,iu(o,p,R,I,F,J),o===ar&&(pn=ar=null,_n=0),Kc=c,jl=o,Yc=p,I0=R,P0=S,Zb=x,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,fw(me,function(){return uw(),null})):(o.callbackNode=null,o.callbackPriority=0),x=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||x){x=X.T,X.T=null,S=pe.p,pe.p=2,I=zn,zn|=4;try{K_(o,c,p)}finally{zn=I,pe.p=S,X.T=x}}ds=1,aw(),iw(),ow()}}function aw(){if(ds===1){ds=0;var o=jl,c=Kc,p=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||p){p=X.T,X.T=null;var x=pe.p;pe.p=2;var S=zn;zn|=4;try{R0(c,o);var R=rm,I=Zx(o.containerInfo),F=R.focusedElem,J=R.selectionRange;if(I!==F&&F&&F.ownerDocument&&Yx(F.ownerDocument.documentElement,F)){if(J!==null&&Uv(F)){var ve=J.start,$e=J.end;if($e===void 0&&($e=ve),"selectionStart"in F)F.selectionStart=ve,F.selectionEnd=Math.min($e,F.value.length);else{var Ve=F.ownerDocument||document,Ce=Ve&&Ve.defaultView||window;if(Ce.getSelection){var ye=Ce.getSelection(),Tt=F.textContent.length,$t=Math.min(J.start,Tt),Qn=J.end===void 0?$t:Math.min(J.end,Tt);!ye.extend&&$t>Qn&&(I=Qn,Qn=$t,$t=I);var ce=Fv(F,$t),ie=Fv(F,Qn);if(ce&&ie&&(ye.rangeCount!==1||ye.anchorNode!==ce.node||ye.anchorOffset!==ce.offset||ye.focusNode!==ie.node||ye.focusOffset!==ie.offset)){var ge=Ve.createRange();ge.setStart(ce.node,ce.offset),ye.removeAllRanges(),$t>Qn?(ye.addRange(ge),ye.extend(ie.node,ie.offset)):(ge.setEnd(ie.node,ie.offset),ye.addRange(ge))}}}}for(Ve=[],ye=F;ye=ye.parentNode;)ye.nodeType===1&&Ve.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;F<Ve.length;F++){var Te=Ve[F];Te.element.scrollLeft=Te.left,Te.element.scrollTop=Te.top}}cm=!!gi,rm=gi=null}finally{zn=S,pe.p=x,X.T=p}}o.current=c,ds=2}}function iw(){if(ds===2){ds=0;var o=jl,c=Kc,p=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||p){p=X.T,X.T=null;var x=pe.p;pe.p=2;var S=zn;zn|=4;try{Vb(o,c.alternate,c)}finally{zn=S,pe.p=x,X.T=p}}ds=3}}function ow(){if(ds===4||ds===3){ds=0,Ln();var o=jl,c=Kc,p=Yc,x=Zb;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?ds=5:(ds=0,Kc=jl=null,lw(o,o.pendingLanes));var S=o.pendingLanes;if(S===0&&(_l=null),jt(p),c=c.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Dt,c,void 0,(c.current.flags&128)===128)}catch{}if(x!==null){c=X.T,S=pe.p,pe.p=2,X.T=null;try{for(var R=o.onRecoverableError,I=0;I<x.length;I++){var F=x[I];R(F.value,{componentStack:F.stack})}}finally{X.T=c,pe.p=S}}(Yc&3)!==0&&Xp(),Yi(o),S=o.pendingLanes,(p&4194090)!==0&&(S&42)!==0?o===D0?Zc++:(Zc=0,D0=o):Zc=0,Gf(0)}}function lw(o,c){(o.pooledCacheLanes&=c)===0&&(c=o.pooledCache,c!=null&&(o.pooledCache=null,lf(c)))}function Xp(o){return aw(),iw(),ow(),uw()}function uw(){if(ds!==5)return!1;var o=jl,c=I0;I0=0;var p=jt(Yc),x=X.T,S=pe.p;try{pe.p=32>p?32:p,X.T=null,p=P0,P0=null;var R=jl,I=Yc;if(ds=0,Kc=jl=null,Yc=0,(zn&6)!==0)throw Error(r(331));var F=zn;if(zn|=4,Kb(R.current),zb(R,R.current,I,p),zn=F,Gf(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Dt,R)}catch{}return!0}finally{pe.p=S,X.T=x,lw(o,c)}}function cw(o,c,p){c=Ss(p,c),c=Mp(o.stateNode,c,2),o=_o(o,c,2),o!==null&&(pa(o,2),Yi(o))}function rr(o,c,p){if(o.tag===3)cw(o,o,p);else for(;c!==null;){if(c.tag===3){cw(c,o,p);break}else if(c.tag===1){var x=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(_l===null||!_l.has(x))){o=Ss(p,o),p=w0(2),x=_o(c,p,2),x!==null&&(Rb(p,x,c,o),pa(x,2),Yi(x));break}}c=c.return}}function G0(o,c,p){var x=o.pingCache;if(x===null){x=o.pingCache=new A0;var S=new Set;x.set(c,S)}else S=x.get(c),S===void 0&&(S=new Set,x.set(c,S));S.has(p)||(k0=!0,S.add(p),o=J_.bind(null,o,c,p),c.then(o,o))}function J_(o,c,p){var x=o.pingCache;x!==null&&x.delete(c),o.pingedLanes|=o.suspendedLanes&p,o.warmLanes&=~p,ar===o&&(_n&p)===p&&(jr===4||jr===3&&(_n&62914560)===_n&&300>Ge()-M0?(zn&2)===0&&Xc(o,0):N0|=p,Hc===_n&&(Hc=0)),Yi(o)}function dw(o,c){c===0&&(c=go()),o=fu(o,c),o!==null&&(pa(o,c),Yi(o))}function Wp(o){var c=o.memoizedState,p=0;c!==null&&(p=c.retryLane),dw(o,p)}function ej(o,c){var p=0;switch(o.tag){case 13:var x=o.stateNode,S=o.memoizedState;S!==null&&(p=S.retryLane);break;case 19:x=o.stateNode;break;case 22:x=o.stateNode._retryCache;break;default:throw Error(r(314))}x!==null&&x.delete(c),dw(o,p)}function fw(o,c){return Pt(o,c)}var Ff=null,$l=null,Qp=!1,Uf=!1,Jp=!1,Rl=0;function Yi(o){o!==$l&&o.next===null&&($l===null?Ff=$l=o:$l=$l.next=o),Uf=!0,Qp||(Qp=!0,z0())}function Gf(o,c){if(!Jp&&Uf){Jp=!0;do for(var p=!1,x=Ff;x!==null;){if(o!==0){var S=x.pendingLanes;if(S===0)var R=0;else{var I=x.suspendedLanes,F=x.pingedLanes;R=(1<<31-jn(42|o)+1)-1,R&=S&~(I&~F),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,pw(x,R))}else R=_n,R=ha(x,x===ar?R:0,x.cancelPendingCommit!==null||x.timeoutHandle!==-1),(R&3)===0||ps(x,R)||(p=!0,pw(x,R));x=x.next}while(p);Jp=!1}}function tj(){zf()}function zf(){Uf=Qp=!1;var o=0;Rl!==0&&(lj()&&(o=Rl),Rl=0);for(var c=Ge(),p=null,x=Ff;x!==null;){var S=x.next,R=Hf(x,c);R===0?(x.next=null,p===null?Ff=S:p.next=S,S===null&&($l=p)):(p=x,(o!==0||(R&3)!==0)&&(Uf=!0)),x=S}Gf(o)}function Hf(o,c){for(var p=o.suspendedLanes,x=o.pingedLanes,S=o.expirationTimes,R=o.pendingLanes&-62914561;0<R;){var I=31-jn(R),F=1<<I,J=S[I];J===-1?((F&p)===0||(F&x)!==0)&&(S[I]=Jo(F,c)):J<=c&&(o.expiredLanes|=F),R&=~F}if(c=ar,p=_n,p=ha(o,o===c?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),x=o.callbackNode,p===0||o===c&&(Hn===2||Hn===9)||o.cancelPendingCommit!==null)return x!==null&&x!==null&&Wt(x),o.callbackNode=null,o.callbackPriority=0;if((p&3)===0||ps(o,p)){if(c=p&-p,c===o.callbackPriority)return c;switch(x!==null&&Wt(x),jt(p)){case 2:case 8:p=oe;break;case 32:p=me;break;case 268435456:p=ze;break;default:p=me}return x=hw.bind(null,o),p=Pt(p,x),o.callbackPriority=c,o.callbackNode=p,c}return x!==null&&x!==null&&Wt(x),o.callbackPriority=2,o.callbackNode=null,2}function hw(o,c){if(ds!==0&&ds!==5)return o.callbackNode=null,o.callbackPriority=0,null;var p=o.callbackNode;if(Xp()&&o.callbackNode!==p)return null;var x=_n;return x=ha(o,o===ar?x:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),x===0?null:(Wb(o,x,c),Hf(o,Ge()),o.callbackNode!=null&&o.callbackNode===p?hw.bind(null,o):null)}function pw(o,c){if(Xp())return null;Wb(o,c,!0)}function z0(){cj(function(){(zn&6)!==0?Pt(Z,tj):zf()})}function em(){return Rl===0&&(Rl=el()),Rl}function mw(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:qd(""+o)}function gw(o,c){var p=c.ownerDocument.createElement("input");return p.name=c.name,p.value=c.value,o.id&&p.setAttribute("form",o.id),c.parentNode.insertBefore(p,c),o=new FormData(o),p.parentNode.removeChild(p),o}function nj(o,c,p,x,S){if(c==="submit"&&p&&p.stateNode===S){var R=mw((S[ft]||null).action),I=x.submitter;I&&(c=(c=I[ft]||null)?mw(c.formAction):I.getAttribute("formAction"),c!==null&&(R=c,I=null));var F=new Xh("action","action",null,x,S);o.push({event:F,listeners:[{instance:null,listener:function(){if(x.defaultPrevented){if(Rl!==0){var J=I?gw(S,I):new FormData(S);wf(p,{pending:!0,data:J,method:S.method,action:R},null,J)}}else typeof R=="function"&&(F.preventDefault(),J=I?gw(S,I):new FormData(S),wf(p,{pending:!0,data:J,method:S.method,action:R},R,J))},currentTarget:S}]})}}for(var H0=0;H0<Mn.length;H0++){var q0=Mn[H0],rj=q0.toLowerCase(),sj=q0[0].toUpperCase()+q0.slice(1);ui(rj,"on"+sj)}ui(lp,"onAnimationEnd"),ui(Xx,"onAnimationIteration"),ui(ba,"onAnimationStart"),ui("dblclick","onDoubleClick"),ui("focusin","onFocus"),ui("focusout","onBlur"),ui(up,"onTransitionRun"),ui(B_,"onTransitionStart"),ui(jc,"onTransitionCancel"),ui(Wd,"onTransitionEnd"),vo("onMouseEnter",["mouseout","mouseover"]),vo("onMouseLeave",["mouseout","mouseover"]),vo("onPointerEnter",["pointerout","pointerover"]),vo("onPointerLeave",["pointerout","pointerover"]),Pi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qf="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(" "),aj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qf));function vw(o,c){c=(c&4)!==0;for(var p=0;p<o.length;p++){var x=o[p],S=x.event;x=x.listeners;e:{var R=void 0;if(c)for(var I=x.length-1;0<=I;I--){var F=x[I],J=F.instance,ve=F.currentTarget;if(F=F.listener,J!==R&&S.isPropagationStopped())break e;R=F,S.currentTarget=ve;try{R(S)}catch($e){Ou($e)}S.currentTarget=null,R=J}else for(I=0;I<x.length;I++){if(F=x[I],J=F.instance,ve=F.currentTarget,F=F.listener,J!==R&&S.isPropagationStopped())break e;R=F,S.currentTarget=ve;try{R(S)}catch($e){Ou($e)}S.currentTarget=null,R=J}}}}function mn(o,c){var p=c[vr];p===void 0&&(p=c[vr]=new Set);var x=o+"__bubble";p.has(x)||(yw(c,o,2,!1),p.add(x))}function K0(o,c,p){var x=0;c&&(x|=4),yw(p,o,x,c)}var ea="_reactListening"+Math.random().toString(36).slice(2);function Y0(o){if(!o[ea]){o[ea]=!0,Gd.forEach(function(p){p!=="selectionchange"&&(aj.has(p)||K0(p,!1,o),K0(p,!0,o))});var c=o.nodeType===9?o:o.ownerDocument;c===null||c[ea]||(c[ea]=!0,K0("selectionchange",!1,c))}}function yw(o,c,p,x){switch(Pw(c)){case 2:var S=Sj;break;case 8:S=sd;break;default:S=sy}p=S.bind(null,c,p,o),S=void 0,!Yd||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(S=!0),x?S!==void 0?o.addEventListener(c,p,{capture:!0,passive:S}):o.addEventListener(c,p,!0):S!==void 0?o.addEventListener(c,p,{passive:S}):o.addEventListener(c,p,!1)}function Mo(o,c,p,x,S){var R=x;if((c&1)===0&&(c&2)===0&&x!==null)e:for(;;){if(x===null)return;var I=x.tag;if(I===3||I===4){var F=x.stateNode.containerInfo;if(F===S)break;if(I===4)for(I=x.return;I!==null;){var J=I.tag;if((J===3||J===4)&&I.stateNode.containerInfo===S)return;I=I.return}for(;F!==null;){if(I=Pn(F),I===null)return;if(J=I.tag,J===5||J===6||J===26||J===27){x=R=I;continue e}F=F.parentNode}}x=x.return}Ox(function(){var ve=R,$e=Ov(p),Ve=[];e:{var Ce=Qd.get(o);if(Ce!==void 0){var ye=Xh,Tt=o;switch(o){case"keypress":if(Xn(p)===0)break e;case"keydown":case"keyup":ye=Mv;break;case"focusin":Tt="focus",ye=Qh;break;case"focusout":Tt="blur",ye=Qh;break;case"beforeblur":case"afterblur":ye=Qh;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=il;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=Lv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=A_;break;case lp:case Xx:case ba:ye=Lx;break;case Wd:ye=k_;break;case"scroll":case"scrollend":ye=R_;break;case"wheel":ye=L_;break;case"copy":case"cut":case"paste":ye=Ix;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=bo;break;case"toggle":case"beforetoggle":ye=ep}var $t=(c&4)!==0,Qn=!$t&&(o==="scroll"||o==="scrollend"),ce=$t?Ce!==null?Ce+"Capture":null:Ce;$t=[];for(var ie=ve,ge;ie!==null;){var Te=ie;if(ge=Te.stateNode,Te=Te.tag,Te!==5&&Te!==26&&Te!==27||ge===null||ce===null||(Te=Kd(ie,ce),Te!=null&&$t.push(zt(ie,Te,ge))),Qn)break;ie=ie.return}0<$t.length&&(Ce=new ye(Ce,Tt,null,p,$e),Ve.push({event:Ce,listeners:$t}))}}if((c&7)===0){e:{if(Ce=o==="mouseover"||o==="pointerover",ye=o==="mouseout"||o==="pointerout",Ce&&p!==Yh&&(Tt=p.relatedTarget||p.fromElement)&&(Pn(Tt)||Tt[Et]))break e;if((ye||Ce)&&(Ce=$e.window===$e?$e:(Ce=$e.ownerDocument)?Ce.defaultView||Ce.parentWindow:window,ye?(Tt=p.relatedTarget||p.toElement,ye=ve,Tt=Tt?Pn(Tt):null,Tt!==null&&(Qn=a(Tt),$t=Tt.tag,Tt!==Qn||$t!==5&&$t!==27&&$t!==6)&&(Tt=null)):(ye=null,Tt=ve),ye!==Tt)){if($t=il,Te="onMouseLeave",ce="onMouseEnter",ie="mouse",(o==="pointerout"||o==="pointerover")&&($t=bo,Te="onPointerLeave",ce="onPointerEnter",ie="pointer"),Qn=ye==null?Ce:tl(ye),ge=Tt==null?Ce:tl(Tt),Ce=new $t(Te,ie+"leave",ye,p,$e),Ce.target=Qn,Ce.relatedTarget=ge,Te=null,Pn($e)===ve&&($t=new $t(ce,ie+"enter",Tt,p,$e),$t.target=ge,$t.relatedTarget=Qn,Te=$t),Qn=Te,ye&&Tt)t:{for($t=ye,ce=Tt,ie=0,ge=$t;ge;ge=Kr(ge))ie++;for(ge=0,Te=ce;Te;Te=Kr(Te))ge++;for(;0<ie-ge;)$t=Kr($t),ie--;for(;0<ge-ie;)ce=Kr(ce),ge--;for(;ie--;){if($t===ce||ce!==null&&$t===ce.alternate)break t;$t=Kr($t),ce=Kr(ce)}$t=null}else $t=null;ye!==null&&Er(Ve,Ce,ye,$t,!1),Tt!==null&&Qn!==null&&Er(Ve,Qn,Tt,$t,!0)}}e:{if(Ce=ve?tl(ve):window,ye=Ce.nodeName&&Ce.nodeName.toLowerCase(),ye==="select"||ye==="input"&&Ce.type==="file")var lt=Gx;else if(sp(Ce))if(zx)lt=P_;else{lt=ul;var cn=Kx}else ye=Ce.nodeName,!ye||ye.toLowerCase()!=="input"||Ce.type!=="checkbox"&&Ce.type!=="radio"?ve&&Rv(ve.elementType)&&(lt=Gx):lt=op;if(lt&&(lt=lt(o,ve))){wc(Ve,lt,p,$e);break e}cn&&cn(o,Ce,ve),o==="focusout"&&ve&&Ce.type==="number"&&ve.memoizedProps.value!=null&&Hd(Ce,"number",Ce.value)}switch(cn=ve?tl(ve):window,o){case"focusin":(sp(cn)||cn.contentEditable==="true")&&(_c=cn,cl=ve,le=null);break;case"focusout":le=cl=_c=null;break;case"mousedown":Ee=!0;break;case"contextmenu":case"mouseup":case"dragend":Ee=!1,Se(Ve,p,$e);break;case"selectionchange":if(V_)break;case"keydown":case"keyup":Se(Ve,p,$e)}var xt;if(Dv)e:{switch(o){case"compositionstart":var At="onCompositionStart";break e;case"compositionend":At="onCompositionEnd";break e;case"compositionupdate":At="onCompositionUpdate";break e}At=void 0}else ol?Fx(o,p)&&(At="onCompositionEnd"):o==="keydown"&&p.keyCode===229&&(At="onCompositionStart");At&&(tp&&p.locale!=="ko"&&(ol||At!=="onCompositionStart"?At==="onCompositionEnd"&&ol&&(xt=Tx()):(al=$e,kv="value"in al?al.value:al.textContent,ol=!0)),cn=tm(ve,At),0<cn.length&&(At=new Gs(At,o,null,p,$e),Ve.push({event:At,listeners:cn}),xt?At.data=xt:(xt=rp(p),xt!==null&&(At.data=xt)))),(xt=Bx?M_(o,p):Ux(o,p))&&(At=tm(ve,"onBeforeInput"),0<At.length&&(cn=new Gs("onBeforeInput","beforeinput",null,p,$e),Ve.push({event:cn,listeners:At}),cn.data=xt)),nj(Ve,o,ve,p,$e)}vw(Ve,c)})}function zt(o,c,p){return{instance:o,listener:c,currentTarget:p}}function tm(o,c){for(var p=c+"Capture",x=[];o!==null;){var S=o,R=S.stateNode;if(S=S.tag,S!==5&&S!==26&&S!==27||R===null||(S=Kd(o,p),S!=null&&x.unshift(zt(o,S,R)),S=Kd(o,c),S!=null&&x.push(zt(o,S,R))),o.tag===3)return x;o=o.return}return[]}function Kr(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Er(o,c,p,x,S){for(var R=c._reactName,I=[];p!==null&&p!==x;){var F=p,J=F.alternate,ve=F.stateNode;if(F=F.tag,J!==null&&J===x)break;F!==5&&F!==26&&F!==27||ve===null||(J=ve,S?(ve=Kd(p,R),ve!=null&&I.unshift(zt(p,ve,J))):S||(ve=Kd(p,R),ve!=null&&I.push(zt(p,ve,J)))),p=p.return}I.length!==0&&o.push({event:c,listeners:I})}var ij=/\r\n?/g,Ol=/\u0000|\uFFFD/g;function xw(o){return(typeof o=="string"?o:""+o).replace(ij,`
`).replace(Ol,"")}function bw(o,c){return c=xw(c),xw(o)===c}function nm(){}function Wn(o,c,p,x,S,R){switch(p){case"children":typeof x=="string"?c==="body"||c==="textarea"&&x===""||sl(o,x):(typeof x=="number"||typeof x=="bigint")&&c!=="body"&&sl(o,""+x);break;case"className":rl(o,"class",x);break;case"tabIndex":rl(o,"tabindex",x);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(o,p,x);break;case"style":$v(o,x,R);break;case"data":if(c!=="object"){rl(o,"data",x);break}case"src":case"href":if(x===""&&(c!=="a"||p!=="href")){o.removeAttribute(p);break}if(x==null||typeof x=="function"||typeof x=="symbol"||typeof x=="boolean"){o.removeAttribute(p);break}x=qd(""+x),o.setAttribute(p,x);break;case"action":case"formAction":if(typeof x=="function"){o.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof R=="function"&&(p==="formAction"?(c!=="input"&&Wn(o,c,"name",S.name,S,null),Wn(o,c,"formEncType",S.formEncType,S,null),Wn(o,c,"formMethod",S.formMethod,S,null),Wn(o,c,"formTarget",S.formTarget,S,null)):(Wn(o,c,"encType",S.encType,S,null),Wn(o,c,"method",S.method,S,null),Wn(o,c,"target",S.target,S,null)));if(x==null||typeof x=="symbol"||typeof x=="boolean"){o.removeAttribute(p);break}x=qd(""+x),o.setAttribute(p,x);break;case"onClick":x!=null&&(o.onclick=nm);break;case"onScroll":x!=null&&mn("scroll",o);break;case"onScrollEnd":x!=null&&mn("scrollend",o);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(p=x.__html,p!=null){if(S.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"multiple":o.multiple=x&&typeof x!="function"&&typeof x!="symbol";break;case"muted":o.muted=x&&typeof x!="function"&&typeof x!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(x==null||typeof x=="function"||typeof x=="boolean"||typeof x=="symbol"){o.removeAttribute("xlink:href");break}p=qd(""+x),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":x!=null&&typeof x!="function"&&typeof x!="symbol"?o.setAttribute(p,""+x):o.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":x&&typeof x!="function"&&typeof x!="symbol"?o.setAttribute(p,""):o.removeAttribute(p);break;case"capture":case"download":x===!0?o.setAttribute(p,""):x!==!1&&x!=null&&typeof x!="function"&&typeof x!="symbol"?o.setAttribute(p,x):o.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":x!=null&&typeof x!="function"&&typeof x!="symbol"&&!isNaN(x)&&1<=x?o.setAttribute(p,x):o.removeAttribute(p);break;case"rowSpan":case"start":x==null||typeof x=="function"||typeof x=="symbol"||isNaN(x)?o.removeAttribute(p):o.setAttribute(p,x);break;case"popover":mn("beforetoggle",o),mn("toggle",o),fc(o,"popover",x);break;case"xlinkActuate":Di(o,"http://www.w3.org/1999/xlink","xlink:actuate",x);break;case"xlinkArcrole":Di(o,"http://www.w3.org/1999/xlink","xlink:arcrole",x);break;case"xlinkRole":Di(o,"http://www.w3.org/1999/xlink","xlink:role",x);break;case"xlinkShow":Di(o,"http://www.w3.org/1999/xlink","xlink:show",x);break;case"xlinkTitle":Di(o,"http://www.w3.org/1999/xlink","xlink:title",x);break;case"xlinkType":Di(o,"http://www.w3.org/1999/xlink","xlink:type",x);break;case"xmlBase":Di(o,"http://www.w3.org/XML/1998/namespace","xml:base",x);break;case"xmlLang":Di(o,"http://www.w3.org/XML/1998/namespace","xml:lang",x);break;case"xmlSpace":Di(o,"http://www.w3.org/XML/1998/namespace","xml:space",x);break;case"is":fc(o,"is",x);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=$x.get(p)||p,fc(o,p,x))}}function Z0(o,c,p,x,S,R){switch(p){case"style":$v(o,x,R);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(p=x.__html,p!=null){if(S.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"children":typeof x=="string"?sl(o,x):(typeof x=="number"||typeof x=="bigint")&&sl(o,""+x);break;case"onScroll":x!=null&&mn("scroll",o);break;case"onScrollEnd":x!=null&&mn("scrollend",o);break;case"onClick":x!=null&&(o.onclick=nm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zd.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(S=p.endsWith("Capture"),c=p.slice(2,S?p.length-7:void 0),R=o[ft]||null,R=R!=null?R[p]:null,typeof R=="function"&&o.removeEventListener(c,R,S),typeof x=="function")){typeof R!="function"&&R!==null&&(p in o?o[p]=null:o.hasAttribute(p)&&o.removeAttribute(p)),o.addEventListener(c,x,S);break e}p in o?o[p]=x:x===!0?o.setAttribute(p,""):fc(o,p,x)}}}function Yr(o,c,p){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mn("error",o),mn("load",o);var x=!1,S=!1,R;for(R in p)if(p.hasOwnProperty(R)){var I=p[R];if(I!=null)switch(R){case"src":x=!0;break;case"srcSet":S=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Wn(o,c,R,I,p,null)}}S&&Wn(o,c,"srcSet",p.srcSet,p,null),x&&Wn(o,c,"src",p.src,p,null);return;case"input":mn("invalid",o);var F=R=I=S=null,J=null,ve=null;for(x in p)if(p.hasOwnProperty(x)){var $e=p[x];if($e!=null)switch(x){case"name":S=$e;break;case"type":I=$e;break;case"checked":J=$e;break;case"defaultChecked":ve=$e;break;case"value":R=$e;break;case"defaultValue":F=$e;break;case"children":case"dangerouslySetInnerHTML":if($e!=null)throw Error(r(137,c));break;default:Wn(o,c,x,$e,p,null)}}_v(o,R,F,J,ve,I,S,!1),Hh(o);return;case"select":mn("invalid",o),x=I=R=null;for(S in p)if(p.hasOwnProperty(S)&&(F=p[S],F!=null))switch(S){case"value":R=F;break;case"defaultValue":I=F;break;case"multiple":x=F;default:Wn(o,c,S,F,p,null)}c=R,p=I,o.multiple=!!x,c!=null?pc(o,!!x,c,!1):p!=null&&pc(o,!!x,p,!0);return;case"textarea":mn("invalid",o),R=S=x=null;for(I in p)if(p.hasOwnProperty(I)&&(F=p[I],F!=null))switch(I){case"value":x=F;break;case"defaultValue":S=F;break;case"children":R=F;break;case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(91));break;default:Wn(o,c,I,F,p,null)}Kh(o,x,S,R),Hh(o);return;case"option":for(J in p)if(p.hasOwnProperty(J)&&(x=p[J],x!=null))switch(J){case"selected":o.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:Wn(o,c,J,x,p,null)}return;case"dialog":mn("beforetoggle",o),mn("toggle",o),mn("cancel",o),mn("close",o);break;case"iframe":case"object":mn("load",o);break;case"video":case"audio":for(x=0;x<qf.length;x++)mn(qf[x],o);break;case"image":mn("error",o),mn("load",o);break;case"details":mn("toggle",o);break;case"embed":case"source":case"link":mn("error",o),mn("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in p)if(p.hasOwnProperty(ve)&&(x=p[ve],x!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Wn(o,c,ve,x,p,null)}return;default:if(Rv(c)){for($e in p)p.hasOwnProperty($e)&&(x=p[$e],x!==void 0&&Z0(o,c,$e,x,p,void 0));return}}for(F in p)p.hasOwnProperty(F)&&(x=p[F],x!=null&&Wn(o,c,F,x,p,null))}function oj(o,c,p,x){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var S=null,R=null,I=null,F=null,J=null,ve=null,$e=null;for(ye in p){var Ve=p[ye];if(p.hasOwnProperty(ye)&&Ve!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":J=Ve;default:x.hasOwnProperty(ye)||Wn(o,c,ye,null,x,Ve)}}for(var Ce in x){var ye=x[Ce];if(Ve=p[Ce],x.hasOwnProperty(Ce)&&(ye!=null||Ve!=null))switch(Ce){case"type":R=ye;break;case"name":S=ye;break;case"checked":ve=ye;break;case"defaultChecked":$e=ye;break;case"value":I=ye;break;case"defaultValue":F=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,c));break;default:ye!==Ve&&Wn(o,c,Ce,ye,x,Ve)}}qh(o,I,F,J,ve,$e,R,S);return;case"select":ye=I=F=Ce=null;for(R in p)if(J=p[R],p.hasOwnProperty(R)&&J!=null)switch(R){case"value":break;case"multiple":ye=J;default:x.hasOwnProperty(R)||Wn(o,c,R,null,x,J)}for(S in x)if(R=x[S],J=p[S],x.hasOwnProperty(S)&&(R!=null||J!=null))switch(S){case"value":Ce=R;break;case"defaultValue":F=R;break;case"multiple":I=R;default:R!==J&&Wn(o,c,S,R,x,J)}c=F,p=I,x=ye,Ce!=null?pc(o,!!p,Ce,!1):!!x!=!!p&&(c!=null?pc(o,!!p,c,!0):pc(o,!!p,p?[]:"",!1));return;case"textarea":ye=Ce=null;for(F in p)if(S=p[F],p.hasOwnProperty(F)&&S!=null&&!x.hasOwnProperty(F))switch(F){case"value":break;case"children":break;default:Wn(o,c,F,null,x,S)}for(I in x)if(S=x[I],R=p[I],x.hasOwnProperty(I)&&(S!=null||R!=null))switch(I){case"value":Ce=S;break;case"defaultValue":ye=S;break;case"children":break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:S!==R&&Wn(o,c,I,S,x,R)}jv(o,Ce,ye);return;case"option":for(var Tt in p)if(Ce=p[Tt],p.hasOwnProperty(Tt)&&Ce!=null&&!x.hasOwnProperty(Tt))switch(Tt){case"selected":o.selected=!1;break;default:Wn(o,c,Tt,null,x,Ce)}for(J in x)if(Ce=x[J],ye=p[J],x.hasOwnProperty(J)&&Ce!==ye&&(Ce!=null||ye!=null))switch(J){case"selected":o.selected=Ce&&typeof Ce!="function"&&typeof Ce!="symbol";break;default:Wn(o,c,J,Ce,x,ye)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $t in p)Ce=p[$t],p.hasOwnProperty($t)&&Ce!=null&&!x.hasOwnProperty($t)&&Wn(o,c,$t,null,x,Ce);for(ve in x)if(Ce=x[ve],ye=p[ve],x.hasOwnProperty(ve)&&Ce!==ye&&(Ce!=null||ye!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(r(137,c));break;default:Wn(o,c,ve,Ce,x,ye)}return;default:if(Rv(c)){for(var Qn in p)Ce=p[Qn],p.hasOwnProperty(Qn)&&Ce!==void 0&&!x.hasOwnProperty(Qn)&&Z0(o,c,Qn,void 0,x,Ce);for($e in x)Ce=x[$e],ye=p[$e],!x.hasOwnProperty($e)||Ce===ye||Ce===void 0&&ye===void 0||Z0(o,c,$e,Ce,x,ye);return}}for(var ce in p)Ce=p[ce],p.hasOwnProperty(ce)&&Ce!=null&&!x.hasOwnProperty(ce)&&Wn(o,c,ce,null,x,Ce);for(Ve in x)Ce=x[Ve],ye=p[Ve],!x.hasOwnProperty(Ve)||Ce===ye||Ce==null&&ye==null||Wn(o,c,Ve,Ce,x,ye)}var gi=null,rm=null;function Nu(o){return o.nodeType===9?o:o.ownerDocument}function gr(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yr(o,c){if(o===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&c==="foreignObject"?0:o}function sm(o,c){return o==="textarea"||o==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var X0=null;function lj(){var o=window.event;return o&&o.type==="popstate"?o===X0?!1:(X0=o,!0):(X0=null,!1)}var ww=typeof setTimeout=="function"?setTimeout:void 0,uj=typeof clearTimeout=="function"?clearTimeout:void 0,Cw=typeof Promise=="function"?Promise:void 0,cj=typeof queueMicrotask=="function"?queueMicrotask:typeof Cw<"u"?function(o){return Cw.resolve(null).then(o).catch(Sw)}:ww;function Sw(o){setTimeout(function(){throw o})}function Qa(o){return o==="head"}function am(o,c){var p=c,x=0,S=0;do{var R=p.nextSibling;if(o.removeChild(p),R&&R.nodeType===8)if(p=R.data,p==="/$"){if(0<x&&8>x){p=x;var I=o.ownerDocument;if(p&1&&Kf(I.documentElement),p&2&&Kf(I.body),p&4)for(p=I.head,Kf(p),I=p.firstChild;I;){var F=I.nextSibling,J=I.nodeName;I[Ar]||J==="SCRIPT"||J==="STYLE"||J==="LINK"&&I.rel.toLowerCase()==="stylesheet"||p.removeChild(I),I=F}}if(S===0){o.removeChild(R),th(c);return}S--}else p==="$"||p==="$?"||p==="$!"?S++:x=p.charCodeAt(0)-48;else x=0;p=R}while(p);th(c)}function W0(o){var c=o.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var p=c;switch(c=c.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":W0(p),Cs(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}o.removeChild(p)}}function _w(o,c,p,x){for(;o.nodeType===1;){var S=p;if(o.nodeName.toLowerCase()!==c.toLowerCase()){if(!x&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(x){if(!o[Ar])switch(c){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(R=o.getAttribute("rel"),R==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(R!==S.rel||o.getAttribute("href")!==(S.href==null||S.href===""?null:S.href)||o.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin)||o.getAttribute("title")!==(S.title==null?null:S.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(R=o.getAttribute("src"),(R!==(S.src==null?null:S.src)||o.getAttribute("type")!==(S.type==null?null:S.type)||o.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin))&&R&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(c==="input"&&o.type==="hidden"){var R=S.name==null?null:""+S.name;if(S.type==="hidden"&&o.getAttribute("name")===R)return o}else return o;if(o=vi(o.nextSibling),o===null)break}return null}function im(o,c,p){if(c==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!p||(o=vi(o.nextSibling),o===null))return null;return o}function Rs(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function Qc(o,c){var p=o.ownerDocument;if(o.data!=="$?"||p.readyState==="complete")c();else{var x=function(){c(),p.removeEventListener("DOMContentLoaded",x)};p.addEventListener("DOMContentLoaded",x),o._reactRetry=x}}function vi(o){for(;o!=null;o=o.nextSibling){var c=o.nodeType;if(c===1||c===3)break;if(c===8){if(c=o.data,c==="$"||c==="$!"||c==="$?"||c==="F!"||c==="F")break;if(c==="/$")return null}}return o}var Q0=null;function jw(o){o=o.previousSibling;for(var c=0;o;){if(o.nodeType===8){var p=o.data;if(p==="$"||p==="$!"||p==="$?"){if(c===0)return o;c--}else p==="/$"&&c++}o=o.previousSibling}return null}function Ew(o,c,p){switch(c=Nu(p),o){case"html":if(o=c.documentElement,!o)throw Error(r(452));return o;case"head":if(o=c.head,!o)throw Error(r(453));return o;case"body":if(o=c.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Kf(o){for(var c=o.attributes;c.length;)o.removeAttributeNode(c[0]);Cs(o)}var $a=new Map,Zi=new Set;function Kt(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Xi=pe.d;pe.d={f:Ja,r:$w,D:dj,C:Rw,L:om,m:fj,X:pj,S:hj,M:mj};function Ja(){var o=Xi.f(),c=Yp();return o||c}function $w(o){var c=ga(o);c!==null&&c.tag===5&&c.type==="form"?Ap(c):Xi.r(o)}var Jc=typeof document>"u"?null:document;function In(o,c,p){var x=Jc;if(x&&typeof c=="string"&&c){var S=Va(c);S='link[rel="'+o+'"][href="'+S+'"]',typeof p=="string"&&(S+='[crossorigin="'+p+'"]'),Zi.has(S)||(Zi.add(S),o={rel:o,crossOrigin:p,href:c},x.querySelector(S)===null&&(c=x.createElement("link"),Yr(c,"link",o),kr(c),x.head.appendChild(c)))}}function dj(o){Xi.D(o),In("dns-prefetch",o,null)}function Rw(o,c){Xi.C(o,c),In("preconnect",o,c)}function om(o,c,p){Xi.L(o,c,p);var x=Jc;if(x&&o&&c){var S='link[rel="preload"][as="'+Va(c)+'"]';c==="image"&&p&&p.imageSrcSet?(S+='[imagesrcset="'+Va(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(S+='[imagesizes="'+Va(p.imageSizes)+'"]')):S+='[href="'+Va(o)+'"]';var R=S;switch(c){case"style":R=ed(o);break;case"script":R=td(o)}$a.has(R)||(o=h({rel:"preload",href:c==="image"&&p&&p.imageSrcSet?void 0:o,as:c},p),$a.set(R,o),x.querySelector(S)!==null||c==="style"&&x.querySelector(Yf(R))||c==="script"&&x.querySelector(Zf(R))||(c=x.createElement("link"),Yr(c,"link",o),kr(c),x.head.appendChild(c)))}}function fj(o,c){Xi.m(o,c);var p=Jc;if(p&&o){var x=c&&typeof c.as=="string"?c.as:"script",S='link[rel="modulepreload"][as="'+Va(x)+'"][href="'+Va(o)+'"]',R=S;switch(x){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=td(o)}if(!$a.has(R)&&(o=h({rel:"modulepreload",href:o},c),$a.set(R,o),p.querySelector(S)===null)){switch(x){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Zf(R)))return}x=p.createElement("link"),Yr(x,"link",o),kr(x),p.head.appendChild(x)}}}function hj(o,c,p){Xi.S(o,c,p);var x=Jc;if(x&&o){var S=nl(x).hoistableStyles,R=ed(o);c=c||"default";var I=S.get(R);if(!I){var F={loading:0,preload:null};if(I=x.querySelector(Yf(R)))F.loading=5;else{o=h({rel:"stylesheet",href:o,"data-precedence":c},p),(p=$a.get(R))&&Xf(o,p);var J=I=x.createElement("link");kr(J),Yr(J,"link",o),J._p=new Promise(function(ve,$e){J.onload=ve,J.onerror=$e}),J.addEventListener("load",function(){F.loading|=1}),J.addEventListener("error",function(){F.loading|=2}),F.loading|=4,lm(I,c,x)}I={type:"stylesheet",instance:I,count:1,state:F},S.set(R,I)}}}function pj(o,c){Xi.X(o,c);var p=Jc;if(p&&o){var x=nl(p).hoistableScripts,S=td(o),R=x.get(S);R||(R=p.querySelector(Zf(S)),R||(o=h({src:o,async:!0},c),(c=$a.get(S))&&J0(o,c),R=p.createElement("script"),kr(R),Yr(R,"link",o),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},x.set(S,R))}}function mj(o,c){Xi.M(o,c);var p=Jc;if(p&&o){var x=nl(p).hoistableScripts,S=td(o),R=x.get(S);R||(R=p.querySelector(Zf(S)),R||(o=h({src:o,async:!0,type:"module"},c),(c=$a.get(S))&&J0(o,c),R=p.createElement("script"),kr(R),Yr(R,"link",o),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},x.set(S,R))}}function Ow(o,c,p,x){var S=(S=Re.current)?Kt(S):null;if(!S)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(c=ed(p.href),p=nl(S).hoistableStyles,x=p.get(c),x||(x={type:"style",instance:null,count:0,state:null},p.set(c,x)),x):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){o=ed(p.href);var R=nl(S).hoistableStyles,I=R.get(o);if(I||(S=S.ownerDocument||S,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(o,I),(R=S.querySelector(Yf(o)))&&!R._p&&(I.instance=R,I.state.loading=5),$a.has(o)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},$a.set(o,p),R||gj(S,o,p,I.state))),c&&x===null)throw Error(r(528,""));return I}if(c&&x!==null)throw Error(r(529,""));return null;case"script":return c=p.async,p=p.src,typeof p=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=td(p),p=nl(S).hoistableScripts,x=p.get(c),x||(x={type:"script",instance:null,count:0,state:null},p.set(c,x)),x):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function ed(o){return'href="'+Va(o)+'"'}function Yf(o){return'link[rel="stylesheet"]['+o+"]"}function Tw(o){return h({},o,{"data-precedence":o.precedence,precedence:null})}function gj(o,c,p,x){o.querySelector('link[rel="preload"][as="style"]['+c+"]")?x.loading=1:(c=o.createElement("link"),x.preload=c,c.addEventListener("load",function(){return x.loading|=1}),c.addEventListener("error",function(){return x.loading|=2}),Yr(c,"link",p),kr(c),o.head.appendChild(c))}function td(o){return'[src="'+Va(o)+'"]'}function Zf(o){return"script[async]"+o}function Aw(o,c,p){if(c.count++,c.instance===null)switch(c.type){case"style":var x=o.querySelector('style[data-href~="'+Va(p.href)+'"]');if(x)return c.instance=x,kr(x),x;var S=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return x=(o.ownerDocument||o).createElement("style"),kr(x),Yr(x,"style",S),lm(x,p.precedence,o),c.instance=x;case"stylesheet":S=ed(p.href);var R=o.querySelector(Yf(S));if(R)return c.state.loading|=4,c.instance=R,kr(R),R;x=Tw(p),(S=$a.get(S))&&Xf(x,S),R=(o.ownerDocument||o).createElement("link"),kr(R);var I=R;return I._p=new Promise(function(F,J){I.onload=F,I.onerror=J}),Yr(R,"link",x),c.state.loading|=4,lm(R,p.precedence,o),c.instance=R;case"script":return R=td(p.src),(S=o.querySelector(Zf(R)))?(c.instance=S,kr(S),S):(x=p,(S=$a.get(R))&&(x=h({},p),J0(x,S)),o=o.ownerDocument||o,S=o.createElement("script"),kr(S),Yr(S,"link",x),o.head.appendChild(S),c.instance=S);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(x=c.instance,c.state.loading|=4,lm(x,p.precedence,o));return c.instance}function lm(o,c,p){for(var x=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=x.length?x[x.length-1]:null,R=S,I=0;I<x.length;I++){var F=x[I];if(F.dataset.precedence===c)R=F;else if(R!==S)break}R?R.parentNode.insertBefore(o,R.nextSibling):(c=p.nodeType===9?p.head:p,c.insertBefore(o,c.firstChild))}function Xf(o,c){o.crossOrigin==null&&(o.crossOrigin=c.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=c.referrerPolicy),o.title==null&&(o.title=c.title)}function J0(o,c){o.crossOrigin==null&&(o.crossOrigin=c.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=c.referrerPolicy),o.integrity==null&&(o.integrity=c.integrity)}var nd=null;function kw(o,c,p){if(nd===null){var x=new Map,S=nd=new Map;S.set(p,x)}else S=nd,x=S.get(p),x||(x=new Map,S.set(p,x));if(x.has(o))return x;for(x.set(o,null),p=p.getElementsByTagName(o),S=0;S<p.length;S++){var R=p[S];if(!(R[Ar]||R[Qe]||o==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var I=R.getAttribute(c)||"";I=o+I;var F=x.get(I);F?F.push(R):x.set(I,[R])}}return x}function Nw(o,c,p){o=o.ownerDocument||o,o.head.insertBefore(p,c==="title"?o.querySelector("head > title"):null)}function vj(o,c,p){if(p===1||c.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return o=c.disabled,typeof c.precedence=="string"&&o==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function Zr(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var ss=null;function yj(){}function xj(o,c,p){if(ss===null)throw Error(r(475));var x=ss;if(c.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var S=ed(p.href),R=o.querySelector(Yf(S));if(R){o=R._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(x.count++,x=Wf.bind(x),o.then(x,x)),c.state.loading|=4,c.instance=R,kr(R);return}R=o.ownerDocument||o,p=Tw(p),(S=$a.get(S))&&Xf(p,S),R=R.createElement("link"),kr(R);var I=R;I._p=new Promise(function(F,J){I.onload=F,I.onerror=J}),Yr(R,"link",p),c.instance=R}x.stylesheets===null&&(x.stylesheets=new Map),x.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&3)===0&&(x.count++,c=Wf.bind(x),o.addEventListener("load",c),o.addEventListener("error",c))}}function bj(){if(ss===null)throw Error(r(475));var o=ss;return o.stylesheets&&o.count===0&&ey(o,o.stylesheets),0<o.count?function(c){var p=setTimeout(function(){if(o.stylesheets&&ey(o,o.stylesheets),o.unsuspend){var x=o.unsuspend;o.unsuspend=null,x()}},6e4);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(p)}}:null}function Wf(){if(this.count--,this.count===0){if(this.stylesheets)ey(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var um=null;function ey(o,c){o.stylesheets=null,o.unsuspend!==null&&(o.count++,um=new Map,c.forEach(wj,o),um=null,Wf.call(o))}function wj(o,c){if(!(c.state.loading&4)){var p=um.get(o);if(p)var x=p.get(null);else{p=new Map,um.set(o,p);for(var S=o.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<S.length;R++){var I=S[R];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(p.set(I.dataset.precedence,I),x=I)}x&&p.set(null,x)}S=c.instance,I=S.getAttribute("data-precedence"),R=p.get(I)||x,R===x&&p.set(null,S),p.set(I,S),this.count++,x=Wf.bind(this),S.addEventListener("load",x),S.addEventListener("error",x),R?R.parentNode.insertBefore(S,R.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(S,o.firstChild)),c.state.loading|=4}}var rd={$$typeof:N,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function Cj(o,c,p,x,S,R,I,F){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=li(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=li(0),this.hiddenUpdates=li(null),this.identifierPrefix=x,this.onUncaughtError=S,this.onCaughtError=R,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function Lw(o,c,p,x,S,R,I,F,J,ve,$e,Ve){return o=new Cj(o,c,p,I,F,J,ve,Ve),c=1,R===!0&&(c|=24),R=zs(3,null,null,c),o.current=R,R.stateNode=o,c=Yv(),c.refCount++,o.pooledCache=c,c.refCount++,R.memoizedState={element:x,isDehydrated:p,cache:c},bu(R),o}function Mw(o){return o?(o=hu,o):hu}function ty(o,c,p,x,S,R){S=Mw(S),x.context===null?x.context=S:x.pendingContext=S,x=pl(c),x.payload={element:p},R=R===void 0?null:R,R!==null&&(x.callback=R),p=_o(o,x,c),p!==null&&(Ea(p,o,c),cf(p,o,c))}function ny(o,c){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var p=o.retryLane;o.retryLane=p!==0&&p<c?p:c}}function ry(o,c){ny(o,c),(o=o.alternate)&&ny(o,c)}function Iw(o){if(o.tag===13){var c=fu(o,67108864);c!==null&&Ea(c,o,67108864),ry(o,67108864)}}var cm=!0;function Sj(o,c,p,x){var S=X.T;X.T=null;var R=pe.p;try{pe.p=2,sy(o,c,p,x)}finally{pe.p=R,X.T=S}}function sd(o,c,p,x){var S=X.T;X.T=null;var R=pe.p;try{pe.p=8,sy(o,c,p,x)}finally{pe.p=R,X.T=S}}function sy(o,c,p,x){if(cm){var S=ay(x);if(S===null)Mo(o,c,x,dm,p),Dw(o,x);else if(jj(S,o,c,p,x))x.stopPropagation();else if(Dw(o,x),c&4&&-1<_j.indexOf(o)){for(;S!==null;){var R=ga(S);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var I=Nn(R.pendingLanes);if(I!==0){var F=R;for(F.pendingLanes|=2,F.entangledLanes|=2;I;){var J=1<<31-jn(I);F.entanglements[1]|=J,I&=~J}Yi(R),(zn&6)===0&&(qc=Ge()+500,Gf(0))}}break;case 13:F=fu(R,2),F!==null&&Ea(F,R,2),Yp(),ry(R,2)}if(R=ay(x),R===null&&Mo(o,c,x,dm,p),R===S)break;S=R}S!==null&&x.stopPropagation()}else Mo(o,c,x,null,p)}}function ay(o){return o=Ov(o),iy(o)}var dm=null;function iy(o){if(dm=null,o=Pn(o),o!==null){var c=a(o);if(c===null)o=null;else{var p=c.tag;if(p===13){if(o=i(c),o!==null)return o;o=null}else if(p===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;o=null}else c!==o&&(o=null)}}return dm=o,null}function Pw(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dt()){case Z:return 2;case oe:return 8;case me:case He:return 32;case ze:return 268435456;default:return 32}default:return 32}}var fm=!1,Io=null,Tl=null,Al=null,Qf=new Map,Jf=new Map,kl=[],_j="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Dw(o,c){switch(o){case"focusin":case"focusout":Io=null;break;case"dragenter":case"dragleave":Tl=null;break;case"mouseover":case"mouseout":Al=null;break;case"pointerover":case"pointerout":Qf.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jf.delete(c.pointerId)}}function eh(o,c,p,x,S,R){return o===null||o.nativeEvent!==R?(o={blockedOn:c,domEventName:p,eventSystemFlags:x,nativeEvent:R,targetContainers:[S]},c!==null&&(c=ga(c),c!==null&&Iw(c)),o):(o.eventSystemFlags|=x,c=o.targetContainers,S!==null&&c.indexOf(S)===-1&&c.push(S),o)}function jj(o,c,p,x,S){switch(c){case"focusin":return Io=eh(Io,o,c,p,x,S),!0;case"dragenter":return Tl=eh(Tl,o,c,p,x,S),!0;case"mouseover":return Al=eh(Al,o,c,p,x,S),!0;case"pointerover":var R=S.pointerId;return Qf.set(R,eh(Qf.get(R)||null,o,c,p,x,S)),!0;case"gotpointercapture":return R=S.pointerId,Jf.set(R,eh(Jf.get(R)||null,o,c,p,x,S)),!0}return!1}function Vw(o){var c=Pn(o.target);if(c!==null){var p=a(c);if(p!==null){if(c=p.tag,c===13){if(c=i(p),c!==null){o.blockedOn=c,ws(o.priority,function(){if(p.tag===13){var x=bs();x=ms(x);var S=fu(p,x);S!==null&&Ea(S,p,x),ry(p,x)}});return}}else if(c===3&&p.stateNode.current.memoizedState.isDehydrated){o.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}o.blockedOn=null}function hm(o){if(o.blockedOn!==null)return!1;for(var c=o.targetContainers;0<c.length;){var p=ay(o.nativeEvent);if(p===null){p=o.nativeEvent;var x=new p.constructor(p.type,p);Yh=x,p.target.dispatchEvent(x),Yh=null}else return c=ga(p),c!==null&&Iw(c),o.blockedOn=p,!1;c.shift()}return!0}function Bw(o,c,p){hm(o)&&p.delete(c)}function Ej(){fm=!1,Io!==null&&hm(Io)&&(Io=null),Tl!==null&&hm(Tl)&&(Tl=null),Al!==null&&hm(Al)&&(Al=null),Qf.forEach(Bw),Jf.forEach(Bw)}function pm(o,c){o.blockedOn===c&&(o.blockedOn=null,fm||(fm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ej)))}var mm=null;function Fw(o){mm!==o&&(mm=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mm===o&&(mm=null);for(var c=0;c<o.length;c+=3){var p=o[c],x=o[c+1],S=o[c+2];if(typeof x!="function"){if(iy(x||p)===null)continue;break}var R=ga(p);R!==null&&(o.splice(c,3),c-=3,wf(R,{pending:!0,data:S,method:p.method,action:x},x,S))}}))}function th(o){function c(J){return pm(J,o)}Io!==null&&pm(Io,o),Tl!==null&&pm(Tl,o),Al!==null&&pm(Al,o),Qf.forEach(c),Jf.forEach(c);for(var p=0;p<kl.length;p++){var x=kl[p];x.blockedOn===o&&(x.blockedOn=null)}for(;0<kl.length&&(p=kl[0],p.blockedOn===null);)Vw(p),p.blockedOn===null&&kl.shift();if(p=(o.ownerDocument||o).$$reactFormReplay,p!=null)for(x=0;x<p.length;x+=3){var S=p[x],R=p[x+1],I=S[ft]||null;if(typeof R=="function")I||Fw(p);else if(I){var F=null;if(R&&R.hasAttribute("formAction")){if(S=R,I=R[ft]||null)F=I.formAction;else if(iy(S)!==null)continue}else F=I.action;typeof F=="function"?p[x+1]=F:(p.splice(x,3),x-=3),Fw(p)}}}function oy(o){this._internalRoot=o}gm.prototype.render=oy.prototype.render=function(o){var c=this._internalRoot;if(c===null)throw Error(r(409));var p=c.current,x=bs();ty(p,x,o,c,null,null)},gm.prototype.unmount=oy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var c=o.containerInfo;ty(o.current,2,null,o,null,null),Yp(),c[Et]=null}};function gm(o){this._internalRoot=o}gm.prototype.unstable_scheduleHydration=function(o){if(o){var c=vn();o={blockedOn:null,target:o,priority:c};for(var p=0;p<kl.length&&c!==0&&c<kl[p].priority;p++);kl.splice(p,0,o),p===0&&Vw(o)}};var Uw=t.version;if(Uw!=="19.1.1")throw Error(r(527,Uw,"19.1.1"));pe.findDOMNode=function(o){var c=o._reactInternals;if(c===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=u(c),o=o!==null?f(o):null,o=o===null?null:o.stateNode,o};var $j={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vm.isDisabled&&vm.supportsFiber)try{Dt=vm.inject($j),ht=vm}catch{}}return uy.createRoot=function(o,c){if(!s(o))throw Error(r(299));var p=!1,x="",S=b0,R=Lp,I=$b,F=null;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(x=c.identifierPrefix),c.onUncaughtError!==void 0&&(S=c.onUncaughtError),c.onCaughtError!==void 0&&(R=c.onCaughtError),c.onRecoverableError!==void 0&&(I=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(F=c.unstable_transitionCallbacks)),c=Lw(o,1,!1,null,null,p,x,S,R,I,F,null),o[Et]=c.current,Y0(o),new oy(c)},uy.hydrateRoot=function(o,c,p){if(!s(o))throw Error(r(299));var x=!1,S="",R=b0,I=Lp,F=$b,J=null,ve=null;return p!=null&&(p.unstable_strictMode===!0&&(x=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onUncaughtError!==void 0&&(R=p.onUncaughtError),p.onCaughtError!==void 0&&(I=p.onCaughtError),p.onRecoverableError!==void 0&&(F=p.onRecoverableError),p.unstable_transitionCallbacks!==void 0&&(J=p.unstable_transitionCallbacks),p.formState!==void 0&&(ve=p.formState)),c=Lw(o,1,!0,c,p??null,x,S,R,I,F,J,ve),c.context=Mw(null),p=c.current,x=bs(),x=ms(x),S=pl(x),S.callback=null,_o(p,S,x),p=x,c.current.lanes=p,pa(c,p),Yi(c),o[Et]=c.current,Y0(o),new gm(c)},uy.version="19.1.1",uy}var VM;function xie(){if(VM)return kj.exports;VM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),kj.exports=yie(),kj.exports}var bie=xie(),y=Yk();const U=PK(y),Zk=lie({__proto__:null,default:U},[y]);/**
 * react-router v7.12.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var BM="popstate";function wie(e={}){function t(r,s){let{pathname:a,search:i,hash:l}=r.location;return aA("",{pathname:a,search:i,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:m1(s)}return Sie(t,n,null,e)}function Rr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ki(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cie(){return Math.random().toString(36).substring(2,10)}function FM(e,t){return{usr:e.state,key:e.key,idx:t}}function aA(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hg(t):t,state:n,key:t&&t.key||r||Cie()}}function m1({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hg(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Sie(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:a=!1}=r,i=s.history,l="POP",u=null,f=h();f==null&&(f=0,i.replaceState({...i.state,idx:f},""));function h(){return(i.state||{idx:null}).idx}function g(){l="POP";let E=h(),$=E==null?null:E-f;f=E,u&&u({action:l,location:_.location,delta:$})}function v(E,$){l="PUSH";let O=aA(_.location,E,$);f=h()+1;let N=FM(O,f),M=_.createHref(O);try{i.pushState(N,"",M)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;s.location.assign(M)}a&&u&&u({action:l,location:_.location,delta:1})}function w(E,$){l="REPLACE";let O=aA(_.location,E,$);f=h();let N=FM(O,f),M=_.createHref(O);i.replaceState(N,"",M),a&&u&&u({action:l,location:_.location,delta:0})}function C(E){return _ie(E)}let _={get action(){return l},get location(){return e(s,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(BM,g),u=E,()=>{s.removeEventListener(BM,g),u=null}},createHref(E){return t(s,E)},createURL:C,encodeLocation(E){let $=C(E);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:v,replace:w,go(E){return i.go(E)}};return _}function _ie(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Rr(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:m1(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function DK(e,t,n="/"){return jie(e,t,n,!1)}function jie(e,t,n,r){let s=typeof t=="string"?Hg(t):t,a=Hu(s.pathname||"/",n);if(a==null)return null;let i=VK(e);Eie(i);let l=null;for(let u=0;l==null&&u<i.length;++u){let f=Pie(a);l=Mie(i[u],f,r)}return l}function VK(e,t=[],n=[],r="",s=!1){let a=(i,l,u=s,f)=>{let h={relativePath:f===void 0?i.path||"":f,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&u)return;Rr(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let g=Fu([r,h.relativePath]),v=n.concat(h);i.children&&i.children.length>0&&(Rr(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),VK(i.children,t,v,g,u)),!(i.path==null&&!i.index)&&t.push({path:g,score:Nie(g,i.index),routesMeta:v})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))a(i,l);else for(let u of BK(i.path))a(i,l,!0,u)}),t}function BK(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return s?[a,""]:[a];let i=BK(r.join("/")),l=[];return l.push(...i.map(u=>u===""?a:[a,u].join("/"))),s&&l.push(...i),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Eie(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Lie(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var $ie=/^:[\w-]+$/,Rie=3,Oie=2,Tie=1,Aie=10,kie=-2,UM=e=>e==="*";function Nie(e,t){let n=e.split("/"),r=n.length;return n.some(UM)&&(r+=kie),t&&(r+=Oie),n.filter(s=>!UM(s)).reduce((s,a)=>s+($ie.test(a)?Rie:a===""?Tie:Aie),r)}function Lie(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Mie(e,t,n=!1){let{routesMeta:r}=e,s={},a="/",i=[];for(let l=0;l<r.length;++l){let u=r[l],f=l===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",g=lS({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),v=u.route;if(!g&&f&&n&&!r[r.length-1].route.index&&(g=lS({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!g)return null;Object.assign(s,g.params),i.push({params:s,pathname:Fu([a,g.pathname]),pathnameBase:Fie(Fu([a,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(a=Fu([a,g.pathnameBase]))}return i}function lS(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Iie(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let a=s[0],i=a.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:g},v)=>{if(h==="*"){let C=l[v]||"";i=a.slice(0,a.length-C.length).replace(/(.)\/+$/,"$1")}const w=l[v];return g&&!w?f[h]=void 0:f[h]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:i,pattern:e}}function Iie(e,t=!1,n=!0){ki(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Pie(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ki(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Hu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var FK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Die=e=>FK.test(e);function Vie(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Hg(e):e,a;if(n)if(Die(n))a=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),ki(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${n}`)}n.startsWith("/")?a=GM(n.substring(1),"/"):a=GM(n,t)}else a=t;return{pathname:a,search:Uie(r),hash:Gie(s)}}function GM(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Pj(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Bie(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xk(e){let t=Bie(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Wk(e,t,n,r=!1){let s;typeof e=="string"?s=Hg(e):(s={...e},Rr(!s.pathname||!s.pathname.includes("?"),Pj("?","pathname","search",s)),Rr(!s.pathname||!s.pathname.includes("#"),Pj("#","pathname","hash",s)),Rr(!s.search||!s.search.includes("#"),Pj("#","search","hash",s)));let a=e===""||s.pathname==="",i=a?"/":s.pathname,l;if(i==null)l=n;else{let g=t.length-1;if(!r&&i.startsWith("..")){let v=i.split("/");for(;v[0]==="..";)v.shift(),g-=1;s.pathname=v.join("/")}l=g>=0?t[g]:"/"}let u=Vie(s,l),f=i&&i!=="/"&&i.endsWith("/"),h=(a||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}var Fu=e=>e.join("/").replace(/\/\/+/g,"/"),Fie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Uie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,zie=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Hie(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qie(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var UK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function GK(e,t){let n=e;if(typeof n!="string"||!FK.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(UK)try{let a=new URL(window.location.href),i=n.startsWith("//")?new URL(a.protocol+n):new URL(n),l=Hu(i.pathname,t);i.origin===a.origin&&l!=null?n=l+i.search+i.hash:s=!0}catch{ki(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zK=["POST","PUT","PATCH","DELETE"];new Set(zK);var Kie=["GET",...zK];new Set(Kie);var qg=y.createContext(null);qg.displayName="DataRouter";var d2=y.createContext(null);d2.displayName="DataRouterState";var Yie=y.createContext(!1),HK=y.createContext({isTransitioning:!1});HK.displayName="ViewTransition";var Zie=y.createContext(new Map);Zie.displayName="Fetchers";var Xie=y.createContext(null);Xie.displayName="Await";var Ii=y.createContext(null);Ii.displayName="Navigation";var W1=y.createContext(null);W1.displayName="Location";var co=y.createContext({outlet:null,matches:[],isDataRoute:!1});co.displayName="Route";var Qk=y.createContext(null);Qk.displayName="RouteError";var qK="REACT_ROUTER_ERROR",Wie="REDIRECT",Qie="ROUTE_ERROR_RESPONSE";function Jie(e){if(e.startsWith(`${qK}:${Wie}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function eoe(e){if(e.startsWith(`${qK}:${Qie}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new zie(t.status,t.statusText,t.data)}catch{}}function toe(e,{relative:t}={}){Rr(Kg(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Ii),{hash:s,pathname:a,search:i}=Q1(e,{relative:t}),l=a;return n!=="/"&&(l=a==="/"?n:Fu([n,a])),r.createHref({pathname:l,search:i,hash:s})}function Kg(){return y.useContext(W1)!=null}function Ds(){return Rr(Kg(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(W1).location}var KK="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function YK(e){y.useContext(Ii).static||y.useLayoutEffect(e)}function kh(){let{isDataRoute:e}=y.useContext(co);return e?goe():noe()}function noe(){Rr(Kg(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(qg),{basename:t,navigator:n}=y.useContext(Ii),{matches:r}=y.useContext(co),{pathname:s}=Ds(),a=JSON.stringify(Xk(r)),i=y.useRef(!1);return YK(()=>{i.current=!0}),y.useCallback((u,f={})=>{if(ki(i.current,KK),!i.current)return;if(typeof u=="number"){n.go(u);return}let h=Wk(u,JSON.parse(a),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Fu([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,a,s,e])}var roe=y.createContext(null);function soe(e){let t=y.useContext(co).outlet;return y.useMemo(()=>t&&y.createElement(roe.Provider,{value:e},t),[t,e])}function fo(){let{matches:e}=y.useContext(co),t=e[e.length-1];return t?t.params:{}}function Q1(e,{relative:t}={}){let{matches:n}=y.useContext(co),{pathname:r}=Ds(),s=JSON.stringify(Xk(n));return y.useMemo(()=>Wk(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function aoe(e,t){return ZK(e,t)}function ZK(e,t,n,r,s){Rr(Kg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=y.useContext(Ii),{matches:i}=y.useContext(co),l=i[i.length-1],u=l?l.params:{},f=l?l.pathname:"/",h=l?l.pathnameBase:"/",g=l&&l.route;{let O=g&&g.path||"";WK(f,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let v=Ds(),w;if(t){let O=typeof t=="string"?Hg(t):t;Rr(h==="/"||O.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${O.pathname}" was given in the \`location\` prop.`),w=O}else w=v;let C=w.pathname||"/",_=C;if(h!=="/"){let O=h.replace(/^\//,"").split("/");_="/"+C.replace(/^\//,"").split("/").slice(O.length).join("/")}let E=DK(e,{pathname:_});ki(g||E!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),ki(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let $=coe(E&&E.map(O=>Object.assign({},O,{params:Object.assign({},u,O.params),pathname:Fu([h,a.encodeLocation?a.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?h:Fu([h,a.encodeLocation?a.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),i,n,r,s);return t&&$?y.createElement(W1.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},$):$}function ioe(){let e=moe(),t=Hie(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,i)}var ooe=y.createElement(ioe,null),XK=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=eoe(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(co.Provider,{value:this.props.routeContext},y.createElement(Qk.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(loe,{error:e},t):t}};XK.contextType=Yie;var Dj=new WeakMap;function loe({children:e,error:t}){let{basename:n}=y.useContext(Ii);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Jie(t.digest);if(r){let s=Dj.get(t);if(s)throw s;let a=GK(r.location,n);if(UK&&!Dj.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw Dj.set(t,i),i}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function uoe({routeContext:e,match:t,children:n}){let r=y.useContext(qg);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(co.Provider,{value:e},n)}function coe(e,t=[],n=null,r=null,s=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,i=n?.errors;if(i!=null){let h=a.findIndex(g=>g.route.id&&i?.[g.route.id]!==void 0);Rr(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let l=!1,u=-1;if(n)for(let h=0;h<a.length;h++){let g=a[h];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(u=h),g.route.id){let{loaderData:v,errors:w}=n,C=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!w||w[g.route.id]===void 0);if(g.route.lazy||C){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}let f=n&&r?(h,g)=>{r(h,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:qie(n.matches),errorInfo:g})}:void 0;return a.reduceRight((h,g,v)=>{let w,C=!1,_=null,E=null;n&&(w=i&&g.route.id?i[g.route.id]:void 0,_=g.route.errorElement||ooe,l&&(u<0&&v===0?(WK("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,E=null):u===v&&(C=!0,E=g.route.hydrateFallbackElement||null)));let $=t.concat(a.slice(0,v+1)),O=()=>{let N;return w?N=_:C?N=E:g.route.Component?N=y.createElement(g.route.Component,null):g.route.element?N=g.route.element:N=h,y.createElement(uoe,{match:g,routeContext:{outlet:h,matches:$,isDataRoute:n!=null},children:N})};return n&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?y.createElement(XK,{location:n.location,revalidation:n.revalidation,component:_,error:w,children:O(),routeContext:{outlet:null,matches:$,isDataRoute:!0},onError:f}):O()},null)}function Jk(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function doe(e){let t=y.useContext(qg);return Rr(t,Jk(e)),t}function foe(e){let t=y.useContext(d2);return Rr(t,Jk(e)),t}function hoe(e){let t=y.useContext(co);return Rr(t,Jk(e)),t}function e8(e){let t=hoe(e),n=t.matches[t.matches.length-1];return Rr(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function poe(){return e8("useRouteId")}function moe(){let e=y.useContext(Qk),t=foe("useRouteError"),n=e8("useRouteError");return e!==void 0?e:t.errors?.[n]}function goe(){let{router:e}=doe("useNavigate"),t=e8("useNavigate"),n=y.useRef(!1);return YK(()=>{n.current=!0}),y.useCallback(async(s,a={})=>{ki(n.current,KK),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...a}))},[e,t])}var zM={};function WK(e,t,n){!t&&!zM[e]&&(zM[e]=!0,ki(!1,n))}y.memo(voe);function voe({routes:e,future:t,state:n,onError:r}){return ZK(e,void 0,n,r,t)}function t8({to:e,replace:t,state:n,relative:r}){Rr(Kg(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(Ii);ki(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=y.useContext(co),{pathname:i}=Ds(),l=kh(),u=Wk(e,Xk(a),i,r==="path"),f=JSON.stringify(u);return y.useEffect(()=>{l(JSON.parse(f),{replace:t,state:n,relative:r})},[l,f,r,t,n]),null}function QK(e){return soe(e.context)}function Tn(e){Rr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function yoe({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:s,static:a=!1,unstable_useTransitions:i}){Rr(!Kg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:a,unstable_useTransitions:i,future:{}}),[l,s,a,i]);typeof n=="string"&&(n=Hg(n));let{pathname:f="/",search:h="",hash:g="",state:v=null,key:w="default"}=n,C=y.useMemo(()=>{let _=Hu(f,l);return _==null?null:{location:{pathname:_,search:h,hash:g,state:v,key:w},navigationType:r}},[l,f,h,g,v,w,r]);return ki(C!=null,`<Router basename="${l}"> is not able to match the URL "${f}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:y.createElement(Ii.Provider,{value:u},y.createElement(W1.Provider,{children:t,value:C}))}function xoe({children:e,location:t}){return aoe(iA(e),t)}function iA(e,t=[]){let n=[];return y.Children.forEach(e,(r,s)=>{if(!y.isValidElement(r))return;let a=[...t,s];if(r.type===y.Fragment){n.push.apply(n,iA(r.props.children,a));return}Rr(r.type===Tn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Rr(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=iA(r.props.children,a)),n.push(i)}),n}var jC="get",EC="application/x-www-form-urlencoded";function f2(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function boe(e){return f2(e)&&e.tagName.toLowerCase()==="button"}function woe(e){return f2(e)&&e.tagName.toLowerCase()==="form"}function Coe(e){return f2(e)&&e.tagName.toLowerCase()==="input"}function Soe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _oe(e,t){return e.button===0&&(!t||t==="_self")&&!Soe(e)}function oA(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function joe(e,t){let n=oA(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(a=>{n.append(s,a)})}),n}var Gw=null;function Eoe(){if(Gw===null)try{new FormData(document.createElement("form"),0),Gw=!1}catch{Gw=!0}return Gw}var $oe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vj(e){return e!=null&&!$oe.has(e)?(ki(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${EC}"`),null):e}function Roe(e,t){let n,r,s,a,i;if(woe(e)){let l=e.getAttribute("action");r=l?Hu(l,t):null,n=e.getAttribute("method")||jC,s=Vj(e.getAttribute("enctype"))||EC,a=new FormData(e)}else if(boe(e)||Coe(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(r=u?Hu(u,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||jC,s=Vj(e.getAttribute("formenctype"))||Vj(l.getAttribute("enctype"))||EC,a=new FormData(l,e),!Eoe()){let{name:f,type:h,value:g}=e;if(h==="image"){let v=f?`${f}.`:"";a.append(`${v}x`,"0"),a.append(`${v}y`,"0")}else f&&a.append(f,g)}}else{if(f2(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=jC,r=null,s=EC,i=e}return a&&s==="text/plain"&&(i=a,a=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function n8(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ooe(e,t,n,r){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:t&&Hu(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function Toe(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Aoe(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function koe(e,t,n){let r=await Promise.all(e.map(async s=>{let a=t.routes[s.route.id];if(a){let i=await Toe(a,n);return i.links?i.links():[]}return[]}));return Ioe(r.flat(1).filter(Aoe).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function HM(e,t,n,r,s,a){let i=(u,f)=>n[f]?u.route.id!==n[f].route.id:!0,l=(u,f)=>n[f].pathname!==u.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==u.params["*"];return a==="assets"?t.filter((u,f)=>i(u,f)||l(u,f)):a==="data"?t.filter((u,f)=>{let h=r.routes[u.route.id];if(!h||!h.hasLoader)return!1;if(i(u,f)||l(u,f))return!0;if(u.route.shouldRevalidate){let g=u.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Noe(e,t,{includeHydrateFallback:n}={}){return Loe(e.map(r=>{let s=t.routes[r.route.id];if(!s)return[];let a=[s.module];return s.clientActionModule&&(a=a.concat(s.clientActionModule)),s.clientLoaderModule&&(a=a.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(a=a.concat(s.hydrateFallbackModule)),s.imports&&(a=a.concat(s.imports)),a}).flat(1))}function Loe(e){return[...new Set(e)]}function Moe(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ioe(e,t){let n=new Set;return new Set(t),e.reduce((r,s)=>{let a=JSON.stringify(Moe(s));return n.has(a)||(n.add(a),r.push({key:a,link:s})),r},[])}function JK(){let e=y.useContext(qg);return n8(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Poe(){let e=y.useContext(d2);return n8(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var r8=y.createContext(void 0);r8.displayName="FrameworkContext";function eY(){let e=y.useContext(r8);return n8(e,"You must render this element inside a <HydratedRouter> element"),e}function Doe(e,t){let n=y.useContext(r8),[r,s]=y.useState(!1),[a,i]=y.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:f,onMouseLeave:h,onTouchStart:g}=t,v=y.useRef(null);y.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let _=$=>{$.forEach(O=>{i(O.isIntersecting)})},E=new IntersectionObserver(_,{threshold:.5});return v.current&&E.observe(v.current),()=>{E.disconnect()}}},[e]),y.useEffect(()=>{if(r){let _=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(_)}}},[r]);let w=()=>{s(!0)},C=()=>{s(!1),i(!1)};return n?e!=="intent"?[a,v,{}]:[a,v,{onFocus:cy(l,w),onBlur:cy(u,C),onMouseEnter:cy(f,w),onMouseLeave:cy(h,C),onTouchStart:cy(g,w)}]:[!1,v,{}]}function cy(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Voe({page:e,...t}){let{router:n}=JK(),r=y.useMemo(()=>DK(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?y.createElement(Foe,{page:e,matches:r,...t}):null}function Boe(e){let{manifest:t,routeModules:n}=eY(),[r,s]=y.useState([]);return y.useEffect(()=>{let a=!1;return koe(e,t,n).then(i=>{a||s(i)}),()=>{a=!0}},[e,t,n]),r}function Foe({page:e,matches:t,...n}){let r=Ds(),{future:s,manifest:a,routeModules:i}=eY(),{basename:l}=JK(),{loaderData:u,matches:f}=Poe(),h=y.useMemo(()=>HM(e,t,f,a,r,"data"),[e,t,f,a,r]),g=y.useMemo(()=>HM(e,t,f,a,r,"assets"),[e,t,f,a,r]),v=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,E=!1;if(t.forEach(O=>{let N=a.routes[O.route.id];!N||!N.hasLoader||(!h.some(M=>M.route.id===O.route.id)&&O.route.id in u&&i[O.route.id]?.shouldRevalidate||N.hasClientLoader?E=!0:_.add(O.route.id))}),_.size===0)return[];let $=Ooe(e,l,s.unstable_trailingSlashAwareDataRequests,"data");return E&&_.size>0&&$.searchParams.set("_routes",t.filter(O=>_.has(O.route.id)).map(O=>O.route.id).join(",")),[$.pathname+$.search]},[l,s.unstable_trailingSlashAwareDataRequests,u,r,a,h,t,e,i]),w=y.useMemo(()=>Noe(g,a),[g,a]),C=Boe(g);return y.createElement(y.Fragment,null,v.map(_=>y.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),w.map(_=>y.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),C.map(({key:_,link:E})=>y.createElement("link",{key:_,nonce:n.nonce,...E})))}function Uoe(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Goe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Goe&&(window.__reactRouterVersion="7.12.0")}catch{}function zoe({basename:e,children:t,unstable_useTransitions:n,window:r}){let s=y.useRef();s.current==null&&(s.current=wie({window:r,v5Compat:!0}));let a=s.current,[i,l]=y.useState({action:a.action,location:a.location}),u=y.useCallback(f=>{n===!1?l(f):y.startTransition(()=>l(f))},[n]);return y.useLayoutEffect(()=>a.listen(u),[a,u]),y.createElement(yoe,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:a,unstable_useTransitions:n})}var tY=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nY=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:s,reloadDocument:a,replace:i,state:l,target:u,to:f,preventScrollReset:h,viewTransition:g,unstable_defaultShouldRevalidate:v,...w},C){let{basename:_,unstable_useTransitions:E}=y.useContext(Ii),$=typeof f=="string"&&tY.test(f),O=GK(f,_);f=O.to;let N=toe(f,{relative:s}),[M,L,k]=Doe(r,w),T=Koe(f,{replace:i,state:l,target:u,preventScrollReset:h,relative:s,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:E});function P(q){t&&t(q),q.defaultPrevented||T(q)}let V=y.createElement("a",{...w,...k,href:O.absoluteURL||N,onClick:O.isExternal||a?t:P,ref:Uoe(C,L),target:u,"data-discover":!$&&n==="render"?"true":void 0});return M&&!$?y.createElement(y.Fragment,null,V,y.createElement(Voe,{page:N})):V});nY.displayName="Link";var Ni=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:s=!1,style:a,to:i,viewTransition:l,children:u,...f},h){let g=Q1(i,{relative:f.relative}),v=Ds(),w=y.useContext(d2),{navigator:C,basename:_}=y.useContext(Ii),E=w!=null&&Qoe(g)&&l===!0,$=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,O=v.pathname,N=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(O=O.toLowerCase(),N=N?N.toLowerCase():null,$=$.toLowerCase()),N&&_&&(N=Hu(N,_)||N);const M=$!=="/"&&$.endsWith("/")?$.length-1:$.length;let L=O===$||!s&&O.startsWith($)&&O.charAt(M)==="/",k=N!=null&&(N===$||!s&&N.startsWith($)&&N.charAt($.length)==="/"),T={isActive:L,isPending:k,isTransitioning:E},P=L?t:void 0,V;typeof r=="function"?V=r(T):V=[r,L?"active":null,k?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let q=typeof a=="function"?a(T):a;return y.createElement(nY,{...f,"aria-current":P,className:V,ref:h,style:q,to:i,viewTransition:l},typeof u=="function"?u(T):u)});Ni.displayName="NavLink";var Hoe=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:s,state:a,method:i=jC,action:l,onSubmit:u,relative:f,preventScrollReset:h,viewTransition:g,unstable_defaultShouldRevalidate:v,...w},C)=>{let{unstable_useTransitions:_}=y.useContext(Ii),E=Xoe(),$=Woe(l,{relative:f}),O=i.toLowerCase()==="get"?"get":"post",N=typeof l=="string"&&tY.test(l),M=L=>{if(u&&u(L),L.defaultPrevented)return;L.preventDefault();let k=L.nativeEvent.submitter,T=k?.getAttribute("formmethod")||i,P=()=>E(k||L.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:s,state:a,relative:f,preventScrollReset:h,viewTransition:g,unstable_defaultShouldRevalidate:v});_&&n!==!1?y.startTransition(()=>P()):P()};return y.createElement("form",{ref:C,method:O,action:$,onSubmit:r?u:M,...w,"data-discover":!N&&e==="render"?"true":void 0})});Hoe.displayName="Form";function qoe(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function rY(e){let t=y.useContext(qg);return Rr(t,qoe(e)),t}function Koe(e,{target:t,replace:n,state:r,preventScrollReset:s,relative:a,viewTransition:i,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let f=kh(),h=Ds(),g=Q1(e,{relative:a});return y.useCallback(v=>{if(_oe(v,t)){v.preventDefault();let w=n!==void 0?n:m1(h)===m1(g),C=()=>f(e,{replace:w,state:r,preventScrollReset:s,relative:a,viewTransition:i,unstable_defaultShouldRevalidate:l});u?y.startTransition(()=>C()):C()}},[h,f,g,n,r,t,e,s,a,i,l,u])}function br(e){ki(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(oA(e)),n=y.useRef(!1),r=Ds(),s=y.useMemo(()=>joe(r.search,n.current?null:t.current),[r.search]),a=kh(),i=y.useCallback((l,u)=>{const f=oA(typeof l=="function"?l(new URLSearchParams(s)):l);n.current=!0,a("?"+f,u)},[a,s]);return[s,i]}var Yoe=0,Zoe=()=>`__${String(++Yoe)}__`;function Xoe(){let{router:e}=rY("useSubmit"),{basename:t}=y.useContext(Ii),n=poe(),r=e.fetch,s=e.navigate;return y.useCallback(async(a,i={})=>{let{action:l,method:u,encType:f,formData:h,body:g}=Roe(a,t);if(i.navigate===!1){let v=i.fetcherKey||Zoe();await r(v,n,i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:g,formMethod:i.method||u,formEncType:i.encType||f,flushSync:i.flushSync})}else await s(i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:g,formMethod:i.method||u,formEncType:i.encType||f,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,s,t,n])}function Woe(e,{relative:t}={}){let{basename:n}=y.useContext(Ii),r=y.useContext(co);Rr(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),a={...Q1(e||".",{relative:t})},i=Ds();if(e==null){a.search=i.search;let l=new URLSearchParams(a.search),u=l.getAll("index");if(u.some(h=>h==="")){l.delete("index"),u.filter(g=>g).forEach(g=>l.append("index",g));let h=l.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Fu([n,a.pathname])),m1(a)}function Qoe(e,{relative:t}={}){let n=y.useContext(HK);Rr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=rY("useViewTransitionState"),s=Q1(e,{relative:t});if(!n.isTransitioning)return!1;let a=Hu(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=Hu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return lS(s.pathname,i)!=null||lS(s.pathname,a)!=null}function sY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=sY(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function We(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=sY(e))&&(r&&(r+=" "),r+=t);return r}const aY=y.createContext(void 0),iY=()=>{const e=y.useContext(aY);if(!e)throw new Error("Используется вне контекста Accordion");return e},s8=y.createContext({});function a8(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const i8=typeof window<"u",oY=i8?y.useLayoutEffect:y.useEffect,h2=y.createContext(null),o8=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});let Joe=class extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=r instanceof HTMLElement&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function ele({children:e,isPresent:t,anchorX:n}){const r=y.useId(),s=y.useRef(null),a=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=y.useContext(o8);return y.useInsertionEffect(()=>{const{width:l,height:u,top:f,left:h,right:g}=a.current;if(t||!s.current||!l||!u)return;const v=n==="left"?`left: ${h}`:`right: ${g}`;s.current.dataset.motionPopId=r;const w=document.createElement("style");return i&&(w.nonce=i),document.head.appendChild(w),w.sheet&&w.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${l}px !important;
            height: ${u}px !important;
            ${v}px !important;
            top: ${f}px !important;
          }
        `),()=>{document.head.contains(w)&&document.head.removeChild(w)}},[t]),d.jsx(Joe,{isPresent:t,childRef:s,sizeRef:a,children:y.cloneElement(e,{ref:s})})}const tle=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:i,anchorX:l})=>{const u=a8(nle),f=y.useId();let h=!0,g=y.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:v=>{u.set(v,!0);for(const w of u.values())if(!w)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return a&&h&&(g={...g}),y.useMemo(()=>{u.forEach((v,w)=>u.set(w,!1))},[n]),y.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),i==="popLayout"&&(e=d.jsx(ele,{isPresent:n,anchorX:l,children:e})),d.jsx(h2.Provider,{value:g,children:e})};function nle(){return new Map}function lY(e=!0){const t=y.useContext(h2);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,a=y.useId();y.useEffect(()=>{if(e)return s(a)},[e]);const i=y.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const zw=e=>e.key||"";function qM(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const uY=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:a="sync",propagate:i=!1,anchorX:l="left"})=>{const[u,f]=lY(i),h=y.useMemo(()=>qM(e),[e]),g=i&&!u?[]:h.map(zw),v=y.useRef(!0),w=y.useRef(h),C=a8(()=>new Map),[_,E]=y.useState(h),[$,O]=y.useState(h);oY(()=>{v.current=!1,w.current=h;for(let L=0;L<$.length;L++){const k=zw($[L]);g.includes(k)?C.delete(k):C.get(k)!==!0&&C.set(k,!1)}},[$,g.length,g.join("-")]);const N=[];if(h!==_){let L=[...h];for(let k=0;k<$.length;k++){const T=$[k],P=zw(T);g.includes(P)||(L.splice(k,0,T),N.push(T))}return a==="wait"&&N.length&&(L=N),O(qM(L)),E(h),null}const{forceRender:M}=y.useContext(s8);return d.jsx(d.Fragment,{children:$.map(L=>{const k=zw(L),T=i&&!u?!1:h===$||g.includes(k),P=()=>{if(C.has(k))C.set(k,!0);else return;let V=!0;C.forEach(q=>{q||(V=!1)}),V&&(M?.(),O(w.current),i&&f?.(),r&&r())};return d.jsx(tle,{isPresent:T,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:a,onExitComplete:T?void 0:P,anchorX:l,children:L},k)})})},Hw=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rle(e,t){let n=new Set,r=new Set,s=!1,a=!1;const i=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(h){i.has(h)&&(f.schedule(h),e()),h(l)}const f={schedule:(h,g=!1,v=!1)=>{const w=v&&s?n:r;return g&&i.add(h),w.has(h)||w.add(h),h},cancel:h=>{r.delete(h),i.delete(h)},process:h=>{if(l=h,s){a=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),n.clear(),s=!1,a&&(a=!1,f.process(h))}};return f}const qu={},sle=40;function cY(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=Hw.reduce(($,O)=>($[O]=rle(a),$),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:h,update:g,preRender:v,render:w,postRender:C}=i,_=()=>{const $=qu.useManualTiming?s.timestamp:performance.now();n=!1,qu.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min($-s.timestamp,sle),1)),s.timestamp=$,s.isProcessing=!0,l.process(s),u.process(s),f.process(s),h.process(s),g.process(s),v.process(s),w.process(s),C.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(_))},E=()=>{n=!0,r=!0,s.isProcessing||e(_)};return{schedule:Hw.reduce(($,O)=>{const N=i[O];return $[O]=(M,L=!1,k=!1)=>(n||E(),N.schedule(M,L,k)),$},{}),cancel:$=>{for(let O=0;O<Hw.length;O++)i[Hw[O]].cancel($)},state:s,steps:i}}const io=e=>e,{schedule:Ir,cancel:_d,state:ks,steps:Bj}=cY(typeof requestAnimationFrame<"u"?requestAnimationFrame:io,!0),dY=y.createContext({strict:!1}),KM={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},kg={};for(const e in KM)kg[e]={isEnabled:t=>KM[e].some(n=>!!t[n])};function ale(e){for(const t in e)kg[t]={...kg[t],...e[t]}}const ile=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function uS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ile.has(e)}let fY=e=>!uS(e);function ole(e){e&&(fY=t=>t.startsWith("on")?!uS(t):e(t))}try{ole(require("@emotion/is-prop-valid").default)}catch{}function lle(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(fY(s)||n===!0&&uS(s)||!t&&!uS(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function ule(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const p2=y.createContext({});function m2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function g1(e){return typeof e=="string"||Array.isArray(e)}const l8=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],u8=["initial",...l8];function g2(e){return m2(e.animate)||u8.some(t=>g1(e[t]))}function hY(e){return!!(g2(e)||e.variants)}function cle(e,t){if(g2(e)){const{initial:n,animate:r}=e;return{initial:n===!1||g1(n)?n:void 0,animate:g1(r)?r:void 0}}return e.inherit!==!1?t:{}}function dle(e){const{initial:t,animate:n}=cle(e,y.useContext(p2));return y.useMemo(()=>({initial:t,animate:n}),[YM(t),YM(n)])}function YM(e){return Array.isArray(e)?e.join(" "):e}const fle=Symbol.for("motionComponentSymbol");function cg(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function hle(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):cg(n)&&(n.current=r))},[t])}const c8=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ple="framerAppearId",pY="data-"+c8(ple),mY=y.createContext({}),{schedule:d8}=cY(queueMicrotask,!1);function mle(e,t,n,r,s){var a,i;const{visualElement:l}=y.useContext(p2),u=y.useContext(dY),f=y.useContext(h2),h=y.useContext(o8).reducedMotion,g=y.useRef(null);r=r||u.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h}));const v=g.current,w=y.useContext(mY);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&gle(g.current,n,s,w);const C=y.useRef(!1);y.useInsertionEffect(()=>{v&&C.current&&v.update(n,f)});const _=n[pY],E=y.useRef(!!_&&!((a=window.MotionHandoffIsComplete)!=null&&a.call(window,_))&&((i=window.MotionHasOptimisedAnimation)==null?void 0:i.call(window,_)));return oY(()=>{v&&(C.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),d8.render(v.render),E.current&&v.animationState&&v.animationState.animateChanges())}),y.useEffect(()=>{v&&(!E.current&&v.animationState&&v.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var $;($=window.MotionHandoffMarkAsComplete)==null||$.call(window,_)}),E.current=!1))}),v}function gle(e,t,n,r){const{layoutId:s,layout:a,drag:i,dragConstraints:l,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gY(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!i||l&&cg(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f})}function gY(e){if(e)return e.options.allowProjection!==!1?e.projection:gY(e.parent)}let f8=()=>{};function vle({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&ale(e);function a(l,u){let f;const h={...y.useContext(o8),...l,layoutId:yle(l)},{isStatic:g}=h,v=dle(l),w=r(l,g);if(!g&&i8){xle();const C=ble(h);f=C.MeasureLayout,v.visualElement=mle(s,w,h,t,C.ProjectionNode)}return d.jsxs(p2.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...h}):null,n(s,l,hle(w,v.visualElement,u),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${s.displayName??s.name??""})`}`;const i=y.forwardRef(a);return i[fle]=s,i}function yle({layoutId:e}){const t=y.useContext(s8).id;return t&&e!==void 0?t+"-"+e:e}function xle(e,t){y.useContext(dY).strict}function ble(e){const{drag:t,layout:n}=kg;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const vY=e=>t=>typeof t=="string"&&t.startsWith(e),h8=vY("--"),wle=vY("var(--"),p8=e=>wle(e)?Cle.test(e.split("/*")[0].trim()):!1,Cle=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,v1={};function Sle(e){for(const t in e)v1[t]=e[t],h8(t)&&(v1[t].isCSSVariable=!0)}const Yg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zg=new Set(Yg);function yY(e,{layout:t,layoutId:n}){return Zg.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!v1[e]||e==="opacity")}const la=e=>!!(e&&e.getVelocity),xY=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ku=(e,t,n)=>n>t?t:n<e?e:n,Xg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},y1={...Xg,transform:e=>Ku(0,1,e)},qw={...Xg,default:1},ZM={...Xg,transform:Math.round},J1=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ad=J1("deg"),Ul=J1("%"),Ht=J1("px"),_le=J1("vh"),jle=J1("vw"),XM={...Ul,parse:e=>Ul.parse(e)/100,transform:e=>Ul.transform(e*100)},Ele={rotate:ad,rotateX:ad,rotateY:ad,rotateZ:ad,scale:qw,scaleX:qw,scaleY:qw,scaleZ:qw,skew:ad,skewX:ad,skewY:ad,distance:Ht,translateX:Ht,translateY:Ht,translateZ:Ht,x:Ht,y:Ht,z:Ht,perspective:Ht,transformPerspective:Ht,opacity:y1,originX:XM,originY:XM,originZ:Ht},m8={borderWidth:Ht,borderTopWidth:Ht,borderRightWidth:Ht,borderBottomWidth:Ht,borderLeftWidth:Ht,borderRadius:Ht,radius:Ht,borderTopLeftRadius:Ht,borderTopRightRadius:Ht,borderBottomRightRadius:Ht,borderBottomLeftRadius:Ht,width:Ht,maxWidth:Ht,height:Ht,maxHeight:Ht,top:Ht,right:Ht,bottom:Ht,left:Ht,padding:Ht,paddingTop:Ht,paddingRight:Ht,paddingBottom:Ht,paddingLeft:Ht,margin:Ht,marginTop:Ht,marginRight:Ht,marginBottom:Ht,marginLeft:Ht,backgroundPositionX:Ht,backgroundPositionY:Ht,...Ele,zIndex:ZM,fillOpacity:y1,strokeOpacity:y1,numOctaves:ZM},$le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rle=Yg.length;function Ole(e,t,n){let r="",s=!0;for(let a=0;a<Rle;a++){const i=Yg[a],l=e[i];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(i.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||n){const f=xY(l,m8[i]);if(!u){s=!1;const h=$le[i]||i;r+=`${h}(${f}) `}n&&(t[i]=f)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function g8(e,t,n){const{style:r,vars:s,transformOrigin:a}=e;let i=!1,l=!1;for(const u in t){const f=t[u];if(Zg.has(u)){i=!0;continue}else if(h8(u)){s[u]=f;continue}else{const h=xY(f,m8[u]);u.startsWith("origin")?(l=!0,a[u]=h):r[u]=h}}if(t.transform||(i||n?r.transform=Ole(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=a;r.transformOrigin=`${u} ${f} ${h}`}}const v8=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bY(e,t,n){for(const r in t)!la(t[r])&&!yY(r,n)&&(e[r]=t[r])}function Tle({transformTemplate:e},t){return y.useMemo(()=>{const n=v8();return g8(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ale(e,t){const n=e.style||{},r={};return bY(r,n,e),Object.assign(r,Tle(e,t)),r}function kle(e,t){const n={},r=Ale(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Nle=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function y8(e){return typeof e!="string"||e.includes("-")?!1:!!(Nle.indexOf(e)>-1||/[A-Z]/u.test(e))}const Lle={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mle={offset:"strokeDashoffset",array:"strokeDasharray"};function Ile(e,t,n=1,r=0,s=!0){e.pathLength=1;const a=s?Lle:Mle;e[a.offset]=Ht.transform(-r);const i=Ht.transform(t),l=Ht.transform(n);e[a.array]=`${i} ${l}`}function wY(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:a=1,pathOffset:i=0,...l},u,f,h){if(g8(e,l,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=h?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&Ile(g,s,a,i,!1)}const CY=()=>({...v8(),attrs:{}}),SY=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ple(e,t,n,r){const s=y.useMemo(()=>{const a=CY();return wY(a,t,SY(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};bY(a,e.style,e),s.style={...a,...s.style}}return s}function Dle(e=!1){return(t,n,r,{latestValues:s},a)=>{const i=(y8(t)?Ple:kle)(n,s,a,t),l=lle(n,typeof t=="string",e),u=t!==y.Fragment?{...l,...i,ref:r}:{},{children:f}=n,h=y.useMemo(()=>la(f)?f.get():f,[f]);return y.createElement(t,{...u,children:h})}}function WM(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function x8(e,t,n,r){if(typeof t=="function"){const[s,a]=WM(r);t=t(n!==void 0?n:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=WM(r);t=t(n!==void 0?n:e.custom,s,a)}return t}function $C(e){return la(e)?e.get():e}function Vle({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Ble(n,r,s,e),renderState:t()}}const _Y=e=>(t,n)=>{const r=y.useContext(p2),s=y.useContext(h2),a=()=>Vle(e,t,r,s);return n?a():a8(a)};function Ble(e,t,n,r){const s={},a=r(e,{});for(const v in a)s[v]=$C(a[v]);let{initial:i,animate:l}=e;const u=g2(e),f=hY(e);t&&f&&!u&&e.inherit!==!1&&(i===void 0&&(i=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||i===!1;const g=h?l:i;if(g&&typeof g!="boolean"&&!m2(g)){const v=Array.isArray(g)?g:[g];for(let w=0;w<v.length;w++){const C=x8(e,v[w]);if(C){const{transitionEnd:_,transition:E,...$}=C;for(const O in $){let N=$[O];if(Array.isArray(N)){const M=h?N.length-1:0;N=N[M]}N!==null&&(s[O]=N)}for(const O in _)s[O]=_[O]}}}return s}function b8(e,t,n){var r;const{style:s}=e,a={};for(const i in s)(la(s[i])||t.style&&la(t.style[i])||yY(i,e)||((r=n?.getValue(i))==null?void 0:r.liveStyle)!==void 0)&&(a[i]=s[i]);return a}const Fle={useVisualState:_Y({scrapeMotionValuesFromProps:b8,createRenderState:v8})};function jY(e,t,n){const r=b8(e,t,n);for(const s in e)if(la(e[s])||la(t[s])){const a=Yg.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[a]=e[s]}return r}const Ule={useVisualState:_Y({scrapeMotionValuesFromProps:jY,createRenderState:CY})};function Gle(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){const s={...y8(n)?Ule:Fle,preloadedFeatures:e,useRender:Dle(r),createVisualElement:t,Component:n};return vle(s)}}function x1(e,t,n){const r=e.getProps();return x8(r,t,n!==void 0?n:r.custom,e)}const lA=e=>Array.isArray(e);let RC;function zle(){RC=void 0}const ni={now:()=>(RC===void 0&&ni.set(ks.isProcessing||qu.useManualTiming?ks.timestamp:performance.now()),RC),set:e=>{RC=e,queueMicrotask(zle)}};function w8(e,t){e.indexOf(t)===-1&&e.push(t)}function C8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let S8=class{constructor(){this.subscriptions=[]}add(t){return w8(this.subscriptions,t),()=>C8(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let a=0;a<s;a++){const i=this.subscriptions[a];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function EY(e,t){return t?e*(1e3/t):0}const QM=30,Hle=e=>!isNaN(parseFloat(e));let qle=class{constructor(t,n={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{var a,i;const l=ni.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty();s&&((i=this.events.renderRequest)==null||i.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ni.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Hle(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new S8);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ir.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ni.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>QM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,QM);return EY(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ng(e,t){return new qle(e,t)}function Kle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ng(n))}function Yle(e){return lA(e)?e[e.length-1]||0:e}function Zle(e,t){const n=x1(e,t);let{transitionEnd:r={},transition:s={},...a}=n||{};a={...a,...r};for(const i in a){const l=Yle(a[i]);Kle(e,i,l)}}function Xle(e){return!!(la(e)&&e.add)}function uA(e,t){const n=e.getValue("willChange");if(Xle(n))return n.add(t);if(!n&&qu.WillChange){const r=new qu.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function $Y(e){return e.props[pY]}const Wle=e=>e!==null;function Qle(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Wle),a=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[a]}const Jle={type:"spring",stiffness:500,damping:25,restSpeed:10},eue=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tue={type:"keyframes",duration:.8},nue={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rue=(e,{keyframes:t})=>t.length>2?tue:Zg.has(e)?e.startsWith("scale")?eue(t[1]):Jle:nue;function sue({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:a,repeatType:i,repeatDelay:l,from:u,elapsed:f,...h}){return!!Object.keys(h).length}function _8(e,t){return e?.[t]??e?.default??e}const Gl=e=>e*1e3,zl=e=>e/1e3,Hy=e=>Math.round(e*1e5)/1e5,j8=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aue(e){return e==null}const iue=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,E8=(e,t)=>n=>!!(typeof n=="string"&&iue.test(n)&&n.startsWith(e)||t&&!aue(n)&&Object.prototype.hasOwnProperty.call(n,t)),RY=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,a,i,l]=r.match(j8);return{[e]:parseFloat(s),[t]:parseFloat(a),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},oue=e=>Ku(0,255,e),Fj={...Xg,transform:e=>Math.round(oue(e))},dh={test:E8("rgb","red"),parse:RY("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fj.transform(e)+", "+Fj.transform(t)+", "+Fj.transform(n)+", "+Hy(y1.transform(r))+")"};function lue(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const cA={test:E8("#"),parse:lue,transform:dh.transform},dg={test:E8("hsl","hue"),parse:RY("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ul.transform(Hy(t))+", "+Ul.transform(Hy(n))+", "+Hy(y1.transform(r))+")"},aa={test:e=>dh.test(e)||cA.test(e)||dg.test(e),parse:e=>dh.test(e)?dh.parse(e):dg.test(e)?dg.parse(e):cA.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?dh.transform(e):dg.transform(e)},uue=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cue(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(j8))==null?void 0:t.length)||0)+(((n=e.match(uue))==null?void 0:n.length)||0)>0}const OY="number",TY="color",due="var",fue="var(",JM="${}",hue=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function b1(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let a=0;const i=t.replace(hue,l=>(aa.test(l)?(r.color.push(a),s.push(TY),n.push(aa.parse(l))):l.startsWith(fue)?(r.var.push(a),s.push(due),n.push(l)):(r.number.push(a),s.push(OY),n.push(parseFloat(l))),++a,JM)).split(JM);return{values:n,split:i,indexes:r,types:s}}function AY(e){return b1(e).values}function kY(e){const{split:t,types:n}=b1(e),r=t.length;return s=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],s[i]!==void 0){const l=n[i];l===OY?a+=Hy(s[i]):l===TY?a+=aa.transform(s[i]):a+=s[i]}return a}}const pue=e=>typeof e=="number"?0:e;function mue(e){const t=AY(e);return kY(e)(t.map(pue))}const jd={test:cue,parse:AY,createTransformer:kY,getAnimatableNone:mue};function Uj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gue({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,a=0,i=0;if(!t)s=a=i=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;s=Uj(u,l,e+1/3),a=Uj(u,l,e),i=Uj(u,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}function cS(e,t){return n=>n>0?t:e}const Lr=(e,t,n)=>e+(t-e)*n,Gj=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},vue=[cA,dh,dg],yue=e=>vue.find(t=>t.test(e));function e7(e){const t=yue(e);if(!t)return!1;let n=t.parse(e);return t===dg&&(n=gue(n)),n}const t7=(e,t)=>{const n=e7(e),r=e7(t);if(!n||!r)return cS(e,t);const s={...n};return a=>(s.red=Gj(n.red,r.red,a),s.green=Gj(n.green,r.green,a),s.blue=Gj(n.blue,r.blue,a),s.alpha=Lr(n.alpha,r.alpha,a),dh.transform(s))},dA=new Set(["none","hidden"]);function xue(e,t){return dA.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}const bue=(e,t)=>n=>t(e(n)),ex=(...e)=>e.reduce(bue);function wue(e,t){return n=>Lr(e,t,n)}function $8(e){return typeof e=="number"?wue:typeof e=="string"?p8(e)?cS:aa.test(e)?t7:_ue:Array.isArray(e)?NY:typeof e=="object"?aa.test(e)?t7:Cue:cS}function NY(e,t){const n=[...e],r=n.length,s=e.map((a,i)=>$8(a)(a,t[i]));return a=>{for(let i=0;i<r;i++)n[i]=s[i](a);return n}}function Cue(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=$8(e[s])(e[s],t[s]));return s=>{for(const a in r)n[a]=r[a](s);return n}}function Sue(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],i=e.indexes[a][r[a]],l=e.values[i]??0;n[s]=l,r[a]++}return n}const _ue=(e,t)=>{const n=jd.createTransformer(t),r=b1(e),s=b1(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?dA.has(e)&&!s.values.length||dA.has(t)&&!r.values.length?xue(e,t):ex(NY(Sue(r,s),s.values),n):cS(e,t)};function LY(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Lr(e,t,n):$8(e)(e,t)}const jue=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ir.update(t,n),stop:()=>_d(t),now:()=>ks.isProcessing?ks.timestamp:ni.now()}},MY=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let a=0;a<s;a++)r+=e(a/(s-1))+", ";return`linear(${r.substring(0,r.length-2)})`},dS=2e4;function R8(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<dS;)t+=n,r=e.next(t);return t>=dS?1/0:t}function Eue(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(R8(r),dS);return{type:"keyframes",ease:a=>r.next(s*a).value/t,duration:zl(s)}}const $ue=5;function IY(e,t,n){const r=Math.max(t-$ue,0);return EY(n-e(r),t-r)}const Br={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},n7=.001;function Rue({duration:e=Br.duration,bounce:t=Br.bounce,velocity:n=Br.velocity,mass:r=Br.mass}){let s,a,i=1-t;i=Ku(Br.minDamping,Br.maxDamping,i),e=Ku(Br.minDuration,Br.maxDuration,zl(e)),i<1?(s=f=>{const h=f*i,g=h*e,v=h-n,w=fA(f,i),C=Math.exp(-g);return n7-v/w*C},a=f=>{const h=f*i*e,g=h*n+n,v=Math.pow(i,2)*Math.pow(f,2)*e,w=Math.exp(-h),C=fA(Math.pow(f,2),i);return(-s(f)+n7>0?-1:1)*((g-v)*w)/C}):(s=f=>{const h=Math.exp(-f*e),g=(f-n)*e+1;return-.001+h*g},a=f=>{const h=Math.exp(-f*e),g=(n-f)*(e*e);return h*g});const l=5/e,u=Tue(s,a,l);if(e=Gl(e),isNaN(u))return{stiffness:Br.stiffness,damping:Br.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:i*2*Math.sqrt(r*f),duration:e}}}const Oue=12;function Tue(e,t,n){let r=n;for(let s=1;s<Oue;s++)r=r-e(r)/t(r);return r}function fA(e,t){return e*Math.sqrt(1-t*t)}const Aue=["duration","bounce"],kue=["stiffness","damping","mass"];function r7(e,t){return t.some(n=>e[n]!==void 0)}function Nue(e){let t={velocity:Br.velocity,stiffness:Br.stiffness,damping:Br.damping,mass:Br.mass,isResolvedFromDuration:!1,...e};if(!r7(e,kue)&&r7(e,Aue))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,a=2*Ku(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Br.mass,stiffness:s,damping:a}}else{const n=Rue(e);t={...t,...n,mass:Br.mass},t.isResolvedFromDuration=!0}return t}function fS(e=Br.visualDuration,t=Br.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:f,mass:h,duration:g,velocity:v,isResolvedFromDuration:w}=Nue({...n,velocity:-zl(n.velocity||0)}),C=v||0,_=f/(2*Math.sqrt(u*h)),E=i-a,$=zl(Math.sqrt(u/h)),O=Math.abs(E)<5;r||(r=O?Br.restSpeed.granular:Br.restSpeed.default),s||(s=O?Br.restDelta.granular:Br.restDelta.default);let N;if(_<1){const L=fA($,_);N=k=>{const T=Math.exp(-_*$*k);return i-T*((C+_*$*E)/L*Math.sin(L*k)+E*Math.cos(L*k))}}else if(_===1)N=L=>i-Math.exp(-$*L)*(E+(C+$*E)*L);else{const L=$*Math.sqrt(_*_-1);N=k=>{const T=Math.exp(-_*$*k),P=Math.min(L*k,300);return i-T*((C+_*$*E)*Math.sinh(P)+L*E*Math.cosh(P))/L}}const M={calculatedDuration:w&&g||null,next:L=>{const k=N(L);if(w)l.done=L>=g;else{let T=L===0?C:0;_<1&&(T=L===0?Gl(C):IY(N,L,k));const P=Math.abs(T)<=r,V=Math.abs(i-k)<=s;l.done=P&&V}return l.value=l.done?i:k,l},toString:()=>{const L=Math.min(R8(M),dS),k=MY(T=>M.next(L*T).value,L,30);return L+"ms "+k},toTransition:()=>{}};return M}fS.applyToOptions=e=>{const t=Eue(e,100,fS);return e.ease=t.ease,e.duration=Gl(t.duration),e.type="keyframes",e};function hA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:i,min:l,max:u,restDelta:f=.5,restSpeed:h}){const g=e[0],v={done:!1,value:g},w=P=>l!==void 0&&P<l||u!==void 0&&P>u,C=P=>l===void 0?u:u===void 0||Math.abs(l-P)<Math.abs(u-P)?l:u;let _=n*t;const E=g+_,$=i===void 0?E:i(E);$!==E&&(_=$-g);const O=P=>-_*Math.exp(-P/r),N=P=>$+O(P),M=P=>{const V=O(P),q=N(P);v.done=Math.abs(V)<=f,v.value=v.done?$:q};let L,k;const T=P=>{w(v.value)&&(L=P,k=fS({keyframes:[v.value,C(v.value)],velocity:IY(N,P,v.value),damping:s,stiffness:a,restDelta:f,restSpeed:h}))};return T(0),{calculatedDuration:null,next:P=>{let V=!1;return!k&&L===void 0&&(V=!0,M(P),T(P)),L!==void 0&&P>=L?k.next(P-L):(!V&&M(P),v)}}}const w1=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};function Lue(e,t,n){const r=[],s=n||qu.mix||LY,a=e.length-1;for(let i=0;i<a;i++){let l=s(e[i],e[i+1]);if(t){const u=Array.isArray(t)?t[i]||io:t;l=ex(u,l)}r.push(l)}return r}function Mue(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const a=e.length;if(f8(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Lue(t,r,s),u=l.length,f=h=>{if(i&&h<e[0])return t[0];let g=0;if(u>1)for(;g<e.length-2&&!(h<e[g+1]);g++);const v=w1(e[g],e[g+1],h);return l[g](v)};return n?h=>f(Ku(e[0],e[a-1],h)):f}function Iue(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=w1(0,t,r);e.push(Lr(n,1,s))}}function Pue(e){const t=[0];return Iue(t,e.length-1),t}function Due(e,t){return e.map(n=>n*t)}const PY=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vue=1e-7,Bue=12;function Fue(e,t,n,r,s){let a,i,l=0;do i=t+(n-t)/2,a=PY(i,r,s)-e,a>0?n=i:t=i;while(Math.abs(a)>Vue&&++l<Bue);return i}function tx(e,t,n,r){if(e===t&&n===r)return io;const s=a=>Fue(a,0,1,e,n);return a=>a===0||a===1?a:PY(s(a),t,r)}const Uue=tx(.42,0,1,1),Gue=tx(0,0,.58,1),DY=tx(.42,0,.58,1),zue=e=>Array.isArray(e)&&typeof e[0]!="number",VY=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,BY=e=>t=>1-e(1-t),FY=tx(.33,1.53,.69,.99),O8=BY(FY),UY=VY(O8),GY=e=>(e*=2)<1?.5*O8(e):.5*(2-Math.pow(2,-10*(e-1))),T8=e=>1-Math.sin(Math.acos(e)),zY=BY(T8),HY=VY(T8),qY=e=>Array.isArray(e)&&typeof e[0]=="number",Hue={linear:io,easeIn:Uue,easeInOut:DY,easeOut:Gue,circIn:T8,circInOut:HY,circOut:zY,backIn:O8,backInOut:UY,backOut:FY,anticipate:GY},que=e=>typeof e=="string",s7=e=>{if(qY(e)){f8(e.length===4);const[t,n,r,s]=e;return tx(t,n,r,s)}else if(que(e))return Hue[e];return e};function Kue(e,t){return e.map(()=>t||DY).splice(0,e.length-1)}function qy({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=zue(r)?r.map(s7):s7(r),a={done:!1,value:t[0]},i=Due(n&&n.length===t.length?n:Pue(t),e),l=Mue(i,t,{ease:Array.isArray(s)?s:Kue(t,s)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const Yue=e=>e!==null;function A8(e,{repeat:t,repeatType:n="loop"},r,s=1){const a=e.filter(Yue),i=s<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const Zue={decay:hA,inertia:hA,tween:qy,keyframes:qy,spring:fS};function KY(e){typeof e.type=="string"&&(e.type=Zue[e.type])}let k8=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}};const Xue=e=>e/100;let N8=class extends k8{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,s;if(n){const{motionValue:a}=this.options;a&&a.updatedAt!==ni.now()&&this.tick(ni.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;KY(t);const{type:n=qy,repeat:r=0,repeatDelay:s=0,repeatType:a,velocity:i=0}=t;let{keyframes:l}=t;const u=n||qy;u!==qy&&typeof l[0]!="number"&&(this.mixKeyframes=ex(Xue,LY(l[0],l[1])),l=[0,100]);const f=u({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-i})),f.calculatedDuration===null&&(f.calculatedDuration=R8(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:g,repeatType:v,repeatDelay:w,type:C,onUpdate:_,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const $=this.currentTime-f*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?$<0:$>s;this.currentTime=Math.max($,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let N=this.currentTime,M=r;if(g){const P=Math.min(this.currentTime,s)/l;let V=Math.floor(P),q=P%1;!q&&P>=1&&(q=1),q===1&&V--,V=Math.min(V,g+1),V%2&&(v==="reverse"?(q=1-q,w&&(q-=w/l)):v==="mirror"&&(M=i)),N=Ku(0,1,q)*l}const L=O?{done:!1,value:h[0]}:M.next(N);a&&(L.value=a(L.value));let{done:k}=L;!O&&u!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return T&&C!==hA&&(L.value=A8(h,this.options,E,this.speed)),_&&_(L.value),T&&this.finish(),L}then(t,n){return this.finished.then(t,n)}get duration(){return zl(this.calculatedDuration)}get time(){return zl(this.currentTime)}set time(t){var n;t=Gl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ni.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=zl(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=jue,startTime:s}=this.options;this.driver||(this.driver=r(i=>this.tick(i))),(n=(t=this.options).onPlay)==null||n.call(t);const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=s??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ni.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}};function Wue(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const fh=e=>e*180/Math.PI,pA=e=>{const t=fh(Math.atan2(e[1],e[0]));return mA(t)},Que={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pA,rotateZ:pA,skewX:e=>fh(Math.atan(e[1])),skewY:e=>fh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mA=e=>(e=e%360,e<0&&(e+=360),e),a7=pA,i7=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),o7=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Jue={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:i7,scaleY:o7,scale:e=>(i7(e)+o7(e))/2,rotateX:e=>mA(fh(Math.atan2(e[6],e[5]))),rotateY:e=>mA(fh(Math.atan2(-e[2],e[0]))),rotateZ:a7,rotate:a7,skewX:e=>fh(Math.atan(e[4])),skewY:e=>fh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function l7(e){return e.includes("scale")?1:0}function gA(e,t){if(!e||e==="none")return l7(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Jue,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Que,s=l}if(!s)return l7(t);const a=r[t],i=s[1].split(",").map(tce);return typeof a=="function"?a(i):i[a]}const ece=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return gA(n,t)};function tce(e){return parseFloat(e.trim())}const u7=e=>e===Xg||e===Ht,nce=new Set(["x","y","z"]),rce=Yg.filter(e=>!nce.has(e));function sce(e){const t=[];return rce.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gh={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>gA(t,"x"),y:(e,{transform:t})=>gA(t,"y")};gh.translateX=gh.x;gh.translateY=gh.y;const vh=new Set;let vA=!1,yA=!1,xA=!1;function YY(){if(yA){const e=Array.from(vh).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sce(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([a,i])=>{var l;(l=r.getValue(a))==null||l.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}yA=!1,vA=!1,vh.forEach(e=>e.complete(xA)),vh.clear()}function ZY(){vh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yA=!0)})}function ace(){xA=!0,ZY(),YY(),xA=!1}let L8=class{constructor(t,n,r,s,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(vh.add(this),vA||(vA=!0,Ir.read(ZY),Ir.resolveKeyframes(YY))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const a=s?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),s&&a===void 0&&s.set(t[0])}Wue(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vh.delete(this)}cancel(){this.state==="scheduled"&&(vh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};const ice=e=>e.startsWith("--");function oce(e,t,n){ice(t)?e.style.setProperty(t,n):e.style[t]=n}function M8(e){let t;return()=>(t===void 0&&(t=e()),t)}const lce=M8(()=>window.ScrollTimeline!==void 0),uce={};function cce(e,t){const n=M8(e);return()=>uce[t]??n()}const XY=cce(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$y=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c7={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$y([0,.65,.55,1]),circOut:$y([.55,0,1,.45]),backIn:$y([.31,.01,.66,-.59]),backOut:$y([.33,1.53,.69,.99])};function WY(e,t){if(e)return typeof e=="function"?XY()?MY(e,t):"ease-out":qY(e)?$y(e):Array.isArray(e)?e.map(n=>WY(n,t)||c7.easeOut):c7[e]}function dce(e,t,n,{delay:r=0,duration:s=300,repeat:a=0,repeatType:i="loop",ease:l="easeOut",times:u}={},f=void 0){const h={[t]:n};u&&(h.offset=u);const g=WY(l,s);Array.isArray(g)&&(h.easing=g);const v={delay:r,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),e.animate(h,v)}function QY(e){return typeof e=="function"&&"applyToOptions"in e}function fce({type:e,...t}){return QY(e)&&XY()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hce extends k8{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,f8(typeof t.type!="string");const f=fce(t);this.animation=dce(n,r,s,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=A8(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):oce(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var t,n;const r=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return zl(Number(r))}get time(){return zl(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Gl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&lce()?(this.animation.timeline=t,io):n(this)}}const JY={anticipate:GY,backInOut:UY,circInOut:HY};function pce(e){return e in JY}function mce(e){typeof e.ease=="string"&&pce(e.ease)&&(e.ease=JY[e.ease])}const d7=10;class gce extends hce{constructor(t){mce(t),KY(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:a,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new N8({...i,autoplay:!1}),u=Gl(this.finishedTime??this.time);n.setWithVelocity(l.sample(u-d7).value,l.sample(u).value,d7),l.stop()}}const f7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(jd.test(e)||e==="0")&&!e.startsWith("url("));function vce(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yce(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],i=f7(s,t),l=f7(a,t);return!i||!l?!1:vce(e)||(n==="spring"||QY(n))&&r}const xce=new Set(["opacity","clipPath","filter","transform"]),bce=M8(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function wce(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:a,type:i}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return bce()&&n&&xce.has(n)&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&a!==0&&i!=="inertia"}const Cce=40;let Sce=class extends k8{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:i="loop",keyframes:l,name:u,motionValue:f,element:h,...g}){var v;super(),this.stop=()=>{var _,E;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=ni.now();const w={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:a,repeatType:i,name:u,motionValue:f,element:h,...g},C=h?.KeyframeResolver||L8;this.keyframeResolver=new C(l,(_,E,$)=>this.onKeyframesResolved(_,E,w,!$),u,f,h),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:a,type:i,velocity:l,delay:u,isHandoff:f,onUpdate:h}=r;this.resolvedAt=ni.now(),yce(t,a,i,l)||((qu.instantAnimations||!u)&&h?.(A8(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Cce?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!f&&wce(g)?new gce({...g,element:g.motionValue.owner.current}):new N8(g);v.finished.then(()=>this.notifyFinished()).catch(io),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ace()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};const I8=(e,t,n,r={},s,a)=>i=>{const l=_8(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Gl(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:v=>{t.set(v),l.onUpdate&&l.onUpdate(v)},onComplete:()=>{i(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};sue(l)||Object.assign(h,rue(e,h)),h.duration&&(h.duration=Gl(h.duration)),h.repeatDelay&&(h.repeatDelay=Gl(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let g=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(g=!0)),(qu.instantAnimations||qu.skipAnimations)&&(g=!0,h.duration=0,h.delay=0),h.allowFlatten=!l.type&&!l.ease,g&&!a&&t.get()!==void 0){const v=Qle(h.keyframes,l);if(v!==void 0){Ir.update(()=>{h.onUpdate(v),h.onComplete()});return}}return l.isSync?new N8(h):new Sce(h)},eZ=new Set(["width","height","top","left","right","bottom",...Yg]);function _ce({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tZ(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...l}=t;r&&(a=r);const u=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in l){const g=e.getValue(h,e.latestValues[h]??null),v=l[h];if(v===void 0||f&&_ce(f,h))continue;const w={delay:n,..._8(a||{},h)},C=g.get();if(C!==void 0&&!g.isAnimating&&!Array.isArray(v)&&v===C&&!w.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const $=$Y(e);if($){const O=window.MotionHandoffAnimation($,h,Ir);O!==null&&(w.startTime=O,_=!0)}}uA(e,h),g.start(I8(h,g,v,e.shouldReduceMotion&&eZ.has(h)?{type:!1}:w,e,_));const E=g.animation;E&&u.push(E)}return i&&Promise.all(u).then(()=>{Ir.update(()=>{i&&Zle(e,i)})}),u}function bA(e,t,n={}){var r;const s=x1(e,t,n.type==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(a=n.transitionOverride);const i=s?()=>Promise.all(tZ(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:v}=a;return jce(e,t,h+f,g,v,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[f,h]=u==="beforeChildren"?[i,l]:[l,i];return f().then(()=>h())}else return Promise.all([i(),l(n.delay)])}function jce(e,t,n=0,r=0,s=1,a){const i=[],l=(e.variantChildren.size-1)*r,u=s===1?(f=0)=>f*r:(f=0)=>l-f*r;return Array.from(e.variantChildren).sort(Ece).forEach((f,h)=>{f.notify("AnimationStart",t),i.push(bA(f,t,{...a,delay:n+u(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(i)}function Ece(e,t){return e.sortNodePosition(t)}function $ce(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(a=>bA(e,a,n));r=Promise.all(s)}else if(typeof t=="string")r=bA(e,t,n);else{const s=typeof t=="function"?x1(e,t,n.custom):t;r=Promise.all(tZ(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function nZ(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Rce=u8.length;function rZ(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rZ(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Rce;n++){const r=u8[n],s=e.props[r];(g1(s)||s===!1)&&(t[r]=s)}return t}const Oce=[...l8].reverse(),Tce=l8.length;function Ace(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$ce(e,n,r)))}function kce(e){let t=Ace(e),n=h7(),r=!0;const s=u=>(f,h)=>{var g;const v=x1(e,h,u==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(v){const{transition:w,transitionEnd:C,..._}=v;f={...f,..._,...C}}return f};function a(u){t=u(e)}function i(u){const{props:f}=e,h=rZ(e.parent)||{},g=[],v=new Set;let w={},C=1/0;for(let E=0;E<Tce;E++){const $=Oce[E],O=n[$],N=f[$]!==void 0?f[$]:h[$],M=g1(N),L=$===u?O.isActive:null;L===!1&&(C=E);let k=N===h[$]&&N!==f[$]&&M;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),O.protectedKeys={...w},!O.isActive&&L===null||!N&&!O.prevProp||m2(N)||typeof N=="boolean")continue;const T=Nce(O.prevProp,N);let P=T||$===u&&O.isActive&&!k&&M||E>C&&M,V=!1;const q=Array.isArray(N)?N:[N];let K=q.reduce(s($),{});L===!1&&(K={});const{prevResolvedValues:re={}}=O,ee={...re,...K},ue=he=>{P=!0,v.has(he)&&(V=!0,v.delete(he)),O.needsAnimating[he]=!0;const X=e.getValue(he);X&&(X.liveStyle=!1)};for(const he in ee){const X=K[he],pe=re[he];if(w.hasOwnProperty(he))continue;let xe=!1;lA(X)&&lA(pe)?xe=!nZ(X,pe):xe=X!==pe,xe?X!=null?ue(he):v.add(he):X!==void 0&&v.has(he)?ue(he):O.protectedKeys[he]=!0}O.prevProp=N,O.prevResolvedValues=K,O.isActive&&(w={...w,...K}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(k&&T)||V)&&g.push(...q.map(he=>({animation:he,options:{type:$}})))}if(v.size){const E={};if(typeof f.initial!="boolean"){const $=x1(e,Array.isArray(f.initial)?f.initial[0]:f.initial);$&&$.transition&&(E.transition=$.transition)}v.forEach($=>{const O=e.getBaseTarget($),N=e.getValue($);N&&(N.liveStyle=!0),E[$]=O??null}),g.push({animation:E})}let _=!!g.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(g):Promise.resolve()}function l(u,f){var h;if(n[u].isActive===f)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(v=>{var w;return(w=v.animationState)==null?void 0:w.setActive(u,f)}),n[u].isActive=f;const g=i(u);for(const v in n)n[v].protectedKeys={};return g}return{animateChanges:i,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=h7(),r=!0}}}function Nce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nZ(t,e):!1}function nh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function h7(){return{animate:nh(!0),whileInView:nh(),whileHover:nh(),whileTap:nh(),whileDrag:nh(),whileFocus:nh(),exit:nh()}}let Id=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},Lce=class extends Id{constructor(t){super(t),t.animationState||(t.animationState=kce(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();m2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}},Mce=0,Ice=class extends Id{constructor(){super(...arguments),this.id=Mce++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}};const Pce={animation:{Feature:Lce},exit:{Feature:Ice}};function C1(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const P8=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function nx(e){return{point:{x:e.pageX,y:e.pageY}}}const Dce=e=>t=>P8(t)&&e(t,nx(t));function Ky(e,t,n,r){return C1(e,t,Dce(n),r)}function sZ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Vce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Bce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const aZ=1e-4,Fce=1-aZ,Uce=1+aZ,iZ=.01,Gce=0-iZ,zce=0+iZ;function Aa(e){return e.max-e.min}function Hce(e,t,n){return Math.abs(e-t)<=n}function p7(e,t,n,r=.5){e.origin=r,e.originPoint=Lr(t.min,t.max,e.origin),e.scale=Aa(n)/Aa(t),e.translate=Lr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Fce&&e.scale<=Uce||isNaN(e.scale))&&(e.scale=1),(e.translate>=Gce&&e.translate<=zce||isNaN(e.translate))&&(e.translate=0)}function Yy(e,t,n,r){p7(e.x,t.x,n.x,r?r.originX:void 0),p7(e.y,t.y,n.y,r?r.originY:void 0)}function m7(e,t,n){e.min=n.min+t.min,e.max=e.min+Aa(t)}function qce(e,t,n){m7(e.x,t.x,n.x),m7(e.y,t.y,n.y)}function g7(e,t,n){e.min=t.min-n.min,e.max=e.min+Aa(t)}function Zy(e,t,n){g7(e.x,t.x,n.x),g7(e.y,t.y,n.y)}const v7=()=>({translate:0,scale:1,origin:0,originPoint:0}),fg=()=>({x:v7(),y:v7()}),y7=()=>({min:0,max:0}),Wr=()=>({x:y7(),y:y7()});function eo(e){return[e("x"),e("y")]}function zj(e){return e===void 0||e===1}function wA({scale:e,scaleX:t,scaleY:n}){return!zj(e)||!zj(t)||!zj(n)}function oh(e){return wA(e)||oZ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oZ(e){return x7(e.x)||x7(e.y)}function x7(e){return e&&e!=="0%"}function hS(e,t,n){const r=e-n,s=t*r;return n+s}function b7(e,t,n,r,s){return s!==void 0&&(e=hS(e,s,r)),hS(e,n,r)+t}function CA(e,t=0,n=1,r,s){e.min=b7(e.min,t,n,r,s),e.max=b7(e.max,t,n,r,s)}function lZ(e,{x:t,y:n}){CA(e.x,t.translate,t.scale,t.originPoint),CA(e.y,n.translate,n.scale,n.originPoint)}const w7=.999999999999,C7=1.0000000000001;function Kce(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let a,i;for(let l=0;l<s;l++){a=n[l],i=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&pg(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,lZ(e,i)),r&&oh(a.latestValues)&&pg(e,a.latestValues))}t.x<C7&&t.x>w7&&(t.x=1),t.y<C7&&t.y>w7&&(t.y=1)}function hg(e,t){e.min=e.min+t,e.max=e.max+t}function S7(e,t,n,r,s=.5){const a=Lr(e.min,e.max,s);CA(e,t,n,a,r)}function pg(e,t){S7(e.x,t.x,t.scaleX,t.scale,t.originX),S7(e.y,t.y,t.scaleY,t.scale,t.originY)}function uZ(e,t){return sZ(Bce(e.getBoundingClientRect(),t))}function Yce(e,t,n){const r=uZ(e,n),{scroll:s}=t;return s&&(hg(r.x,s.offset.x),hg(r.y,s.offset.y)),r}const cZ=({current:e})=>e?e.ownerDocument.defaultView:null,_7=(e,t)=>Math.abs(e-t);function Zce(e,t){const n=_7(e.x,t.x),r=_7(e.y,t.y);return Math.sqrt(n**2+r**2)}let dZ=class{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=qj(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,w=Zce(g.offset,{x:0,y:0})>=3;if(!v&&!w)return;const{point:C}=g,{timestamp:_}=ks;this.history.push({...C,timestamp:_});const{onStart:E,onMove:$}=this.handlers;v||(E&&E(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),$&&$(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=Hj(v,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:w,onSessionEnd:C,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=qj(g.type==="pointercancel"?this.lastMoveEventInfo:Hj(v,this.transformPagePoint),this.history);this.startEvent&&w&&w(g,E),C&&C(g,E)},!P8(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=nx(t),l=Hj(i,this.transformPagePoint),{point:u}=l,{timestamp:f}=ks;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,qj(l,this.history)),this.removeListeners=ex(Ky(this.contextWindow,"pointermove",this.handlePointerMove),Ky(this.contextWindow,"pointerup",this.handlePointerUp),Ky(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_d(this.updatePoint)}};function Hj(e,t){return t?{point:t(e.point)}:e}function j7(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qj({point:e},t){return{point:e,delta:j7(e,fZ(t)),offset:j7(e,Xce(t)),velocity:Wce(t,.1)}}function Xce(e){return e[0]}function fZ(e){return e[e.length-1]}function Wce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=fZ(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Gl(t)));)n--;if(!r)return{x:0,y:0};const a=zl(s.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const i={x:(s.x-r.x)/a,y:(s.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Qce(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Lr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Lr(n,e,r.max):Math.min(e,n)),e}function E7(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Jce(e,{top:t,left:n,bottom:r,right:s}){return{x:E7(e.x,n,s),y:E7(e.y,t,r)}}function $7(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ede(e,t){return{x:$7(e.x,t.x),y:$7(e.y,t.y)}}function tde(e,t){let n=.5;const r=Aa(e),s=Aa(t);return s>r?n=w1(t.min,t.max-r,e.min):r>s&&(n=w1(e.min,e.max-s,t.min)),Ku(0,1,n)}function nde(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const SA=.35;function rde(e=SA){return e===!1?e=0:e===!0&&(e=SA),{x:R7(e,"left","right"),y:R7(e,"top","bottom")}}function R7(e,t,n){return{min:O7(e,t),max:O7(e,n)}}function O7(e,t){return typeof e=="number"?e:e[t]||0}const Bo={x:!1,y:!1};function hZ(){return Bo.x||Bo.y}function sde(e){return e==="x"||e==="y"?Bo[e]?null:(Bo[e]=!0,()=>{Bo[e]=!1}):Bo.x||Bo.y?null:(Bo.x=Bo.y=!0,()=>{Bo.x=Bo.y=!1})}const ade=new WeakMap;let ide=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wr(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nx(h).point)},a=(h,g)=>{const{drag:v,dragPropagation:w,onDragStart:C}=this.getProps();if(v&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sde(v),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eo(E=>{let $=this.getAxisMotionValue(E).get()||0;if(Ul.test($)){const{projection:O}=this.visualElement;if(O&&O.layout){const N=O.layout.layoutBox[E];N&&($=Aa(N)*(parseFloat($)/100))}}this.originPoint[E]=$}),C&&Ir.postRender(()=>C(h,g)),uA(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},i=(h,g)=>{const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:C,onDrag:_}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:E}=g;if(w&&this.currentDirection===null){this.currentDirection=ode(E),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",g.point,E),this.updateAxis("y",g.point,E),this.visualElement.render(),_&&_(h,g)},l=(h,g)=>this.stop(h,g),u=()=>eo(h=>{var g;return this.getAnimationState(h)==="paused"&&((g=this.getAxisMotionValue(h).animation)==null?void 0:g.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new dZ(t,{onSessionStart:s,onStart:a,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:cZ(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ir.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Kw(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Qce(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)==null?void 0:t.layout,a=this.constraints;n&&cg(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Jce(s.layoutBox,n):this.constraints=!1,this.elastic=rde(r),a!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&eo(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=nde(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!cg(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=Yce(r,s.root,this.visualElement.getTransformPagePoint());let i=ede(s.layout.layoutBox,a);if(n){const l=n(Vce(i));this.hasMutatedConstraints=!!l,l&&(i=sZ(l))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=eo(h=>{if(!Kw(h,n,this.currentDirection))return;let g=u&&u[h]||{};i&&(g={min:0,max:0});const v=s?200:1e6,w=s?40:1e7,C={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...a,...g};return this.startAxisValueAnimation(h,C)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return uA(this.visualElement,t),r.start(I8(t,r,0,n,this.visualElement,!1))}stopAnimation(){eo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){eo(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps();return r[n]||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){eo(n=>{const{drag:r}=this.getProps();if(!Kw(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:l}=s.layout.layoutBox[n];a.set(t[n]-Lr(i,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!cg(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};eo(i=>{const l=this.getAxisMotionValue(i);if(l&&this.constraints!==!1){const u=l.get();s[i]=tde({min:u,max:u},this.constraints[i])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),eo(i=>{if(!Kw(i,t,null))return;const l=this.getAxisMotionValue(i),{min:u,max:f}=this.constraints[i];l.set(Lr(u,f,s[i]))})}addListeners(){if(!this.visualElement.current)return;ade.set(this.visualElement,this);const t=this.visualElement.current,n=Ky(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();cg(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ir.read(r);const i=C1(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(eo(h=>{const g=this.getAxisMotionValue(h);g&&(this.originPoint[h]+=u[h].translate,g.set(g.get()+u[h].translate))}),this.visualElement.render())});return()=>{i(),n(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:i=SA,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:a,dragElastic:i,dragMomentum:l}}};function Kw(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ode(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}let lde=class extends Id{constructor(t){super(t),this.removeGroupControls=io,this.removeListeners=io,this.controls=new ide(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||io}unmount(){this.removeGroupControls(),this.removeListeners()}};const T7=e=>(t,n)=>{e&&Ir.postRender(()=>e(t,n))};let ude=class extends Id{constructor(){super(...arguments),this.removePointerDownListener=io}onPointerDown(t){this.session=new dZ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cZ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:T7(t),onStart:T7(n),onMove:r,onEnd:(a,i)=>{delete this.session,s&&Ir.postRender(()=>s(a,i))}}}mount(){this.removePointerDownListener=Ky(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const OC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function A7(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dy={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ht.test(e))e=parseFloat(e);else return e;const n=A7(e,t.target.x),r=A7(e,t.target.y);return`${n}% ${r}%`}},cde={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=jd.parse(e);if(s.length>5)return r;const a=jd.createTransformer(e),i=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;s[0+i]/=l,s[1+i]/=u;const f=Lr(l,u,.5);return typeof s[2+i]=="number"&&(s[2+i]/=f),typeof s[3+i]=="number"&&(s[3+i]/=f),a(s)}};let dde=class extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:a}=t;Sle(fde),a&&(n.group&&n.group.add(a),r&&r.register&&s&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),OC.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:a}=this.props,{projection:i}=r;return i&&(i.isPresent=a,s||t.layoutDependency!==n||n===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Ir.postRender(()=>{const l=i.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),d8.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function pZ(e){const[t,n]=lY(),r=y.useContext(s8);return d.jsx(dde,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(mY),isPresent:t,safeToRemove:n})}const fde={borderRadius:{...dy,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dy,borderTopRightRadius:dy,borderBottomLeftRadius:dy,borderBottomRightRadius:dy,boxShadow:cde};function hde(e,t,n){const r=la(e)?e:Ng(e);return r.start(I8("",r,t,n)),r.animation}function pde(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mde=(e,t)=>e.depth-t.depth;let gde=class{constructor(){this.children=[],this.isDirty=!1}add(t){w8(this.children,t),this.isDirty=!0}remove(t){C8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mde),this.isDirty=!1,this.children.forEach(t)}};function vde(e,t){const n=ni.now(),r=({timestamp:s})=>{const a=s-n;a>=t&&(_d(r),e(a-t))};return Ir.setup(r,!0),()=>_d(r)}const mZ=["TopLeft","TopRight","BottomLeft","BottomRight"],yde=mZ.length,k7=e=>typeof e=="string"?parseFloat(e):e,N7=e=>typeof e=="number"||Ht.test(e);function xde(e,t,n,r,s,a){s?(e.opacity=Lr(0,n.opacity??1,bde(r)),e.opacityExit=Lr(t.opacity??1,0,wde(r))):a&&(e.opacity=Lr(t.opacity??1,n.opacity??1,r));for(let i=0;i<yde;i++){const l=`border${mZ[i]}Radius`;let u=L7(t,l),f=L7(n,l);u===void 0&&f===void 0||(u||(u=0),f||(f=0),u===0||f===0||N7(u)===N7(f)?(e[l]=Math.max(Lr(k7(u),k7(f),r),0),(Ul.test(f)||Ul.test(u))&&(e[l]+="%")):e[l]=f)}(t.rotate||n.rotate)&&(e.rotate=Lr(t.rotate||0,n.rotate||0,r))}function L7(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bde=gZ(0,.5,zY),wde=gZ(.5,.95,io);function gZ(e,t,n){return r=>r<e?0:r>t?1:n(w1(e,t,r))}function M7(e,t){e.min=t.min,e.max=t.max}function Wi(e,t){M7(e.x,t.x),M7(e.y,t.y)}function I7(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function P7(e,t,n,r,s){return e-=t,e=hS(e,1/n,r),s!==void 0&&(e=hS(e,1/s,r)),e}function Cde(e,t=0,n=1,r=.5,s,a=e,i=e){if(Ul.test(t)&&(t=parseFloat(t),t=Lr(i.min,i.max,t/100)-i.min),typeof t!="number")return;let l=Lr(a.min,a.max,r);e===a&&(l-=t),e.min=P7(e.min,t,n,l,s),e.max=P7(e.max,t,n,l,s)}function D7(e,t,[n,r,s],a,i){Cde(e,t[n],t[r],t[s],t.scale,a,i)}const Sde=["x","scaleX","originX"],_de=["y","scaleY","originY"];function V7(e,t,n,r){D7(e.x,t,Sde,n?n.x:void 0,r?r.x:void 0),D7(e.y,t,_de,n?n.y:void 0,r?r.y:void 0)}function B7(e){return e.translate===0&&e.scale===1}function vZ(e){return B7(e.x)&&B7(e.y)}function F7(e,t){return e.min===t.min&&e.max===t.max}function jde(e,t){return F7(e.x,t.x)&&F7(e.y,t.y)}function U7(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yZ(e,t){return U7(e.x,t.x)&&U7(e.y,t.y)}function G7(e){return Aa(e.x)/Aa(e.y)}function z7(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ede{constructor(){this.members=[]}add(t){w8(this.members,t),t.scheduleRender()}remove(t){if(C8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $de(e,t,n){let r="";const s=e.x.translate/t.x,a=e.y.translate/t.y,i=n?.z||0;if((s||a||i)&&(r=`translate3d(${s}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:g,rotateY:v,skewX:w,skewY:C}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),g&&(r+=`rotateX(${g}deg) `),v&&(r+=`rotateY(${v}deg) `),w&&(r+=`skewX(${w}deg) `),C&&(r+=`skewY(${C}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Kj=["","X","Y","Z"],Rde={visibility:"hidden"},Ode=1e3;let Tde=0;function Yj(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function xZ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=$Y(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ir,!(s||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&xZ(r)}function bZ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},i=t?.()){this.id=Tde++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Nde),this.nodes.forEach(Dde),this.nodes.forEach(Vde),this.nodes.forEach(Lde)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gde)}addEventListener(a,i){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new S8),this.eventHandlers.get(a).add(i)}notifyListeners(a,...i){const l=this.eventHandlers.get(a);l&&l.notify(...i)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=pde(a),this.instance=a;const{layoutId:i,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=vde(h,250),OC.hasAnimatedSinceResize&&(OC.hasAnimatedSinceResize=!1,this.nodes.forEach(q7))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||u.getDefaultTransition()||zde,{onLayoutAnimationStart:C,onLayoutAnimationComplete:_}=u.getProps(),E=!this.targetLayout||!yZ(this.targetLayout,v),$=!h&&g;if(this.options.layoutRoot||this.resumeFrom||$||h&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,$);const O={..._8(w,"layout"),onPlay:C,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||q7(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_d(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Bde),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xZ(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(H7);return}this.isUpdating||this.nodes.forEach(Ide),this.isUpdating=!1,this.nodes.forEach(Pde),this.nodes.forEach(Ade),this.nodes.forEach(kde),this.clearAllSnapshots();const a=ni.now();ks.delta=Ku(0,1e3/60,a-ks.timestamp),ks.timestamp=a,ks.isProcessing=!0,Bj.update.process(ks),Bj.preRender.process(ks),Bj.render.process(ks),ks.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,d8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Mde),this.sharedNodes.forEach(Fde)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ir.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ir.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Aa(this.snapshot.measuredBox.x)&&!Aa(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(i=!1),i&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!vZ(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;a&&this.instance&&(i||oh(this.latestValues)||f)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const i=this.measurePageBox();let l=this.removeElementScroll(i);return a&&(l=this.removeTransform(l)),Hde(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:i}=this.options;if(!i)return Wr();const l=i.measureViewportBox();if(!((a=this.scroll)!=null&&a.wasRoot||this.path.some(qde))){const{scroll:u}=this.root;u&&(hg(l.x,u.offset.x),hg(l.y,u.offset.y))}return l}removeElementScroll(a){var i;const l=Wr();if(Wi(l,a),(i=this.scroll)!=null&&i.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:g}=f;f!==this.root&&h&&g.layoutScroll&&(h.wasRoot&&Wi(l,a),hg(l.x,h.offset.x),hg(l.y,h.offset.y))}return l}applyTransform(a,i=!1){const l=Wr();Wi(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];!i&&f.options.layoutScroll&&f.scroll&&f!==f.root&&pg(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),oh(f.latestValues)&&pg(l,f.latestValues)}return oh(this.latestValues)&&pg(l,this.latestValues),l}removeTransform(a){const i=Wr();Wi(i,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!oh(u.latestValues))continue;wA(u.latestValues)&&u.updateSnapshot();const f=Wr(),h=u.measurePageBox();Wi(f,h),V7(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return oh(this.latestValues)&&V7(i,this.latestValues),i}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ks.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var i;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(i=this.parent)!=null&&i.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=ks.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wr(),this.relativeTargetOrigin=Wr(),Zy(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Wr(),this.targetWithTransforms=Wr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qce(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Wi(this.target,this.layout.layoutBox),lZ(this.target,this.targetDelta)):Wi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wr(),this.relativeTargetOrigin=Wr(),Zy(this.relativeTargetOrigin,this.target,g.target),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||wA(this.parent.latestValues)||oZ(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const i=this.getLead(),l=!!this.resumingFrom||this!==i;let u=!0;if((this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===ks.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Wi(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Kce(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Wr());const{target:w}=i;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(I7(this.prevProjectionDelta.x,this.projectionDelta.x),I7(this.prevProjectionDelta.y,this.projectionDelta.y)),Yy(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!z7(this.projectionDelta.x,this.prevProjectionDelta.x)||!z7(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var i;if((i=this.options.visualElement)==null||i.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fg(),this.projectionDelta=fg(),this.projectionDeltaWithTransform=fg()}setAnimationOrigin(a,i=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},h=fg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const g=Wr(),v=l?l.source:void 0,w=this.layout?this.layout.source:void 0,C=v!==w,_=this.getStack(),E=!_||_.members.length<=1,$=!!(C&&!E&&this.options.crossfade===!0&&!this.path.some(Gde));this.animationProgress=0;let O;this.mixTargetDelta=N=>{const M=N/1e3;K7(h.x,a.x,M),K7(h.y,a.y,M),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ude(this.relativeTarget,this.relativeTargetOrigin,g,M),O&&jde(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Wr()),Wi(O,this.relativeTarget)),C&&(this.animationValues=f,xde(f,u,this.latestValues,M,$,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var i,l,u;this.notifyListeners("animationStart"),(i=this.currentAnimation)==null||i.stop(!1),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(!1),this.pendingAnimation&&(_d(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update(()=>{OC.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ng(0)),this.currentAnimation=hde(this.motionValue,[0,1e3],{...a,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),a.onUpdate&&a.onUpdate(f)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ode),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:i,target:l,layout:u,latestValues:f}=a;if(!(!i||!l||!u)){if(this!==a&&this.layout&&u&&wZ(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Wr();const h=Aa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const g=Aa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+g}Wi(i,l),pg(i,f),Yy(this.projectionDeltaWithTransform,this.layoutCorrected,i,f)}}registerSharedNode(a,i){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Ede),this.sharedNodes.get(a).add(i);const l=i.options.initialPromotionConfig;i.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(i):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:i,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let i=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;const u={};l.z&&Yj("z",a,u,this.animationValues);for(let f=0;f<Kj.length;f++)Yj(`rotate${Kj[f]}`,a,u,this.animationValues),Yj(`skew${Kj[f]}`,a,u,this.animationValues);a.render();for(const f in u)a.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Rde;const i={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=$C(a?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none",i;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=$C(a?.pointerEvents)||""),this.hasProjected&&!oh(this.latestValues)&&(v.transform=l?l({},""):"none",this.hasProjected=!1),v}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),i.transform=$de(this.projectionDeltaWithTransform,this.treeScale,f),l&&(i.transform=l(f,i.transform));const{x:h,y:g}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${g.origin*100}% 0`,u.animationValues?i.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:i.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in v1){if(f[v]===void 0)continue;const{correct:w,applyTo:C,isCSSVariable:_}=v1[v],E=i.transform==="none"?f[v]:w(f[v],u);if(C){const $=C.length;for(let O=0;O<$;O++)i[C[O]]=E}else _?this.options.visualElement.renderState.vars[v]=E:i[v]=E}return this.options.layoutId&&(i.pointerEvents=u===this?$C(a?.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var i;return(i=a.currentAnimation)==null?void 0:i.stop(!1)}),this.root.nodes.forEach(H7),this.root.sharedNodes.clear()}}}function Ade(e){e.updateLayout()}function kde(e){var t;const n=((t=e.resumeFrom)==null?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:a}=e.options,i=n.source!==e.layout.source;a==="size"?eo(g=>{const v=i?n.measuredBox[g]:n.layoutBox[g],w=Aa(v);v.min=r[g].min,v.max=v.min+w}):wZ(a,n.layoutBox,r)&&eo(g=>{const v=i?n.measuredBox[g]:n.layoutBox[g],w=Aa(r[g]);v.max=v.min+w,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+w)});const l=fg();Yy(l,r,n.layoutBox);const u=fg();i?Yy(u,e.applyTransform(s,!0),n.measuredBox):Yy(u,r,n.layoutBox);const f=!vZ(l);let h=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:v,layout:w}=g;if(v&&w){const C=Wr();Zy(C,n.layoutBox,v.layoutBox);const _=Wr();Zy(_,r,w.layoutBox),yZ(C,_)||(h=!0),g.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=C,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Nde(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Lde(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Mde(e){e.clearSnapshot()}function H7(e){e.clearMeasurements()}function Ide(e){e.isLayoutDirty=!1}function Pde(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function q7(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Dde(e){e.resolveTargetDelta()}function Vde(e){e.calcProjection()}function Bde(e){e.resetSkewAndRotation()}function Fde(e){e.removeLeadSnapshot()}function K7(e,t,n){e.translate=Lr(t.translate,0,n),e.scale=Lr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Y7(e,t,n,r){e.min=Lr(t.min,n.min,r),e.max=Lr(t.max,n.max,r)}function Ude(e,t,n,r){Y7(e.x,t.x,n.x,r),Y7(e.y,t.y,n.y,r)}function Gde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zde={duration:.45,ease:[.4,0,.1,1]},Z7=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),X7=Z7("applewebkit/")&&!Z7("chrome/")?Math.round:io;function W7(e){e.min=X7(e.min),e.max=X7(e.max)}function Hde(e){W7(e.x),W7(e.y)}function wZ(e,t,n){return e==="position"||e==="preserve-aspect"&&!Hce(G7(t),G7(n),.2)}function qde(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Kde=bZ({attachResizeListener:(e,t)=>C1(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zj={current:void 0},CZ=bZ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zj.current){const e=new Kde({});e.mount(window),e.setOptions({layoutScroll:!0}),Zj.current=e}return Zj.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Yde={pan:{Feature:ude},drag:{Feature:lde,ProjectionNode:CZ,MeasureLayout:pZ}};function Zde(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function SZ(e,t){const n=Zde(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Q7(e){return!(e.pointerType==="touch"||hZ())}function Xde(e,t,n={}){const[r,s,a]=SZ(e,n),i=l=>{if(!Q7(l))return;const{target:u}=l,f=t(u,l);if(typeof f!="function"||!u)return;const h=g=>{Q7(g)&&(f(g),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,s)};return r.forEach(l=>{l.addEventListener("pointerenter",i,s)}),a}function J7(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,a=r[s];a&&Ir.postRender(()=>a(t,nx(t)))}class Wde extends Id{mount(){const{current:t}=this.node;t&&(this.unmount=Xde(t,(n,r)=>(J7(this.node,r,"Start"),s=>J7(this.node,s,"End"))))}unmount(){}}class Qde extends Id{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ex(C1(this.node.current,"focus",()=>this.onFocus()),C1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const _Z=(e,t)=>t?e===t?!0:_Z(e,t.parentElement):!1,Jde=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function efe(e){return Jde.has(e.tagName)||e.tabIndex!==-1}const TC=new WeakSet;function eI(e){return t=>{t.key==="Enter"&&e(t)}}function Xj(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tfe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=eI(()=>{if(TC.has(n))return;Xj(n,"down");const s=eI(()=>{Xj(n,"up")}),a=()=>Xj(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function tI(e){return P8(e)&&!hZ()}function nfe(e,t,n={}){const[r,s,a]=SZ(e,n),i=l=>{const u=l.currentTarget;if(!tI(l))return;TC.add(u);const f=t(u,l),h=(w,C)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),TC.has(u)&&TC.delete(u),tI(w)&&typeof f=="function"&&f(w,{success:C})},g=w=>{h(w,u===window||u===document||n.useGlobalTarget||_Z(u,w.target))},v=w=>{h(w,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",i,s),l instanceof HTMLElement&&(l.addEventListener("focus",u=>tfe(u,s)),!efe(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function nI(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),a=r[s];a&&Ir.postRender(()=>a(t,nx(t)))}class rfe extends Id{mount(){const{current:t}=this.node;t&&(this.unmount=nfe(t,(n,r)=>(nI(this.node,r,"Start"),(s,{success:a})=>nI(this.node,s,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _A=new WeakMap,Wj=new WeakMap,sfe=e=>{const t=_A.get(e.target);t&&t(e)},afe=e=>{e.forEach(sfe)};function ife({root:e,...t}){const n=e||document;Wj.has(n)||Wj.set(n,{});const r=Wj.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(afe,{root:e,...t})),r[s]}function ofe(e,t,n){const r=ife(t);return _A.set(e,n),r.observe(e),()=>{_A.delete(e),r.unobserve(e)}}const lfe={some:0,all:1};class ufe extends Id{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:lfe[s]},l=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:g}=this.node.getProps(),v=f?h:g;v&&v(u)};return ofe(this.node.current,i,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(cfe(t,n))&&this.startObserver()}unmount(){}}function cfe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dfe={inView:{Feature:ufe},tap:{Feature:rfe},focus:{Feature:Qde},hover:{Feature:Wde}},ffe={layout:{ProjectionNode:CZ,MeasureLayout:pZ}},jA={current:null},jZ={current:!1};function hfe(){if(jZ.current=!0,!!i8)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jA.current=e.matches;e.addListener(t),t()}else jA.current=!1}const pfe=new WeakMap;function mfe(e,t,n){for(const r in t){const s=t[r],a=n[r];if(la(s))e.addValue(r,s);else if(la(a))e.addValue(r,Ng(s,{owner:e}));else if(a!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Ng(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const EZ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$Z=e=>/^0[^.\s]+$/u.test(e),gfe={test:e=>e==="auto",parse:e=>e},RZ=e=>t=>t.test(e),OZ=[Xg,Ht,Ul,ad,jle,_le,gfe],rI=e=>OZ.find(RZ(e)),vfe=[...OZ,aa,jd],yfe=e=>vfe.find(RZ(e)),xfe=new Set(["brightness","contrast","saturate","opacity"]);function bfe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(j8)||[];if(!r)return e;const s=n.replace(r,"");let a=xfe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+s+")"}const wfe=/\b([a-z-]*)\(.*?\)/gu,EA={...jd,getAnimatableNone:e=>{const t=e.match(wfe);return t?t.map(bfe).join(" "):e}},Cfe={...m8,color:aa,backgroundColor:aa,outlineColor:aa,fill:aa,stroke:aa,borderColor:aa,borderTopColor:aa,borderRightColor:aa,borderBottomColor:aa,borderLeftColor:aa,filter:EA,WebkitFilter:EA},TZ=e=>Cfe[e];function AZ(e,t){let n=TZ(e);return n!==EA&&(n=jd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Sfe=class{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:a,visualState:i},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=L8,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=ni.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Ir.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=i;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=g2(n),this.isVariantNode=hY(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in g){const w=g[v];u[v]!==void 0&&la(w)&&w.set(u[v],!1)}}mount(t){this.current=t,pfe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),jZ.current||hfe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),_d(this.notifyUpdate),_d(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zg.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ir.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),a(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in kg){const n=kg[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<sI.length;r++){const s=sI[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,i=t[a];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=mfe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ng(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(EZ(r)||$Z(r))?r=parseFloat(r):!yfe(r)&&jd.test(n)&&(r=AZ(t,n)),this.setBaseTarget(t,la(r)?r.get():r)),la(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=x8(this.props,r,(n=this.presenceContext)==null?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!la(a)?a:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new S8),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}};const _fe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jfe(e){const t=_fe.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function kZ(e,t,n=1){const[r,s]=jfe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const i=a.trim();return EZ(i)?parseFloat(i):i}return p8(s)?kZ(s,t,n+1):s}function Efe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$Z(e):!0}const $fe=new Set(["auto","none","0"]);function Rfe(e,t,n){let r=0,s;for(;r<e.length&&!s;){const a=e[r];typeof a=="string"&&!$fe.has(a)&&b1(a).values.length&&(s=e[r]),r++}if(s&&n)for(const a of t)e[a]=AZ(n,s)}let Ofe=class extends L8{constructor(t,n,r,s,a){super(t,n,r,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),p8(f))){const h=kZ(f,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!eZ.has(r)||t.length!==2)return;const[s,a]=t,i=rI(s),l=rI(a);if(i!==l)if(u7(i)&&u7(l))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else gh[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Efe(t[s]))&&r.push(s);r.length&&Rfe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gh[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const i=s.length-1,l=s[i];s[i]=gh[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(t=this.removedTransforms)!=null&&t.length&&this.removedTransforms.forEach(([u,f])=>{n.getValue(u).set(f)}),this.resolveNoneKeyframes()}},NZ=class extends Sfe{constructor(){super(...arguments),this.KeyframeResolver=Ofe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;la(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}};function LZ(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}function Tfe(e){return window.getComputedStyle(e)}let Afe=class extends NZ{constructor(){super(...arguments),this.type="html",this.renderInstance=LZ}readValueFromInstance(t,n){if(Zg.has(n))return ece(t,n);{const r=Tfe(t),s=(h8(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uZ(t,n)}build(t,n,r){g8(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return b8(t,n,r)}};const MZ=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kfe(e,t,n,r){LZ(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(MZ.has(s)?s:c8(s),t.attrs[s])}let Nfe=class extends NZ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zg.has(n)){const r=TZ(n);return r&&r.default||0}return n=MZ.has(n)?n:c8(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jY(t,n,r)}build(t,n,r){wY(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){kfe(t,n,r,s)}mount(t){this.isSVGTag=SY(t.tagName),super.mount(t)}};const Lfe=(e,t)=>y8(e)?new Nfe(t):new Afe(t,{allowProjection:e!==y.Fragment}),Mfe=Gle({...Pce,...dfe,...Yde,...ffe},Lfe),Lg=ule(Mfe),ec=e=>d.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20",...e,children:d.jsx("path",{fill:"currentColor",d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),Ife=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:d.jsx("path",{d:"M21.3745 4.45312H19.7362C19.5065 4.45312 19.2885 4.55859 19.1479 4.73906L9.48462 16.9805L4.85103 11.1094C4.78093 11.0204 4.69159 10.9484 4.5897 10.8989C4.48781 10.8494 4.37603 10.8236 4.26274 10.8234H2.62446C2.46743 10.8234 2.38071 11.0039 2.47681 11.1258L8.89634 19.2586C9.19634 19.6383 9.7729 19.6383 10.0752 19.2586L21.5221 4.75313C21.6182 4.63359 21.5315 4.45312 21.3745 4.45312Z",fill:"currentColor"})}),D8=e=>d.jsx("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",...e,children:d.jsx("path",{d:"M22.3426 14.6632L20.8074 13.3507C20.8801 12.9054 20.9176 12.4507 20.9176 11.996C20.9176 11.5414 20.8801 11.0867 20.8074 10.6414L22.3426 9.32886C22.4584 9.22973 22.5413 9.09771 22.5802 8.95034C22.6191 8.80297 22.6123 8.64724 22.5606 8.50386L22.5395 8.44292C22.1168 7.26173 21.484 6.16675 20.6715 5.21089L20.6293 5.16167C20.5307 5.04578 20.3994 4.96247 20.2525 4.92272C20.1057 4.88297 19.9502 4.88865 19.8067 4.93901L17.9012 5.61636C17.1981 5.03979 16.4129 4.58511 15.5645 4.26636L15.1965 2.27417C15.1687 2.12427 15.096 1.98636 14.988 1.87877C14.88 1.77119 14.7418 1.69901 14.5918 1.67183L14.5285 1.66011C13.3074 1.43979 12.0231 1.43979 10.802 1.66011L10.7387 1.67183C10.5887 1.69901 10.4505 1.77119 10.3425 1.87877C10.2345 1.98636 10.1618 2.12427 10.134 2.27417L9.76369 4.27573C8.92202 4.59455 8.13822 5.049 7.44338 5.62104L5.52384 4.93901C5.38033 4.88825 5.22476 4.88237 5.07782 4.92214C4.93088 4.96191 4.79951 5.04545 4.70119 5.16167L4.659 5.21089C3.84747 6.16743 3.21473 7.26223 2.79103 8.44292L2.76994 8.50386C2.66447 8.79683 2.75119 9.12495 2.98791 9.32886L4.54181 10.6554C4.46916 11.096 4.434 11.546 4.434 11.9937C4.434 12.4437 4.46916 12.8937 4.54181 13.332L2.98791 14.6585C2.87212 14.7577 2.78924 14.8897 2.75031 15.0371C2.71137 15.1844 2.71822 15.3402 2.76994 15.4835L2.79103 15.5445C3.21525 16.7257 3.84338 17.8156 4.659 18.7765L4.70119 18.8257C4.79975 18.9416 4.93112 19.0249 5.07798 19.0647C5.22483 19.1044 5.38028 19.0987 5.52384 19.0484L7.44338 18.3664C8.14181 18.9406 8.92228 19.3953 9.76369 19.7117L10.134 21.7132C10.1618 21.8631 10.2345 22.001 10.3425 22.1086C10.4505 22.2162 10.5887 22.2884 10.7387 22.3156L10.802 22.3273C12.0343 22.5488 13.2962 22.5488 14.5285 22.3273L14.5918 22.3156C14.7418 22.2884 14.88 22.2162 14.988 22.1086C15.096 22.001 15.1687 21.8631 15.1965 21.7132L15.5645 19.721C16.4126 19.4031 17.2022 18.947 17.9012 18.371L19.8067 19.0484C19.9502 19.0991 20.1057 19.105 20.2527 19.0653C20.3996 19.0255 20.531 18.9419 20.6293 18.8257L20.6715 18.7765C21.4871 17.8132 22.1153 16.7257 22.5395 15.5445L22.5606 15.4835C22.666 15.1953 22.5793 14.8671 22.3426 14.6632ZM19.1434 10.9179C19.202 11.2718 19.2324 11.6351 19.2324 11.9984C19.2324 12.3617 19.202 12.725 19.1434 13.0789L18.9887 14.0187L20.7395 15.5164C20.4741 16.1278 20.139 16.7066 19.741 17.2414L17.566 16.4703L16.8301 17.075C16.2699 17.5343 15.6465 17.8953 14.9715 18.1484L14.0785 18.4835L13.659 20.757C12.9971 20.832 12.3288 20.832 11.6668 20.757L11.2473 18.4789L10.3613 18.139C9.69338 17.8859 9.07228 17.525 8.51681 17.0679L7.78088 16.4609L5.59181 17.239C5.19338 16.7023 4.86056 16.1234 4.59338 15.514L6.36291 14.0023L6.21056 13.0648C6.15431 12.7156 6.12385 12.3546 6.12385 11.9984C6.12385 11.6398 6.15197 11.2812 6.21056 10.932L6.36291 9.99448L4.59338 8.48276C4.85822 7.87104 5.19338 7.29448 5.59181 6.75776L7.78088 7.53589L8.51681 6.92886C9.07228 6.47183 9.69338 6.11089 10.3613 5.85776L11.2496 5.52261L11.6692 3.24448C12.3278 3.16948 13.0004 3.16948 13.6613 3.24448L14.0809 5.51792L14.9738 5.85308C15.6465 6.1062 16.2723 6.46714 16.8324 6.92651L17.5684 7.5312L19.7434 6.76011C20.1418 7.29683 20.4746 7.87573 20.7418 8.48511L18.991 9.98276L19.1434 10.9179ZM12.6676 7.63901C10.3895 7.63901 8.5426 9.48589 8.5426 11.764C8.5426 14.0421 10.3895 15.889 12.6676 15.889C14.9457 15.889 16.7926 14.0421 16.7926 11.764C16.7926 9.48589 14.9457 7.63901 12.6676 7.63901ZM14.5238 13.6203C14.2804 13.8644 13.991 14.058 13.6725 14.19C13.3539 14.3219 13.0124 14.3896 12.6676 14.389C11.9668 14.389 11.3082 14.1148 10.8113 13.6203C10.5672 13.3768 10.3736 13.0875 10.2416 12.7689C10.1097 12.4503 10.0421 12.1088 10.0426 11.764C10.0426 11.0632 10.3168 10.4046 10.8113 9.90776C11.3082 9.41089 11.9668 9.13901 12.6676 9.13901C13.3684 9.13901 14.027 9.41089 14.5238 9.90776C14.768 10.1512 14.9616 10.4406 15.0936 10.7591C15.2255 11.0777 15.2931 11.4192 15.2926 11.764C15.2926 12.4648 15.0184 13.1234 14.5238 13.6203Z",fill:"currentColor"})}),Pfe=e=>d.jsx("svg",{width:"10",height:"7",viewBox:"0 0 10 7",...e,children:d.jsx("path",{d:"M1.45109 2.42509C1.37233 2.34538 1.27872 2.28212 1.17563 2.23896C1.07254 2.1958 0.962002 2.17359 0.850364 2.17359C0.738726 2.17359 0.628188 2.1958 0.525097 2.23896C0.422006 2.28212 0.328392 2.34538 0.249633 2.42509C0.170513 2.50444 0.107731 2.59875 0.0648916 2.70262C0.0220522 2.80648 0 2.91785 0 3.03032C0 3.1428 0.0220522 3.25416 0.0648916 3.35803C0.107731 3.46189 0.170513 3.5562 0.249633 3.63555L3.3536 6.76278C3.4281 6.83798 3.51659 6.89764 3.614 6.93834C3.71141 6.97905 3.81583 7 3.92129 7C4.02675 7 4.13117 6.97905 4.22858 6.93834C4.32599 6.89764 4.41447 6.83798 4.48897 6.76278L9.76454 1.44768C9.83918 1.37262 9.8984 1.28347 9.9388 1.18533C9.9792 1.08719 10 0.98199 10 0.875744C10 0.769497 9.9792 0.664293 9.9388 0.566153C9.8984 0.468013 9.83918 0.378863 9.76454 0.303805L9.69845 0.237218C9.62395 0.16202 9.53547 0.102361 9.43806 0.0616562C9.34065 0.0209513 9.23623 0 9.13077 0C9.02531 0 8.92089 0.0209513 8.82348 0.0616562C8.72607 0.102361 8.63758 0.16202 8.56308 0.237218L3.92011 4.9126L1.45109 2.42509Z",fill:"currentValue"})}),V8=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M13.2138 12L19.3661 4.66641C19.4692 4.54453 19.3825 4.35938 19.2231 4.35938H17.3528C17.2427 4.35938 17.1372 4.40859 17.0645 4.49297L11.9903 10.5422L6.91611 4.49297C6.84579 4.40859 6.74032 4.35938 6.62782 4.35938H4.75751C4.59814 4.35938 4.51142 4.54453 4.61454 4.66641L10.7669 12L4.61454 19.3336C4.59144 19.3608 4.57662 19.394 4.57184 19.4293C4.56706 19.4647 4.57252 19.5006 4.58757 19.533C4.60263 19.5653 4.62664 19.5926 4.65676 19.6117C4.68689 19.6308 4.72185 19.6408 4.75751 19.6406H6.62782C6.73798 19.6406 6.84345 19.5914 6.91611 19.507L11.9903 13.4578L17.0645 19.507C17.1349 19.5914 17.2403 19.6406 17.3528 19.6406H19.2231C19.3825 19.6406 19.4692 19.4555 19.3661 19.3336L13.2138 12Z",fill:"currentColor"})}),Dfe=e=>d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M16.75 7.375H12.6875V3.3125C12.6875 3.14062 12.5469 3 12.375 3H3.3125C3.14062 3 3 3.14062 3 3.3125V12.375C3 12.5469 3.14062 12.6875 3.3125 12.6875H7.375V16.75C7.375 16.9219 7.51562 17.0625 7.6875 17.0625H16.75C16.9219 17.0625 17.0625 16.9219 17.0625 16.75V7.6875C17.0625 7.51562 16.9219 7.375 16.75 7.375ZM7.375 7.6875V11.3594H4.32812V4.32812H11.3594V7.375H7.6875C7.51562 7.375 7.375 7.51562 7.375 7.6875ZM15.7344 15.7344H8.70312V8.70312H12.6875H15.7344V15.7344Z",fill:"currentColor"})}),v2=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M4 12.3125C4 12.4849 4.03395 12.6555 4.09991 12.8148C4.16587 12.974 4.26255 13.1187 4.38442 13.2406C4.5063 13.3625 4.65099 13.4591 4.81023 13.5251C4.96947 13.5911 5.14014 13.625 5.3125 13.625C5.48486 13.625 5.65553 13.5911 5.81477 13.5251C5.97401 13.4591 6.1187 13.3625 6.24058 13.2406C6.36245 13.1187 6.45913 12.974 6.52509 12.8148C6.59105 12.6555 6.625 12.4849 6.625 12.3125C6.625 12.1401 6.59105 11.9695 6.52509 11.8102C6.45913 11.651 6.36245 11.5063 6.24058 11.3844C6.1187 11.2625 5.97401 11.1659 5.81477 11.0999C5.65553 11.0339 5.48486 11 5.3125 11C5.14014 11 4.96947 11.0339 4.81023 11.0999C4.65099 11.1659 4.5063 11.2625 4.38442 11.3844C4.26255 11.5063 4.16587 11.651 4.09991 11.8102C4.03395 11.9695 4 12.1401 4 12.3125ZM10.5625 12.3125C10.5625 12.6606 10.7008 12.9944 10.9469 13.2406C11.1931 13.4867 11.5269 13.625 11.875 13.625C12.2231 13.625 12.5569 13.4867 12.8031 13.2406C13.0492 12.9944 13.1875 12.6606 13.1875 12.3125C13.1875 11.9644 13.0492 11.6306 12.8031 11.3844C12.5569 11.1383 12.2231 11 11.875 11C11.5269 11 11.1931 11.1383 10.9469 11.3844C10.7008 11.6306 10.5625 11.9644 10.5625 12.3125ZM17.125 12.3125C17.125 12.6606 17.2633 12.9944 17.5094 13.2406C17.7556 13.4867 18.0894 13.625 18.4375 13.625C18.7856 13.625 19.1194 13.4867 19.3656 13.2406C19.6117 12.9944 19.75 12.6606 19.75 12.3125C19.75 11.9644 19.6117 11.6306 19.3656 11.3844C19.1194 11.1383 18.7856 11 18.4375 11C18.0894 11 17.7556 11.1383 17.5094 11.3844C17.2633 11.6306 17.125 11.9644 17.125 12.3125Z",fill:"currentColor"})}),Vfe=e=>d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M3.75 9.0625H5.07812H6.48438H13.5156V4.6875C13.5156 4.08398 13.0254 3.59375 12.4219 3.59375H7.57812C6.97461 3.59375 6.48438 4.08398 6.48438 4.6875V9.0625H5.07812V4.6875C5.07812 3.30664 6.19727 2.1875 7.57812 2.1875H12.4219C13.8027 2.1875 14.9219 3.30664 14.9219 4.6875V9.0625H16.25C16.5957 9.0625 16.875 9.3418 16.875 9.6875V17.1875C16.875 17.5332 16.5957 17.8125 16.25 17.8125H3.75C3.4043 17.8125 3.125 17.5332 3.125 17.1875V9.6875C3.125 9.3418 3.4043 9.0625 3.75 9.0625ZM4.53125 16.4062H15.4688V10.4688H4.53125V16.4062ZM10.5469 13.6914V14.7266C10.5469 14.8125 10.4766 14.8828 10.3906 14.8828H9.60938C9.52344 14.8828 9.45312 14.8125 9.45312 14.7266V13.6914C9.2919 13.5757 9.17156 13.4117 9.10943 13.2232C9.0473 13.0347 9.04659 12.8314 9.10738 12.6425C9.16818 12.4535 9.28736 12.2888 9.44777 12.1719C9.60817 12.055 9.80153 11.992 10 11.992C10.1985 11.992 10.3918 12.055 10.5522 12.1719C10.7126 12.2888 10.8318 12.4535 10.8926 12.6425C10.9534 12.8314 10.9527 13.0347 10.8906 13.2232C10.8284 13.4117 10.7081 13.5757 10.5469 13.6914Z",fill:"currentColor"})}),Bfe=e=>d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M3.75 9.0625H13.5156V4.6875C13.5156 4.08398 13.0254 3.59375 12.4219 3.59375H7.57812C6.97461 3.59375 6.48438 4.08398 6.48438 4.6875V6.01562C6.48438 6.10156 6.41406 6.17188 6.32812 6.17188H5.23438C5.14844 6.17188 5.07812 6.10156 5.07812 6.01562V4.6875C5.07812 3.30664 6.19727 2.1875 7.57812 2.1875H12.4219C13.8027 2.1875 14.9219 3.30664 14.9219 4.6875V9.0625H16.25C16.5957 9.0625 16.875 9.3418 16.875 9.6875V17.1875C16.875 17.5332 16.5957 17.8125 16.25 17.8125H3.75C3.4043 17.8125 3.125 17.5332 3.125 17.1875V9.6875C3.125 9.3418 3.4043 9.0625 3.75 9.0625ZM4.53125 16.4062H15.4688V10.4688H4.53125V16.4062ZM10.5469 13.6914V14.7266C10.5469 14.8125 10.4766 14.8828 10.3906 14.8828H9.60938C9.52344 14.8828 9.45312 14.8125 9.45312 14.7266V13.6914C9.2919 13.5757 9.17156 13.4117 9.10943 13.2232C9.0473 13.0347 9.04659 12.8314 9.10738 12.6425C9.16818 12.4535 9.28736 12.2888 9.44777 12.1719C9.60817 12.055 9.80153 11.992 10 11.992C10.1985 11.992 10.3918 12.055 10.5522 12.1719C10.7126 12.2888 10.8318 12.4535 10.8926 12.6425C10.9534 12.8314 10.9527 13.0347 10.8906 13.2232C10.8284 13.4117 10.7081 13.5757 10.5469 13.6914Z",fill:"currentColor"})}),IZ=e=>d.jsx("svg",{focusable:"false","aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",...e,children:d.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"currentColor"})}),Ffe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M12.1518 17.6687H4.46843L4.46838 5.6875H8.89914L11.6888 8.36036H19.8476L19.8393 9.23122C19.8393 9.33435 19.9237 9.41872 20.0268 9.41872H21.3393C21.4424 9.41872 21.5268 9.33435 21.5268 9.23122L21.5351 7.42286C21.5351 7.00802 21.2 6.67286 20.7851 6.67286H12.3595L9.57825 4H3.53088C3.11604 4 2.78088 4.33516 2.78088 4.75L2.78093 18.6062C2.78093 19.0211 3.11609 19.3562 3.53093 19.3562H12.1518C12.2549 19.3562 12.3393 19.2718 12.3393 19.1687V17.8562C12.3393 17.7531 12.2549 17.6687 12.1518 17.6687ZM14.5916 14.9593C14.6338 14.1508 14.9713 13.3937 15.5479 12.8172C16.1619 12.2031 17.001 11.8562 17.8705 11.8562C18.7471 11.8562 19.5721 12.1984 20.1932 12.8172C20.2682 12.8922 20.3408 12.9718 20.4088 13.0539L19.8674 13.4734C19.8395 13.495 19.8182 13.524 19.8061 13.5572C19.7939 13.5903 19.7914 13.6262 19.7987 13.6607C19.8061 13.6953 19.823 13.727 19.8476 13.7523C19.8722 13.7777 19.9034 13.7955 19.9377 13.8039L22.1244 14.3312C22.2416 14.3593 22.3541 14.2703 22.3565 14.1508L22.3705 11.9148C22.3709 11.8796 22.3613 11.845 22.3429 11.815C22.3244 11.7849 22.2979 11.7607 22.2664 11.7451C22.2348 11.7294 22.1995 11.723 22.1644 11.7264C22.1294 11.7299 22.096 11.7432 22.0682 11.7648L21.5924 12.1351C20.7159 11.05 19.3729 10.3562 17.8705 10.3562C15.2948 10.3562 13.1924 12.3929 13.0893 14.9429C13.0846 15.0484 13.1713 15.1375 13.2768 15.1375H14.4041C14.5049 15.1375 14.5869 15.0601 14.5916 14.9593ZM22.4643 15.1375H21.3369C21.2362 15.1375 21.1541 15.2148 21.1494 15.3156C21.1073 16.1242 20.7697 16.8812 20.1932 17.4578C19.5791 18.0718 18.7401 18.4187 17.8705 18.4187C16.994 18.4187 16.169 18.0765 15.5479 17.4578C15.4729 17.3828 15.4002 17.3031 15.3323 17.2211L15.8737 16.8015C15.9016 16.7799 15.9228 16.7509 15.935 16.7178C15.9471 16.6846 15.9497 16.6487 15.9423 16.6142C15.935 16.5797 15.918 16.5479 15.8935 16.5226C15.8689 16.4973 15.8376 16.4794 15.8033 16.4711L13.6166 15.9437C13.4994 15.9156 13.3869 16.0047 13.3846 16.1242L13.3705 18.3601C13.3702 18.3954 13.3798 18.43 13.3982 18.46C13.4166 18.49 13.4431 18.5142 13.4747 18.5299C13.5062 18.5455 13.5416 18.552 13.5766 18.5485C13.6117 18.545 13.645 18.5317 13.6729 18.5101L14.1487 18.1398C15.0252 19.225 16.3682 19.9187 17.8705 19.9187C20.4463 19.9187 22.5487 17.882 22.6518 15.332C22.6565 15.2265 22.5698 15.1375 22.4643 15.1375Z",fill:"currentColor"})}),Ufe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M20.625 6.99375H12.2109L9.46172 4.36406C9.42674 4.33132 9.38073 4.31291 9.33281 4.3125H3.375C2.96016 4.3125 2.625 4.64766 2.625 5.0625V18.9375C2.625 19.3523 2.96016 19.6875 3.375 19.6875H20.625C21.0398 19.6875 21.375 19.3523 21.375 18.9375V7.74375C21.375 7.32891 21.0398 6.99375 20.625 6.99375ZM19.6875 18H4.3125V6H8.73047L11.5336 8.68125H19.6875V18Z",fill:"currentColor"})}),B8=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M21.4058 6.99375H12.9917L10.2425 4.36406C10.2075 4.33132 10.1615 4.31291 10.1136 4.3125H4.15576C3.74092 4.3125 3.40576 4.64766 3.40576 5.0625V18.9375C3.40576 19.3523 3.74092 19.6875 4.15576 19.6875H21.4058C21.8206 19.6875 22.1558 19.3523 22.1558 18.9375V7.74375C22.1558 7.32891 21.8206 6.99375 21.4058 6.99375ZM20.4683 18H5.09326V6H9.51123L12.3144 8.68125H20.4683V18Z",fill:"currentColor"}),d.jsx("path",{d:"M12.9455 10.072C12.928 10.0496 12.9056 10.0315 12.88 10.019C12.8544 10.0066 12.8263 10.0001 12.7979 10.0001C12.7694 10.0001 12.7413 10.0066 12.7158 10.019C12.6902 10.0315 12.6678 10.0496 12.6502 10.072L10.0252 13.3931C9.92913 13.515 10.0159 13.6955 10.1729 13.6955H11.9096V16.5C11.9096 16.6031 11.994 16.6875 12.0971 16.6875H13.5034C13.6065 16.6875 13.6909 16.6031 13.6909 16.5V13.6978H15.4229C15.5799 13.6978 15.6666 13.5174 15.5705 13.3955L12.9455 10.072Z",fill:"currentColor"})]}),Gfe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M11.8523 15.4922C11.8699 15.5146 11.8923 15.5327 11.9179 15.5452C11.9435 15.5577 11.9715 15.5641 12 15.5641C12.0285 15.5641 12.0565 15.5577 12.0821 15.5452C12.1077 15.5327 12.1301 15.5146 12.1477 15.4922L14.7727 12.1711C14.8687 12.0492 14.782 11.8687 14.625 11.8687H12.8883V3.9375C12.8883 3.83437 12.8039 3.75 12.7008 3.75H11.2945C11.1914 3.75 11.107 3.83437 11.107 3.9375V11.8664H9.375C9.21797 11.8664 9.13125 12.0469 9.22734 12.1688L11.8523 15.4922ZM20.5781 14.6719H19.1719C19.0688 14.6719 18.9844 14.7563 18.9844 14.8594V18.4688H5.01562V14.8594C5.01562 14.7563 4.93125 14.6719 4.82812 14.6719H3.42188C3.31875 14.6719 3.23438 14.7563 3.23438 14.8594V19.5C3.23438 19.9148 3.56953 20.25 3.98438 20.25H20.0156C20.4305 20.25 20.7656 19.9148 20.7656 19.5V14.8594C20.7656 14.7563 20.6812 14.6719 20.5781 14.6719Z",fill:"currentColor"})}),Ma=e=>d.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M9.91406 2.96875H11.0859C11.1901 2.96875 11.2422 3.02083 11.2422 3.125V16.875C11.2422 16.9792 11.1901 17.0312 11.0859 17.0312H9.91406C9.8099 17.0312 9.75781 16.9792 9.75781 16.875V3.125C9.75781 3.02083 9.8099 2.96875 9.91406 2.96875Z",fill:"currentColor"}),d.jsx("path",{d:"M3.9375 9.25781H17.0625C17.1667 9.25781 17.2188 9.3099 17.2188 9.41406V10.5859C17.2188 10.6901 17.1667 10.7422 17.0625 10.7422H3.9375C3.83333 10.7422 3.78125 10.6901 3.78125 10.5859V9.41406C3.78125 9.3099 3.83333 9.25781 3.9375 9.25781Z",fill:"currentColor"})]}),zfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM12 20.7188C7.18594 20.7188 3.28125 16.8141 3.28125 12C3.28125 7.18594 7.18594 3.28125 12 3.28125C16.8141 3.28125 20.7188 7.18594 20.7188 12C20.7188 16.8141 16.8141 20.7188 12 20.7188Z",fill:"currentColor","fill-opacity":"0.45"}),d.jsx("path",{d:"M14.6156 7.42266C13.9125 6.80625 12.9844 6.46875 12 6.46875C11.0156 6.46875 10.0875 6.80859 9.38438 7.42266C8.65312 8.0625 8.25 8.92266 8.25 9.84375V10.0219C8.25 10.125 8.33437 10.2094 8.4375 10.2094H9.5625C9.66562 10.2094 9.75 10.125 9.75 10.0219V9.84375C9.75 8.81016 10.7602 7.96875 12 7.96875C13.2398 7.96875 14.25 8.81016 14.25 9.84375C14.25 10.5727 13.7344 11.2406 12.9352 11.5477C12.4383 11.7375 12.0164 12.0703 11.7141 12.5062C11.407 12.9516 11.2477 13.4859 11.2477 14.0273V14.5312C11.2477 14.6344 11.332 14.7188 11.4352 14.7188H12.5602C12.6633 14.7188 12.7477 14.6344 12.7477 14.5312V13.9992C12.7489 13.7717 12.8186 13.5498 12.9478 13.3625C13.077 13.1752 13.2596 13.0312 13.4719 12.9492C14.8547 12.4172 15.7477 11.1984 15.7477 9.84375C15.75 8.92266 15.3469 8.0625 14.6156 7.42266ZM11.0625 17.1562C11.0625 17.4049 11.1613 17.6433 11.3371 17.8192C11.5129 17.995 11.7514 18.0938 12 18.0938C12.2486 18.0938 12.4871 17.995 12.6629 17.8192C12.8387 17.6433 12.9375 17.4049 12.9375 17.1562C12.9375 16.9076 12.8387 16.6692 12.6629 16.4933C12.4871 16.3175 12.2486 16.2188 12 16.2188C11.7514 16.2188 11.5129 16.3175 11.3371 16.4933C11.1613 16.6692 11.0625 16.9076 11.0625 17.1562Z",fill:"currentColor","fill-opacity":"0.45"})]}),Hfe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z",fill:"currentColor"})}),F8=e=>d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M5.0332 14.6875C5.07227 14.6875 5.11133 14.6836 5.15039 14.6777L8.43555 14.1016C8.47461 14.0938 8.51172 14.0762 8.53906 14.0469L16.8184 5.76758C16.8365 5.74951 16.8508 5.72805 16.8606 5.70442C16.8704 5.68079 16.8755 5.65546 16.8755 5.62988C16.8755 5.6043 16.8704 5.57897 16.8606 5.55535C16.8508 5.53172 16.8365 5.51026 16.8184 5.49219L13.5723 2.24414C13.5352 2.20703 13.4863 2.1875 13.4336 2.1875C13.3809 2.1875 13.332 2.20703 13.2949 2.24414L5.01562 10.5234C4.98633 10.5527 4.96875 10.5879 4.96094 10.627L4.38477 13.9121C4.36577 14.0167 4.37255 14.1244 4.40454 14.2258C4.43654 14.3273 4.49276 14.4193 4.56836 14.4941C4.69727 14.6191 4.85938 14.6875 5.0332 14.6875ZM6.34961 11.2812L13.4336 4.19922L14.8652 5.63086L7.78125 12.7129L6.04492 13.0195L6.34961 11.2812ZM17.1875 16.3281H2.8125C2.4668 16.3281 2.1875 16.6074 2.1875 16.9531V17.6562C2.1875 17.7422 2.25781 17.8125 2.34375 17.8125H17.6562C17.7422 17.8125 17.8125 17.7422 17.8125 17.6562V16.9531C17.8125 16.6074 17.5332 16.3281 17.1875 16.3281Z",fill:"currentColor"})}),qfe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M9.3125 5.75H2.8125C2.70937 5.75 2.625 5.83437 2.625 5.9375V7.4375C2.625 7.54062 2.70937 7.625 2.8125 7.625H9.3125C9.41563 7.625 9.5 7.54062 9.5 7.4375V5.9375C9.5 5.83437 9.41563 5.75 9.3125 5.75ZM21.1875 16.375H2.8125C2.70937 16.375 2.625 16.4594 2.625 16.5625V18.0625C2.625 18.1656 2.70937 18.25 2.8125 18.25H21.1875C21.2906 18.25 21.375 18.1656 21.375 18.0625V16.5625C21.375 16.4594 21.2906 16.375 21.1875 16.375ZM15.8125 11.0625H2.8125C2.70937 11.0625 2.625 11.1469 2.625 11.25V12.75C2.625 12.8531 2.70937 12.9375 2.8125 12.9375H15.8125C15.9156 12.9375 16 12.8531 16 12.75V11.25C16 11.1469 15.9156 11.0625 15.8125 11.0625Z",fill:"currentColor"})}),Kfe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M9.3125 18.25H2.8125C2.70937 18.25 2.625 18.1656 2.625 18.0625V16.5625C2.625 16.4594 2.70937 16.375 2.8125 16.375H9.3125C9.41563 16.375 9.5 16.4594 9.5 16.5625V18.0625C9.5 18.1656 9.41563 18.25 9.3125 18.25ZM21.1875 7.625H2.8125C2.70937 7.625 2.625 7.54062 2.625 7.4375V5.9375C2.625 5.83438 2.70937 5.75 2.8125 5.75H21.1875C21.2906 5.75 21.375 5.83438 21.375 5.9375V7.4375C21.375 7.54062 21.2906 7.625 21.1875 7.625ZM15.8125 12.9375H2.8125C2.70937 12.9375 2.625 12.8531 2.625 12.75V11.25C2.625 11.1469 2.70937 11.0625 2.8125 11.0625H15.8125C15.9156 11.0625 16 11.1469 16 11.25V12.75C16 12.8531 15.9156 12.9375 15.8125 12.9375Z",fill:"currentColor"})}),PZ=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M20.6274 3.60938H3.37275C2.79853 3.60938 2.43994 4.23516 2.72822 4.73438L8.17978 14.0016V19.6406C8.17978 20.0555 8.51259 20.3906 8.92509 20.3906H15.0751C15.4876 20.3906 15.8204 20.0555 15.8204 19.6406V14.0016L21.2743 4.73438C21.5602 4.23516 21.2017 3.60938 20.6274 3.60938ZM14.1423 18.7031H9.85791V15.0469H14.1446V18.7031H14.1423ZM14.3673 13.1578L14.1446 13.5469H9.85556L9.63291 13.1578L4.98525 5.29688H19.0149L14.3673 13.1578Z",fill:"currentColor"})}),Yfe=e=>d.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:d.jsx("path",{d:"M22.0829 11.3953C19.8611 6.71484 16.5025 4.35938 12.0001 4.35938C7.49545 4.35938 4.1392 6.71484 1.91732 11.3977C1.8282 11.5864 1.78198 11.7925 1.78198 12.0012C1.78198 12.2099 1.8282 12.416 1.91732 12.6047C4.1392 17.2852 7.49779 19.6406 12.0001 19.6406C16.5048 19.6406 19.8611 17.2852 22.0829 12.6023C22.2634 12.2227 22.2634 11.782 22.0829 11.3953ZM12.0001 17.9531C8.21967 17.9531 5.4517 16.0359 3.49935 12C5.4517 7.96406 8.21967 6.04688 12.0001 6.04688C15.7806 6.04688 18.5486 7.96406 20.5009 12C18.5509 16.0359 15.7829 17.9531 12.0001 17.9531ZM11.9064 7.875C9.62826 7.875 7.78139 9.72188 7.78139 12C7.78139 14.2781 9.62826 16.125 11.9064 16.125C14.1845 16.125 16.0314 14.2781 16.0314 12C16.0314 9.72188 14.1845 7.875 11.9064 7.875ZM11.9064 14.625C10.4556 14.625 9.28139 13.4508 9.28139 12C9.28139 10.5492 10.4556 9.375 11.9064 9.375C13.3572 9.375 14.5314 10.5492 14.5314 12C14.5314 13.4508 13.3572 14.625 11.9064 14.625Z",fill:"currentColor"})}),Zfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M22.0829 11.3957C21.259 9.65996 20.2786 8.24434 19.1415 7.14887L17.949 8.34137C18.9215 9.27067 19.7685 10.4864 20.5009 12.0004C18.5509 16.0364 15.7829 17.9536 12.0001 17.9536C10.8647 17.9536 9.81881 17.7787 8.86256 17.429L7.57045 18.7211C8.89857 19.3344 10.3751 19.6411 12.0001 19.6411C16.5048 19.6411 19.8658 17.295 22.0829 12.6028C22.1721 12.4141 22.2183 12.208 22.2183 11.9993C22.2183 11.7906 22.1721 11.5845 22.0829 11.3957ZM20.593 3.88074L19.5939 2.88043C19.5765 2.863 19.5558 2.84917 19.533 2.83973C19.5103 2.8303 19.4859 2.82544 19.4612 2.82544C19.4366 2.82544 19.4122 2.8303 19.3894 2.83973C19.3667 2.84917 19.346 2.863 19.3286 2.88043L16.7652 5.44262C15.3519 4.72074 13.7636 4.35981 12.0001 4.35981C7.49545 4.35981 4.13451 6.7059 1.91732 11.3981C1.8282 11.5868 1.78198 11.7929 1.78198 12.0016C1.78198 12.2103 1.8282 12.4164 1.91732 12.6051C2.8031 14.4707 3.86951 15.9661 5.11654 17.0913L2.63639 19.5707C2.60125 19.6059 2.58151 19.6536 2.58151 19.7033C2.58151 19.753 2.60125 19.8007 2.63639 19.8358L3.63693 20.8364C3.67209 20.8715 3.71976 20.8912 3.76947 20.8912C3.81918 20.8912 3.86685 20.8715 3.90201 20.8364L20.593 4.14606C20.6105 4.12864 20.6243 4.10796 20.6337 4.0852C20.6432 4.06244 20.648 4.03804 20.648 4.0134C20.648 3.98876 20.6432 3.96436 20.6337 3.9416C20.6243 3.91884 20.6105 3.89816 20.593 3.88074ZM3.49935 12.0004C5.4517 7.96449 8.21967 6.04731 12.0001 6.04731C13.2784 6.04731 14.4407 6.26668 15.4951 6.7127L13.8475 8.36035C13.0672 7.94402 12.1737 7.7895 11.2989 7.9196C10.4241 8.0497 9.61425 8.45752 8.98887 9.08291C8.36348 9.7083 7.95565 10.5181 7.82555 11.3929C7.69546 12.2678 7.84997 13.1612 8.26631 13.9415L6.31115 15.8967C5.22904 14.9416 4.29623 13.6476 3.49935 12.0004ZM9.28139 12.0004C9.2818 11.5871 9.37969 11.1798 9.56711 10.8114C9.75454 10.4431 10.0262 10.1242 10.3601 9.88053C10.6939 9.63691 11.0805 9.47547 11.4885 9.40933C11.8964 9.34319 12.3142 9.37421 12.7079 9.49988L9.40584 12.802C9.32307 12.5429 9.28109 12.2725 9.28139 12.0004Z",fill:"currentColor"}),d.jsx("path",{d:"M11.9066 14.6252C11.8255 14.6252 11.7456 14.6215 11.6664 14.6142L10.4284 15.8522C11.173 16.1373 11.9842 16.2007 12.7641 16.0346C13.5439 15.8685 14.2589 15.4801 14.8227 14.9163C15.3865 14.3526 15.7749 13.6375 15.941 12.8577C16.1071 12.0779 16.0437 11.2666 15.7585 10.522L14.5206 11.76C14.5278 11.8392 14.5316 11.9191 14.5316 12.0002C14.5318 12.345 14.464 12.6864 14.3322 13.005C14.2003 13.3236 14.007 13.613 13.7632 13.8568C13.5194 14.1006 13.2299 14.2939 12.9114 14.4258C12.5928 14.5576 12.2514 14.6254 11.9066 14.6252Z",fill:"currentColor"})]}),Xfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M22.5 12.5521V22L11.125 20.5276V12.4856L22.5 12.5521Z",fill:"currentColor"}),d.jsx("path",{d:"M9.875 12.4783V20.3771L1.5 19.3006V12.4294L9.875 12.4783Z",fill:"currentColor"}),d.jsx("path",{d:"M9.875 11.5215L1.5 11.5706V4.82209L9.875 3.69658V11.5215Z",fill:"currentColor"}),d.jsx("path",{d:"M22.5 11.4479L11.125 11.5142V3.53374L22.5 2V11.4479Z",fill:"currentColor"})]}),Wfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M13.4938 7.40476C13.6142 7.38335 13.6498 7.39975 13.6001 7.529C11.9172 8.82338 11.0592 8.87251 9.70401 7.7775C9.67281 7.6349 9.7096 7.61384 9.84569 7.65325C11.0599 8.82788 11.8862 8.68186 13.4938 7.40476Z",fill:"currentColor"}),d.jsx("path",{d:"M10.9437 6.7214C11.0219 6.7214 11.0853 6.74922 11.0853 6.78352C11.0853 6.81782 11.0219 6.84564 10.9437 6.84564C10.8654 6.84564 10.802 6.81782 10.802 6.78352C10.802 6.74922 10.8654 6.72141 10.9437 6.7214Z",fill:"currentColor"}),d.jsx("path",{d:"M11.9354 6.7214C12.0136 6.7214 12.0771 6.74922 12.0771 6.78352C12.0771 6.81782 12.0136 6.84564 11.9354 6.84564C11.8572 6.84564 11.7937 6.81782 11.7937 6.78352C11.7937 6.74922 11.8572 6.72141 11.9354 6.7214Z",fill:"currentColor"}),d.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.3613 2C13.1685 2.01874 13.8017 2.14654 14.2962 2.3944C14.7914 2.64263 15.1449 3.00992 15.395 3.50286C15.8929 4.48406 15.9834 5.96771 15.9731 8.0155C17.7499 10.0582 18.8446 11.5084 19.4081 12.6945C19.9691 13.8756 20.0038 14.796 19.6626 15.7785C20.0483 16.0072 20.2935 16.2186 20.4425 16.4777C20.5927 16.7388 20.6432 17.0445 20.6482 17.457C21.004 17.8169 21.246 18.1215 21.3785 18.3869C21.5123 18.655 21.5355 18.8856 21.4484 19.0928C21.3617 19.2991 21.168 19.4767 20.8815 19.644C20.5954 19.811 20.2131 19.9696 19.7434 20.1368C19.1836 20.417 18.9053 20.6201 18.4434 21.0306C18.1946 21.3061 17.9823 21.496 17.7408 21.6398C17.4988 21.7839 17.2293 21.8804 16.8684 21.9715L16.8652 21.9723L16.8619 21.9726C16.1501 22.0323 15.6561 21.9991 15.276 21.8271C14.8989 21.6564 14.6403 21.3518 14.3904 20.8823C12.6962 20.6166 11.7276 20.615 9.97401 20.8827C9.72145 21.2574 9.45393 21.4944 9.06039 21.6199C8.66499 21.746 8.14684 21.758 7.39826 21.6931L7.39197 21.6925L7.3863 21.6901C6.09494 21.1401 5.31423 20.9674 3.82228 20.8855L3.81875 20.8853L3.81537 20.8846C3.53942 20.8203 3.31102 20.7592 3.12677 20.6958C2.9428 20.6324 2.80074 20.5659 2.69877 20.49C2.59609 20.4135 2.53357 20.3272 2.51034 20.2253C2.48729 20.1242 2.5036 20.0111 2.55108 19.8821L2.55157 19.8809L2.55212 19.8797C2.67027 19.6301 2.74809 19.4329 2.78829 19.2243C2.82836 19.0165 2.83127 18.7957 2.7977 18.4991C2.63678 17.9554 2.58597 17.5623 2.7317 17.2671C2.87886 16.9692 3.22102 16.7803 3.81336 16.6316C4.09686 16.5462 4.3008 16.4436 4.48376 16.2923C4.66596 16.1416 4.82871 15.9415 5.02846 15.6585C4.99855 14.645 5.13247 13.8294 5.54431 12.9751C5.957 12.119 6.64798 11.2259 7.72845 10.0565L7.72886 10.0561L7.72928 10.0556C8.10356 9.68056 8.34675 9.38152 8.51977 9.07202C8.69234 8.76332 8.79598 8.44261 8.88931 8.02302C8.87207 7.03434 8.86443 6.16888 8.91615 5.42614C8.96792 4.68275 9.07927 4.05998 9.30126 3.55813C9.52361 3.05548 9.85727 2.67358 10.353 2.41357C10.8479 2.15399 11.5012 2.01753 12.3596 2H12.3613ZM16.2565 15.6051C15.0877 16.1021 15.9377 18.059 14.8043 20.109C14.4855 21.1341 16.1856 22.0659 17.3545 21.3515C18.5468 20.3226 19.1528 19.8901 20.0463 19.5499C21.3623 19.1768 21.5062 18.7809 20.3296 17.6241C20.0312 16.2021 19.671 15.9431 18.8066 16.1021C17.1982 17.043 16.5699 17.0636 16.2565 15.6051ZM7.01219 16.2263C6.58716 15.3566 5.56282 15.3099 4.70997 16.5059C3.25359 17.031 2.77186 17.4514 3.18696 18.6802C2.75028 19.973 2.86141 20.4283 4.14327 20.4197C5.43425 20.5666 6.16315 20.7488 7.47263 21.2583C8.96022 21.6932 10.377 20.6682 9.34982 19.4257C8.22885 18.2779 7.71712 17.5762 7.01219 16.2263ZM14.1668 8.21236C12.1714 9.48564 11.1659 9.69958 9.73943 8.46086C9.66858 10.8837 7.40179 12.2815 7.40179 15.1392C6.53243 13.9441 6.63949 13.0966 7.82682 11.2875C5.77528 13.9328 5.8045 15.1886 9.03105 16.8165C10.2202 17.5631 10.1261 17.9541 9.03105 18.6181C11.314 20.4054 12.5723 20.1131 14.8043 18.8666C15.5481 18.4628 14.5564 15.7293 16.1856 15.2634C16.3981 14.1452 18.6295 14.5645 18.9837 15.7293C19.4835 15.4783 19.2456 15.2022 17.8503 14.4558C17.9903 12.6673 17.5383 11.9125 16.1856 10.8216C17.2878 12.0728 17.677 12.8131 17.3899 14.3005H16.7878C16.4336 12.0019 14.4501 10.4488 14.1668 8.21236ZM12.1125 6.4729C11.475 6.25548 11.227 6.25548 10.8728 6.4729L9.56234 7.31157C9.27901 7.46688 9.279 7.74644 9.56234 7.96387L10.8728 8.80254C11.3343 9.04151 11.5812 9.08208 12.1125 8.8336L13.8834 7.96387C14.3084 7.7775 14.3084 7.40476 13.8834 7.18732L12.1125 6.4729ZM11.0853 6.19335C11.0145 4.11221 8.53518 4.76451 9.73943 7.00095L10.0936 6.78352C9.24356 5.51 10.8374 5.16831 10.6603 6.44184L11.0853 6.19335ZM13.848 7.00095C14.9814 4.70238 11.9 4.05008 11.9 6.25547L12.3958 6.44184C12.4667 4.85769 14.0251 5.50998 13.2813 6.78352L13.848 7.00095Z",fill:"currentColor"})]}),Qfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M17.7391 7.68658H6.26087V16.9919C6.26087 17.3796 6.26087 17.7674 6.78261 17.7674H8.47826V21.1276C8.47826 22.2908 10.9565 22.2908 10.9565 21.1276V17.7674H13.0435V21.1276C13.0435 22.2908 15.5217 22.2908 15.5217 21.1276V17.7674H17.2174C17.7391 17.7674 17.7391 17.3796 17.7391 16.9919V7.68658Z",fill:"currentColor"}),d.jsx("path",{d:"M21 8.46202C21 7.29885 18.5217 7.29886 18.5217 8.46202V14.4071C18.5217 15.5703 21 15.5703 21 14.4071V8.46202Z",fill:"currentColor"}),d.jsx("path",{d:"M5.47826 8.46202C5.47826 7.29886 3 7.29886 3 8.46202V14.4071C3 15.5703 5.47826 15.5703 5.47826 14.4071V8.46202Z",fill:"currentColor"}),d.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.26087 6.65266C6.26089 0.449111 17.7391 0.449114 17.7391 6.65266H6.26087ZM9.45652 3.87398C9.0243 3.87398 8.67391 4.22116 8.67391 4.64943C8.67392 5.07769 9.0243 5.42487 9.45652 5.42487C9.88874 5.42487 10.2391 5.07769 10.2391 4.64943C10.2391 4.22116 9.88874 3.87398 9.45652 3.87398ZM14.5435 3.87398C14.1113 3.87398 13.7609 4.22116 13.7609 4.64943C13.7609 5.07769 14.1113 5.42487 14.5435 5.42487C14.9757 5.42487 15.3261 5.07769 15.3261 4.64943C15.3261 4.22116 14.9757 3.87398 14.5435 3.87398Z",fill:"currentColor"})]}),Jfe=e=>d.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[d.jsx("path",{d:"M13.6548 7.33769C12.4392 7.94132 11.7342 7.87734 10.452 7.33769C9.05986 6.7538 8.27893 6.73986 6.88655 7.33769C2.65646 10.0986 3.26075 16.786 7.49086 21.3261C8.57404 22.2627 9.4863 22.1857 11.4793 21.3261C11.9023 21.142 12.99 21.142 13.3526 21.3261C15.1051 22.185 16.4346 22.3077 17.4015 21.142C18.7249 19.7025 19.2471 18.709 20 16.786C16.7367 15.2522 16.4346 10.6507 19.4561 8.81016C17.7641 6.60145 15.4073 6.47875 13.6548 7.33769Z",fill:"currentColor"}),d.jsx("path",{d:"M11.9628 6.60145C12.3883 3.59507 13.3918 2.69895 15.9512 2C15.524 5.04358 14.7406 6.15005 11.9628 6.60145Z",fill:"currentColor"})]}),ehe=e=>d.jsxs("svg",{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",...e,children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("path",{d:"m9 12 2 2 4-4"})]}),the=e=>d.jsxs("svg",{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",...e,children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("path",{d:"M12 16v-4"}),d.jsx("path",{d:"M12 8h.01"})]}),nhe=e=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"inherit",...e,children:[d.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),d.jsx("path",{d:"M12 9v4"}),d.jsx("path",{d:"M12 17h.01"})]}),Xy=({children:e,className:t,isOpen:n,onToggle:r,defaultOpen:s=!1})=>{const a=n!==void 0&&r!==void 0,[i,l]=y.useState(s),u=a?n:i,f=y.useCallback(()=>{a&&r?r():l(g=>!g)},[a,r]),h=y.useMemo(()=>({isOpen:u,toggleIsOpen:f}),[u,f]);return d.jsx(aY.Provider,{value:h,children:d.jsx("div",{className:We("border-2 border-panel rounded-xs text-text",t),children:e})})};Xy.Header=({children:e,className:t})=>{const{isOpen:n,toggleIsOpen:r}=iY();return d.jsxs("div",{className:We("pr-4 pl-[42px] text-text min-h-[52px] flex items-center gap-2.5 relative cursor-pointer",{"border-b-2 border-b-panel":n},t),onClick:()=>r(),children:[e,d.jsx(Lg.div,{className:"absolute left-4 top-1/2 transform -translate-y-1/2",animate:{rotate:n?0:-90},transition:{duration:.3},children:d.jsx(ec,{width:"16",height:"16"})})]})};Xy.Body=({children:e,className:t})=>{const{isOpen:n}=iY(),r=y.useId();return d.jsx(uY,{initial:!1,children:n&&d.jsx(Lg.div,{initial:"collapsed",animate:"open",exit:"collapsed",variants:rhe,transition:she,className:We("px-4 py-2.5 flex flex-col gap-2.5 overflow-hidden",t),children:e},r)})};const rhe={open:{height:"auto",opacity:1},collapsed:{height:0,opacity:0}},she={duration:.3,ease:"easeOut"};var Yw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qj,aI;function U8(){if(aI)return Qj;aI=1;var e=Array.isArray;return Qj=e,Qj}var Jj,iI;function ahe(){if(iI)return Jj;iI=1;var e=typeof Yw=="object"&&Yw&&Yw.Object===Object&&Yw;return Jj=e,Jj}var eE,oI;function G8(){if(oI)return eE;oI=1;var e=ahe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return eE=n,eE}var tE,lI;function z8(){if(lI)return tE;lI=1;var e=G8(),t=e.Symbol;return tE=t,tE}var nE,uI;function ihe(){if(uI)return nE;uI=1;var e=z8(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,s=e?e.toStringTag:void 0;function a(i){var l=n.call(i,s),u=i[s];try{i[s]=void 0;var f=!0}catch{}var h=r.call(i);return f&&(l?i[s]=u:delete i[s]),h}return nE=a,nE}var rE,cI;function ohe(){if(cI)return rE;cI=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return rE=n,rE}var sE,dI;function DZ(){if(dI)return sE;dI=1;var e=z8(),t=ihe(),n=ohe(),r="[object Null]",s="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?s:r:a&&a in Object(l)?t(l):n(l)}return sE=i,sE}var aE,fI;function lhe(){if(fI)return aE;fI=1;function e(t){return t!=null&&typeof t=="object"}return aE=e,aE}var iE,hI;function H8(){if(hI)return iE;hI=1;var e=DZ(),t=lhe(),n="[object Symbol]";function r(s){return typeof s=="symbol"||t(s)&&e(s)==n}return iE=r,iE}var oE,pI;function uhe(){if(pI)return oE;pI=1;var e=U8(),t=H8(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(a,i){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||i!=null&&a in Object(i)}return oE=s,oE}var lE,mI;function VZ(){if(mI)return lE;mI=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return lE=e,lE}var uE,gI;function che(){if(gI)return uE;gI=1;var e=DZ(),t=VZ(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",a="[object Proxy]";function i(l){if(!t(l))return!1;var u=e(l);return u==r||u==s||u==n||u==a}return uE=i,uE}var cE,vI;function dhe(){if(vI)return cE;vI=1;var e=G8(),t=e["__core-js_shared__"];return cE=t,cE}var dE,yI;function fhe(){if(yI)return dE;yI=1;var e=dhe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return dE=n,dE}var fE,xI;function hhe(){if(xI)return fE;xI=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return fE=n,fE}var hE,bI;function phe(){if(bI)return hE;bI=1;var e=che(),t=fhe(),n=VZ(),r=hhe(),s=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){if(!n(v)||t(v))return!1;var w=e(v)?h:a;return w.test(r(v))}return hE=g,hE}var pE,wI;function mhe(){if(wI)return pE;wI=1;function e(t,n){return t?.[n]}return pE=e,pE}var mE,CI;function BZ(){if(CI)return mE;CI=1;var e=phe(),t=mhe();function n(r,s){var a=t(r,s);return e(a)?a:void 0}return mE=n,mE}var gE,SI;function y2(){if(SI)return gE;SI=1;var e=BZ(),t=e(Object,"create");return gE=t,gE}var vE,_I;function ghe(){if(_I)return vE;_I=1;var e=y2();function t(){this.__data__=e?e(null):{},this.size=0}return vE=t,vE}var yE,jI;function vhe(){if(jI)return yE;jI=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return yE=e,yE}var xE,EI;function yhe(){if(EI)return xE;EI=1;var e=y2(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(a){var i=this.__data__;if(e){var l=i[a];return l===t?void 0:l}return r.call(i,a)?i[a]:void 0}return xE=s,xE}var bE,$I;function xhe(){if($I)return bE;$I=1;var e=y2(),t=Object.prototype,n=t.hasOwnProperty;function r(s){var a=this.__data__;return e?a[s]!==void 0:n.call(a,s)}return bE=r,bE}var wE,RI;function bhe(){if(RI)return wE;RI=1;var e=y2(),t="__lodash_hash_undefined__";function n(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&s===void 0?t:s,this}return wE=n,wE}var CE,OI;function whe(){if(OI)return CE;OI=1;var e=ghe(),t=vhe(),n=yhe(),r=xhe(),s=bhe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,CE=a,CE}var SE,TI;function Che(){if(TI)return SE;TI=1;function e(){this.__data__=[],this.size=0}return SE=e,SE}var _E,AI;function She(){if(AI)return _E;AI=1;function e(t,n){return t===n||t!==t&&n!==n}return _E=e,_E}var jE,kI;function x2(){if(kI)return jE;kI=1;var e=She();function t(n,r){for(var s=n.length;s--;)if(e(n[s][0],r))return s;return-1}return jE=t,jE}var EE,NI;function _he(){if(NI)return EE;NI=1;var e=x2(),t=Array.prototype,n=t.splice;function r(s){var a=this.__data__,i=e(a,s);if(i<0)return!1;var l=a.length-1;return i==l?a.pop():n.call(a,i,1),--this.size,!0}return EE=r,EE}var $E,LI;function jhe(){if(LI)return $E;LI=1;var e=x2();function t(n){var r=this.__data__,s=e(r,n);return s<0?void 0:r[s][1]}return $E=t,$E}var RE,MI;function Ehe(){if(MI)return RE;MI=1;var e=x2();function t(n){return e(this.__data__,n)>-1}return RE=t,RE}var OE,II;function $he(){if(II)return OE;II=1;var e=x2();function t(n,r){var s=this.__data__,a=e(s,n);return a<0?(++this.size,s.push([n,r])):s[a][1]=r,this}return OE=t,OE}var TE,PI;function Rhe(){if(PI)return TE;PI=1;var e=Che(),t=_he(),n=jhe(),r=Ehe(),s=$he();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,TE=a,TE}var AE,DI;function Ohe(){if(DI)return AE;DI=1;var e=BZ(),t=G8(),n=e(t,"Map");return AE=n,AE}var kE,VI;function The(){if(VI)return kE;VI=1;var e=whe(),t=Rhe(),n=Ohe();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return kE=r,kE}var NE,BI;function Ahe(){if(BI)return NE;BI=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return NE=e,NE}var LE,FI;function b2(){if(FI)return LE;FI=1;var e=Ahe();function t(n,r){var s=n.__data__;return e(r)?s[typeof r=="string"?"string":"hash"]:s.map}return LE=t,LE}var ME,UI;function khe(){if(UI)return ME;UI=1;var e=b2();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return ME=t,ME}var IE,GI;function Nhe(){if(GI)return IE;GI=1;var e=b2();function t(n){return e(this,n).get(n)}return IE=t,IE}var PE,zI;function Lhe(){if(zI)return PE;zI=1;var e=b2();function t(n){return e(this,n).has(n)}return PE=t,PE}var DE,HI;function Mhe(){if(HI)return DE;HI=1;var e=b2();function t(n,r){var s=e(this,n),a=s.size;return s.set(n,r),this.size+=s.size==a?0:1,this}return DE=t,DE}var VE,qI;function Ihe(){if(qI)return VE;qI=1;var e=The(),t=khe(),n=Nhe(),r=Lhe(),s=Mhe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,VE=a,VE}var BE,KI;function Phe(){if(KI)return BE;KI=1;var e=Ihe(),t="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var a=function(){var i=arguments,l=s?s.apply(this,i):i[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,i);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,BE=n,BE}var FE,YI;function Dhe(){if(YI)return FE;YI=1;var e=Phe(),t=500;function n(r){var s=e(r,function(i){return a.size===t&&a.clear(),i}),a=s.cache;return s}return FE=n,FE}var UE,ZI;function Vhe(){if(ZI)return UE;ZI=1;var e=Dhe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(t,function(i,l,u,f){a.push(u?f.replace(n,"$1"):l||i)}),a});return UE=r,UE}var GE,XI;function Bhe(){if(XI)return GE;XI=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r<s;)a[r]=n(t[r],r,t);return a}return GE=e,GE}var zE,WI;function Fhe(){if(WI)return zE;WI=1;var e=z8(),t=Bhe(),n=U8(),r=H8(),s=e?e.prototype:void 0,a=s?s.toString:void 0;function i(l){if(typeof l=="string")return l;if(n(l))return t(l,i)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return zE=i,zE}var HE,QI;function Uhe(){if(QI)return HE;QI=1;var e=Fhe();function t(n){return n==null?"":e(n)}return HE=t,HE}var qE,JI;function Ghe(){if(JI)return qE;JI=1;var e=U8(),t=uhe(),n=Vhe(),r=Uhe();function s(a,i){return e(a)?a:t(a,i)?[a]:n(r(a))}return qE=s,qE}var KE,eP;function zhe(){if(eP)return KE;eP=1;var e=H8();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return KE=t,KE}var YE,tP;function Hhe(){if(tP)return YE;tP=1;var e=Ghe(),t=zhe();function n(r,s){s=e(s,r);for(var a=0,i=s.length;r!=null&&a<i;)r=r[t(s[a++])];return a&&a==i?r:void 0}return YE=n,YE}var ZE,nP;function qhe(){if(nP)return ZE;nP=1;var e=Hhe();function t(n,r,s){var a=n==null?void 0:e(n,r);return a===void 0?s:a}return ZE=t,ZE}qhe();const _g=(e,t,n,r)=>{y.useEffect(()=>(e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}),[])},Khe=({top:e,left:t,children:n,...r})=>d.jsx(Lg.div,{className:We("fixed top-0 left-0 z-10","shadow-md shadow-bg","py-1.5 px-4","flex flex-col gap-2","min-w-[170px]","rounded","bg-panel","[&>*]:text-start"),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{top:e,left:t},...r,children:n}),Yhe=e=>{const t=({contextMenuChildren:n,className:r,contextMenuDataTestId:s,...a})=>{const[i,l]=y.useState(0),[u,f]=y.useState(0),[h,g]=y.useState(!1),v=C=>{C.preventDefault();const _=C.target,{top:E,height:$}=_.getBoundingClientRect();l(E+$),f(C.pageX),document.dispatchEvent(Zhe),g(!0)};_g(document,"wheel",()=>g(!1)),_g(document,"click",()=>g(!1)),_g(document,"closeContextMenu",()=>g(!1));const w=Array.isArray(n)?!n.length:!n;return d.jsxs(d.Fragment,{children:[d.jsx(e,{className:We("cursor-context-menu",r),onContextMenu:v,...a}),h&&!w&&d.jsx(Khe,{top:i,left:u,"data-testid":s,children:n})]})};return t.displayName=`${e.displayName}WithContextMenu`,t},Zhe=new CustomEvent("closeContextMenu"),Xhe={small:"h-[20px] w-[20px] border-t-1 border-t-text border-r-1 border-r-transparent",default:"h-7 w-7 border-t-[3px] border-t-text border-r-[3px] border-r-transparent"},ho=({size:e="default",className:t,...n})=>d.jsx("span",{className:We("inline-block rounded-full box-border animate-spin",Xhe[e],t),...n}),Whe="flex gap-1.5 items-center text-sm font-medium rounded-xs ease-in justify-center",Qhe={primary:"bg-primary text-black hover:bg-primary-light active:bg-primary-dark",secondary:"bg-secondary text-text hover:bg-secondary-light active:bg-secondary-dark",outlined:"bg-transparent border border-primary text-primary hover:border-primary-light active:border-primary-dark hover:text-primary-light active:text-primary-dark",dashed:"bg-transparent border border-dashed border-primary text-primary hover:border-primary-light active:border-primary-dark hover:text-primary-light active:text-primary-dark",filled:"bg-primary/20 text-primary hover:bg-primary/40 active:bg-primary/15",text:"bg-transparent text-primary hover:bg-primary/40 active:bg-primary/15",link:"bg-transparent text-primary [&]:h-auto [&]:p-0 hover:text-primary-light active:text-primary-dark",ghost:"bg-transparent text-text [&]:h-auto [&]:p-0 hover:brightness-120 active:brightness-90"},Jhe={primary:"bg-secondary text-secondary-light border border-secondary-light",secondary:"bg-secondary text-secondary-light border border-secondary-light",outlined:"bg-transparent border border-secondary-light text-secondary-light",dashed:"bg-transparent border border-dashed border-secondary-light text-secondary-light",filled:"bg-secondary/80 text-secondary-light",text:"bg-transparent text-secondary-light",link:"bg-transparent text-secondary-light [&]:h-auto [&]:p-0",ghost:"bg-transparent text-secondary-light [&]:h-auto [&]:p-0"},epe={primary:"[&]:border-black",secondary:"[&]:border-text",outlined:"[&]:border-primary",dashed:"[&]:border-primary",filled:"[&]:border-primary",text:"[&]:border-primary",link:"[&]:border-primary",ghost:"[&]:border-text"},tpe={small:"h-6 px-2",default:"h-8 px-4",large:"h-10 px-4"},npe={small:"h-6 px-0.5",default:"h-8 px-1",large:"h-10 px-2"},Fe=({className:e,variant:t="primary",size:n="default",type:r="button",children:s,onlyIcon:a=!1,disabled:i=!1,isLoading:l,...u})=>{var f;const h=y.useRef(null);return d.jsx("button",{ref:h,className:We("",Whe,i?"cursor-default":"cursor-pointer",i?Jhe[t]:Qhe[t],a?npe[n]:tpe[n],e),type:r,disabled:i||l,style:{minWidth:l?(f=h.current)==null?void 0:f.clientWidth:"unset"},...u,children:l?d.jsx(ho,{className:epe[t],size:"small"}):s})},q8=y.createContext({});function K8(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Y8=typeof window<"u",FZ=Y8?y.useLayoutEffect:y.useEffect,w2=y.createContext(null),Z8=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});let rpe=class extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=r instanceof HTMLElement&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function spe({children:e,isPresent:t,anchorX:n}){const r=y.useId(),s=y.useRef(null),a=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=y.useContext(Z8);return y.useInsertionEffect(()=>{const{width:l,height:u,top:f,left:h,right:g}=a.current;if(t||!s.current||!l||!u)return;const v=n==="left"?`left: ${h}`:`right: ${g}`;s.current.dataset.motionPopId=r;const w=document.createElement("style");return i&&(w.nonce=i),document.head.appendChild(w),w.sheet&&w.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${l}px !important;
            height: ${u}px !important;
            ${v}px !important;
            top: ${f}px !important;
          }
        `),()=>{document.head.contains(w)&&document.head.removeChild(w)}},[t]),d.jsx(rpe,{isPresent:t,childRef:s,sizeRef:a,children:y.cloneElement(e,{ref:s})})}const ape=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:i,anchorX:l})=>{const u=K8(ipe),f=y.useId();let h=!0,g=y.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:v=>{u.set(v,!0);for(const w of u.values())if(!w)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return a&&h&&(g={...g}),y.useMemo(()=>{u.forEach((v,w)=>u.set(w,!1))},[n]),y.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),i==="popLayout"&&(e=d.jsx(spe,{isPresent:n,anchorX:l,children:e})),d.jsx(w2.Provider,{value:g,children:e})};function ipe(){return new Map}function UZ(e=!0){const t=y.useContext(w2);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,a=y.useId();y.useEffect(()=>{if(e)return s(a)},[e]);const i=y.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const Zw=e=>e.key||"";function rP(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const GZ=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:a="sync",propagate:i=!1,anchorX:l="left"})=>{const[u,f]=UZ(i),h=y.useMemo(()=>rP(e),[e]),g=i&&!u?[]:h.map(Zw),v=y.useRef(!0),w=y.useRef(h),C=K8(()=>new Map),[_,E]=y.useState(h),[$,O]=y.useState(h);FZ(()=>{v.current=!1,w.current=h;for(let L=0;L<$.length;L++){const k=Zw($[L]);g.includes(k)?C.delete(k):C.get(k)!==!0&&C.set(k,!1)}},[$,g.length,g.join("-")]);const N=[];if(h!==_){let L=[...h];for(let k=0;k<$.length;k++){const T=$[k],P=Zw(T);g.includes(P)||(L.splice(k,0,T),N.push(T))}return a==="wait"&&N.length&&(L=N),O(rP(L)),E(h),null}const{forceRender:M}=y.useContext(q8);return d.jsx(d.Fragment,{children:$.map(L=>{const k=Zw(L),T=i&&!u?!1:h===$||g.includes(k),P=()=>{if(C.has(k))C.set(k,!0);else return;let V=!0;C.forEach(q=>{q||(V=!1)}),V&&(M?.(),O(w.current),i&&f?.(),r&&r())};return d.jsx(ape,{isPresent:T,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:a,onExitComplete:T?void 0:P,anchorX:l,children:L},k)})})};function X8(e,t){e.indexOf(t)===-1&&e.push(t)}function W8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Yu=(e,t,n)=>n>t?t:n<e?e:n;let Q8=()=>{};const Zu={},zZ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),HZ=e=>/^0[^.\s]+$/u.test(e);function J8(e){let t;return()=>(t===void 0&&(t=e()),t)}const oo=e=>e,ope=(e,t)=>n=>t(e(n)),rx=(...e)=>e.reduce(ope),S1=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};let eN=class{constructor(){this.subscriptions=[]}add(t){return X8(this.subscriptions,t),()=>W8(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let a=0;a<s;a++){const i=this.subscriptions[a];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const Hl=e=>e*1e3,ql=e=>e/1e3;function qZ(e,t){return t?e*(1e3/t):0}const KZ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lpe=1e-7,upe=12;function cpe(e,t,n,r,s){let a,i,l=0;do i=t+(n-t)/2,a=KZ(i,r,s)-e,a>0?n=i:t=i;while(Math.abs(a)>lpe&&++l<upe);return i}function sx(e,t,n,r){if(e===t&&n===r)return oo;const s=a=>cpe(a,0,1,e,n);return a=>a===0||a===1?a:KZ(s(a),t,r)}const YZ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZZ=e=>t=>1-e(1-t),XZ=sx(.33,1.53,.69,.99),tN=ZZ(XZ),WZ=YZ(tN),QZ=e=>(e*=2)<1?.5*tN(e):.5*(2-Math.pow(2,-10*(e-1))),nN=e=>1-Math.sin(Math.acos(e)),JZ=ZZ(nN),eX=YZ(nN),dpe=sx(.42,0,1,1),fpe=sx(0,0,.58,1),tX=sx(.42,0,.58,1),hpe=e=>Array.isArray(e)&&typeof e[0]!="number",nX=e=>Array.isArray(e)&&typeof e[0]=="number",ppe={linear:oo,easeIn:dpe,easeInOut:tX,easeOut:fpe,circIn:nN,circInOut:eX,circOut:JZ,backIn:tN,backInOut:WZ,backOut:XZ,anticipate:QZ},mpe=e=>typeof e=="string",sP=e=>{if(nX(e)){Q8(e.length===4);const[t,n,r,s]=e;return sx(t,n,r,s)}else if(mpe(e))return ppe[e];return e},Xw=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gpe(e,t){let n=new Set,r=new Set,s=!1,a=!1;const i=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(h){i.has(h)&&(f.schedule(h),e()),h(l)}const f={schedule:(h,g=!1,v=!1)=>{const w=v&&s?n:r;return g&&i.add(h),w.has(h)||w.add(h),h},cancel:h=>{r.delete(h),i.delete(h)},process:h=>{if(l=h,s){a=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),n.clear(),s=!1,a&&(a=!1,f.process(h))}};return f}const vpe=40;function rX(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=Xw.reduce(($,O)=>($[O]=gpe(a),$),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:h,update:g,preRender:v,render:w,postRender:C}=i,_=()=>{const $=Zu.useManualTiming?s.timestamp:performance.now();n=!1,Zu.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min($-s.timestamp,vpe),1)),s.timestamp=$,s.isProcessing=!0,l.process(s),u.process(s),f.process(s),h.process(s),g.process(s),v.process(s),w.process(s),C.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(_))},E=()=>{n=!0,r=!0,s.isProcessing||e(_)};return{schedule:Xw.reduce(($,O)=>{const N=i[O];return $[O]=(M,L=!1,k=!1)=>(n||E(),N.schedule(M,L,k)),$},{}),cancel:$=>{for(let O=0;O<Xw.length;O++)i[Xw[O]].cancel($)},state:s,steps:i}}const{schedule:Pr,cancel:Ed,state:Ns,steps:XE}=rX(typeof requestAnimationFrame<"u"?requestAnimationFrame:oo,!0);let AC;function ype(){AC=void 0}const ri={now:()=>(AC===void 0&&ri.set(Ns.isProcessing||Zu.useManualTiming?Ns.timestamp:performance.now()),AC),set:e=>{AC=e,queueMicrotask(ype)}},sX=e=>t=>typeof t=="string"&&t.startsWith(e),rN=sX("--"),xpe=sX("var(--"),sN=e=>xpe(e)?bpe.test(e.split("/*")[0].trim()):!1,bpe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_1={...Wg,transform:e=>Yu(0,1,e)},Ww={...Wg,default:1},Wy=e=>Math.round(e*1e5)/1e5,aN=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wpe(e){return e==null}const Cpe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,iN=(e,t)=>n=>!!(typeof n=="string"&&Cpe.test(n)&&n.startsWith(e)||t&&!wpe(n)&&Object.prototype.hasOwnProperty.call(n,t)),aX=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,a,i,l]=r.match(aN);return{[e]:parseFloat(s),[t]:parseFloat(a),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},Spe=e=>Yu(0,255,e),WE={...Wg,transform:e=>Math.round(Spe(e))},hh={test:iN("rgb","red"),parse:aX("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+WE.transform(e)+", "+WE.transform(t)+", "+WE.transform(n)+", "+Wy(_1.transform(r))+")"};function _pe(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const $A={test:iN("#"),parse:_pe,transform:hh.transform},ax=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),id=ax("deg"),Kl=ax("%"),qt=ax("px"),jpe=ax("vh"),Epe=ax("vw"),aP={...Kl,parse:e=>Kl.parse(e)/100,transform:e=>Kl.transform(e*100)},mg={test:iN("hsl","hue"),parse:aX("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kl.transform(Wy(t))+", "+Kl.transform(Wy(n))+", "+Wy(_1.transform(r))+")"},ia={test:e=>hh.test(e)||$A.test(e)||mg.test(e),parse:e=>hh.test(e)?hh.parse(e):mg.test(e)?mg.parse(e):$A.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?hh.transform(e):mg.transform(e)},$pe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Rpe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(aN))==null?void 0:t.length)||0)+(((n=e.match($pe))==null?void 0:n.length)||0)>0}const iX="number",oX="color",Ope="var",Tpe="var(",iP="${}",Ape=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function j1(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let a=0;const i=t.replace(Ape,l=>(ia.test(l)?(r.color.push(a),s.push(oX),n.push(ia.parse(l))):l.startsWith(Tpe)?(r.var.push(a),s.push(Ope),n.push(l)):(r.number.push(a),s.push(iX),n.push(parseFloat(l))),++a,iP)).split(iP);return{values:n,split:i,indexes:r,types:s}}function lX(e){return j1(e).values}function uX(e){const{split:t,types:n}=j1(e),r=t.length;return s=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],s[i]!==void 0){const l=n[i];l===iX?a+=Wy(s[i]):l===oX?a+=ia.transform(s[i]):a+=s[i]}return a}}const kpe=e=>typeof e=="number"?0:e;function Npe(e){const t=lX(e);return uX(e)(t.map(kpe))}const $d={test:Rpe,parse:lX,createTransformer:uX,getAnimatableNone:Npe};function QE(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lpe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,a=0,i=0;if(!t)s=a=i=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;s=QE(u,l,e+1/3),a=QE(u,l,e),i=QE(u,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}function pS(e,t){return n=>n>0?t:e}const Mr=(e,t,n)=>e+(t-e)*n,JE=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Mpe=[$A,hh,mg],Ipe=e=>Mpe.find(t=>t.test(e));function oP(e){const t=Ipe(e);if(!t)return!1;let n=t.parse(e);return t===mg&&(n=Lpe(n)),n}const lP=(e,t)=>{const n=oP(e),r=oP(t);if(!n||!r)return pS(e,t);const s={...n};return a=>(s.red=JE(n.red,r.red,a),s.green=JE(n.green,r.green,a),s.blue=JE(n.blue,r.blue,a),s.alpha=Mr(n.alpha,r.alpha,a),hh.transform(s))},RA=new Set(["none","hidden"]);function Ppe(e,t){return RA.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Dpe(e,t){return n=>Mr(e,t,n)}function oN(e){return typeof e=="number"?Dpe:typeof e=="string"?sN(e)?pS:ia.test(e)?lP:Fpe:Array.isArray(e)?cX:typeof e=="object"?ia.test(e)?lP:Vpe:pS}function cX(e,t){const n=[...e],r=n.length,s=e.map((a,i)=>oN(a)(a,t[i]));return a=>{for(let i=0;i<r;i++)n[i]=s[i](a);return n}}function Vpe(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=oN(e[s])(e[s],t[s]));return s=>{for(const a in r)n[a]=r[a](s);return n}}function Bpe(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],i=e.indexes[a][r[a]],l=e.values[i]??0;n[s]=l,r[a]++}return n}const Fpe=(e,t)=>{const n=$d.createTransformer(t),r=j1(e),s=j1(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?RA.has(e)&&!s.values.length||RA.has(t)&&!r.values.length?Ppe(e,t):rx(cX(Bpe(r,s),s.values),n):pS(e,t)};function dX(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Mr(e,t,n):oN(e)(e,t)}const Upe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Pr.update(t,n),stop:()=>Ed(t),now:()=>Ns.isProcessing?Ns.timestamp:ri.now()}},fX=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let a=0;a<s;a++)r+=e(a/(s-1))+", ";return`linear(${r.substring(0,r.length-2)})`},mS=2e4;function lN(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mS;)t+=n,r=e.next(t);return t>=mS?1/0:t}function Gpe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(lN(r),mS);return{type:"keyframes",ease:a=>r.next(s*a).value/t,duration:ql(s)}}const zpe=5;function hX(e,t,n){const r=Math.max(t-zpe,0);return qZ(n-e(r),t-r)}const Fr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},uP=.001;function Hpe({duration:e=Fr.duration,bounce:t=Fr.bounce,velocity:n=Fr.velocity,mass:r=Fr.mass}){let s,a,i=1-t;i=Yu(Fr.minDamping,Fr.maxDamping,i),e=Yu(Fr.minDuration,Fr.maxDuration,ql(e)),i<1?(s=f=>{const h=f*i,g=h*e,v=h-n,w=OA(f,i),C=Math.exp(-g);return uP-v/w*C},a=f=>{const h=f*i*e,g=h*n+n,v=Math.pow(i,2)*Math.pow(f,2)*e,w=Math.exp(-h),C=OA(Math.pow(f,2),i);return(-s(f)+uP>0?-1:1)*((g-v)*w)/C}):(s=f=>{const h=Math.exp(-f*e),g=(f-n)*e+1;return-.001+h*g},a=f=>{const h=Math.exp(-f*e),g=(n-f)*(e*e);return h*g});const l=5/e,u=Kpe(s,a,l);if(e=Hl(e),isNaN(u))return{stiffness:Fr.stiffness,damping:Fr.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:i*2*Math.sqrt(r*f),duration:e}}}const qpe=12;function Kpe(e,t,n){let r=n;for(let s=1;s<qpe;s++)r=r-e(r)/t(r);return r}function OA(e,t){return e*Math.sqrt(1-t*t)}const Ype=["duration","bounce"],Zpe=["stiffness","damping","mass"];function cP(e,t){return t.some(n=>e[n]!==void 0)}function Xpe(e){let t={velocity:Fr.velocity,stiffness:Fr.stiffness,damping:Fr.damping,mass:Fr.mass,isResolvedFromDuration:!1,...e};if(!cP(e,Zpe)&&cP(e,Ype))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,a=2*Yu(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Fr.mass,stiffness:s,damping:a}}else{const n=Hpe(e);t={...t,...n,mass:Fr.mass},t.isResolvedFromDuration=!0}return t}function gS(e=Fr.visualDuration,t=Fr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:f,mass:h,duration:g,velocity:v,isResolvedFromDuration:w}=Xpe({...n,velocity:-ql(n.velocity||0)}),C=v||0,_=f/(2*Math.sqrt(u*h)),E=i-a,$=ql(Math.sqrt(u/h)),O=Math.abs(E)<5;r||(r=O?Fr.restSpeed.granular:Fr.restSpeed.default),s||(s=O?Fr.restDelta.granular:Fr.restDelta.default);let N;if(_<1){const L=OA($,_);N=k=>{const T=Math.exp(-_*$*k);return i-T*((C+_*$*E)/L*Math.sin(L*k)+E*Math.cos(L*k))}}else if(_===1)N=L=>i-Math.exp(-$*L)*(E+(C+$*E)*L);else{const L=$*Math.sqrt(_*_-1);N=k=>{const T=Math.exp(-_*$*k),P=Math.min(L*k,300);return i-T*((C+_*$*E)*Math.sinh(P)+L*E*Math.cosh(P))/L}}const M={calculatedDuration:w&&g||null,next:L=>{const k=N(L);if(w)l.done=L>=g;else{let T=L===0?C:0;_<1&&(T=L===0?Hl(C):hX(N,L,k));const P=Math.abs(T)<=r,V=Math.abs(i-k)<=s;l.done=P&&V}return l.value=l.done?i:k,l},toString:()=>{const L=Math.min(lN(M),mS),k=fX(T=>M.next(L*T).value,L,30);return L+"ms "+k},toTransition:()=>{}};return M}gS.applyToOptions=e=>{const t=Gpe(e,100,gS);return e.ease=t.ease,e.duration=Hl(t.duration),e.type="keyframes",e};function TA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:i,min:l,max:u,restDelta:f=.5,restSpeed:h}){const g=e[0],v={done:!1,value:g},w=P=>l!==void 0&&P<l||u!==void 0&&P>u,C=P=>l===void 0?u:u===void 0||Math.abs(l-P)<Math.abs(u-P)?l:u;let _=n*t;const E=g+_,$=i===void 0?E:i(E);$!==E&&(_=$-g);const O=P=>-_*Math.exp(-P/r),N=P=>$+O(P),M=P=>{const V=O(P),q=N(P);v.done=Math.abs(V)<=f,v.value=v.done?$:q};let L,k;const T=P=>{w(v.value)&&(L=P,k=gS({keyframes:[v.value,C(v.value)],velocity:hX(N,P,v.value),damping:s,stiffness:a,restDelta:f,restSpeed:h}))};return T(0),{calculatedDuration:null,next:P=>{let V=!1;return!k&&L===void 0&&(V=!0,M(P),T(P)),L!==void 0&&P>=L?k.next(P-L):(!V&&M(P),v)}}}function Wpe(e,t,n){const r=[],s=n||Zu.mix||dX,a=e.length-1;for(let i=0;i<a;i++){let l=s(e[i],e[i+1]);if(t){const u=Array.isArray(t)?t[i]||oo:t;l=rx(u,l)}r.push(l)}return r}function Qpe(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const a=e.length;if(Q8(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Wpe(t,r,s),u=l.length,f=h=>{if(i&&h<e[0])return t[0];let g=0;if(u>1)for(;g<e.length-2&&!(h<e[g+1]);g++);const v=S1(e[g],e[g+1],h);return l[g](v)};return n?h=>f(Yu(e[0],e[a-1],h)):f}function Jpe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=S1(0,t,r);e.push(Mr(n,1,s))}}function eme(e){const t=[0];return Jpe(t,e.length-1),t}function tme(e,t){return e.map(n=>n*t)}function nme(e,t){return e.map(()=>t||tX).splice(0,e.length-1)}function Qy({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=hpe(r)?r.map(sP):sP(r),a={done:!1,value:t[0]},i=tme(n&&n.length===t.length?n:eme(t),e),l=Qpe(i,t,{ease:Array.isArray(s)?s:nme(t,s)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const rme=e=>e!==null;function uN(e,{repeat:t,repeatType:n="loop"},r,s=1){const a=e.filter(rme),i=s<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const sme={decay:TA,inertia:TA,tween:Qy,keyframes:Qy,spring:gS};function pX(e){typeof e.type=="string"&&(e.type=sme[e.type])}let cN=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}};const ame=e=>e/100;let dN=class extends cN{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,s;if(n){const{motionValue:a}=this.options;a&&a.updatedAt!==ri.now()&&this.tick(ri.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;pX(t);const{type:n=Qy,repeat:r=0,repeatDelay:s=0,repeatType:a,velocity:i=0}=t;let{keyframes:l}=t;const u=n||Qy;u!==Qy&&typeof l[0]!="number"&&(this.mixKeyframes=rx(ame,dX(l[0],l[1])),l=[0,100]);const f=u({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-i})),f.calculatedDuration===null&&(f.calculatedDuration=lN(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:g,repeatType:v,repeatDelay:w,type:C,onUpdate:_,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const $=this.currentTime-f*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?$<0:$>s;this.currentTime=Math.max($,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let N=this.currentTime,M=r;if(g){const P=Math.min(this.currentTime,s)/l;let V=Math.floor(P),q=P%1;!q&&P>=1&&(q=1),q===1&&V--,V=Math.min(V,g+1),V%2&&(v==="reverse"?(q=1-q,w&&(q-=w/l)):v==="mirror"&&(M=i)),N=Yu(0,1,q)*l}const L=O?{done:!1,value:h[0]}:M.next(N);a&&(L.value=a(L.value));let{done:k}=L;!O&&u!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return T&&C!==TA&&(L.value=uN(h,this.options,E,this.speed)),_&&_(L.value),T&&this.finish(),L}then(t,n){return this.finished.then(t,n)}get duration(){return ql(this.calculatedDuration)}get time(){return ql(this.currentTime)}set time(t){var n;t=Hl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ri.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ql(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=Upe,startTime:s}=this.options;this.driver||(this.driver=r(i=>this.tick(i))),(n=(t=this.options).onPlay)==null||n.call(t);const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=s??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ri.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}};function ime(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ph=e=>e*180/Math.PI,AA=e=>{const t=ph(Math.atan2(e[1],e[0]));return kA(t)},ome={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:AA,rotateZ:AA,skewX:e=>ph(Math.atan(e[1])),skewY:e=>ph(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kA=e=>(e=e%360,e<0&&(e+=360),e),dP=AA,fP=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),hP=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lme={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fP,scaleY:hP,scale:e=>(fP(e)+hP(e))/2,rotateX:e=>kA(ph(Math.atan2(e[6],e[5]))),rotateY:e=>kA(ph(Math.atan2(-e[2],e[0]))),rotateZ:dP,rotate:dP,skewX:e=>ph(Math.atan(e[4])),skewY:e=>ph(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pP(e){return e.includes("scale")?1:0}function NA(e,t){if(!e||e==="none")return pP(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=lme,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ome,s=l}if(!s)return pP(t);const a=r[t],i=s[1].split(",").map(cme);return typeof a=="function"?a(i):i[a]}const ume=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return NA(n,t)};function cme(e){return parseFloat(e.trim())}const Qg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jg=new Set(Qg),mP=e=>e===Wg||e===qt,dme=new Set(["x","y","z"]),fme=Qg.filter(e=>!dme.has(e));function hme(e){const t=[];return fme.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const yh={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>NA(t,"x"),y:(e,{transform:t})=>NA(t,"y")};yh.translateX=yh.x;yh.translateY=yh.y;const xh=new Set;let LA=!1,MA=!1,IA=!1;function mX(){if(MA){const e=Array.from(xh).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=hme(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([a,i])=>{var l;(l=r.getValue(a))==null||l.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}MA=!1,LA=!1,xh.forEach(e=>e.complete(IA)),xh.clear()}function gX(){xh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(MA=!0)})}function pme(){IA=!0,gX(),mX(),IA=!1}let fN=class{constructor(t,n,r,s,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(xh.add(this),LA||(LA=!0,Pr.read(gX),Pr.resolveKeyframes(mX))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const a=s?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),s&&a===void 0&&s.set(t[0])}ime(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xh.delete(this)}cancel(){this.state==="scheduled"&&(xh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};const mme=e=>e.startsWith("--");function gme(e,t,n){mme(t)?e.style.setProperty(t,n):e.style[t]=n}const vme=J8(()=>window.ScrollTimeline!==void 0),yme={};function xme(e,t){const n=J8(e);return()=>yme[t]??n()}const vX=xme(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ry=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ry([0,.65,.55,1]),circOut:Ry([.55,0,1,.45]),backIn:Ry([.31,.01,.66,-.59]),backOut:Ry([.33,1.53,.69,.99])};function yX(e,t){if(e)return typeof e=="function"?vX()?fX(e,t):"ease-out":nX(e)?Ry(e):Array.isArray(e)?e.map(n=>yX(n,t)||gP.easeOut):gP[e]}function bme(e,t,n,{delay:r=0,duration:s=300,repeat:a=0,repeatType:i="loop",ease:l="easeOut",times:u}={},f=void 0){const h={[t]:n};u&&(h.offset=u);const g=yX(l,s);Array.isArray(g)&&(h.easing=g);const v={delay:r,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),e.animate(h,v)}function xX(e){return typeof e=="function"&&"applyToOptions"in e}function wme({type:e,...t}){return xX(e)&&vX()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}let Cme=class extends cN{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Q8(typeof t.type!="string");const f=wme(t);this.animation=bme(n,r,s,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=uN(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):gme(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var t,n;const r=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return ql(Number(r))}get time(){return ql(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Hl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&vme()?(this.animation.timeline=t,oo):n(this)}};const bX={anticipate:QZ,backInOut:WZ,circInOut:eX};function Sme(e){return e in bX}function _me(e){typeof e.ease=="string"&&Sme(e.ease)&&(e.ease=bX[e.ease])}const vP=10;let jme=class extends Cme{constructor(t){_me(t),pX(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:a,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new dN({...i,autoplay:!1}),u=Hl(this.finishedTime??this.time);n.setWithVelocity(l.sample(u-vP).value,l.sample(u).value,vP),l.stop()}};const yP=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($d.test(e)||e==="0")&&!e.startsWith("url("));function Eme(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $me(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],i=yP(s,t),l=yP(a,t);return!i||!l?!1:Eme(e)||(n==="spring"||xX(n))&&r}const Rme=new Set(["opacity","clipPath","filter","transform"]),Ome=J8(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tme(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:a,type:i}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Ome()&&n&&Rme.has(n)&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&a!==0&&i!=="inertia"}const Ame=40;let kme=class extends cN{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:i="loop",keyframes:l,name:u,motionValue:f,element:h,...g}){var v;super(),this.stop=()=>{var _,E;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=ri.now();const w={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:a,repeatType:i,name:u,motionValue:f,element:h,...g},C=h?.KeyframeResolver||fN;this.keyframeResolver=new C(l,(_,E,$)=>this.onKeyframesResolved(_,E,w,!$),u,f,h),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:a,type:i,velocity:l,delay:u,isHandoff:f,onUpdate:h}=r;this.resolvedAt=ri.now(),$me(t,a,i,l)||((Zu.instantAnimations||!u)&&h?.(uN(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Ame?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!f&&Tme(g)?new jme({...g,element:g.motionValue.owner.current}):new dN(g);v.finished.then(()=>this.notifyFinished()).catch(oo),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),pme()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};const Nme=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Lme(e){const t=Nme.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function wX(e,t,n=1){const[r,s]=Lme(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const i=a.trim();return zZ(i)?parseFloat(i):i}return sN(s)?wX(s,t,n+1):s}function hN(e,t){return e?.[t]??e?.default??e}const CX=new Set(["width","height","top","left","right","bottom",...Qg]),Mme={test:e=>e==="auto",parse:e=>e},SX=e=>t=>t.test(e),_X=[Wg,qt,Kl,id,Epe,jpe,Mme],xP=e=>_X.find(SX(e));function Ime(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||HZ(e):!0}const Pme=new Set(["brightness","contrast","saturate","opacity"]);function Dme(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(aN)||[];if(!r)return e;const s=n.replace(r,"");let a=Pme.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+s+")"}const Vme=/\b([a-z-]*)\(.*?\)/gu,PA={...$d,getAnimatableNone:e=>{const t=e.match(Vme);return t?t.map(Dme).join(" "):e}},bP={...Wg,transform:Math.round},Bme={rotate:id,rotateX:id,rotateY:id,rotateZ:id,scale:Ww,scaleX:Ww,scaleY:Ww,scaleZ:Ww,skew:id,skewX:id,skewY:id,distance:qt,translateX:qt,translateY:qt,translateZ:qt,x:qt,y:qt,z:qt,perspective:qt,transformPerspective:qt,opacity:_1,originX:aP,originY:aP,originZ:qt},pN={borderWidth:qt,borderTopWidth:qt,borderRightWidth:qt,borderBottomWidth:qt,borderLeftWidth:qt,borderRadius:qt,radius:qt,borderTopLeftRadius:qt,borderTopRightRadius:qt,borderBottomRightRadius:qt,borderBottomLeftRadius:qt,width:qt,maxWidth:qt,height:qt,maxHeight:qt,top:qt,right:qt,bottom:qt,left:qt,padding:qt,paddingTop:qt,paddingRight:qt,paddingBottom:qt,paddingLeft:qt,margin:qt,marginTop:qt,marginRight:qt,marginBottom:qt,marginLeft:qt,backgroundPositionX:qt,backgroundPositionY:qt,...Bme,zIndex:bP,fillOpacity:_1,strokeOpacity:_1,numOctaves:bP},Fme={...pN,color:ia,backgroundColor:ia,outlineColor:ia,fill:ia,stroke:ia,borderColor:ia,borderTopColor:ia,borderRightColor:ia,borderBottomColor:ia,borderLeftColor:ia,filter:PA,WebkitFilter:PA},jX=e=>Fme[e];function EX(e,t){let n=jX(e);return n!==PA&&(n=$d),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ume=new Set(["auto","none","0"]);function Gme(e,t,n){let r=0,s;for(;r<e.length&&!s;){const a=e[r];typeof a=="string"&&!Ume.has(a)&&j1(a).values.length&&(s=e[r]),r++}if(s&&n)for(const a of t)e[a]=EX(n,s)}let zme=class extends fN{constructor(t,n,r,s,a){super(t,n,r,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),sN(f))){const h=wX(f,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!CX.has(r)||t.length!==2)return;const[s,a]=t,i=xP(s),l=xP(a);if(i!==l)if(mP(i)&&mP(l))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else yh[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Ime(t[s]))&&r.push(s);r.length&&Gme(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yh[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const i=s.length-1,l=s[i];s[i]=yh[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(t=this.removedTransforms)!=null&&t.length&&this.removedTransforms.forEach(([u,f])=>{n.getValue(u).set(f)}),this.resolveNoneKeyframes()}};function Hme(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const wP=30,qme=e=>!isNaN(parseFloat(e));let Kme=class{constructor(t,n={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{var a,i;const l=ri.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty();s&&((i=this.events.renderRequest)==null||i.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ri.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qme(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new eN);const r=this.events[t].add(n);return t==="change"?()=>{r(),Pr.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ri.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wP)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wP);return qZ(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Mg(e,t){return new Kme(e,t)}const $X=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:mN}=rX(queueMicrotask,!1),Fo={x:!1,y:!1};function RX(){return Fo.x||Fo.y}function Yme(e){return e==="x"||e==="y"?Fo[e]?null:(Fo[e]=!0,()=>{Fo[e]=!1}):Fo.x||Fo.y?null:(Fo.x=Fo.y=!0,()=>{Fo.x=Fo.y=!1})}function OX(e,t){const n=Hme(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function CP(e){return!(e.pointerType==="touch"||RX())}function Zme(e,t,n={}){const[r,s,a]=OX(e,n),i=l=>{if(!CP(l))return;const{target:u}=l,f=t(u,l);if(typeof f!="function"||!u)return;const h=g=>{CP(g)&&(f(g),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,s)};return r.forEach(l=>{l.addEventListener("pointerenter",i,s)}),a}const TX=(e,t)=>t?e===t?!0:TX(e,t.parentElement):!1,gN=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xme=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wme(e){return Xme.has(e.tagName)||e.tabIndex!==-1}const kC=new WeakSet;function SP(e){return t=>{t.key==="Enter"&&e(t)}}function e5(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Qme=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=SP(()=>{if(kC.has(n))return;e5(n,"down");const s=SP(()=>{e5(n,"up")}),a=()=>e5(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function _P(e){return gN(e)&&!RX()}function Jme(e,t,n={}){const[r,s,a]=OX(e,n),i=l=>{const u=l.currentTarget;if(!_P(l))return;kC.add(u);const f=t(u,l),h=(w,C)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),kC.has(u)&&kC.delete(u),_P(w)&&typeof f=="function"&&f(w,{success:C})},g=w=>{h(w,u===window||u===document||n.useGlobalTarget||TX(u,w.target))},v=w=>{h(w,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",i,s),l instanceof HTMLElement&&(l.addEventListener("focus",u=>Qme(u,s)),!Wme(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}const ege=[..._X,ia,$d],tge=e=>ege.find(SX(e)),AX=y.createContext({strict:!1}),jP={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ig={};for(const e in jP)Ig[e]={isEnabled:t=>jP[e].some(n=>!!t[n])};function nge(e){for(const t in e)Ig[t]={...Ig[t],...e[t]}}const rge=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rge.has(e)}let kX=e=>!vS(e);function sge(e){e&&(kX=t=>t.startsWith("on")?!vS(t):e(t))}try{sge(require("@emotion/is-prop-valid").default)}catch{}function age(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(kX(s)||n===!0&&vS(s)||!t&&!vS(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function ige(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const C2=y.createContext({});function S2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function E1(e){return typeof e=="string"||Array.isArray(e)}const vN=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yN=["initial",...vN];function _2(e){return S2(e.animate)||yN.some(t=>E1(e[t]))}function NX(e){return!!(_2(e)||e.variants)}function oge(e,t){if(_2(e)){const{initial:n,animate:r}=e;return{initial:n===!1||E1(n)?n:void 0,animate:E1(r)?r:void 0}}return e.inherit!==!1?t:{}}function lge(e){const{initial:t,animate:n}=oge(e,y.useContext(C2));return y.useMemo(()=>({initial:t,animate:n}),[EP(t),EP(n)])}function EP(e){return Array.isArray(e)?e.join(" "):e}const uge=Symbol.for("motionComponentSymbol");function gg(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cge(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gg(n)&&(n.current=r))},[t])}const xN=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dge="framerAppearId",LX="data-"+xN(dge),MX=y.createContext({});function fge(e,t,n,r,s){var a,i;const{visualElement:l}=y.useContext(C2),u=y.useContext(AX),f=y.useContext(w2),h=y.useContext(Z8).reducedMotion,g=y.useRef(null);r=r||u.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h}));const v=g.current,w=y.useContext(MX);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&hge(g.current,n,s,w);const C=y.useRef(!1);y.useInsertionEffect(()=>{v&&C.current&&v.update(n,f)});const _=n[LX],E=y.useRef(!!_&&!((a=window.MotionHandoffIsComplete)!=null&&a.call(window,_))&&((i=window.MotionHasOptimisedAnimation)==null?void 0:i.call(window,_)));return FZ(()=>{v&&(C.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),mN.render(v.render),E.current&&v.animationState&&v.animationState.animateChanges())}),y.useEffect(()=>{v&&(!E.current&&v.animationState&&v.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var $;($=window.MotionHandoffMarkAsComplete)==null||$.call(window,_)}),E.current=!1))}),v}function hge(e,t,n,r){const{layoutId:s,layout:a,drag:i,dragConstraints:l,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:IX(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!i||l&&gg(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f})}function IX(e){if(e)return e.options.allowProjection!==!1?e.projection:IX(e.parent)}function pge({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&nge(e);function a(l,u){let f;const h={...y.useContext(Z8),...l,layoutId:mge(l)},{isStatic:g}=h,v=lge(l),w=r(l,g);if(!g&&Y8){gge();const C=vge(h);f=C.MeasureLayout,v.visualElement=fge(s,w,h,t,C.ProjectionNode)}return d.jsxs(C2.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...h}):null,n(s,l,cge(w,v.visualElement,u),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${s.displayName??s.name??""})`}`;const i=y.forwardRef(a);return i[uge]=s,i}function mge({layoutId:e}){const t=y.useContext(q8).id;return t&&e!==void 0?t+"-"+e:e}function gge(e,t){y.useContext(AX).strict}function vge(e){const{drag:t,layout:n}=Ig;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const $1={};function yge(e){for(const t in e)$1[t]=e[t],rN(t)&&($1[t].isCSSVariable=!0)}function PX(e,{layout:t,layoutId:n}){return Jg.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$1[e]||e==="opacity")}const ua=e=>!!(e&&e.getVelocity),xge={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bge=Qg.length;function wge(e,t,n){let r="",s=!0;for(let a=0;a<bge;a++){const i=Qg[a],l=e[i];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(i.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||n){const f=$X(l,pN[i]);if(!u){s=!1;const h=xge[i]||i;r+=`${h}(${f}) `}n&&(t[i]=f)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function bN(e,t,n){const{style:r,vars:s,transformOrigin:a}=e;let i=!1,l=!1;for(const u in t){const f=t[u];if(Jg.has(u)){i=!0;continue}else if(rN(u)){s[u]=f;continue}else{const h=$X(f,pN[u]);u.startsWith("origin")?(l=!0,a[u]=h):r[u]=h}}if(t.transform||(i||n?r.transform=wge(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=a;r.transformOrigin=`${u} ${f} ${h}`}}const wN=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DX(e,t,n){for(const r in t)!ua(t[r])&&!PX(r,n)&&(e[r]=t[r])}function Cge({transformTemplate:e},t){return y.useMemo(()=>{const n=wN();return bN(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sge(e,t){const n=e.style||{},r={};return DX(r,n,e),Object.assign(r,Cge(e,t)),r}function _ge(e,t){const n={},r=Sge(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const jge=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function CN(e){return typeof e!="string"||e.includes("-")?!1:!!(jge.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ege={offset:"stroke-dashoffset",array:"stroke-dasharray"},$ge={offset:"strokeDashoffset",array:"strokeDasharray"};function Rge(e,t,n=1,r=0,s=!0){e.pathLength=1;const a=s?Ege:$ge;e[a.offset]=qt.transform(-r);const i=qt.transform(t),l=qt.transform(n);e[a.array]=`${i} ${l}`}function VX(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:a=1,pathOffset:i=0,...l},u,f,h){if(bN(e,l,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=h?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&Rge(g,s,a,i,!1)}const BX=()=>({...wN(),attrs:{}}),FX=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Oge(e,t,n,r){const s=y.useMemo(()=>{const a=BX();return VX(a,t,FX(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};DX(a,e.style,e),s.style={...a,...s.style}}return s}function Tge(e=!1){return(t,n,r,{latestValues:s},a)=>{const i=(CN(t)?Oge:_ge)(n,s,a,t),l=age(n,typeof t=="string",e),u=t!==y.Fragment?{...l,...i,ref:r}:{},{children:f}=n,h=y.useMemo(()=>ua(f)?f.get():f,[f]);return y.createElement(t,{...u,children:h})}}function $P(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function SN(e,t,n,r){if(typeof t=="function"){const[s,a]=$P(r);t=t(n!==void 0?n:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=$P(r);t=t(n!==void 0?n:e.custom,s,a)}return t}function NC(e){return ua(e)?e.get():e}function Age({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:kge(n,r,s,e),renderState:t()}}const UX=e=>(t,n)=>{const r=y.useContext(C2),s=y.useContext(w2),a=()=>Age(e,t,r,s);return n?a():K8(a)};function kge(e,t,n,r){const s={},a=r(e,{});for(const v in a)s[v]=NC(a[v]);let{initial:i,animate:l}=e;const u=_2(e),f=NX(e);t&&f&&!u&&e.inherit!==!1&&(i===void 0&&(i=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||i===!1;const g=h?l:i;if(g&&typeof g!="boolean"&&!S2(g)){const v=Array.isArray(g)?g:[g];for(let w=0;w<v.length;w++){const C=SN(e,v[w]);if(C){const{transitionEnd:_,transition:E,...$}=C;for(const O in $){let N=$[O];if(Array.isArray(N)){const M=h?N.length-1:0;N=N[M]}N!==null&&(s[O]=N)}for(const O in _)s[O]=_[O]}}}return s}function _N(e,t,n){var r;const{style:s}=e,a={};for(const i in s)(ua(s[i])||t.style&&ua(t.style[i])||PX(i,e)||((r=n?.getValue(i))==null?void 0:r.liveStyle)!==void 0)&&(a[i]=s[i]);return a}const Nge={useVisualState:UX({scrapeMotionValuesFromProps:_N,createRenderState:wN})};function GX(e,t,n){const r=_N(e,t,n);for(const s in e)if(ua(e[s])||ua(t[s])){const a=Qg.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[a]=e[s]}return r}const Lge={useVisualState:UX({scrapeMotionValuesFromProps:GX,createRenderState:BX})};function Mge(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){const s={...CN(n)?Lge:Nge,preloadedFeatures:e,useRender:Tge(r),createVisualElement:t,Component:n};return pge(s)}}function R1(e,t,n){const r=e.getProps();return SN(r,t,n!==void 0?n:r.custom,e)}const DA=e=>Array.isArray(e);function Ige(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mg(n))}function Pge(e){return DA(e)?e[e.length-1]||0:e}function Dge(e,t){const n=R1(e,t);let{transitionEnd:r={},transition:s={},...a}=n||{};a={...a,...r};for(const i in a){const l=Pge(a[i]);Ige(e,i,l)}}function Vge(e){return!!(ua(e)&&e.add)}function VA(e,t){const n=e.getValue("willChange");if(Vge(n))return n.add(t);if(!n&&Zu.WillChange){const r=new Zu.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zX(e){return e.props[LX]}const Bge=e=>e!==null;function Fge(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Bge),a=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[a]}const Uge={type:"spring",stiffness:500,damping:25,restSpeed:10},Gge=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zge={type:"keyframes",duration:.8},Hge={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qge=(e,{keyframes:t})=>t.length>2?zge:Jg.has(e)?e.startsWith("scale")?Gge(t[1]):Uge:Hge;function Kge({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:a,repeatType:i,repeatDelay:l,from:u,elapsed:f,...h}){return!!Object.keys(h).length}const jN=(e,t,n,r={},s,a)=>i=>{const l=hN(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Hl(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:v=>{t.set(v),l.onUpdate&&l.onUpdate(v)},onComplete:()=>{i(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};Kge(l)||Object.assign(h,qge(e,h)),h.duration&&(h.duration=Hl(h.duration)),h.repeatDelay&&(h.repeatDelay=Hl(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let g=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(g=!0)),(Zu.instantAnimations||Zu.skipAnimations)&&(g=!0,h.duration=0,h.delay=0),h.allowFlatten=!l.type&&!l.ease,g&&!a&&t.get()!==void 0){const v=Fge(h.keyframes,l);if(v!==void 0){Pr.update(()=>{h.onUpdate(v),h.onComplete()});return}}return l.isSync?new dN(h):new kme(h)};function Yge({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function HX(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...l}=t;r&&(a=r);const u=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in l){const g=e.getValue(h,e.latestValues[h]??null),v=l[h];if(v===void 0||f&&Yge(f,h))continue;const w={delay:n,...hN(a||{},h)},C=g.get();if(C!==void 0&&!g.isAnimating&&!Array.isArray(v)&&v===C&&!w.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const $=zX(e);if($){const O=window.MotionHandoffAnimation($,h,Pr);O!==null&&(w.startTime=O,_=!0)}}VA(e,h),g.start(jN(h,g,v,e.shouldReduceMotion&&CX.has(h)?{type:!1}:w,e,_));const E=g.animation;E&&u.push(E)}return i&&Promise.all(u).then(()=>{Pr.update(()=>{i&&Dge(e,i)})}),u}function BA(e,t,n={}){var r;const s=R1(e,t,n.type==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(a=n.transitionOverride);const i=s?()=>Promise.all(HX(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:v}=a;return Zge(e,t,h+f,g,v,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[f,h]=u==="beforeChildren"?[i,l]:[l,i];return f().then(()=>h())}else return Promise.all([i(),l(n.delay)])}function Zge(e,t,n=0,r=0,s=1,a){const i=[],l=(e.variantChildren.size-1)*r,u=s===1?(f=0)=>f*r:(f=0)=>l-f*r;return Array.from(e.variantChildren).sort(Xge).forEach((f,h)=>{f.notify("AnimationStart",t),i.push(BA(f,t,{...a,delay:n+u(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(i)}function Xge(e,t){return e.sortNodePosition(t)}function Wge(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(a=>BA(e,a,n));r=Promise.all(s)}else if(typeof t=="string")r=BA(e,t,n);else{const s=typeof t=="function"?R1(e,t,n.custom):t;r=Promise.all(HX(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function qX(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Qge=yN.length;function KX(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?KX(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Qge;n++){const r=yN[n],s=e.props[r];(E1(s)||s===!1)&&(t[r]=s)}return t}const Jge=[...vN].reverse(),eve=vN.length;function tve(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wge(e,n,r)))}function nve(e){let t=tve(e),n=RP(),r=!0;const s=u=>(f,h)=>{var g;const v=R1(e,h,u==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(v){const{transition:w,transitionEnd:C,..._}=v;f={...f,..._,...C}}return f};function a(u){t=u(e)}function i(u){const{props:f}=e,h=KX(e.parent)||{},g=[],v=new Set;let w={},C=1/0;for(let E=0;E<eve;E++){const $=Jge[E],O=n[$],N=f[$]!==void 0?f[$]:h[$],M=E1(N),L=$===u?O.isActive:null;L===!1&&(C=E);let k=N===h[$]&&N!==f[$]&&M;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),O.protectedKeys={...w},!O.isActive&&L===null||!N&&!O.prevProp||S2(N)||typeof N=="boolean")continue;const T=rve(O.prevProp,N);let P=T||$===u&&O.isActive&&!k&&M||E>C&&M,V=!1;const q=Array.isArray(N)?N:[N];let K=q.reduce(s($),{});L===!1&&(K={});const{prevResolvedValues:re={}}=O,ee={...re,...K},ue=he=>{P=!0,v.has(he)&&(V=!0,v.delete(he)),O.needsAnimating[he]=!0;const X=e.getValue(he);X&&(X.liveStyle=!1)};for(const he in ee){const X=K[he],pe=re[he];if(w.hasOwnProperty(he))continue;let xe=!1;DA(X)&&DA(pe)?xe=!qX(X,pe):xe=X!==pe,xe?X!=null?ue(he):v.add(he):X!==void 0&&v.has(he)?ue(he):O.protectedKeys[he]=!0}O.prevProp=N,O.prevResolvedValues=K,O.isActive&&(w={...w,...K}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(k&&T)||V)&&g.push(...q.map(he=>({animation:he,options:{type:$}})))}if(v.size){const E={};if(typeof f.initial!="boolean"){const $=R1(e,Array.isArray(f.initial)?f.initial[0]:f.initial);$&&$.transition&&(E.transition=$.transition)}v.forEach($=>{const O=e.getBaseTarget($),N=e.getValue($);N&&(N.liveStyle=!0),E[$]=O??null}),g.push({animation:E})}let _=!!g.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(g):Promise.resolve()}function l(u,f){var h;if(n[u].isActive===f)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(v=>{var w;return(w=v.animationState)==null?void 0:w.setActive(u,f)}),n[u].isActive=f;const g=i(u);for(const v in n)n[v].protectedKeys={};return g}return{animateChanges:i,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=RP(),r=!0}}}function rve(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qX(t,e):!1}function rh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RP(){return{animate:rh(!0),whileInView:rh(),whileHover:rh(),whileTap:rh(),whileDrag:rh(),whileFocus:rh(),exit:rh()}}let Pd=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},sve=class extends Pd{constructor(t){super(t),t.animationState||(t.animationState=nve(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();S2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}},ave=0;class ive extends Pd{constructor(){super(...arguments),this.id=ave++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ove={animation:{Feature:sve},exit:{Feature:ive}};function O1(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ix(e){return{point:{x:e.pageX,y:e.pageY}}}const lve=e=>t=>gN(t)&&e(t,ix(t));function Jy(e,t,n,r){return O1(e,t,lve(n),r)}function YX({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uve({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function cve(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const ZX=1e-4,dve=1-ZX,fve=1+ZX,XX=.01,hve=0-XX,pve=0+XX;function ka(e){return e.max-e.min}function mve(e,t,n){return Math.abs(e-t)<=n}function OP(e,t,n,r=.5){e.origin=r,e.originPoint=Mr(t.min,t.max,e.origin),e.scale=ka(n)/ka(t),e.translate=Mr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dve&&e.scale<=fve||isNaN(e.scale))&&(e.scale=1),(e.translate>=hve&&e.translate<=pve||isNaN(e.translate))&&(e.translate=0)}function e1(e,t,n,r){OP(e.x,t.x,n.x,r?r.originX:void 0),OP(e.y,t.y,n.y,r?r.originY:void 0)}function TP(e,t,n){e.min=n.min+t.min,e.max=e.min+ka(t)}function gve(e,t,n){TP(e.x,t.x,n.x),TP(e.y,t.y,n.y)}function AP(e,t,n){e.min=t.min-n.min,e.max=e.min+ka(t)}function t1(e,t,n){AP(e.x,t.x,n.x),AP(e.y,t.y,n.y)}const kP=()=>({translate:0,scale:1,origin:0,originPoint:0}),vg=()=>({x:kP(),y:kP()}),NP=()=>({min:0,max:0}),Qr=()=>({x:NP(),y:NP()});function to(e){return[e("x"),e("y")]}function t5(e){return e===void 0||e===1}function FA({scale:e,scaleX:t,scaleY:n}){return!t5(e)||!t5(t)||!t5(n)}function lh(e){return FA(e)||WX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WX(e){return LP(e.x)||LP(e.y)}function LP(e){return e&&e!=="0%"}function yS(e,t,n){const r=e-n,s=t*r;return n+s}function MP(e,t,n,r,s){return s!==void 0&&(e=yS(e,s,r)),yS(e,n,r)+t}function UA(e,t=0,n=1,r,s){e.min=MP(e.min,t,n,r,s),e.max=MP(e.max,t,n,r,s)}function QX(e,{x:t,y:n}){UA(e.x,t.translate,t.scale,t.originPoint),UA(e.y,n.translate,n.scale,n.originPoint)}const IP=.999999999999,PP=1.0000000000001;function vve(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let a,i;for(let l=0;l<s;l++){a=n[l],i=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&xg(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,QX(e,i)),r&&lh(a.latestValues)&&xg(e,a.latestValues))}t.x<PP&&t.x>IP&&(t.x=1),t.y<PP&&t.y>IP&&(t.y=1)}function yg(e,t){e.min=e.min+t,e.max=e.max+t}function DP(e,t,n,r,s=.5){const a=Mr(e.min,e.max,s);UA(e,t,n,a,r)}function xg(e,t){DP(e.x,t.x,t.scaleX,t.scale,t.originX),DP(e.y,t.y,t.scaleY,t.scale,t.originY)}function JX(e,t){return YX(cve(e.getBoundingClientRect(),t))}function yve(e,t,n){const r=JX(e,n),{scroll:s}=t;return s&&(yg(r.x,s.offset.x),yg(r.y,s.offset.y)),r}const eW=({current:e})=>e?e.ownerDocument.defaultView:null,VP=(e,t)=>Math.abs(e-t);function xve(e,t){const n=VP(e.x,t.x),r=VP(e.y,t.y);return Math.sqrt(n**2+r**2)}let tW=class{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=r5(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,w=xve(g.offset,{x:0,y:0})>=3;if(!v&&!w)return;const{point:C}=g,{timestamp:_}=Ns;this.history.push({...C,timestamp:_});const{onStart:E,onMove:$}=this.handlers;v||(E&&E(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),$&&$(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=n5(v,this.transformPagePoint),Pr.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:w,onSessionEnd:C,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=r5(g.type==="pointercancel"?this.lastMoveEventInfo:n5(v,this.transformPagePoint),this.history);this.startEvent&&w&&w(g,E),C&&C(g,E)},!gN(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=ix(t),l=n5(i,this.transformPagePoint),{point:u}=l,{timestamp:f}=Ns;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,r5(l,this.history)),this.removeListeners=rx(Jy(this.contextWindow,"pointermove",this.handlePointerMove),Jy(this.contextWindow,"pointerup",this.handlePointerUp),Jy(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ed(this.updatePoint)}};function n5(e,t){return t?{point:t(e.point)}:e}function BP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function r5({point:e},t){return{point:e,delta:BP(e,nW(t)),offset:BP(e,bve(t)),velocity:wve(t,.1)}}function bve(e){return e[0]}function nW(e){return e[e.length-1]}function wve(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=nW(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Hl(t)));)n--;if(!r)return{x:0,y:0};const a=ql(s.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const i={x:(s.x-r.x)/a,y:(s.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Cve(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Mr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Mr(n,e,r.max):Math.min(e,n)),e}function FP(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Sve(e,{top:t,left:n,bottom:r,right:s}){return{x:FP(e.x,n,s),y:FP(e.y,t,r)}}function UP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _ve(e,t){return{x:UP(e.x,t.x),y:UP(e.y,t.y)}}function jve(e,t){let n=.5;const r=ka(e),s=ka(t);return s>r?n=S1(t.min,t.max-r,e.min):r>s&&(n=S1(e.min,e.max-s,t.min)),Yu(0,1,n)}function Eve(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const GA=.35;function $ve(e=GA){return e===!1?e=0:e===!0&&(e=GA),{x:GP(e,"left","right"),y:GP(e,"top","bottom")}}function GP(e,t,n){return{min:zP(e,t),max:zP(e,n)}}function zP(e,t){return typeof e=="number"?e:e[t]||0}const Rve=new WeakMap;let Ove=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Qr(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ix(h).point)},a=(h,g)=>{const{drag:v,dragPropagation:w,onDragStart:C}=this.getProps();if(v&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yme(v),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),to(E=>{let $=this.getAxisMotionValue(E).get()||0;if(Kl.test($)){const{projection:O}=this.visualElement;if(O&&O.layout){const N=O.layout.layoutBox[E];N&&($=ka(N)*(parseFloat($)/100))}}this.originPoint[E]=$}),C&&Pr.postRender(()=>C(h,g)),VA(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},i=(h,g)=>{const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:C,onDrag:_}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:E}=g;if(w&&this.currentDirection===null){this.currentDirection=Tve(E),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",g.point,E),this.updateAxis("y",g.point,E),this.visualElement.render(),_&&_(h,g)},l=(h,g)=>this.stop(h,g),u=()=>to(h=>{var g;return this.getAnimationState(h)==="paused"&&((g=this.getAxisMotionValue(h).animation)==null?void 0:g.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new tW(t,{onSessionStart:s,onStart:a,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:eW(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Pr.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Qw(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Cve(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)==null?void 0:t.layout,a=this.constraints;n&&gg(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Sve(s.layoutBox,n):this.constraints=!1,this.elastic=$ve(r),a!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&to(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Eve(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gg(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=yve(r,s.root,this.visualElement.getTransformPagePoint());let i=_ve(s.layout.layoutBox,a);if(n){const l=n(uve(i));this.hasMutatedConstraints=!!l,l&&(i=YX(l))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=to(h=>{if(!Qw(h,n,this.currentDirection))return;let g=u&&u[h]||{};i&&(g={min:0,max:0});const v=s?200:1e6,w=s?40:1e7,C={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...a,...g};return this.startAxisValueAnimation(h,C)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return VA(this.visualElement,t),r.start(jN(t,r,0,n,this.visualElement,!1))}stopAnimation(){to(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){to(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps();return r[n]||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){to(n=>{const{drag:r}=this.getProps();if(!Qw(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:l}=s.layout.layoutBox[n];a.set(t[n]-Mr(i,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gg(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};to(i=>{const l=this.getAxisMotionValue(i);if(l&&this.constraints!==!1){const u=l.get();s[i]=jve({min:u,max:u},this.constraints[i])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),to(i=>{if(!Qw(i,t,null))return;const l=this.getAxisMotionValue(i),{min:u,max:f}=this.constraints[i];l.set(Mr(u,f,s[i]))})}addListeners(){if(!this.visualElement.current)return;Rve.set(this.visualElement,this);const t=this.visualElement.current,n=Jy(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();gg(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Pr.read(r);const i=O1(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(to(h=>{const g=this.getAxisMotionValue(h);g&&(this.originPoint[h]+=u[h].translate,g.set(g.get()+u[h].translate))}),this.visualElement.render())});return()=>{i(),n(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:i=GA,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:a,dragElastic:i,dragMomentum:l}}};function Qw(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Tve(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}let Ave=class extends Pd{constructor(t){super(t),this.removeGroupControls=oo,this.removeListeners=oo,this.controls=new Ove(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oo}unmount(){this.removeGroupControls(),this.removeListeners()}};const HP=e=>(t,n)=>{e&&Pr.postRender(()=>e(t,n))};let kve=class extends Pd{constructor(){super(...arguments),this.removePointerDownListener=oo}onPointerDown(t){this.session=new tW(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eW(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:HP(t),onStart:HP(n),onMove:r,onEnd:(a,i)=>{delete this.session,s&&Pr.postRender(()=>s(a,i))}}}mount(){this.removePointerDownListener=Jy(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const LC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fy={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(qt.test(e))e=parseFloat(e);else return e;const n=qP(e,t.target.x),r=qP(e,t.target.y);return`${n}% ${r}%`}},Nve={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=$d.parse(e);if(s.length>5)return r;const a=$d.createTransformer(e),i=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;s[0+i]/=l,s[1+i]/=u;const f=Mr(l,u,.5);return typeof s[2+i]=="number"&&(s[2+i]/=f),typeof s[3+i]=="number"&&(s[3+i]/=f),a(s)}};let Lve=class extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:a}=t;yge(Mve),a&&(n.group&&n.group.add(a),r&&r.register&&s&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),LC.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:a}=this.props,{projection:i}=r;return i&&(i.isPresent=a,s||t.layoutDependency!==n||n===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Pr.postRender(()=>{const l=i.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),mN.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function rW(e){const[t,n]=UZ(),r=y.useContext(q8);return d.jsx(Lve,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(MX),isPresent:t,safeToRemove:n})}const Mve={borderRadius:{...fy,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fy,borderTopRightRadius:fy,borderBottomLeftRadius:fy,borderBottomRightRadius:fy,boxShadow:Nve};function Ive(e,t,n){const r=ua(e)?e:Mg(e);return r.start(jN("",r,t,n)),r.animation}function Pve(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Dve=(e,t)=>e.depth-t.depth;let Vve=class{constructor(){this.children=[],this.isDirty=!1}add(t){X8(this.children,t),this.isDirty=!0}remove(t){W8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dve),this.isDirty=!1,this.children.forEach(t)}};function Bve(e,t){const n=ri.now(),r=({timestamp:s})=>{const a=s-n;a>=t&&(Ed(r),e(a-t))};return Pr.setup(r,!0),()=>Ed(r)}const sW=["TopLeft","TopRight","BottomLeft","BottomRight"],Fve=sW.length,KP=e=>typeof e=="string"?parseFloat(e):e,YP=e=>typeof e=="number"||qt.test(e);function Uve(e,t,n,r,s,a){s?(e.opacity=Mr(0,n.opacity??1,Gve(r)),e.opacityExit=Mr(t.opacity??1,0,zve(r))):a&&(e.opacity=Mr(t.opacity??1,n.opacity??1,r));for(let i=0;i<Fve;i++){const l=`border${sW[i]}Radius`;let u=ZP(t,l),f=ZP(n,l);u===void 0&&f===void 0||(u||(u=0),f||(f=0),u===0||f===0||YP(u)===YP(f)?(e[l]=Math.max(Mr(KP(u),KP(f),r),0),(Kl.test(f)||Kl.test(u))&&(e[l]+="%")):e[l]=f)}(t.rotate||n.rotate)&&(e.rotate=Mr(t.rotate||0,n.rotate||0,r))}function ZP(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Gve=aW(0,.5,JZ),zve=aW(.5,.95,oo);function aW(e,t,n){return r=>r<e?0:r>t?1:n(S1(e,t,r))}function XP(e,t){e.min=t.min,e.max=t.max}function Qi(e,t){XP(e.x,t.x),XP(e.y,t.y)}function WP(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function QP(e,t,n,r,s){return e-=t,e=yS(e,1/n,r),s!==void 0&&(e=yS(e,1/s,r)),e}function Hve(e,t=0,n=1,r=.5,s,a=e,i=e){if(Kl.test(t)&&(t=parseFloat(t),t=Mr(i.min,i.max,t/100)-i.min),typeof t!="number")return;let l=Mr(a.min,a.max,r);e===a&&(l-=t),e.min=QP(e.min,t,n,l,s),e.max=QP(e.max,t,n,l,s)}function JP(e,t,[n,r,s],a,i){Hve(e,t[n],t[r],t[s],t.scale,a,i)}const qve=["x","scaleX","originX"],Kve=["y","scaleY","originY"];function eD(e,t,n,r){JP(e.x,t,qve,n?n.x:void 0,r?r.x:void 0),JP(e.y,t,Kve,n?n.y:void 0,r?r.y:void 0)}function tD(e){return e.translate===0&&e.scale===1}function iW(e){return tD(e.x)&&tD(e.y)}function nD(e,t){return e.min===t.min&&e.max===t.max}function Yve(e,t){return nD(e.x,t.x)&&nD(e.y,t.y)}function rD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oW(e,t){return rD(e.x,t.x)&&rD(e.y,t.y)}function sD(e){return ka(e.x)/ka(e.y)}function aD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let Zve=class{constructor(){this.members=[]}add(t){X8(this.members,t),t.scheduleRender()}remove(t){if(W8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Xve(e,t,n){let r="";const s=e.x.translate/t.x,a=e.y.translate/t.y,i=n?.z||0;if((s||a||i)&&(r=`translate3d(${s}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:g,rotateY:v,skewX:w,skewY:C}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),g&&(r+=`rotateX(${g}deg) `),v&&(r+=`rotateY(${v}deg) `),w&&(r+=`skewX(${w}deg) `),C&&(r+=`skewY(${C}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const s5=["","X","Y","Z"],Wve={visibility:"hidden"},Qve=1e3;let Jve=0;function a5(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function lW(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zX(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Pr,!(s||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&lW(r)}function uW({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},i=t?.()){this.id=Jve++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(n0e),this.nodes.forEach(o0e),this.nodes.forEach(l0e),this.nodes.forEach(r0e)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vve)}addEventListener(a,i){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new eN),this.eventHandlers.get(a).add(i)}notifyListeners(a,...i){const l=this.eventHandlers.get(a);l&&l.notify(...i)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Pve(a),this.instance=a;const{layoutId:i,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Bve(h,250),LC.hasAnimatedSinceResize&&(LC.hasAnimatedSinceResize=!1,this.nodes.forEach(oD))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||u.getDefaultTransition()||h0e,{onLayoutAnimationStart:C,onLayoutAnimationComplete:_}=u.getProps(),E=!this.targetLayout||!oW(this.targetLayout,v),$=!h&&g;if(this.options.layoutRoot||this.resumeFrom||$||h&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,$);const O={...hN(w,"layout"),onPlay:C,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||oD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ed(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(u0e),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lW(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(iD);return}this.isUpdating||this.nodes.forEach(a0e),this.isUpdating=!1,this.nodes.forEach(i0e),this.nodes.forEach(e0e),this.nodes.forEach(t0e),this.clearAllSnapshots();const a=ri.now();Ns.delta=Yu(0,1e3/60,a-Ns.timestamp),Ns.timestamp=a,Ns.isProcessing=!0,XE.update.process(Ns),XE.preRender.process(Ns),XE.render.process(Ns),Ns.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mN.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s0e),this.sharedNodes.forEach(c0e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ka(this.snapshot.measuredBox.x)&&!ka(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Qr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(i=!1),i&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!iW(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;a&&this.instance&&(i||lh(this.latestValues)||f)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const i=this.measurePageBox();let l=this.removeElementScroll(i);return a&&(l=this.removeTransform(l)),p0e(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:i}=this.options;if(!i)return Qr();const l=i.measureViewportBox();if(!((a=this.scroll)!=null&&a.wasRoot||this.path.some(m0e))){const{scroll:u}=this.root;u&&(yg(l.x,u.offset.x),yg(l.y,u.offset.y))}return l}removeElementScroll(a){var i;const l=Qr();if(Qi(l,a),(i=this.scroll)!=null&&i.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:g}=f;f!==this.root&&h&&g.layoutScroll&&(h.wasRoot&&Qi(l,a),yg(l.x,h.offset.x),yg(l.y,h.offset.y))}return l}applyTransform(a,i=!1){const l=Qr();Qi(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];!i&&f.options.layoutScroll&&f.scroll&&f!==f.root&&xg(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),lh(f.latestValues)&&xg(l,f.latestValues)}return lh(this.latestValues)&&xg(l,this.latestValues),l}removeTransform(a){const i=Qr();Qi(i,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!lh(u.latestValues))continue;FA(u.latestValues)&&u.updateSnapshot();const f=Qr(),h=u.measurePageBox();Qi(f,h),eD(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return lh(this.latestValues)&&eD(i,this.latestValues),i}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ns.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var i;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(i=this.parent)!=null&&i.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Ns.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qr(),this.relativeTargetOrigin=Qr(),t1(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Qi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Qr(),this.targetWithTransforms=Qr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gve(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qi(this.target,this.layout.layoutBox),QX(this.target,this.targetDelta)):Qi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Qr(),this.relativeTargetOrigin=Qr(),t1(this.relativeTargetOrigin,this.target,g.target),Qi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||FA(this.parent.latestValues)||WX(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const i=this.getLead(),l=!!this.resumingFrom||this!==i;let u=!0;if((this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ns.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Qi(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;vve(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Qr());const{target:w}=i;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(WP(this.prevProjectionDelta.x,this.projectionDelta.x),WP(this.prevProjectionDelta.y,this.projectionDelta.y)),e1(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!aD(this.projectionDelta.x,this.prevProjectionDelta.x)||!aD(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var i;if((i=this.options.visualElement)==null||i.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vg(),this.projectionDelta=vg(),this.projectionDeltaWithTransform=vg()}setAnimationOrigin(a,i=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},h=vg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const g=Qr(),v=l?l.source:void 0,w=this.layout?this.layout.source:void 0,C=v!==w,_=this.getStack(),E=!_||_.members.length<=1,$=!!(C&&!E&&this.options.crossfade===!0&&!this.path.some(f0e));this.animationProgress=0;let O;this.mixTargetDelta=N=>{const M=N/1e3;lD(h.x,a.x,M),lD(h.y,a.y,M),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(t1(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),d0e(this.relativeTarget,this.relativeTargetOrigin,g,M),O&&Yve(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Qr()),Qi(O,this.relativeTarget)),C&&(this.animationValues=f,Uve(f,u,this.latestValues,M,$,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var i,l,u;this.notifyListeners("animationStart"),(i=this.currentAnimation)==null||i.stop(!1),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(!1),this.pendingAnimation&&(Ed(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pr.update(()=>{LC.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mg(0)),this.currentAnimation=Ive(this.motionValue,[0,1e3],{...a,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),a.onUpdate&&a.onUpdate(f)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qve),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:i,target:l,layout:u,latestValues:f}=a;if(!(!i||!l||!u)){if(this!==a&&this.layout&&u&&cW(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Qr();const h=ka(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const g=ka(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+g}Qi(i,l),xg(i,f),e1(this.projectionDeltaWithTransform,this.layoutCorrected,i,f)}}registerSharedNode(a,i){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Zve),this.sharedNodes.get(a).add(i);const l=i.options.initialPromotionConfig;i.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(i):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:i,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let i=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;const u={};l.z&&a5("z",a,u,this.animationValues);for(let f=0;f<s5.length;f++)a5(`rotate${s5[f]}`,a,u,this.animationValues),a5(`skew${s5[f]}`,a,u,this.animationValues);a.render();for(const f in u)a.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Wve;const i={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=NC(a?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none",i;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=NC(a?.pointerEvents)||""),this.hasProjected&&!lh(this.latestValues)&&(v.transform=l?l({},""):"none",this.hasProjected=!1),v}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),i.transform=Xve(this.projectionDeltaWithTransform,this.treeScale,f),l&&(i.transform=l(f,i.transform));const{x:h,y:g}=this.projectionDelta;i.transformOrigin=`${h.origin*100}% ${g.origin*100}% 0`,u.animationValues?i.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:i.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in $1){if(f[v]===void 0)continue;const{correct:w,applyTo:C,isCSSVariable:_}=$1[v],E=i.transform==="none"?f[v]:w(f[v],u);if(C){const $=C.length;for(let O=0;O<$;O++)i[C[O]]=E}else _?this.options.visualElement.renderState.vars[v]=E:i[v]=E}return this.options.layoutId&&(i.pointerEvents=u===this?NC(a?.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var i;return(i=a.currentAnimation)==null?void 0:i.stop(!1)}),this.root.nodes.forEach(iD),this.root.sharedNodes.clear()}}}function e0e(e){e.updateLayout()}function t0e(e){var t;const n=((t=e.resumeFrom)==null?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:a}=e.options,i=n.source!==e.layout.source;a==="size"?to(g=>{const v=i?n.measuredBox[g]:n.layoutBox[g],w=ka(v);v.min=r[g].min,v.max=v.min+w}):cW(a,n.layoutBox,r)&&to(g=>{const v=i?n.measuredBox[g]:n.layoutBox[g],w=ka(r[g]);v.max=v.min+w,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+w)});const l=vg();e1(l,r,n.layoutBox);const u=vg();i?e1(u,e.applyTransform(s,!0),n.measuredBox):e1(u,r,n.layoutBox);const f=!iW(l);let h=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:v,layout:w}=g;if(v&&w){const C=Qr();t1(C,n.layoutBox,v.layoutBox);const _=Qr();t1(_,r,w.layoutBox),oW(C,_)||(h=!0),g.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=C,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function n0e(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function r0e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s0e(e){e.clearSnapshot()}function iD(e){e.clearMeasurements()}function a0e(e){e.isLayoutDirty=!1}function i0e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function o0e(e){e.resolveTargetDelta()}function l0e(e){e.calcProjection()}function u0e(e){e.resetSkewAndRotation()}function c0e(e){e.removeLeadSnapshot()}function lD(e,t,n){e.translate=Mr(t.translate,0,n),e.scale=Mr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uD(e,t,n,r){e.min=Mr(t.min,n.min,r),e.max=Mr(t.max,n.max,r)}function d0e(e,t,n,r){uD(e.x,t.x,n.x,r),uD(e.y,t.y,n.y,r)}function f0e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const h0e={duration:.45,ease:[.4,0,.1,1]},cD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),dD=cD("applewebkit/")&&!cD("chrome/")?Math.round:oo;function fD(e){e.min=dD(e.min),e.max=dD(e.max)}function p0e(e){fD(e.x),fD(e.y)}function cW(e,t,n){return e==="position"||e==="preserve-aspect"&&!mve(sD(t),sD(n),.2)}function m0e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const g0e=uW({attachResizeListener:(e,t)=>O1(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),i5={current:void 0},dW=uW({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!i5.current){const e=new g0e({});e.mount(window),e.setOptions({layoutScroll:!0}),i5.current=e}return i5.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),v0e={pan:{Feature:kve},drag:{Feature:Ave,ProjectionNode:dW,MeasureLayout:rW}};function hD(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,a=r[s];a&&Pr.postRender(()=>a(t,ix(t)))}let y0e=class extends Pd{mount(){const{current:t}=this.node;t&&(this.unmount=Zme(t,(n,r)=>(hD(this.node,r,"Start"),s=>hD(this.node,s,"End"))))}unmount(){}},x0e=class extends Pd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=rx(O1(this.node.current,"focus",()=>this.onFocus()),O1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function pD(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),a=r[s];a&&Pr.postRender(()=>a(t,ix(t)))}let b0e=class extends Pd{mount(){const{current:t}=this.node;t&&(this.unmount=Jme(t,(n,r)=>(pD(this.node,r,"Start"),(s,{success:a})=>pD(this.node,s,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const zA=new WeakMap,o5=new WeakMap,w0e=e=>{const t=zA.get(e.target);t&&t(e)},C0e=e=>{e.forEach(w0e)};function S0e({root:e,...t}){const n=e||document;o5.has(n)||o5.set(n,{});const r=o5.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(C0e,{root:e,...t})),r[s]}function _0e(e,t,n){const r=S0e(t);return zA.set(e,n),r.observe(e),()=>{zA.delete(e),r.unobserve(e)}}const j0e={some:0,all:1};let E0e=class extends Pd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:j0e[s]},l=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:g}=this.node.getProps(),v=f?h:g;v&&v(u)};return _0e(this.node.current,i,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($0e(t,n))&&this.startObserver()}unmount(){}};function $0e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const R0e={inView:{Feature:E0e},tap:{Feature:b0e},focus:{Feature:x0e},hover:{Feature:y0e}},O0e={layout:{ProjectionNode:dW,MeasureLayout:rW}},HA={current:null},fW={current:!1};function T0e(){if(fW.current=!0,!!Y8)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>HA.current=e.matches;e.addListener(t),t()}else HA.current=!1}const A0e=new WeakMap;function k0e(e,t,n){for(const r in t){const s=t[r],a=n[r];if(ua(s))e.addValue(r,s);else if(ua(a))e.addValue(r,Mg(s,{owner:e}));else if(a!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Mg(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const mD=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let N0e=class{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:a,visualState:i},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fN,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=ri.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Pr.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=i;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=_2(n),this.isVariantNode=NX(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in g){const w=g[v];u[v]!==void 0&&ua(w)&&w.set(u[v],!1)}}mount(t){this.current=t,A0e.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),fW.current||T0e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:HA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ed(this.notifyUpdate),Ed(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Jg.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Pr.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),a(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ig){const n=Ig[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Qr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<mD.length;r++){const s=mD[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,i=t[a];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=k0e(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Mg(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(zZ(r)||HZ(r))?r=parseFloat(r):!tge(r)&&$d.test(n)&&(r=EX(t,n)),this.setBaseTarget(t,ua(r)?r.get():r)),ua(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=SN(this.props,r,(n=this.presenceContext)==null?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ua(a)?a:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new eN),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}},hW=class extends N0e{constructor(){super(...arguments),this.KeyframeResolver=zme}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ua(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}};function pW(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}function L0e(e){return window.getComputedStyle(e)}let M0e=class extends hW{constructor(){super(...arguments),this.type="html",this.renderInstance=pW}readValueFromInstance(t,n){if(Jg.has(n))return ume(t,n);{const r=L0e(t),s=(rN(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return JX(t,n)}build(t,n,r){bN(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _N(t,n,r)}};const mW=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function I0e(e,t,n,r){pW(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(mW.has(s)?s:xN(s),t.attrs[s])}let P0e=class extends hW{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Jg.has(n)){const r=jX(n);return r&&r.default||0}return n=mW.has(n)?n:xN(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return GX(t,n,r)}build(t,n,r){VX(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){I0e(t,n,r,s)}mount(t){this.isSVGTag=FX(t.tagName),super.mount(t)}};const D0e=(e,t)=>CN(e)?new P0e(t):new M0e(t,{allowProjection:e!==y.Fragment}),V0e=Mge({...ove,...R0e,...v0e,...O0e},D0e),qA=ige(V0e),B0e={left:"top-0 left-0",right:"top-0 right-0",top:"top-0 left-0",bottom:"bottom-0 left-0"},Ms=({children:e,className:t,isOpen:n,onClose:r,overlayClassName:s,placement:a="right",showOverlay:i=!0,width:l="578px",...u})=>(y.useEffect(()=>{const f=h=>{h.key==="Escape"&&r?.()};return n&&window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[n,r]),d.jsx(GZ,{children:n&&d.jsxs(d.Fragment,{children:[i&&d.jsx(qA.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:We("fixed top-0 left-0 bottom-0 right-0 flex items-center","justify-center p-4 backdrop-blur-[10px] z-[20]",s),onClick:r,"data-testid":u["data-testid"]&&`${u["data-testid"]}-overlay`}),d.jsxs(qA.div,{variants:F0e(a,l),initial:"hidden",animate:"visible",exit:"hidden",className:We("bg-panel flex flex-col shadow-md shadow-bg fixed text-white z-[21]",B0e[a],t),style:{width:a==="left"||a==="right"?l:"100%",height:a==="left"||a==="right"?"100%":l},...u,children:[d.jsx(Fe,{className:"absolute top-2.5 right-4 !px-1 !h-8",onlyIcon:!0,variant:"ghost",onClick:r,"data-testid":"close-button",children:d.jsx(V8,{width:20,height:20})}),e]})]})}));Ms.Header=({children:e,className:t,...n})=>d.jsx("div",{className:We("py-2.5 pl-4 pr-[57px] border-b-2 border-b-bg min-h-[52px] flex items-center",t),...n,children:e});Ms.Body=({children:e,className:t,...n})=>d.jsx("div",{className:We("flex flex-col overflow-y-auto px-4 py-2.5 gap-2.5",t),...n,children:e});Ms.Footer=({children:e,className:t,...n})=>d.jsx("div",{className:We("py-2.5 px-4 border-t-2 border-t-bg min-h-[52px] flex items-center gap-2.5 justify-end",t),...n,children:e});const F0e=(e,t)=>{const n=`-${t}`,r={left:{hidden:{left:n},visible:{left:"0%",right:"unset",bottom:"0",top:"0"}},right:{hidden:{right:n},visible:{right:"0%",left:"unset",bottom:"0",top:"0"}},top:{hidden:{top:n},visible:{top:"0%",bottom:"unset",right:"0",left:"0"}},bottom:{hidden:{bottom:n},visible:{bottom:"0%",top:"unset",right:"0",left:"0"}}}[e];return{hidden:{...r.hidden,transition:{duration:.2}},visible:{...r.visible,transition:{duration:.2}}}},U0e=({children:e,containerRect:t,placement:n})=>{const{top:r,left:s}=y.useMemo(()=>t?{top:n.startsWith("top")?t.top+window.scrollY:t.bottom+window.scrollY,left:n==="topRight"||n==="bottomRight"?t.right+window.scrollX:n==="top"||n==="bottom"?t.left+window.scrollX+Math.round(t.width/2):t.left+window.scrollX}:{},[t]);return t?av.createPortal(d.jsx("div",{className:"absolute z-[999]",style:{top:r,left:s},children:e}),document.body):null},KA=y.forwardRef(({className:e,placementClasses:t,content:n,closeMenuByClick:r,onClose:s,...a},i)=>{const l=u=>{r||u.stopPropagation()};return d.jsx(GZ,{children:d.jsx(qA.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:We("absolute z-10 rounded bg-panel","shadow-md shadow-bg","flex flex-col","min-w-[111px] max-w-[200px]","max-h-[250px] overflow-y-auto",t,e),role:"menu",onClick:l,ref:i,...a,children:typeof n=="function"?n(s):n})})});KA.displayName="DropdownMenu";const gW=({children:e,content:t,className:n,placement:r="bottomLeft",trigger:s="click",isOpen:a,onOpen:i,portal:l=!1,closeMenuByClick:u=!0,offset:f=2,closeOnLeave:h=!0,onClick:g,closeOthers:v=!1,...w})=>{const[C,_]=y.useState(!1),E=y.useRef(null),$=y.useRef(null),O=a!==void 0?a:C,N=K=>{i?i(K):_(K)},M=K=>{var re,ee;if(!K||!v){N(!1);return}const ue=K.target;(u&&(re=$.current)!=null&&re.contains(ue)||!((ee=E.current)!=null&&ee.contains(ue)))&&N(!1)},L=()=>{s==="hover"&&N(!0)},k=()=>{h&&s==="hover"&&N(!1)},T=K=>{v||K.stopPropagation(),s==="click"&&N(!O),g?.(K)},P=K=>{K.target.tagName==="BODY"&&$.current&&!$.current.contains(K.target)&&M(K)};_g(document.body,"wheel",P),_g(document,"click",M),_g(document,"resize",M);const V=y.useMemo(()=>{switch(r){case"bottom":return`left-1/2 -translate-x-1/2 mt-${f}`;case"bottomLeft":return`left-0 mt-${f}`;case"bottomRight":return`right-0 mt-${f}`;case"top":return`left-1/2 -translate-x-1/2 bottom-full mb-${f}`;case"topLeft":return`left-0 bottom-full mb-${f}`;case"topRight":return`right-0 bottom-full mb-${f}`;case"middleRight":return"top-0 left-full";default:return""}},[r]),q=w["data-testid"]&&`${w["data-testid"]}-menu`;return d.jsxs("div",{className:"relative inline-block text-left",onMouseEnter:L,onMouseLeave:k,ref:E,children:[d.jsx("div",{onClick:T,className:"cursor-pointer",role:"button",tabIndex:0,...w,children:e}),O&&d.jsx(d.Fragment,{children:l?d.jsx(U0e,{containerRect:E.current.getBoundingClientRect(),placement:r,children:d.jsx(KA,{className:n,placementClasses:V,content:t,closeMenuByClick:u,onClose:M,ref:$,"data-testid":q})}):d.jsx(KA,{className:n,placementClasses:V,content:t,closeMenuByClick:u,onClose:M,ref:$,"data-testid":q})})]})};var Jw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ev(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ei={},ym={},l5,gD;function vW(){if(gD)return l5;gD=1;var e=typeof Jw=="object"&&Jw&&Jw.Object===Object&&Jw;return l5=e,l5}var u5,vD;function nu(){if(vD)return u5;vD=1;var e=vW(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return u5=n,u5}var c5,yD;function ox(){if(yD)return c5;yD=1;var e=nu(),t=e.Symbol;return c5=t,c5}var d5,xD;function G0e(){if(xD)return d5;xD=1;var e=ox(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,s=e?e.toStringTag:void 0;function a(i){var l=n.call(i,s),u=i[s];try{i[s]=void 0;var f=!0}catch{}var h=r.call(i);return f&&(l?i[s]=u:delete i[s]),h}return d5=a,d5}var f5,bD;function z0e(){if(bD)return f5;bD=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return f5=n,f5}var h5,wD;function Nh(){if(wD)return h5;wD=1;var e=ox(),t=G0e(),n=z0e(),r="[object Null]",s="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?s:r:a&&a in Object(l)?t(l):n(l)}return h5=i,h5}var p5,CD;function Xo(){if(CD)return p5;CD=1;var e=Array.isArray;return p5=e,p5}var m5,SD;function tc(){if(SD)return m5;SD=1;function e(t){return t!=null&&typeof t=="object"}return m5=e,m5}var g5,_D;function H0e(){if(_D)return g5;_D=1;var e=Nh(),t=Xo(),n=tc(),r="[object String]";function s(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return g5=s,g5}var v5,jD;function q0e(){if(jD)return v5;jD=1;function e(t){return function(n,r,s){for(var a=-1,i=Object(n),l=s(n),u=l.length;u--;){var f=l[t?u:++a];if(r(i[f],f,i)===!1)break}return n}}return v5=e,v5}var y5,ED;function K0e(){if(ED)return y5;ED=1;var e=q0e(),t=e();return y5=t,y5}var x5,$D;function Y0e(){if($D)return x5;$D=1;function e(t,n){for(var r=-1,s=Array(t);++r<t;)s[r]=n(r);return s}return x5=e,x5}var b5,RD;function Z0e(){if(RD)return b5;RD=1;var e=Nh(),t=tc(),n="[object Arguments]";function r(s){return t(s)&&e(s)==n}return b5=r,b5}var w5,OD;function yW(){if(OD)return w5;OD=1;var e=Z0e(),t=tc(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(i){return t(i)&&r.call(i,"callee")&&!s.call(i,"callee")};return w5=a,w5}var MC={exports:{}},C5,TD;function X0e(){if(TD)return C5;TD=1;function e(){return!1}return C5=e,C5}MC.exports;var AD;function EN(){return AD||(AD=1,(function(e,t){var n=nu(),r=X0e(),s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===s,l=i?n.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||r;e.exports=f})(MC,MC.exports)),MC.exports}var S5,kD;function xW(){if(kD)return S5;kD=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,s){var a=typeof r;return s=s??e,!!s&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<s}return S5=n,S5}var _5,ND;function $N(){if(ND)return _5;ND=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return _5=t,_5}var j5,LD;function W0e(){if(LD)return j5;LD=1;var e=Nh(),t=$N(),n=tc(),r="[object Arguments]",s="[object Array]",a="[object Boolean]",i="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",g="[object Object]",v="[object RegExp]",w="[object Set]",C="[object String]",_="[object WeakMap]",E="[object ArrayBuffer]",$="[object DataView]",O="[object Float32Array]",N="[object Float64Array]",M="[object Int8Array]",L="[object Int16Array]",k="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",V="[object Uint16Array]",q="[object Uint32Array]",K={};K[O]=K[N]=K[M]=K[L]=K[k]=K[T]=K[P]=K[V]=K[q]=!0,K[r]=K[s]=K[E]=K[a]=K[$]=K[i]=K[l]=K[u]=K[f]=K[h]=K[g]=K[v]=K[w]=K[C]=K[_]=!1;function re(ee){return n(ee)&&t(ee.length)&&!!K[e(ee)]}return j5=re,j5}var E5,MD;function RN(){if(MD)return E5;MD=1;function e(t){return function(n){return t(n)}}return E5=e,E5}var IC={exports:{}};IC.exports;var ID;function ON(){return ID||(ID=1,(function(e,t){var n=vW(),r=t&&!t.nodeType&&t,s=r&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===r,i=a&&n.process,l=(function(){try{var u=s&&s.require&&s.require("util").types;return u||i&&i.binding&&i.binding("util")}catch{}})();e.exports=l})(IC,IC.exports)),IC.exports}var $5,PD;function bW(){if(PD)return $5;PD=1;var e=W0e(),t=RN(),n=ON(),r=n&&n.isTypedArray,s=r?t(r):e;return $5=s,$5}var R5,DD;function wW(){if(DD)return R5;DD=1;var e=Y0e(),t=yW(),n=Xo(),r=EN(),s=xW(),a=bW(),i=Object.prototype,l=i.hasOwnProperty;function u(f,h){var g=n(f),v=!g&&t(f),w=!g&&!v&&r(f),C=!g&&!v&&!w&&a(f),_=g||v||w||C,E=_?e(f.length,String):[],$=E.length;for(var O in f)(h||l.call(f,O))&&!(_&&(O=="length"||w&&(O=="offset"||O=="parent")||C&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||s(O,$)))&&E.push(O);return E}return R5=u,R5}var O5,VD;function TN(){if(VD)return O5;VD=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||e;return n===s}return O5=t,O5}var T5,BD;function CW(){if(BD)return T5;BD=1;function e(t,n){return function(r){return t(n(r))}}return T5=e,T5}var A5,FD;function Q0e(){if(FD)return A5;FD=1;var e=CW(),t=e(Object.keys,Object);return A5=t,A5}var k5,UD;function J0e(){if(UD)return k5;UD=1;var e=TN(),t=Q0e(),n=Object.prototype,r=n.hasOwnProperty;function s(a){if(!e(a))return t(a);var i=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&i.push(l);return i}return k5=s,k5}var N5,GD;function tv(){if(GD)return N5;GD=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return N5=e,N5}var L5,zD;function SW(){if(zD)return L5;zD=1;var e=Nh(),t=tv(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",a="[object Proxy]";function i(l){if(!t(l))return!1;var u=e(l);return u==r||u==s||u==n||u==a}return L5=i,L5}var M5,HD;function j2(){if(HD)return M5;HD=1;var e=SW(),t=$N();function n(r){return r!=null&&t(r.length)&&!e(r)}return M5=n,M5}var I5,qD;function lx(){if(qD)return I5;qD=1;var e=wW(),t=J0e(),n=j2();function r(s){return n(s)?e(s):t(s)}return I5=r,I5}var P5,KD;function _W(){if(KD)return P5;KD=1;var e=K0e(),t=lx();function n(r,s){return r&&e(r,s,t)}return P5=n,P5}var D5,YD;function jW(){if(YD)return D5;YD=1;function e(t){return t}return D5=e,D5}var V5,ZD;function eye(){if(ZD)return V5;ZD=1;var e=jW();function t(n){return typeof n=="function"?n:e}return V5=t,V5}var B5,XD;function AN(){if(XD)return B5;XD=1;var e=_W(),t=eye();function n(r,s){return r&&e(r,t(s))}return B5=n,B5}var F5,WD;function kN(){if(WD)return F5;WD=1;var e=CW(),t=e(Object.getPrototypeOf,Object);return F5=t,F5}var U5,QD;function tye(){if(QD)return U5;QD=1;var e=Nh(),t=kN(),n=tc(),r="[object Object]",s=Function.prototype,a=Object.prototype,i=s.toString,l=a.hasOwnProperty,u=i.call(Object);function f(h){if(!n(h)||e(h)!=r)return!1;var g=t(h);if(g===null)return!0;var v=l.call(g,"constructor")&&g.constructor;return typeof v=="function"&&v instanceof v&&i.call(v)==u}return U5=f,U5}var G5,JD;function EW(){if(JD)return G5;JD=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r<s;)a[r]=n(t[r],r,t);return a}return G5=e,G5}var z5,eV;function nye(){if(eV)return z5;eV=1;function e(){this.__data__=[],this.size=0}return z5=e,z5}var H5,tV;function NN(){if(tV)return H5;tV=1;function e(t,n){return t===n||t!==t&&n!==n}return H5=e,H5}var q5,nV;function E2(){if(nV)return q5;nV=1;var e=NN();function t(n,r){for(var s=n.length;s--;)if(e(n[s][0],r))return s;return-1}return q5=t,q5}var K5,rV;function rye(){if(rV)return K5;rV=1;var e=E2(),t=Array.prototype,n=t.splice;function r(s){var a=this.__data__,i=e(a,s);if(i<0)return!1;var l=a.length-1;return i==l?a.pop():n.call(a,i,1),--this.size,!0}return K5=r,K5}var Y5,sV;function sye(){if(sV)return Y5;sV=1;var e=E2();function t(n){var r=this.__data__,s=e(r,n);return s<0?void 0:r[s][1]}return Y5=t,Y5}var Z5,aV;function aye(){if(aV)return Z5;aV=1;var e=E2();function t(n){return e(this.__data__,n)>-1}return Z5=t,Z5}var X5,iV;function iye(){if(iV)return X5;iV=1;var e=E2();function t(n,r){var s=this.__data__,a=e(s,n);return a<0?(++this.size,s.push([n,r])):s[a][1]=r,this}return X5=t,X5}var W5,oV;function $2(){if(oV)return W5;oV=1;var e=nye(),t=rye(),n=sye(),r=aye(),s=iye();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,W5=a,W5}var Q5,lV;function oye(){if(lV)return Q5;lV=1;var e=$2();function t(){this.__data__=new e,this.size=0}return Q5=t,Q5}var J5,uV;function lye(){if(uV)return J5;uV=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return J5=e,J5}var e$,cV;function uye(){if(cV)return e$;cV=1;function e(t){return this.__data__.get(t)}return e$=e,e$}var t$,dV;function cye(){if(dV)return t$;dV=1;function e(t){return this.__data__.has(t)}return t$=e,t$}var n$,fV;function dye(){if(fV)return n$;fV=1;var e=nu(),t=e["__core-js_shared__"];return n$=t,n$}var r$,hV;function fye(){if(hV)return r$;hV=1;var e=dye(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return r$=n,r$}var s$,pV;function $W(){if(pV)return s$;pV=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return s$=n,s$}var a$,mV;function hye(){if(mV)return a$;mV=1;var e=SW(),t=fye(),n=tv(),r=$W(),s=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){if(!n(v)||t(v))return!1;var w=e(v)?h:a;return w.test(r(v))}return a$=g,a$}var i$,gV;function pye(){if(gV)return i$;gV=1;function e(t,n){return t?.[n]}return i$=e,i$}var o$,vV;function Lh(){if(vV)return o$;vV=1;var e=hye(),t=pye();function n(r,s){var a=t(r,s);return e(a)?a:void 0}return o$=n,o$}var l$,yV;function LN(){if(yV)return l$;yV=1;var e=Lh(),t=nu(),n=e(t,"Map");return l$=n,l$}var u$,xV;function R2(){if(xV)return u$;xV=1;var e=Lh(),t=e(Object,"create");return u$=t,u$}var c$,bV;function mye(){if(bV)return c$;bV=1;var e=R2();function t(){this.__data__=e?e(null):{},this.size=0}return c$=t,c$}var d$,wV;function gye(){if(wV)return d$;wV=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return d$=e,d$}var f$,CV;function vye(){if(CV)return f$;CV=1;var e=R2(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(a){var i=this.__data__;if(e){var l=i[a];return l===t?void 0:l}return r.call(i,a)?i[a]:void 0}return f$=s,f$}var h$,SV;function yye(){if(SV)return h$;SV=1;var e=R2(),t=Object.prototype,n=t.hasOwnProperty;function r(s){var a=this.__data__;return e?a[s]!==void 0:n.call(a,s)}return h$=r,h$}var p$,_V;function xye(){if(_V)return p$;_V=1;var e=R2(),t="__lodash_hash_undefined__";function n(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&s===void 0?t:s,this}return p$=n,p$}var m$,jV;function bye(){if(jV)return m$;jV=1;var e=mye(),t=gye(),n=vye(),r=yye(),s=xye();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,m$=a,m$}var g$,EV;function wye(){if(EV)return g$;EV=1;var e=bye(),t=$2(),n=LN();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return g$=r,g$}var v$,$V;function Cye(){if($V)return v$;$V=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return v$=e,v$}var y$,RV;function O2(){if(RV)return y$;RV=1;var e=Cye();function t(n,r){var s=n.__data__;return e(r)?s[typeof r=="string"?"string":"hash"]:s.map}return y$=t,y$}var x$,OV;function Sye(){if(OV)return x$;OV=1;var e=O2();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return x$=t,x$}var b$,TV;function _ye(){if(TV)return b$;TV=1;var e=O2();function t(n){return e(this,n).get(n)}return b$=t,b$}var w$,AV;function jye(){if(AV)return w$;AV=1;var e=O2();function t(n){return e(this,n).has(n)}return w$=t,w$}var C$,kV;function Eye(){if(kV)return C$;kV=1;var e=O2();function t(n,r){var s=e(this,n),a=s.size;return s.set(n,r),this.size+=s.size==a?0:1,this}return C$=t,C$}var S$,NV;function MN(){if(NV)return S$;NV=1;var e=wye(),t=Sye(),n=_ye(),r=jye(),s=Eye();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,S$=a,S$}var _$,LV;function $ye(){if(LV)return _$;LV=1;var e=$2(),t=LN(),n=MN(),r=200;function s(a,i){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!t||u.length<r-1)return u.push([a,i]),this.size=++l.size,this;l=this.__data__=new n(u)}return l.set(a,i),this.size=l.size,this}return _$=s,_$}var j$,MV;function IN(){if(MV)return j$;MV=1;var e=$2(),t=oye(),n=lye(),r=uye(),s=cye(),a=$ye();function i(l){var u=this.__data__=new e(l);this.size=u.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=s,i.prototype.set=a,j$=i,j$}var E$,IV;function Rye(){if(IV)return E$;IV=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return E$=t,E$}var $$,PV;function Oye(){if(PV)return $$;PV=1;function e(t){return this.__data__.has(t)}return $$=e,$$}var R$,DV;function Tye(){if(DV)return R$;DV=1;var e=MN(),t=Rye(),n=Oye();function r(s){var a=-1,i=s==null?0:s.length;for(this.__data__=new e;++a<i;)this.add(s[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,R$=r,R$}var O$,VV;function Aye(){if(VV)return O$;VV=1;function e(t,n){for(var r=-1,s=t==null?0:t.length;++r<s;)if(n(t[r],r,t))return!0;return!1}return O$=e,O$}var T$,BV;function kye(){if(BV)return T$;BV=1;function e(t,n){return t.has(n)}return T$=e,T$}var A$,FV;function RW(){if(FV)return A$;FV=1;var e=Tye(),t=Aye(),n=kye(),r=1,s=2;function a(i,l,u,f,h,g){var v=u&r,w=i.length,C=l.length;if(w!=C&&!(v&&C>w))return!1;var _=g.get(i),E=g.get(l);if(_&&E)return _==l&&E==i;var $=-1,O=!0,N=u&s?new e:void 0;for(g.set(i,l),g.set(l,i);++$<w;){var M=i[$],L=l[$];if(f)var k=v?f(L,M,$,l,i,g):f(M,L,$,i,l,g);if(k!==void 0){if(k)continue;O=!1;break}if(N){if(!t(l,function(T,P){if(!n(N,P)&&(M===T||h(M,T,u,f,g)))return N.push(P)})){O=!1;break}}else if(!(M===L||h(M,L,u,f,g))){O=!1;break}}return g.delete(i),g.delete(l),O}return A$=a,A$}var k$,UV;function OW(){if(UV)return k$;UV=1;var e=nu(),t=e.Uint8Array;return k$=t,k$}var N$,GV;function Nye(){if(GV)return N$;GV=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s,a){r[++n]=[a,s]}),r}return N$=e,N$}var L$,zV;function Lye(){if(zV)return L$;zV=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s){r[++n]=s}),r}return L$=e,L$}var M$,HV;function Mye(){if(HV)return M$;HV=1;var e=ox(),t=OW(),n=NN(),r=RW(),s=Nye(),a=Lye(),i=1,l=2,u="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Map]",v="[object Number]",w="[object RegExp]",C="[object Set]",_="[object String]",E="[object Symbol]",$="[object ArrayBuffer]",O="[object DataView]",N=e?e.prototype:void 0,M=N?N.valueOf:void 0;function L(k,T,P,V,q,K,re){switch(P){case O:if(k.byteLength!=T.byteLength||k.byteOffset!=T.byteOffset)return!1;k=k.buffer,T=T.buffer;case $:return!(k.byteLength!=T.byteLength||!K(new t(k),new t(T)));case u:case f:case v:return n(+k,+T);case h:return k.name==T.name&&k.message==T.message;case w:case _:return k==T+"";case g:var ee=s;case C:var ue=V&i;if(ee||(ee=a),k.size!=T.size&&!ue)return!1;var he=re.get(k);if(he)return he==T;V|=l,re.set(k,T);var X=r(ee(k),ee(T),V,q,K,re);return re.delete(k),X;case E:if(M)return M.call(k)==M.call(T)}return!1}return M$=L,M$}var I$,qV;function TW(){if(qV)return I$;qV=1;function e(t,n){for(var r=-1,s=n.length,a=t.length;++r<s;)t[a+r]=n[r];return t}return I$=e,I$}var P$,KV;function AW(){if(KV)return P$;KV=1;var e=TW(),t=Xo();function n(r,s,a){var i=s(r);return t(r)?i:e(i,a(r))}return P$=n,P$}var D$,YV;function Iye(){if(YV)return D$;YV=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,a=0,i=[];++r<s;){var l=t[r];n(l,r,t)&&(i[a++]=l)}return i}return D$=e,D$}var V$,ZV;function kW(){if(ZV)return V$;ZV=1;function e(){return[]}return V$=e,V$}var B$,XV;function PN(){if(XV)return B$;XV=1;var e=Iye(),t=kW(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(i){return i==null?[]:(i=Object(i),e(s(i),function(l){return r.call(i,l)}))}:t;return B$=a,B$}var F$,WV;function NW(){if(WV)return F$;WV=1;var e=AW(),t=PN(),n=lx();function r(s){return e(s,n,t)}return F$=r,F$}var U$,QV;function Pye(){if(QV)return U$;QV=1;var e=NW(),t=1,n=Object.prototype,r=n.hasOwnProperty;function s(a,i,l,u,f,h){var g=l&t,v=e(a),w=v.length,C=e(i),_=C.length;if(w!=_&&!g)return!1;for(var E=w;E--;){var $=v[E];if(!(g?$ in i:r.call(i,$)))return!1}var O=h.get(a),N=h.get(i);if(O&&N)return O==i&&N==a;var M=!0;h.set(a,i),h.set(i,a);for(var L=g;++E<w;){$=v[E];var k=a[$],T=i[$];if(u)var P=g?u(T,k,$,i,a,h):u(k,T,$,a,i,h);if(!(P===void 0?k===T||f(k,T,l,u,h):P)){M=!1;break}L||(L=$=="constructor")}if(M&&!L){var V=a.constructor,q=i.constructor;V!=q&&"constructor"in a&&"constructor"in i&&!(typeof V=="function"&&V instanceof V&&typeof q=="function"&&q instanceof q)&&(M=!1)}return h.delete(a),h.delete(i),M}return U$=s,U$}var G$,JV;function Dye(){if(JV)return G$;JV=1;var e=Lh(),t=nu(),n=e(t,"DataView");return G$=n,G$}var z$,eB;function Vye(){if(eB)return z$;eB=1;var e=Lh(),t=nu(),n=e(t,"Promise");return z$=n,z$}var H$,tB;function Bye(){if(tB)return H$;tB=1;var e=Lh(),t=nu(),n=e(t,"Set");return H$=n,H$}var q$,nB;function Fye(){if(nB)return q$;nB=1;var e=Lh(),t=nu(),n=e(t,"WeakMap");return q$=n,q$}var K$,rB;function T2(){if(rB)return K$;rB=1;var e=Dye(),t=LN(),n=Vye(),r=Bye(),s=Fye(),a=Nh(),i=$W(),l="[object Map]",u="[object Object]",f="[object Promise]",h="[object Set]",g="[object WeakMap]",v="[object DataView]",w=i(e),C=i(t),_=i(n),E=i(r),$=i(s),O=a;return(e&&O(new e(new ArrayBuffer(1)))!=v||t&&O(new t)!=l||n&&O(n.resolve())!=f||r&&O(new r)!=h||s&&O(new s)!=g)&&(O=function(N){var M=a(N),L=M==u?N.constructor:void 0,k=L?i(L):"";if(k)switch(k){case w:return v;case C:return l;case _:return f;case E:return h;case $:return g}return M}),K$=O,K$}var Y$,sB;function Uye(){if(sB)return Y$;sB=1;var e=IN(),t=RW(),n=Mye(),r=Pye(),s=T2(),a=Xo(),i=EN(),l=bW(),u=1,f="[object Arguments]",h="[object Array]",g="[object Object]",v=Object.prototype,w=v.hasOwnProperty;function C(_,E,$,O,N,M){var L=a(_),k=a(E),T=L?h:s(_),P=k?h:s(E);T=T==f?g:T,P=P==f?g:P;var V=T==g,q=P==g,K=T==P;if(K&&i(_)){if(!i(E))return!1;L=!0,V=!1}if(K&&!V)return M||(M=new e),L||l(_)?t(_,E,$,O,N,M):n(_,E,T,$,O,N,M);if(!($&u)){var re=V&&w.call(_,"__wrapped__"),ee=q&&w.call(E,"__wrapped__");if(re||ee){var ue=re?_.value():_,he=ee?E.value():E;return M||(M=new e),N(ue,he,$,O,M)}}return K?(M||(M=new e),r(_,E,$,O,N,M)):!1}return Y$=C,Y$}var Z$,aB;function LW(){if(aB)return Z$;aB=1;var e=Uye(),t=tc();function n(r,s,a,i,l){return r===s?!0:r==null||s==null||!t(r)&&!t(s)?r!==r&&s!==s:e(r,s,a,i,n,l)}return Z$=n,Z$}var X$,iB;function Gye(){if(iB)return X$;iB=1;var e=IN(),t=LW(),n=1,r=2;function s(a,i,l,u){var f=l.length,h=f,g=!u;if(a==null)return!h;for(a=Object(a);f--;){var v=l[f];if(g&&v[2]?v[1]!==a[v[0]]:!(v[0]in a))return!1}for(;++f<h;){v=l[f];var w=v[0],C=a[w],_=v[1];if(g&&v[2]){if(C===void 0&&!(w in a))return!1}else{var E=new e;if(u)var $=u(C,_,w,a,i,E);if(!($===void 0?t(_,C,n|r,u,E):$))return!1}}return!0}return X$=s,X$}var W$,oB;function MW(){if(oB)return W$;oB=1;var e=tv();function t(n){return n===n&&!e(n)}return W$=t,W$}var Q$,lB;function zye(){if(lB)return Q$;lB=1;var e=MW(),t=lx();function n(r){for(var s=t(r),a=s.length;a--;){var i=s[a],l=r[i];s[a]=[i,l,e(l)]}return s}return Q$=n,Q$}var J$,uB;function IW(){if(uB)return J$;uB=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return J$=e,J$}var e3,cB;function Hye(){if(cB)return e3;cB=1;var e=Gye(),t=zye(),n=IW();function r(s){var a=t(s);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(i){return i===s||e(i,s,a)}}return e3=r,e3}var t3,dB;function DN(){if(dB)return t3;dB=1;var e=Nh(),t=tc(),n="[object Symbol]";function r(s){return typeof s=="symbol"||t(s)&&e(s)==n}return t3=r,t3}var n3,fB;function VN(){if(fB)return n3;fB=1;var e=Xo(),t=DN(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(a,i){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||i!=null&&a in Object(i)}return n3=s,n3}var r3,hB;function qye(){if(hB)return r3;hB=1;var e=MN(),t="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var a=function(){var i=arguments,l=s?s.apply(this,i):i[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,i);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,r3=n,r3}var s3,pB;function Kye(){if(pB)return s3;pB=1;var e=qye(),t=500;function n(r){var s=e(r,function(i){return a.size===t&&a.clear(),i}),a=s.cache;return s}return s3=n,s3}var a3,mB;function Yye(){if(mB)return a3;mB=1;var e=Kye(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(t,function(i,l,u,f){a.push(u?f.replace(n,"$1"):l||i)}),a});return a3=r,a3}var i3,gB;function Zye(){if(gB)return i3;gB=1;var e=ox(),t=EW(),n=Xo(),r=DN(),s=e?e.prototype:void 0,a=s?s.toString:void 0;function i(l){if(typeof l=="string")return l;if(n(l))return t(l,i)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return i3=i,i3}var o3,vB;function Xye(){if(vB)return o3;vB=1;var e=Zye();function t(n){return n==null?"":e(n)}return o3=t,o3}var l3,yB;function PW(){if(yB)return l3;yB=1;var e=Xo(),t=VN(),n=Yye(),r=Xye();function s(a,i){return e(a)?a:t(a,i)?[a]:n(r(a))}return l3=s,l3}var u3,xB;function A2(){if(xB)return u3;xB=1;var e=DN();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return u3=t,u3}var c3,bB;function DW(){if(bB)return c3;bB=1;var e=PW(),t=A2();function n(r,s){s=e(s,r);for(var a=0,i=s.length;r!=null&&a<i;)r=r[t(s[a++])];return a&&a==i?r:void 0}return c3=n,c3}var d3,wB;function Wye(){if(wB)return d3;wB=1;var e=DW();function t(n,r,s){var a=n==null?void 0:e(n,r);return a===void 0?s:a}return d3=t,d3}var f3,CB;function Qye(){if(CB)return f3;CB=1;function e(t,n){return t!=null&&n in Object(t)}return f3=e,f3}var h3,SB;function Jye(){if(SB)return h3;SB=1;var e=PW(),t=yW(),n=Xo(),r=xW(),s=$N(),a=A2();function i(l,u,f){u=e(u,l);for(var h=-1,g=u.length,v=!1;++h<g;){var w=a(u[h]);if(!(v=l!=null&&f(l,w)))break;l=l[w]}return v||++h!=g?v:(g=l==null?0:l.length,!!g&&s(g)&&r(w,g)&&(n(l)||t(l)))}return h3=i,h3}var p3,_B;function e1e(){if(_B)return p3;_B=1;var e=Qye(),t=Jye();function n(r,s){return r!=null&&t(r,s,e)}return p3=n,p3}var m3,jB;function t1e(){if(jB)return m3;jB=1;var e=LW(),t=Wye(),n=e1e(),r=VN(),s=MW(),a=IW(),i=A2(),l=1,u=2;function f(h,g){return r(h)&&s(g)?a(i(h),g):function(v){var w=t(v,h);return w===void 0&&w===g?n(v,h):e(g,w,l|u)}}return m3=f,m3}var g3,EB;function n1e(){if(EB)return g3;EB=1;function e(t){return function(n){return n?.[t]}}return g3=e,g3}var v3,$B;function r1e(){if($B)return v3;$B=1;var e=DW();function t(n){return function(r){return e(r,n)}}return v3=t,v3}var y3,RB;function s1e(){if(RB)return y3;RB=1;var e=n1e(),t=r1e(),n=VN(),r=A2();function s(a){return n(a)?e(r(a)):t(a)}return y3=s,y3}var x3,OB;function a1e(){if(OB)return x3;OB=1;var e=Hye(),t=t1e(),n=jW(),r=Xo(),s=s1e();function a(i){return typeof i=="function"?i:i==null?n:typeof i=="object"?r(i)?t(i[0],i[1]):e(i):s(i)}return x3=a,x3}var b3,TB;function i1e(){if(TB)return b3;TB=1;var e=j2();function t(n,r){return function(s,a){if(s==null)return s;if(!e(s))return n(s,a);for(var i=s.length,l=r?i:-1,u=Object(s);(r?l--:++l<i)&&a(u[l],l,u)!==!1;);return s}}return b3=t,b3}var w3,AB;function o1e(){if(AB)return w3;AB=1;var e=_W(),t=i1e(),n=t(e);return w3=n,w3}var C3,kB;function l1e(){if(kB)return C3;kB=1;var e=o1e(),t=j2();function n(r,s){var a=-1,i=t(r)?Array(r.length):[];return e(r,function(l,u,f){i[++a]=s(l,u,f)}),i}return C3=n,C3}var S3,NB;function u1e(){if(NB)return S3;NB=1;var e=EW(),t=a1e(),n=l1e(),r=Xo();function s(a,i){var l=r(a)?e:n;return l(a,t(i,3))}return S3=s,S3}var LB;function c1e(){if(LB)return ym;LB=1,Object.defineProperty(ym,"__esModule",{value:!0}),ym.flattenNames=void 0;var e=H0e(),t=u(e),n=AN(),r=u(n),s=tye(),a=u(s),i=u1e(),l=u(i);function u(h){return h&&h.__esModule?h:{default:h}}var f=ym.flattenNames=function h(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=[];return(0,l.default)(g,function(w){Array.isArray(w)?h(w).map(function(C){return v.push(C)}):(0,a.default)(w)?(0,r.default)(w,function(C,_){C===!0&&v.push(_),v.push(_+"-"+C)}):(0,t.default)(w)&&v.push(w)}),v};return ym.default=f,ym}var xm={},_3,MB;function d1e(){if(MB)return _3;MB=1;function e(t,n){for(var r=-1,s=t==null?0:t.length;++r<s&&n(t[r],r,t)!==!1;);return t}return _3=e,_3}var j3,IB;function f1e(){if(IB)return j3;IB=1;var e=Lh(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return j3=t,j3}var E3,PB;function VW(){if(PB)return E3;PB=1;var e=f1e();function t(n,r,s){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return E3=t,E3}var $3,DB;function BW(){if(DB)return $3;DB=1;var e=VW(),t=NN(),n=Object.prototype,r=n.hasOwnProperty;function s(a,i,l){var u=a[i];(!(r.call(a,i)&&t(u,l))||l===void 0&&!(i in a))&&e(a,i,l)}return $3=s,$3}var R3,VB;function k2(){if(VB)return R3;VB=1;var e=BW(),t=VW();function n(r,s,a,i){var l=!a;a||(a={});for(var u=-1,f=s.length;++u<f;){var h=s[u],g=i?i(a[h],r[h],h,a,r):void 0;g===void 0&&(g=r[h]),l?t(a,h,g):e(a,h,g)}return a}return R3=n,R3}var O3,BB;function h1e(){if(BB)return O3;BB=1;var e=k2(),t=lx();function n(r,s){return r&&e(s,t(s),r)}return O3=n,O3}var T3,FB;function p1e(){if(FB)return T3;FB=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return T3=e,T3}var A3,UB;function m1e(){if(UB)return A3;UB=1;var e=tv(),t=TN(),n=p1e(),r=Object.prototype,s=r.hasOwnProperty;function a(i){if(!e(i))return n(i);var l=t(i),u=[];for(var f in i)f=="constructor"&&(l||!s.call(i,f))||u.push(f);return u}return A3=a,A3}var k3,GB;function BN(){if(GB)return k3;GB=1;var e=wW(),t=m1e(),n=j2();function r(s){return n(s)?e(s,!0):t(s)}return k3=r,k3}var N3,zB;function g1e(){if(zB)return N3;zB=1;var e=k2(),t=BN();function n(r,s){return r&&e(s,t(s),r)}return N3=n,N3}var PC={exports:{}};PC.exports;var HB;function v1e(){return HB||(HB=1,(function(e,t){var n=nu(),r=t&&!t.nodeType&&t,s=r&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===r,i=a?n.Buffer:void 0,l=i?i.allocUnsafe:void 0;function u(f,h){if(h)return f.slice();var g=f.length,v=l?l(g):new f.constructor(g);return f.copy(v),v}e.exports=u})(PC,PC.exports)),PC.exports}var L3,qB;function y1e(){if(qB)return L3;qB=1;function e(t,n){var r=-1,s=t.length;for(n||(n=Array(s));++r<s;)n[r]=t[r];return n}return L3=e,L3}var M3,KB;function x1e(){if(KB)return M3;KB=1;var e=k2(),t=PN();function n(r,s){return e(r,t(r),s)}return M3=n,M3}var I3,YB;function FW(){if(YB)return I3;YB=1;var e=TW(),t=kN(),n=PN(),r=kW(),s=Object.getOwnPropertySymbols,a=s?function(i){for(var l=[];i;)e(l,n(i)),i=t(i);return l}:r;return I3=a,I3}var P3,ZB;function b1e(){if(ZB)return P3;ZB=1;var e=k2(),t=FW();function n(r,s){return e(r,t(r),s)}return P3=n,P3}var D3,XB;function w1e(){if(XB)return D3;XB=1;var e=AW(),t=FW(),n=BN();function r(s){return e(s,n,t)}return D3=r,D3}var V3,WB;function C1e(){if(WB)return V3;WB=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var s=r.length,a=new r.constructor(s);return s&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return V3=n,V3}var B3,QB;function FN(){if(QB)return B3;QB=1;var e=OW();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return B3=t,B3}var F3,JB;function S1e(){if(JB)return F3;JB=1;var e=FN();function t(n,r){var s=r?e(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.byteLength)}return F3=t,F3}var U3,eF;function _1e(){if(eF)return U3;eF=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return U3=t,U3}var G3,tF;function j1e(){if(tF)return G3;tF=1;var e=ox(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(s){return n?Object(n.call(s)):{}}return G3=r,G3}var z3,nF;function E1e(){if(nF)return z3;nF=1;var e=FN();function t(n,r){var s=r?e(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return z3=t,z3}var H3,rF;function $1e(){if(rF)return H3;rF=1;var e=FN(),t=S1e(),n=_1e(),r=j1e(),s=E1e(),a="[object Boolean]",i="[object Date]",l="[object Map]",u="[object Number]",f="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",w="[object ArrayBuffer]",C="[object DataView]",_="[object Float32Array]",E="[object Float64Array]",$="[object Int8Array]",O="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",k="[object Uint16Array]",T="[object Uint32Array]";function P(V,q,K){var re=V.constructor;switch(q){case w:return e(V);case a:case i:return new re(+V);case C:return t(V,K);case _:case E:case $:case O:case N:case M:case L:case k:case T:return s(V,K);case l:return new re;case u:case g:return new re(V);case f:return n(V);case h:return new re;case v:return r(V)}}return H3=P,H3}var q3,sF;function R1e(){if(sF)return q3;sF=1;var e=tv(),t=Object.create,n=(function(){function r(){}return function(s){if(!e(s))return{};if(t)return t(s);r.prototype=s;var a=new r;return r.prototype=void 0,a}})();return q3=n,q3}var K3,aF;function O1e(){if(aF)return K3;aF=1;var e=R1e(),t=kN(),n=TN();function r(s){return typeof s.constructor=="function"&&!n(s)?e(t(s)):{}}return K3=r,K3}var Y3,iF;function T1e(){if(iF)return Y3;iF=1;var e=T2(),t=tc(),n="[object Map]";function r(s){return t(s)&&e(s)==n}return Y3=r,Y3}var Z3,oF;function A1e(){if(oF)return Z3;oF=1;var e=T1e(),t=RN(),n=ON(),r=n&&n.isMap,s=r?t(r):e;return Z3=s,Z3}var X3,lF;function k1e(){if(lF)return X3;lF=1;var e=T2(),t=tc(),n="[object Set]";function r(s){return t(s)&&e(s)==n}return X3=r,X3}var W3,uF;function N1e(){if(uF)return W3;uF=1;var e=k1e(),t=RN(),n=ON(),r=n&&n.isSet,s=r?t(r):e;return W3=s,W3}var Q3,cF;function L1e(){if(cF)return Q3;cF=1;var e=IN(),t=d1e(),n=BW(),r=h1e(),s=g1e(),a=v1e(),i=y1e(),l=x1e(),u=b1e(),f=NW(),h=w1e(),g=T2(),v=C1e(),w=$1e(),C=O1e(),_=Xo(),E=EN(),$=A1e(),O=tv(),N=N1e(),M=lx(),L=BN(),k=1,T=2,P=4,V="[object Arguments]",q="[object Array]",K="[object Boolean]",re="[object Date]",ee="[object Error]",ue="[object Function]",he="[object GeneratorFunction]",X="[object Map]",pe="[object Number]",xe="[object Object]",be="[object RegExp]",Y="[object Set]",se="[object String]",Oe="[object Symbol]",de="[object WeakMap]",_e="[object ArrayBuffer]",Le="[object DataView]",Re="[object Float32Array]",Ye="[object Float64Array]",Xe="[object Int8Array]",Je="[object Int16Array]",Ot="[object Int32Array]",tn="[object Uint8Array]",an="[object Uint8ClampedArray]",Pt="[object Uint16Array]",Wt="[object Uint32Array]",Lt={};Lt[V]=Lt[q]=Lt[_e]=Lt[Le]=Lt[K]=Lt[re]=Lt[Re]=Lt[Ye]=Lt[Xe]=Lt[Je]=Lt[Ot]=Lt[X]=Lt[pe]=Lt[xe]=Lt[be]=Lt[Y]=Lt[se]=Lt[Oe]=Lt[tn]=Lt[an]=Lt[Pt]=Lt[Wt]=!0,Lt[ee]=Lt[ue]=Lt[de]=!1;function Ln(Ge,dt,Z,oe,me,He){var ze,Ke=dt&k,at=dt&T,Dt=dt&P;if(Z&&(ze=me?Z(Ge,oe,me,He):Z(Ge)),ze!==void 0)return ze;if(!O(Ge))return Ge;var ht=_(Ge);if(ht){if(ze=v(Ge),!Ke)return i(Ge,ze)}else{var Jt=g(Ge),jn=Jt==ue||Jt==he;if(E(Ge))return a(Ge,Ke);if(Jt==xe||Jt==V||jn&&!me){if(ze=at||jn?{}:C(Ge),!Ke)return at?u(Ge,s(ze,Ge)):l(Ge,r(ze,Ge))}else{if(!Lt[Jt])return me?Ge:{};ze=w(Ge,Jt,Ke)}}He||(He=new e);var dr=He.get(Ge);if(dr)return dr;He.set(Ge,ze),N(Ge)?Ge.forEach(function(er){ze.add(Ln(er,dt,Z,er,Ge,He))}):$(Ge)&&Ge.forEach(function(er,Zn){ze.set(Zn,Ln(er,dt,Z,Zn,Ge,He))});var fa=Dt?at?h:f:at?L:M,cs=ht?void 0:fa(Ge);return t(cs||Ge,function(er,Zn){cs&&(Zn=er,er=Ge[Zn]),n(ze,Zn,Ln(er,dt,Z,Zn,Ge,He))}),ze}return Q3=Ln,Q3}var J3,dF;function M1e(){if(dF)return J3;dF=1;var e=L1e(),t=1,n=4;function r(s){return e(s,t|n)}return J3=r,J3}var fF;function I1e(){if(fF)return xm;fF=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.mergeClasses=void 0;var e=AN(),t=a(e),n=M1e(),r=a(n),s=Object.assign||function(l){for(var u=1;u<arguments.length;u++){var f=arguments[u];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(l[h]=f[h])}return l};function a(l){return l&&l.__esModule?l:{default:l}}var i=xm.mergeClasses=function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=l.default&&(0,r.default)(l.default)||{};return u.map(function(h){var g=l[h];return g&&(0,t.default)(g,function(v,w){f[w]||(f[w]={}),f[w]=s({},f[w],g[w])}),h}),f};return xm.default=i,xm}var bm={},hF;function P1e(){if(hF)return bm;hF=1,Object.defineProperty(bm,"__esModule",{value:!0}),bm.autoprefix=void 0;var e=AN(),t=r(e),n=Object.assign||function(i){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(i[f]=u[f])}return i};function r(i){return i&&i.__esModule?i:{default:i}}var s={borderRadius:function(i){return{msBorderRadius:i,MozBorderRadius:i,OBorderRadius:i,WebkitBorderRadius:i,borderRadius:i}},boxShadow:function(i){return{msBoxShadow:i,MozBoxShadow:i,OBoxShadow:i,WebkitBoxShadow:i,boxShadow:i}},userSelect:function(i){return{WebkitTouchCallout:i,KhtmlUserSelect:i,MozUserSelect:i,msUserSelect:i,WebkitUserSelect:i,userSelect:i}},flex:function(i){return{WebkitBoxFlex:i,MozBoxFlex:i,WebkitFlex:i,msFlex:i,flex:i}},flexBasis:function(i){return{WebkitFlexBasis:i,flexBasis:i}},justifyContent:function(i){return{WebkitJustifyContent:i,justifyContent:i}},transition:function(i){return{msTransition:i,MozTransition:i,OTransition:i,WebkitTransition:i,transition:i}},transform:function(i){return{msTransform:i,MozTransform:i,OTransform:i,WebkitTransform:i,transform:i}},absolute:function(i){var l=i&&i.split(" ");return{position:"absolute",top:l&&l[0],right:l&&l[1],bottom:l&&l[2],left:l&&l[3]}},extend:function(i,l){var u=l[i];return u||{extend:i}}},a=bm.autoprefix=function(i){var l={};return(0,t.default)(i,function(u,f){var h={};(0,t.default)(u,function(g,v){var w=s[v];w?h=n({},h,w(g)):h[v]=g}),l[f]=h}),l};return bm.default=a,bm}var wm={},pF;function D1e(){if(pF)return wm;pF=1,Object.defineProperty(wm,"__esModule",{value:!0}),wm.hover=void 0;var e=Object.assign||function(u){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(u[g]=h[g])}return u},t=U,n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function s(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}function a(u,f){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:u}function i(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(u,f):u.__proto__=f)}var l=wm.hover=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(h){i(g,h);function g(){var v,w,C,_;s(this,g);for(var E=arguments.length,$=Array(E),O=0;O<E;O++)$[O]=arguments[O];return _=(w=(C=a(this,(v=g.__proto__||Object.getPrototypeOf(g)).call.apply(v,[this].concat($))),C),C.state={hover:!1},C.handleMouseOver=function(){return C.setState({hover:!0})},C.handleMouseOut=function(){return C.setState({hover:!1})},C.render=function(){return n.default.createElement(f,{onMouseOver:C.handleMouseOver,onMouseOut:C.handleMouseOut},n.default.createElement(u,e({},C.props,C.state)))},w),a(C,_)}return g})(n.default.Component)};return wm.default=l,wm}var Cm={},mF;function V1e(){if(mF)return Cm;mF=1,Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.active=void 0;var e=Object.assign||function(u){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(u[g]=h[g])}return u},t=U,n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function s(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}function a(u,f){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:u}function i(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(u,f):u.__proto__=f)}var l=Cm.active=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(h){i(g,h);function g(){var v,w,C,_;s(this,g);for(var E=arguments.length,$=Array(E),O=0;O<E;O++)$[O]=arguments[O];return _=(w=(C=a(this,(v=g.__proto__||Object.getPrototypeOf(g)).call.apply(v,[this].concat($))),C),C.state={active:!1},C.handleMouseDown=function(){return C.setState({active:!0})},C.handleMouseUp=function(){return C.setState({active:!1})},C.render=function(){return n.default.createElement(f,{onMouseDown:C.handleMouseDown,onMouseUp:C.handleMouseUp},n.default.createElement(u,e({},C.props,C.state)))},w),a(C,_)}return g})(n.default.Component)};return Cm.default=l,Cm}var eC={},gF;function B1e(){if(gF)return eC;gF=1,Object.defineProperty(eC,"__esModule",{value:!0});var e=function(t,n){var r={},s=function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=i};return t===0&&s("first-child"),t===n-1&&s("last-child"),(t===0||t%2===0)&&s("even"),Math.abs(t%2)===1&&s("odd"),s("nth-child",t),r};return eC.default=e,eC}var vF;function F1e(){if(vF)return ei;vF=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.ReactCSS=ei.loop=ei.handleActive=ei.handleHover=ei.hover=void 0;var e=c1e(),t=v(e),n=I1e(),r=v(n),s=P1e(),a=v(s),i=D1e(),l=v(i),u=V1e(),f=v(u),h=B1e(),g=v(h);function v(C){return C&&C.__esModule?C:{default:C}}ei.hover=l.default,ei.handleHover=l.default,ei.handleActive=f.default,ei.loop=g.default;var w=ei.ReactCSS=function(C){for(var _=arguments.length,E=Array(_>1?_-1:0),$=1;$<_;$++)E[$-1]=arguments[$];var O=(0,t.default)(E),N=(0,r.default)(C,O);return(0,a.default)(N)};return ei.default=w,ei}var UN=F1e();const Xt=ev(UN);var U1e=function(e,t,n,r,s){var a=s.clientWidth,i=s.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,f=l-(s.getBoundingClientRect().left+window.pageXOffset),h=u-(s.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var g=void 0;if(h<0?g=0:h>i?g=1:g=Math.round(h*100/i)/100,t.a!==g)return{h:t.h,s:t.s,l:t.l,a:g,source:"rgb"}}else{var v=void 0;if(f<0?v=0:f>a?v=1:v=Math.round(f*100/a)/100,r!==v)return{h:t.h,s:t.s,l:t.l,a:v,source:"rgb"}}return null},e4={},G1e=function(e,t,n,r){if(typeof document>"u"&&!r)return null;var s=r?new r:document.createElement("canvas");s.width=n*2,s.height=n*2;var a=s.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,s.width,s.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),s.toDataURL()):null},z1e=function(e,t,n,r){var s=e+"-"+t+"-"+n+(r?"-server":"");if(e4[s])return e4[s];var a=G1e(e,t,n,r);return e4[s]=a,a},yF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nv=function(e){var t=e.white,n=e.grey,r=e.size,s=e.renderers,a=e.borderRadius,i=e.boxShadow,l=e.children,u=Xt({default:{grid:{borderRadius:a,boxShadow:i,absolute:"0px 0px 0px 0px",background:"url("+z1e(t,n,r,s.canvas)+") center left"}}});return y.isValidElement(l)?U.cloneElement(l,yF({},l.props,{style:yF({},l.props.style,u.grid)})):U.createElement("div",{style:u.grid})};nv.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var H1e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q1e=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function K1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Y1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var GN=(function(e){Y1e(t,e);function t(){var n,r,s,a;K1e(this,t);for(var i=arguments.length,l=Array(i),u=0;u<i;u++)l[u]=arguments[u];return a=(r=(s=xF(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),s),s.handleChange=function(f){var h=U1e(f,s.props.hsl,s.props.direction,s.props.a,s.container);h&&typeof s.props.onChange=="function"&&s.props.onChange(h,f)},s.handleMouseDown=function(f){s.handleChange(f),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},s.unbindEventListeners=function(){window.removeEventListener("mousemove",s.handleChange),window.removeEventListener("mouseup",s.handleMouseUp)},r),xF(s,a)}return q1e(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,r=this.props.rgb,s=Xt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+r.r+","+r.g+","+r.b+`, 0) 0%,
           rgba(`+r.r+","+r.g+","+r.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:r.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+r.r+","+r.g+","+r.b+`, 0) 0%,
           rgba(`+r.r+","+r.g+","+r.b+", 1) 100%)"},pointer:{left:0,top:r.a*100+"%"}},overwrite:H1e({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return U.createElement("div",{style:s.alpha},U.createElement("div",{style:s.checkboard},U.createElement(nv,{renderers:this.props.renderers})),U.createElement("div",{style:s.gradient}),U.createElement("div",{style:s.container,ref:function(a){return n.container=a},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},U.createElement("div",{style:s.pointer},this.props.pointer?U.createElement(this.props.pointer,this.props):U.createElement("div",{style:s.slider}))))}}]),t})(y.PureComponent||y.Component),Z1e=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function X1e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q1e(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function J1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var exe=1,UW=38,txe=40,nxe=[UW,txe],rxe=function(e){return nxe.indexOf(e)>-1},sxe=function(e){return Number(String(e).replace(/%/g,""))},axe=1,An=(function(e){J1e(t,e);function t(n){W1e(this,t);var r=Q1e(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(s){r.setUpdatedValue(s.target.value,s)},r.handleKeyDown=function(s){var a=sxe(s.target.value);if(!isNaN(a)&&rxe(s.keyCode)){var i=r.getArrowOffset(),l=s.keyCode===UW?a+i:a-i;r.setUpdatedValue(l,s)}},r.handleDrag=function(s){if(r.props.dragLabel){var a=Math.round(r.props.value+s.movementX);a>=0&&a<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(a),s)}},r.handleMouseDown=function(s){r.props.dragLabel&&(s.preventDefault(),r.handleDrag(s),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+axe++,r}return Z1e(t,[{key:"componentDidUpdate",value:function(n,r){this.props.value!==this.state.value&&(n.value!==this.props.value||r.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return X1e({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||exe}},{key:"setUpdatedValue",value:function(n,r){var s=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(s,r),this.setState({value:n})}},{key:"render",value:function(){var n=this,r=Xt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return U.createElement("div",{style:r.wrap},U.createElement("input",{id:this.inputId,style:r.input,ref:function(s){return n.input=s},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?U.createElement("label",{htmlFor:this.inputId,style:r.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t})(y.PureComponent||y.Component),ixe=function(e,t,n,r){var s=r.clientWidth,a=r.clientHeight,i=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=i-(r.getBoundingClientRect().left+window.pageXOffset),f=l-(r.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var h=void 0;if(f<0)h=359;else if(f>a)h=0;else{var g=-(f*100/a)+100;h=360*g/100}if(n.h!==h)return{h,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var v=void 0;if(u<0)v=0;else if(u>s)v=359;else{var w=u*100/s;v=360*w/100}if(n.h!==v)return{h:v,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},oxe=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function lxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function uxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var rv=(function(e){uxe(t,e);function t(){var n,r,s,a;lxe(this,t);for(var i=arguments.length,l=Array(i),u=0;u<i;u++)l[u]=arguments[u];return a=(r=(s=bF(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),s),s.handleChange=function(f){var h=ixe(f,s.props.direction,s.props.hsl,s.container);h&&typeof s.props.onChange=="function"&&s.props.onChange(h,f)},s.handleMouseDown=function(f){s.handleChange(f),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},r),bF(s,a)}return oxe(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,r=this.props.direction,s=r===void 0?"horizontal":r,a=Xt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:s==="vertical"});return U.createElement("div",{style:a.hue},U.createElement("div",{className:"hue-"+s,style:a.container,ref:function(i){return n.container=i},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},U.createElement("style",null,`
            .hue-horizontal {
              background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
                33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
              background: -webkit-linear-gradient(to right, #f00 0%, #ff0
                17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
            }

            .hue-vertical {
              background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
                #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
              background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
                #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
            }
          `),U.createElement("div",{style:a.pointer},this.props.pointer?U.createElement(this.props.pointer,this.props):U.createElement("div",{style:a.slider}))))}}]),t})(y.PureComponent||y.Component),t4={exports:{}},n4,wF;function cxe(){if(wF)return n4;wF=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return n4=e,n4}var r4,CF;function dxe(){if(CF)return r4;CF=1;var e=cxe();function t(){}function n(){}return n.resetWarningCache=t,r4=function(){function r(i,l,u,f,h,g){if(g!==e){var v=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 v.name="Invariant Violation",v}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},r4}var SF;function fxe(){return SF||(SF=1,t4.exports=dxe()()),t4.exports}var hxe=fxe();const tt=ev(hxe);function pxe(){this.__data__=[],this.size=0}function ux(e,t){return e===t||e!==e&&t!==t}function N2(e,t){for(var n=e.length;n--;)if(ux(e[n][0],t))return n;return-1}var mxe=Array.prototype,gxe=mxe.splice;function vxe(e){var t=this.__data__,n=N2(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gxe.call(t,n,1),--this.size,!0}function yxe(e){var t=this.__data__,n=N2(t,e);return n<0?void 0:t[n][1]}function xxe(e){return N2(this.__data__,e)>-1}function bxe(e,t){var n=this.__data__,r=N2(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nc.prototype.clear=pxe;nc.prototype.delete=vxe;nc.prototype.get=yxe;nc.prototype.has=xxe;nc.prototype.set=bxe;function wxe(){this.__data__=new nc,this.size=0}function Cxe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Sxe(e){return this.__data__.get(e)}function _xe(e){return this.__data__.has(e)}var GW=typeof global=="object"&&global&&global.Object===Object&&global,jxe=typeof self=="object"&&self&&self.Object===Object&&self,Wo=GW||jxe||Function("return this")(),Rd=Wo.Symbol,zW=Object.prototype,Exe=zW.hasOwnProperty,$xe=zW.toString,hy=Rd?Rd.toStringTag:void 0;function Rxe(e){var t=Exe.call(e,hy),n=e[hy];try{e[hy]=void 0;var r=!0}catch{}var s=$xe.call(e);return r&&(t?e[hy]=n:delete e[hy]),s}var Oxe=Object.prototype,Txe=Oxe.toString;function Axe(e){return Txe.call(e)}var kxe="[object Null]",Nxe="[object Undefined]",_F=Rd?Rd.toStringTag:void 0;function Mh(e){return e==null?e===void 0?Nxe:kxe:_F&&_F in Object(e)?Rxe(e):Axe(e)}function uo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lxe="[object AsyncFunction]",Mxe="[object Function]",Ixe="[object GeneratorFunction]",Pxe="[object Proxy]";function zN(e){if(!uo(e))return!1;var t=Mh(e);return t==Mxe||t==Ixe||t==Lxe||t==Pxe}var s4=Wo["__core-js_shared__"],jF=(function(){var e=/[^.]+$/.exec(s4&&s4.keys&&s4.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Dxe(e){return!!jF&&jF in e}var Vxe=Function.prototype,Bxe=Vxe.toString;function Ih(e){if(e!=null){try{return Bxe.call(e)}catch{}try{return e+""}catch{}}return""}var Fxe=/[\\^$.*+?()[\]{}|]/g,Uxe=/^\[object .+?Constructor\]$/,Gxe=Function.prototype,zxe=Object.prototype,Hxe=Gxe.toString,qxe=zxe.hasOwnProperty,Kxe=RegExp("^"+Hxe.call(qxe).replace(Fxe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yxe(e){if(!uo(e)||Dxe(e))return!1;var t=zN(e)?Kxe:Uxe;return t.test(Ih(e))}function Zxe(e,t){return e?.[t]}function Ph(e,t){var n=Zxe(e,t);return Yxe(n)?n:void 0}var T1=Ph(Wo,"Map"),A1=Ph(Object,"create");function Xxe(){this.__data__=A1?A1(null):{},this.size=0}function Wxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Qxe="__lodash_hash_undefined__",Jxe=Object.prototype,ebe=Jxe.hasOwnProperty;function tbe(e){var t=this.__data__;if(A1){var n=t[e];return n===Qxe?void 0:n}return ebe.call(t,e)?t[e]:void 0}var nbe=Object.prototype,rbe=nbe.hasOwnProperty;function sbe(e){var t=this.__data__;return A1?t[e]!==void 0:rbe.call(t,e)}var abe="__lodash_hash_undefined__";function ibe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=A1&&t===void 0?abe:t,this}function wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wh.prototype.clear=Xxe;wh.prototype.delete=Wxe;wh.prototype.get=tbe;wh.prototype.has=sbe;wh.prototype.set=ibe;function obe(){this.size=0,this.__data__={hash:new wh,map:new(T1||nc),string:new wh}}function lbe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function L2(e,t){var n=e.__data__;return lbe(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ube(e){var t=L2(this,e).delete(e);return this.size-=t?1:0,t}function cbe(e){return L2(this,e).get(e)}function dbe(e){return L2(this,e).has(e)}function fbe(e,t){var n=L2(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rc.prototype.clear=obe;rc.prototype.delete=ube;rc.prototype.get=cbe;rc.prototype.has=dbe;rc.prototype.set=fbe;var hbe=200;function pbe(e,t){var n=this.__data__;if(n instanceof nc){var r=n.__data__;if(!T1||r.length<hbe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rc(r)}return n.set(e,t),this.size=n.size,this}function Yl(e){var t=this.__data__=new nc(e);this.size=t.size}Yl.prototype.clear=wxe;Yl.prototype.delete=Cxe;Yl.prototype.get=Sxe;Yl.prototype.has=_xe;Yl.prototype.set=pbe;var xS=(function(){try{var e=Ph(Object,"defineProperty");return e({},"",{}),e}catch{}})();function HN(e,t,n){t=="__proto__"&&xS?xS(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function YA(e,t,n){(n!==void 0&&!ux(e[t],n)||n===void 0&&!(t in e))&&HN(e,t,n)}function mbe(e){return function(t,n,r){for(var s=-1,a=Object(t),i=r(t),l=i.length;l--;){var u=i[++s];if(n(a[u],u,a)===!1)break}return t}}var HW=mbe(),qW=typeof Ei=="object"&&Ei&&!Ei.nodeType&&Ei,EF=qW&&typeof $i=="object"&&$i&&!$i.nodeType&&$i,gbe=EF&&EF.exports===qW,$F=gbe?Wo.Buffer:void 0;$F&&$F.allocUnsafe;function vbe(e,t){return e.slice()}var bS=Wo.Uint8Array;function ybe(e){var t=new e.constructor(e.byteLength);return new bS(t).set(new bS(e)),t}function xbe(e,t){var n=ybe(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function bbe(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var RF=Object.create,wbe=(function(){function e(){}return function(t){if(!uo(t))return{};if(RF)return RF(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function KW(e,t){return function(n){return e(t(n))}}var YW=KW(Object.getPrototypeOf,Object),Cbe=Object.prototype;function qN(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Cbe;return e===n}function Sbe(e){return typeof e.constructor=="function"&&!qN(e)?wbe(YW(e)):{}}function Od(e){return e!=null&&typeof e=="object"}var _be="[object Arguments]";function OF(e){return Od(e)&&Mh(e)==_be}var ZW=Object.prototype,jbe=ZW.hasOwnProperty,Ebe=ZW.propertyIsEnumerable,wS=OF((function(){return arguments})())?OF:function(e){return Od(e)&&jbe.call(e,"callee")&&!Ebe.call(e,"callee")},Li=Array.isArray,$be=9007199254740991;function KN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$be}function sv(e){return e!=null&&KN(e.length)&&!zN(e)}function Rbe(e){return Od(e)&&sv(e)}function Obe(){return!1}var XW=typeof Ei=="object"&&Ei&&!Ei.nodeType&&Ei,TF=XW&&typeof $i=="object"&&$i&&!$i.nodeType&&$i,Tbe=TF&&TF.exports===XW,AF=Tbe?Wo.Buffer:void 0,Abe=AF?AF.isBuffer:void 0,CS=Abe||Obe,kbe="[object Object]",Nbe=Function.prototype,Lbe=Object.prototype,WW=Nbe.toString,Mbe=Lbe.hasOwnProperty,Ibe=WW.call(Object);function Pbe(e){if(!Od(e)||Mh(e)!=kbe)return!1;var t=YW(e);if(t===null)return!0;var n=Mbe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&WW.call(n)==Ibe}var Dbe="[object Arguments]",Vbe="[object Array]",Bbe="[object Boolean]",Fbe="[object Date]",Ube="[object Error]",Gbe="[object Function]",zbe="[object Map]",Hbe="[object Number]",qbe="[object Object]",Kbe="[object RegExp]",Ybe="[object Set]",Zbe="[object String]",Xbe="[object WeakMap]",Wbe="[object ArrayBuffer]",Qbe="[object DataView]",Jbe="[object Float32Array]",ewe="[object Float64Array]",twe="[object Int8Array]",nwe="[object Int16Array]",rwe="[object Int32Array]",swe="[object Uint8Array]",awe="[object Uint8ClampedArray]",iwe="[object Uint16Array]",owe="[object Uint32Array]",xr={};xr[Jbe]=xr[ewe]=xr[twe]=xr[nwe]=xr[rwe]=xr[swe]=xr[awe]=xr[iwe]=xr[owe]=!0;xr[Dbe]=xr[Vbe]=xr[Wbe]=xr[Bbe]=xr[Qbe]=xr[Fbe]=xr[Ube]=xr[Gbe]=xr[zbe]=xr[Hbe]=xr[qbe]=xr[Kbe]=xr[Ybe]=xr[Zbe]=xr[Xbe]=!1;function lwe(e){return Od(e)&&KN(e.length)&&!!xr[Mh(e)]}function uwe(e){return function(t){return e(t)}}var QW=typeof Ei=="object"&&Ei&&!Ei.nodeType&&Ei,n1=QW&&typeof $i=="object"&&$i&&!$i.nodeType&&$i,cwe=n1&&n1.exports===QW,a4=cwe&&GW.process,kF=(function(){try{var e=n1&&n1.require&&n1.require("util").types;return e||a4&&a4.binding&&a4.binding("util")}catch{}})(),NF=kF&&kF.isTypedArray,YN=NF?uwe(NF):lwe;function ZA(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var dwe=Object.prototype,fwe=dwe.hasOwnProperty;function hwe(e,t,n){var r=e[t];(!(fwe.call(e,t)&&ux(r,n))||n===void 0&&!(t in e))&&HN(e,t,n)}function pwe(e,t,n,r){var s=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var l=t[a],u=void 0;u===void 0&&(u=e[l]),s?HN(n,l,u):hwe(n,l,u)}return n}function mwe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var gwe=9007199254740991,vwe=/^(?:0|[1-9]\d*)$/;function ZN(e,t){var n=typeof e;return t=t??gwe,!!t&&(n=="number"||n!="symbol"&&vwe.test(e))&&e>-1&&e%1==0&&e<t}var ywe=Object.prototype,xwe=ywe.hasOwnProperty;function JW(e,t){var n=Li(e),r=!n&&wS(e),s=!n&&!r&&CS(e),a=!n&&!r&&!s&&YN(e),i=n||r||s||a,l=i?mwe(e.length,String):[],u=l.length;for(var f in e)(t||xwe.call(e,f))&&!(i&&(f=="length"||s&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ZN(f,u)))&&l.push(f);return l}function bwe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var wwe=Object.prototype,Cwe=wwe.hasOwnProperty;function Swe(e){if(!uo(e))return bwe(e);var t=qN(e),n=[];for(var r in e)r=="constructor"&&(t||!Cwe.call(e,r))||n.push(r);return n}function eQ(e){return sv(e)?JW(e,!0):Swe(e)}function _we(e){return pwe(e,eQ(e))}function jwe(e,t,n,r,s,a,i){var l=ZA(e,n),u=ZA(t,n),f=i.get(u);if(f){YA(e,n,f);return}var h=a?a(l,u,n+"",e,t,i):void 0,g=h===void 0;if(g){var v=Li(u),w=!v&&CS(u),C=!v&&!w&&YN(u);h=u,v||w||C?Li(l)?h=l:Rbe(l)?h=bbe(l):w?(g=!1,h=vbe(u)):C?(g=!1,h=xbe(u)):h=[]:Pbe(u)||wS(u)?(h=l,wS(l)?h=_we(l):(!uo(l)||zN(l))&&(h=Sbe(u))):g=!1}g&&(i.set(u,h),s(h,u,r,a,i),i.delete(u)),YA(e,n,h)}function tQ(e,t,n,r,s){e!==t&&HW(t,function(a,i){if(s||(s=new Yl),uo(a))jwe(e,t,i,n,tQ,r,s);else{var l=r?r(ZA(e,i),a,i+"",e,t,s):void 0;l===void 0&&(l=a),YA(e,i,l)}},eQ)}function M2(e){return e}function Ewe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var LF=Math.max;function $we(e,t,n){return t=LF(t===void 0?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=LF(r.length-t,0),i=Array(a);++s<a;)i[s]=r[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=r[s];return l[t]=n(i),Ewe(e,this,l)}}function Rwe(e){return function(){return e}}var Owe=xS?function(e,t){return xS(e,"toString",{configurable:!0,enumerable:!1,value:Rwe(t),writable:!0})}:M2,Twe=800,Awe=16,kwe=Date.now;function Nwe(e){var t=0,n=0;return function(){var r=kwe(),s=Awe-(r-n);if(n=r,s>0){if(++t>=Twe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Lwe=Nwe(Owe);function Mwe(e,t){return Lwe($we(e,t,M2),e+"")}function Iwe(e,t,n){if(!uo(n))return!1;var r=typeof t;return(r=="number"?sv(n)&&ZN(t,n.length):r=="string"&&t in n)?ux(n[t],e):!1}function Pwe(e){return Mwe(function(t,n){var r=-1,s=n.length,a=s>1?n[s-1]:void 0,i=s>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(s--,a):void 0,i&&Iwe(n[0],n[1],i)&&(a=s<3?void 0:a,s=1),t=Object(t);++r<s;){var l=n[r];l&&e(t,l,r,a)}return t})}var ii=Pwe(function(e,t,n){tQ(e,t,n)}),cx=function(e){var t=e.zDepth,n=e.radius,r=e.background,s=e.children,a=e.styles,i=a===void 0?{}:a,l=Xt(ii({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},i),{"zDepth-1":t===1});return U.createElement("div",{style:l.wrap},U.createElement("div",{style:l.bg}),U.createElement("div",{style:l.content},s))};cx.propTypes={background:tt.string,zDepth:tt.oneOf([0,1,2,3,4,5]),radius:tt.number,styles:tt.object};cx.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var i4=function(){return Wo.Date.now()},Dwe=/\s/;function Vwe(e){for(var t=e.length;t--&&Dwe.test(e.charAt(t)););return t}var Bwe=/^\s+/;function Fwe(e){return e&&e.slice(0,Vwe(e)+1).replace(Bwe,"")}var Uwe="[object Symbol]";function I2(e){return typeof e=="symbol"||Od(e)&&Mh(e)==Uwe}var MF=NaN,Gwe=/^[-+]0x[0-9a-f]+$/i,zwe=/^0b[01]+$/i,Hwe=/^0o[0-7]+$/i,qwe=parseInt;function IF(e){if(typeof e=="number")return e;if(I2(e))return MF;if(uo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=uo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Fwe(e);var n=zwe.test(e);return n||Hwe.test(e)?qwe(e.slice(2),n?2:8):Gwe.test(e)?MF:+e}var Kwe="Expected a function",Ywe=Math.max,Zwe=Math.min;function nQ(e,t,n){var r,s,a,i,l,u,f=0,h=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(Kwe);t=IF(t)||0,uo(n)&&(h=!!n.leading,g="maxWait"in n,a=g?Ywe(IF(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v);function w(k){var T=r,P=s;return r=s=void 0,f=k,i=e.apply(P,T),i}function C(k){return f=k,l=setTimeout($,t),h?w(k):i}function _(k){var T=k-u,P=k-f,V=t-T;return g?Zwe(V,a-P):V}function E(k){var T=k-u,P=k-f;return u===void 0||T>=t||T<0||g&&P>=a}function $(){var k=i4();if(E(k))return O(k);l=setTimeout($,_(k))}function O(k){return l=void 0,v&&r?w(k):(r=s=void 0,i)}function N(){l!==void 0&&clearTimeout(l),f=0,r=u=s=l=void 0}function M(){return l===void 0?i:O(i4())}function L(){var k=i4(),T=E(k);if(r=arguments,s=this,u=k,T){if(l===void 0)return C(u);if(g)return clearTimeout(l),l=setTimeout($,t),w(u)}return l===void 0&&(l=setTimeout($,t)),i}return L.cancel=N,L.flush=M,L}var Xwe="Expected a function";function Wwe(e,t,n){var r=!0,s=!0;if(typeof e!="function")throw new TypeError(Xwe);return uo(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),nQ(e,t,{leading:r,maxWait:t,trailing:s})}var Qwe=function(e,t,n){var r=n.getBoundingClientRect(),s=r.width,a=r.height,i=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=i-(n.getBoundingClientRect().left+window.pageXOffset),f=l-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>s&&(u=s),f<0?f=0:f>a&&(f=a);var h=u/s,g=1-f/a;return{h:t.h,s:h,v:g,a:t.a,source:"hsv"}},Jwe=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function eCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tCe(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function nCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var P2=(function(e){nCe(t,e);function t(n){eCe(this,t);var r=tCe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(s){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,Qwe(s,r.props.hsl,r.container),s)},r.handleMouseDown=function(s){r.handleChange(s);var a=r.getContainerRenderWindow();a.addEventListener("mousemove",r.handleChange),a.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=Wwe(function(s,a,i){s(a,i)},50),r}return Jwe(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,r=window;!r.document.contains(n)&&r.parent!==r;)r=r.parent;return r}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,r=this.props.style||{},s=r.color,a=r.white,i=r.black,l=r.pointer,u=r.circle,f=Xt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
            0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:s,white:a,black:i,pointer:l,circle:u}},{custom:!!this.props.style});return U.createElement("div",{style:f.color,ref:function(h){return n.container=h},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},U.createElement("style",null,`
          .saturation-white {
            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
            background: linear-gradient(to right, #fff, rgba(255,255,255,0));
          }
          .saturation-black {
            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
            background: linear-gradient(to top, #000, rgba(0,0,0,0));
          }
        `),U.createElement("div",{style:f.white,className:"saturation-white"},U.createElement("div",{style:f.black,className:"saturation-black"}),U.createElement("div",{style:f.pointer},this.props.pointer?U.createElement(this.props.pointer,this.props):U.createElement("div",{style:f.circle}))))}}]),t})(y.PureComponent||y.Component);function rCe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var sCe=KW(Object.keys,Object),aCe=Object.prototype,iCe=aCe.hasOwnProperty;function oCe(e){if(!qN(e))return sCe(e);var t=[];for(var n in Object(e))iCe.call(e,n)&&n!="constructor"&&t.push(n);return t}function XN(e){return sv(e)?JW(e):oCe(e)}function lCe(e,t){return e&&HW(e,t,XN)}function uCe(e,t){return function(n,r){if(n==null)return n;if(!sv(n))return e(n,r);for(var s=n.length,a=-1,i=Object(n);++a<s&&r(i[a],a,i)!==!1;);return n}}var rQ=uCe(lCe);function cCe(e){return typeof e=="function"?e:M2}function dCe(e,t){var n=Li(e)?rCe:rQ;return n(e,cCe(t))}function SS(e){"@babel/helpers - typeof";return SS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},SS(e)}var fCe=/^\s+/,hCe=/\s+$/;function yt(e,t){if(e=e||"",t=t||{},e instanceof yt)return e;if(!(this instanceof yt))return new yt(e,t);var n=pCe(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.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=n.ok}yt.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 e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,r,s,a,i;return t=e.r/255,n=e.g/255,r=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),.2126*s+.7152*a+.0722*i},setAlpha:function(e){return this._a=sQ(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=DF(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=DF(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=PF(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=PF(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return VF(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return yCe(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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($r(this._r,255)*100)+"%",g:Math.round($r(this._g,255)*100)+"%",b:Math.round($r(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round($r(this._r,255)*100)+"%, "+Math.round($r(this._g,255)*100)+"%, "+Math.round($r(this._b,255)*100)+"%)":"rgba("+Math.round($r(this._r,255)*100)+"%, "+Math.round($r(this._g,255)*100)+"%, "+Math.round($r(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:TCe[VF(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+BF(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var s=yt(e);n="#"+BF(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0,s=!t&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return yt(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(CCe,arguments)},brighten:function(){return this._applyModification(SCe,arguments)},darken:function(){return this._applyModification(_Ce,arguments)},desaturate:function(){return this._applyModification(xCe,arguments)},saturate:function(){return this._applyModification(bCe,arguments)},greyscale:function(){return this._applyModification(wCe,arguments)},spin:function(){return this._applyModification(jCe,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(RCe,arguments)},complement:function(){return this._applyCombination(ECe,arguments)},monochromatic:function(){return this._applyCombination(OCe,arguments)},splitcomplement:function(){return this._applyCombination($Ce,arguments)},triad:function(){return this._applyCombination(FF,[3])},tetrad:function(){return this._applyCombination(FF,[4])}};yt.fromRatio=function(e,t){if(SS(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Oy(e[r]));e=n}return yt(e,t)};function pCe(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,a=null,i=!1,l=!1;return typeof e=="string"&&(e=LCe(e)),SS(e)=="object"&&(Mu(e.r)&&Mu(e.g)&&Mu(e.b)?(t=mCe(e.r,e.g,e.b),i=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Mu(e.h)&&Mu(e.s)&&Mu(e.v)?(r=Oy(e.s),s=Oy(e.v),t=vCe(e.h,r,s),i=!0,l="hsv"):Mu(e.h)&&Mu(e.s)&&Mu(e.l)&&(r=Oy(e.s),a=Oy(e.l),t=gCe(e.h,r,a),i=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=sQ(n),{ok:i,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function mCe(e,t,n){return{r:$r(e,255)*255,g:$r(t,255)*255,b:$r(n,255)*255}}function PF(e,t,n){e=$r(e,255),t=$r(t,255),n=$r(n,255);var r=Math.max(e,t,n),s=Math.min(e,t,n),a,i,l=(r+s)/2;if(r==s)a=i=0;else{var u=r-s;switch(i=l>.5?u/(2-r-s):u/(r+s),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:i,l}}function gCe(e,t,n){var r,s,a;e=$r(e,360),t=$r(t,100),n=$r(n,100);function i(f,h,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?f+(h-f)*6*g:g<1/2?h:g<2/3?f+(h-f)*(2/3-g)*6:f}if(t===0)r=s=a=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=i(u,l,e+1/3),s=i(u,l,e),a=i(u,l,e-1/3)}return{r:r*255,g:s*255,b:a*255}}function DF(e,t,n){e=$r(e,255),t=$r(t,255),n=$r(n,255);var r=Math.max(e,t,n),s=Math.min(e,t,n),a,i,l=r,u=r-s;if(i=r===0?0:u/r,r==s)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:i,v:l}}function vCe(e,t,n){e=$r(e,360)*6,t=$r(t,100),n=$r(n,100);var r=Math.floor(e),s=e-r,a=n*(1-t),i=n*(1-s*t),l=n*(1-(1-s)*t),u=r%6,f=[n,i,a,a,l,n][u],h=[l,n,n,i,a,a][u],g=[a,a,l,n,n,i][u];return{r:f*255,g:h*255,b:g*255}}function VF(e,t,n,r){var s=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return r&&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[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function yCe(e,t,n,r,s){var a=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16)),zo(aQ(r))];return s&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function BF(e,t,n,r){var s=[zo(aQ(r)),zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return s.join("")}yt.equals=function(e,t){return!e||!t?!1:yt(e).toRgbString()==yt(t).toRgbString()};yt.random=function(){return yt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function xCe(e,t){t=t===0?0:t||10;var n=yt(e).toHsl();return n.s-=t/100,n.s=D2(n.s),yt(n)}function bCe(e,t){t=t===0?0:t||10;var n=yt(e).toHsl();return n.s+=t/100,n.s=D2(n.s),yt(n)}function wCe(e){return yt(e).desaturate(100)}function CCe(e,t){t=t===0?0:t||10;var n=yt(e).toHsl();return n.l+=t/100,n.l=D2(n.l),yt(n)}function SCe(e,t){t=t===0?0:t||10;var n=yt(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),yt(n)}function _Ce(e,t){t=t===0?0:t||10;var n=yt(e).toHsl();return n.l-=t/100,n.l=D2(n.l),yt(n)}function jCe(e,t){var n=yt(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,yt(n)}function ECe(e){var t=yt(e).toHsl();return t.h=(t.h+180)%360,yt(t)}function FF(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=yt(e).toHsl(),r=[yt(e)],s=360/t,a=1;a<t;a++)r.push(yt({h:(n.h+a*s)%360,s:n.s,l:n.l}));return r}function $Ce(e){var t=yt(e).toHsl(),n=t.h;return[yt(e),yt({h:(n+72)%360,s:t.s,l:t.l}),yt({h:(n+216)%360,s:t.s,l:t.l})]}function RCe(e,t,n){t=t||6,n=n||30;var r=yt(e).toHsl(),s=360/n,a=[yt(e)];for(r.h=(r.h-(s*t>>1)+720)%360;--t;)r.h=(r.h+s)%360,a.push(yt(r));return a}function OCe(e,t){t=t||6;for(var n=yt(e).toHsv(),r=n.h,s=n.s,a=n.v,i=[],l=1/t;t--;)i.push(yt({h:r,s,v:a})),a=(a+l)%1;return i}yt.mix=function(e,t,n){n=n===0?0:n||50;var r=yt(e).toRgb(),s=yt(t).toRgb(),a=n/100,i={r:(s.r-r.r)*a+r.r,g:(s.g-r.g)*a+r.g,b:(s.b-r.b)*a+r.b,a:(s.a-r.a)*a+r.a};return yt(i)};yt.readability=function(e,t){var n=yt(e),r=yt(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};yt.isReadable=function(e,t,n){var r=yt.readability(e,t),s,a;switch(a=!1,s=MCe(n),s.level+s.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};yt.mostReadable=function(e,t,n){var r=null,s=0,a,i,l,u;n=n||{},i=n.includeFallbackColors,l=n.level,u=n.size;for(var f=0;f<t.length;f++)a=yt.readability(e,t[f]),a>s&&(s=a,r=yt(t[f]));return yt.isReadable(e,r,{level:l,size:u})||!i?r:(n.includeFallbackColors=!1,yt.mostReadable(e,["#fff","#000"],n))};var XA=yt.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"},TCe=yt.hexNames=ACe(XA);function ACe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function sQ(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $r(e,t){kCe(e)&&(e="100%");var n=NCe(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D2(e){return Math.min(1,Math.max(0,e))}function wi(e){return parseInt(e,16)}function kCe(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function NCe(e){return typeof e=="string"&&e.indexOf("%")!=-1}function zo(e){return e.length==1?"0"+e:""+e}function Oy(e){return e<=1&&(e=e*100+"%"),e}function aQ(e){return Math.round(parseFloat(e)*255).toString(16)}function UF(e){return wi(e)/255}var Do=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",s="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+s),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 Mu(e){return!!Do.CSS_UNIT.exec(e)}function LCe(e){e=e.replace(fCe,"").replace(hCe,"").toLowerCase();var t=!1;if(XA[e])e=XA[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Do.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Do.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Do.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Do.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Do.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Do.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Do.hex8.exec(e))?{r:wi(n[1]),g:wi(n[2]),b:wi(n[3]),a:UF(n[4]),format:t?"name":"hex8"}:(n=Do.hex6.exec(e))?{r:wi(n[1]),g:wi(n[2]),b:wi(n[3]),format:t?"name":"hex"}:(n=Do.hex4.exec(e))?{r:wi(n[1]+""+n[1]),g:wi(n[2]+""+n[2]),b:wi(n[3]+""+n[3]),a:UF(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Do.hex3.exec(e))?{r:wi(n[1]+""+n[1]),g:wi(n[2]+""+n[2]),b:wi(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function MCe(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var GF=function(e){var t=["r","g","b","a","h","s","l","v"],n=0,r=0;return dCe(t,function(s){if(e[s]&&(n+=1,isNaN(e[s])||(r+=1),s==="s"||s==="l")){var a=/^\d+%$/;a.test(e[s])&&(r+=1)}}),n===r?e:!1},Ty=function(e,t){var n=e.hex?yt(e.hex):yt(e),r=n.toHsl(),s=n.toHsv(),a=n.toRgb(),i=n.toHex();r.s===0&&(r.h=t||0,s.h=t||0);var l=i==="000000"&&a.a===0;return{hsl:r,hex:l?"transparent":"#"+i,rgb:a,hsv:s,oldHue:e.h||t||r.h,source:e.source}},Dd=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&yt(e).isValid()},WN=function(e){if(!e)return"#fff";var t=Ty(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},o4=function(e,t){var n=e.replace("°","");return yt(t+" ("+n+")")._ok},py=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ICe=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function PCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DCe(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function VCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var oi=function(e){var t=(function(n){VCe(r,n);function r(s){PCe(this,r);var a=DCe(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.handleChange=function(i,l){var u=GF(i);if(u){var f=Ty(i,i.h||a.state.oldHue);a.setState(f),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,f,l),a.props.onChange&&a.props.onChange(f,l)}},a.handleSwatchHover=function(i,l){var u=GF(i);if(u){var f=Ty(i,i.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(f,l)}},a.state=py({},Ty(s.color,0)),a.debounce=nQ(function(i,l,u){i(l,u)},100),a}return ICe(r,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),U.createElement(e,py({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,a){return py({},Ty(s.color,a.oldHue))}}]),r})(y.PureComponent||y.Component);return t.propTypes=py({},e.propTypes),t.defaultProps=py({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},BCe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FCe=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function UCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function GCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var zCe=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(n){GCe(r,n);function r(){var s,a,i,l;UCe(this,r);for(var u=arguments.length,f=Array(u),h=0;h<u;h++)f[h]=arguments[h];return l=(a=(i=zF(this,(s=r.__proto__||Object.getPrototypeOf(r)).call.apply(s,[this].concat(f))),i),i.state={focus:!1},i.handleFocus=function(){return i.setState({focus:!0})},i.handleBlur=function(){return i.setState({focus:!1})},a),zF(i,l)}return FCe(r,[{key:"render",value:function(){return U.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},U.createElement(e,BCe({},this.props,this.state)))}}]),r})(U.Component)},HF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HCe=13,qCe=function(e){var t=e.color,n=e.style,r=e.onClick,s=r===void 0?function(){}:r,a=e.onHover,i=e.title,l=i===void 0?t:i,u=e.children,f=e.focus,h=e.focusStyle,g=h===void 0?{}:h,v=t==="transparent",w=Xt({default:{swatch:HF({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,f?g:{})}}),C=function(O){return s(t,O)},_=function(O){return O.keyCode===HCe&&s(t,O)},E=function(O){return a(t,O)},$={};return a&&($.onMouseOver=E),U.createElement("div",HF({style:w.swatch,onClick:C,title:l,tabIndex:0,onKeyDown:_},$),u,v&&U.createElement(nv,{borderRadius:w.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Dh=zCe(qCe);var KCe=function(e){var t=e.direction,n=Xt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return U.createElement("div",{style:n.picker})},YCe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iQ=function(e){var t=e.rgb,n=e.hsl,r=e.width,s=e.height,a=e.onChange,i=e.direction,l=e.style,u=e.renderers,f=e.pointer,h=e.className,g=h===void 0?"":h,v=Xt({default:{picker:{position:"relative",width:r,height:s},alpha:{radius:"2px",style:l}}});return U.createElement("div",{style:v.picker,className:"alpha-picker "+g},U.createElement(GN,YCe({},v.alpha,{rgb:t,hsl:n,pointer:f,renderers:u,onChange:a,direction:i})))};iQ.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:KCe};oi(iQ);function oQ(e,t){for(var n=-1,r=e==null?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var ZCe="__lodash_hash_undefined__";function XCe(e){return this.__data__.set(e,ZCe),this}function WCe(e){return this.__data__.has(e)}function _S(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rc;++t<n;)this.add(e[t])}_S.prototype.add=_S.prototype.push=XCe;_S.prototype.has=WCe;function QCe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function JCe(e,t){return e.has(t)}var eSe=1,tSe=2;function lQ(e,t,n,r,s,a){var i=n&eSe,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;var f=a.get(e),h=a.get(t);if(f&&h)return f==t&&h==e;var g=-1,v=!0,w=n&tSe?new _S:void 0;for(a.set(e,t),a.set(t,e);++g<l;){var C=e[g],_=t[g];if(r)var E=i?r(_,C,g,t,e,a):r(C,_,g,e,t,a);if(E!==void 0){if(E)continue;v=!1;break}if(w){if(!QCe(t,function($,O){if(!JCe(w,O)&&(C===$||s(C,$,n,r,a)))return w.push(O)})){v=!1;break}}else if(!(C===_||s(C,_,n,r,a))){v=!1;break}}return a.delete(e),a.delete(t),v}function nSe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,s){n[++t]=[s,r]}),n}function rSe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sSe=1,aSe=2,iSe="[object Boolean]",oSe="[object Date]",lSe="[object Error]",uSe="[object Map]",cSe="[object Number]",dSe="[object RegExp]",fSe="[object Set]",hSe="[object String]",pSe="[object Symbol]",mSe="[object ArrayBuffer]",gSe="[object DataView]",qF=Rd?Rd.prototype:void 0,l4=qF?qF.valueOf:void 0;function vSe(e,t,n,r,s,a,i){switch(n){case gSe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mSe:return!(e.byteLength!=t.byteLength||!a(new bS(e),new bS(t)));case iSe:case oSe:case cSe:return ux(+e,+t);case lSe:return e.name==t.name&&e.message==t.message;case dSe:case hSe:return e==t+"";case uSe:var l=nSe;case fSe:var u=r&sSe;if(l||(l=rSe),e.size!=t.size&&!u)return!1;var f=i.get(e);if(f)return f==t;r|=aSe,i.set(e,t);var h=lQ(l(e),l(t),r,s,a,i);return i.delete(e),h;case pSe:if(l4)return l4.call(e)==l4.call(t)}return!1}function ySe(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function xSe(e,t,n){var r=t(e);return Li(e)?r:ySe(r,n(e))}function bSe(e,t){for(var n=-1,r=e==null?0:e.length,s=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[s++]=i)}return a}function wSe(){return[]}var CSe=Object.prototype,SSe=CSe.propertyIsEnumerable,KF=Object.getOwnPropertySymbols,_Se=KF?function(e){return e==null?[]:(e=Object(e),bSe(KF(e),function(t){return SSe.call(e,t)}))}:wSe;function YF(e){return xSe(e,XN,_Se)}var jSe=1,ESe=Object.prototype,$Se=ESe.hasOwnProperty;function RSe(e,t,n,r,s,a){var i=n&jSe,l=YF(e),u=l.length,f=YF(t),h=f.length;if(u!=h&&!i)return!1;for(var g=u;g--;){var v=l[g];if(!(i?v in t:$Se.call(t,v)))return!1}var w=a.get(e),C=a.get(t);if(w&&C)return w==t&&C==e;var _=!0;a.set(e,t),a.set(t,e);for(var E=i;++g<u;){v=l[g];var $=e[v],O=t[v];if(r)var N=i?r(O,$,v,t,e,a):r($,O,v,e,t,a);if(!(N===void 0?$===O||s($,O,n,r,a):N)){_=!1;break}E||(E=v=="constructor")}if(_&&!E){var M=e.constructor,L=t.constructor;M!=L&&"constructor"in e&&"constructor"in t&&!(typeof M=="function"&&M instanceof M&&typeof L=="function"&&L instanceof L)&&(_=!1)}return a.delete(e),a.delete(t),_}var WA=Ph(Wo,"DataView"),QA=Ph(Wo,"Promise"),JA=Ph(Wo,"Set"),ek=Ph(Wo,"WeakMap"),ZF="[object Map]",OSe="[object Object]",XF="[object Promise]",WF="[object Set]",QF="[object WeakMap]",JF="[object DataView]",TSe=Ih(WA),ASe=Ih(T1),kSe=Ih(QA),NSe=Ih(JA),LSe=Ih(ek),ud=Mh;(WA&&ud(new WA(new ArrayBuffer(1)))!=JF||T1&&ud(new T1)!=ZF||QA&&ud(QA.resolve())!=XF||JA&&ud(new JA)!=WF||ek&&ud(new ek)!=QF)&&(ud=function(e){var t=Mh(e),n=t==OSe?e.constructor:void 0,r=n?Ih(n):"";if(r)switch(r){case TSe:return JF;case ASe:return ZF;case kSe:return XF;case NSe:return WF;case LSe:return QF}return t});var MSe=1,eU="[object Arguments]",tU="[object Array]",tC="[object Object]",ISe=Object.prototype,nU=ISe.hasOwnProperty;function PSe(e,t,n,r,s,a){var i=Li(e),l=Li(t),u=i?tU:ud(e),f=l?tU:ud(t);u=u==eU?tC:u,f=f==eU?tC:f;var h=u==tC,g=f==tC,v=u==f;if(v&&CS(e)){if(!CS(t))return!1;i=!0,h=!1}if(v&&!h)return a||(a=new Yl),i||YN(e)?lQ(e,t,n,r,s,a):vSe(e,t,u,n,r,s,a);if(!(n&MSe)){var w=h&&nU.call(e,"__wrapped__"),C=g&&nU.call(t,"__wrapped__");if(w||C){var _=w?e.value():e,E=C?t.value():t;return a||(a=new Yl),s(_,E,n,r,a)}}return v?(a||(a=new Yl),RSe(e,t,n,r,s,a)):!1}function QN(e,t,n,r,s){return e===t?!0:e==null||t==null||!Od(e)&&!Od(t)?e!==e&&t!==t:PSe(e,t,n,r,QN,s)}var DSe=1,VSe=2;function BSe(e,t,n,r){var s=n.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var i=n[s];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++s<a;){i=n[s];var l=i[0],u=e[l],f=i[1];if(i[2]){if(u===void 0&&!(l in e))return!1}else{var h=new Yl,g;if(!(g===void 0?QN(f,u,DSe|VSe,r,h):g))return!1}}return!0}function uQ(e){return e===e&&!uo(e)}function FSe(e){for(var t=XN(e),n=t.length;n--;){var r=t[n],s=e[r];t[n]=[r,s,uQ(s)]}return t}function cQ(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function USe(e){var t=FSe(e);return t.length==1&&t[0][2]?cQ(t[0][0],t[0][1]):function(n){return n===e||BSe(n,e,t)}}var GSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zSe=/^\w*$/;function JN(e,t){if(Li(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||I2(e)?!0:zSe.test(e)||!GSe.test(e)||t!=null&&e in Object(t)}var HSe="Expected a function";function e9(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(HSe);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var i=e.apply(this,r);return n.cache=a.set(s,i)||a,i};return n.cache=new(e9.Cache||rc),n}e9.Cache=rc;var qSe=500;function KSe(e){var t=e9(e,function(r){return n.size===qSe&&n.clear(),r}),n=t.cache;return t}var YSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZSe=/\\(\\)?/g,XSe=KSe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(YSe,function(n,r,s,a){t.push(s?a.replace(ZSe,"$1"):r||n)}),t}),rU=Rd?Rd.prototype:void 0,sU=rU?rU.toString:void 0;function dQ(e){if(typeof e=="string")return e;if(Li(e))return oQ(e,dQ)+"";if(I2(e))return sU?sU.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function WSe(e){return e==null?"":dQ(e)}function fQ(e,t){return Li(e)?e:JN(e,t)?[e]:XSe(WSe(e))}function V2(e){if(typeof e=="string"||I2(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hQ(e,t){t=fQ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[V2(t[n++])];return n&&n==r?e:void 0}function QSe(e,t,n){var r=e==null?void 0:hQ(e,t);return r===void 0?n:r}function JSe(e,t){return e!=null&&t in Object(e)}function e2e(e,t,n){t=fQ(t,e);for(var r=-1,s=t.length,a=!1;++r<s;){var i=V2(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=s?a:(s=e==null?0:e.length,!!s&&KN(s)&&ZN(i,s)&&(Li(e)||wS(e)))}function t2e(e,t){return e!=null&&e2e(e,t,JSe)}var n2e=1,r2e=2;function s2e(e,t){return JN(e)&&uQ(t)?cQ(V2(e),t):function(n){var r=QSe(n,e);return r===void 0&&r===t?t2e(n,e):QN(t,r,n2e|r2e)}}function a2e(e){return function(t){return t?.[e]}}function i2e(e){return function(t){return hQ(t,e)}}function o2e(e){return JN(e)?a2e(V2(e)):i2e(e)}function l2e(e){return typeof e=="function"?e:e==null?M2:typeof e=="object"?Li(e)?s2e(e[0],e[1]):USe(e):o2e(e)}function u2e(e,t){var n=-1,r=sv(e)?Array(e.length):[];return rQ(e,function(s,a,i){r[++n]=t(s,a,i)}),r}function Vh(e,t){var n=Li(e)?oQ:u2e;return n(e,l2e(t))}var c2e=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,s=Xt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return U.createElement("div",{style:s.swatches},Vh(t,function(a){return U.createElement(Dh,{key:a,color:a,style:s.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+a}})}),U.createElement("div",{style:s.clear}))},t9=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,s=e.colors,a=e.width,i=e.triangle,l=e.styles,u=l===void 0?{}:l,f=e.className,h=f===void 0?"":f,g=r==="transparent",v=function(C,_){Dd(C)&&t({hex:C,source:"hex"},_)},w=Xt(ii({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:WN(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":i==="hide"});return U.createElement("div",{style:w.card,className:"block-picker "+h},U.createElement("div",{style:w.triangle}),U.createElement("div",{style:w.head},g&&U.createElement(nv,{borderRadius:"6px 6px 0 0"}),U.createElement("div",{style:w.label},r)),U.createElement("div",{style:w.body},U.createElement(c2e,{colors:s,onClick:v,onSwatchHover:n}),U.createElement(An,{style:{input:w.input},value:r,onChange:v})))};t9.propTypes={width:tt.oneOfType([tt.string,tt.number]),colors:tt.arrayOf(tt.string),triangle:tt.oneOf(["top","hide"]),styles:tt.object};t9.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};oi(t9);var Gm={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},zm={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Hm={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},qm={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Km={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},Ym={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Zm={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Xm={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},Wm={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},Ay={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},Qm={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},Jm={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},eg={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},tg={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},ng={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},rg={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},sg={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},ag={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},pQ=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,s=e.hover,a=e.active,i=e.circleSize,l=e.circleSpacing,u=Xt({default:{swatch:{width:i,height:i,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(i/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:s,active:a});return U.createElement("div",{style:u.swatch},U.createElement(Dh,{style:u.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+t}}))};pQ.defaultProps={circleSize:28,circleSpacing:14};const d2e=UN.handleHover(pQ);var n9=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,s=e.colors,a=e.hex,i=e.circleSize,l=e.styles,u=l===void 0?{}:l,f=e.circleSpacing,h=e.className,g=h===void 0?"":h,v=Xt(ii({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-f,marginBottom:-f}}},u)),w=function(C,_){return n({hex:C,source:"hex"},_)};return U.createElement("div",{style:v.card,className:"circle-picker "+g},Vh(s,function(C){return U.createElement(d2e,{key:C,color:C,onClick:w,onSwatchHover:r,active:a===C.toLowerCase(),circleSize:i,circleSpacing:f})}))};n9.propTypes={width:tt.oneOfType([tt.string,tt.number]),circleSize:tt.number,circleSpacing:tt.number,styles:tt.object};n9.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Gm[500],zm[500],Hm[500],qm[500],Km[500],Ym[500],Zm[500],Xm[500],Wm[500],Ay[500],Qm[500],Jm[500],eg[500],tg[500],ng[500],rg[500],sg[500],ag[500]],styles:{}};const f2e=oi(n9);function aU(e){return e===void 0}var nC={},iU;function h2e(){if(iU)return nC;iU=1,Object.defineProperty(nC,"__esModule",{value:!0});var e=Object.assign||function(i){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(i[f]=u[f])}return i},t=U,n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function s(i,l){var u={};for(var f in i)l.indexOf(f)>=0||Object.prototype.hasOwnProperty.call(i,f)&&(u[f]=i[f]);return u}var a=24;return nC.default=function(i){var l=i.fill,u=l===void 0?"currentColor":l,f=i.width,h=f===void 0?a:f,g=i.height,v=g===void 0?a:g,w=i.style,C=w===void 0?{}:w,_=s(i,["fill","width","height","style"]);return n.default.createElement("svg",e({viewBox:"0 0 "+a+" "+a,style:e({fill:u,width:h,height:v},C)},_),n.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},nC}var p2e=h2e();const m2e=ev(p2e);var g2e=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function v2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y2e(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function x2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var mQ=(function(e){x2e(t,e);function t(n){v2e(this,t);var r=y2e(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(s,a){s.hex?Dd(s.hex)&&r.props.onChange({hex:s.hex,source:"hex"},a):s.r||s.g||s.b?r.props.onChange({r:s.r||r.props.rgb.r,g:s.g||r.props.rgb.g,b:s.b||r.props.rgb.b,source:"rgb"},a):s.a?(s.a<0?s.a=0:s.a>1&&(s.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(s.a*100)/100,source:"rgb"},a)):(s.h||s.s||s.l)&&(typeof s.s=="string"&&s.s.includes("%")&&(s.s=s.s.replace("%","")),typeof s.l=="string"&&s.l.includes("%")&&(s.l=s.l.replace("%","")),s.s==1?s.s=.01:s.l==1&&(s.l=.01),r.props.onChange({h:s.h||r.props.hsl.h,s:Number(aU(s.s)?r.props.hsl.s:s.s),l:Number(aU(s.l)?r.props.hsl.l:s.l),source:"hsl"},a))},r.showHighlight=function(s){s.currentTarget.style.background="#eee"},r.hideHighlight=function(s){s.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return g2e(t,[{key:"render",value:function(){var n=this,r=Xt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),s=void 0;return this.state.view==="hex"?s=U.createElement("div",{style:r.fields,className:"flexbox-fix"},U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?s=U.createElement("div",{style:r.fields,className:"flexbox-fix"},U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),U.createElement("div",{style:r.alpha},U.createElement(An,{style:{input:r.input,label:r.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(s=U.createElement("div",{style:r.fields,className:"flexbox-fix"},U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),U.createElement("div",{style:r.field},U.createElement(An,{style:{input:r.input,label:r.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),U.createElement("div",{style:r.alpha},U.createElement(An,{style:{input:r.input,label:r.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),U.createElement("div",{style:r.wrap,className:"flexbox-fix"},s,U.createElement("div",{style:r.toggle},U.createElement("div",{style:r.icon,onClick:this.toggleViews,ref:function(a){return n.icon=a}},U.createElement(m2e,{style:r.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,r){return n.hsl.a!==1&&r.view==="hex"?{view:"rgb"}:null}}]),t})(U.Component);mQ.defaultProps={view:"hex"};var oU=function(){var e=Xt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return U.createElement("div",{style:e.picker})},b2e=function(){var e=Xt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return U.createElement("div",{style:e.picker})},r9=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,s=e.rgb,a=e.hsl,i=e.hsv,l=e.hex,u=e.renderers,f=e.styles,h=f===void 0?{}:f,g=e.className,v=g===void 0?"":g,w=e.defaultView,C=Xt(ii({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:r});return U.createElement("div",{style:C.picker,className:"chrome-picker "+v},U.createElement("div",{style:C.saturation},U.createElement(P2,{style:C.Saturation,hsl:a,hsv:i,pointer:b2e,onChange:n})),U.createElement("div",{style:C.body},U.createElement("div",{style:C.controls,className:"flexbox-fix"},U.createElement("div",{style:C.color},U.createElement("div",{style:C.swatch},U.createElement("div",{style:C.active}),U.createElement(nv,{renderers:u}))),U.createElement("div",{style:C.toggles},U.createElement("div",{style:C.hue},U.createElement(rv,{style:C.Hue,hsl:a,pointer:oU,onChange:n})),U.createElement("div",{style:C.alpha},U.createElement(GN,{style:C.Alpha,rgb:s,hsl:a,pointer:oU,renderers:u,onChange:n})))),U.createElement(mQ,{rgb:s,hsl:a,hex:l,view:w,onChange:n,disableAlpha:r})))};r9.propTypes={width:tt.oneOfType([tt.string,tt.number]),disableAlpha:tt.bool,styles:tt.object,defaultView:tt.oneOf(["hex","rgb","hsl"])};r9.defaultProps={width:225,disableAlpha:!1,styles:{}};oi(r9);var w2e=function(e){var t=e.color,n=e.onClick,r=n===void 0?function(){}:n,s=e.onSwatchHover,a=e.active,i=Xt({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:WN(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return U.createElement(Dh,{style:i.color,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},U.createElement("div",{style:i.dot}))},C2e=function(e){var t=e.hex,n=e.rgb,r=e.onChange,s=Xt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(i,l){i.r||i.g||i.b?r({r:i.r||n.r,g:i.g||n.g,b:i.b||n.b,source:"rgb"},l):r({hex:i.hex,source:"hex"},l)};return U.createElement("div",{style:s.fields,className:"flexbox-fix"},U.createElement("div",{style:s.active}),U.createElement(An,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:a}),U.createElement(An,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:a}),U.createElement(An,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:a}),U.createElement(An,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:a}))},s9=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,s=e.hex,a=e.rgb,i=e.styles,l=i===void 0?{}:i,u=e.className,f=u===void 0?"":u,h=Xt(ii({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),g=function(v,w){v.hex?Dd(v.hex)&&t({hex:v.hex,source:"hex"},w):t(v,w)};return U.createElement(cx,{style:h.Compact,styles:l},U.createElement("div",{style:h.compact,className:"compact-picker "+f},U.createElement("div",null,Vh(r,function(v){return U.createElement(w2e,{key:v,color:v,active:v.toLowerCase()===s,onClick:g,onSwatchHover:n})}),U.createElement("div",{style:h.clear})),U.createElement(C2e,{hex:s,rgb:a,onChange:g})))};s9.propTypes={colors:tt.arrayOf(tt.string),styles:tt.object};s9.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};oi(s9);var S2e=function(e){var t=e.hover,n=e.color,r=e.onClick,s=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},i=Xt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:t});return U.createElement("div",{style:i.swatch},U.createElement(Dh,{color:n,onClick:r,onHover:s,focusStyle:a}))};const _2e=UN.handleHover(S2e);var a9=function(e){var t=e.width,n=e.colors,r=e.onChange,s=e.onSwatchHover,a=e.triangle,i=e.styles,l=i===void 0?{}:i,u=e.className,f=u===void 0?"":u,h=Xt(ii({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),g=function(v,w){return r({hex:v,source:"hex"},w)};return U.createElement("div",{style:h.card,className:"github-picker "+f},U.createElement("div",{style:h.triangleShadow}),U.createElement("div",{style:h.triangle}),Vh(n,function(v){return U.createElement(_2e,{color:v,key:v,onClick:g,onSwatchHover:s})}))};a9.propTypes={width:tt.oneOfType([tt.string,tt.number]),colors:tt.arrayOf(tt.string),triangle:tt.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:tt.object};a9.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};oi(a9);var j2e=function(e){var t=e.direction,n=Xt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return U.createElement("div",{style:n.picker})},E2e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i9=function(e){var t=e.width,n=e.height,r=e.onChange,s=e.hsl,a=e.direction,i=e.pointer,l=e.styles,u=l===void 0?{}:l,f=e.className,h=f===void 0?"":f,g=Xt(ii({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},u)),v=function(w){return r({a:1,h:w.h,l:.5,s:1})};return U.createElement("div",{style:g.picker,className:"hue-picker "+h},U.createElement(rv,E2e({},g.hue,{hsl:s,pointer:i,onChange:v,direction:a})))};i9.propTypes={styles:tt.object};i9.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:j2e,styles:{}};oi(i9);var $2e=function(e){var t=e.onChange,n=e.hex,r=e.rgb,s=e.styles,a=s===void 0?{}:s,i=e.className,l=i===void 0?"":i,u=Xt(ii({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),f=function(h,g){h.hex?Dd(h.hex)&&t({hex:h.hex,source:"hex"},g):(h.r||h.g||h.b)&&t({r:h.r||r.r,g:h.g||r.g,b:h.b||r.b,source:"rgb"},g)};return U.createElement(cx,{styles:a},U.createElement("div",{style:u.material,className:"material-picker "+l},U.createElement(An,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:f}),U.createElement("div",{style:u.split,className:"flexbox-fix"},U.createElement("div",{style:u.third},U.createElement(An,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:f})),U.createElement("div",{style:u.third},U.createElement(An,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:f})),U.createElement("div",{style:u.third},U.createElement(An,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:f})))))};oi($2e);var R2e=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,s=e.hex,a=Xt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),i=function(l,u){l["#"]?Dd(l["#"])&&t({hex:l["#"],source:"hex"},u):l.r||l.g||l.b?t({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},u):(l.h||l.s||l.v)&&t({h:l.h||r.h,s:l.s||r.s,v:l.v||r.v,source:"hsv"},u)};return U.createElement("div",{style:a.fields},U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(r.h),onChange:i}),U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(r.s*100),onChange:i}),U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(r.v*100),onChange:i}),U.createElement("div",{style:a.divider}),U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:n.r,onChange:i}),U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:n.g,onChange:i}),U.createElement(An,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:n.b,onChange:i}),U.createElement("div",{style:a.divider}),U.createElement(An,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:s.replace("#",""),onChange:i}),U.createElement("div",{style:a.fieldSymbols},U.createElement("div",{style:a.symbol},"°"),U.createElement("div",{style:a.symbol},"%"),U.createElement("div",{style:a.symbol},"%")))},O2e=function(e){var t=e.hsl,n=Xt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return U.createElement("div",{style:n.picker})},T2e=function(){var e=Xt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return U.createElement("div",{style:e.pointer},U.createElement("div",{style:e.left},U.createElement("div",{style:e.leftInside})),U.createElement("div",{style:e.right},U.createElement("div",{style:e.rightInside})))},lU=function(e){var t=e.onClick,n=e.label,r=e.children,s=e.active,a=Xt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return U.createElement("div",{style:a.button,onClick:t},n||r)},A2e=function(e){var t=e.rgb,n=e.currentColor,r=Xt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return U.createElement("div",null,U.createElement("div",{style:r.label},"new"),U.createElement("div",{style:r.swatches},U.createElement("div",{style:r.new}),U.createElement("div",{style:r.current})),U.createElement("div",{style:r.label},"current"))},k2e=(function(){function e(t,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})();function N2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L2e(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function M2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o9=(function(e){M2e(t,e);function t(n){N2e(this,t);var r=L2e(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return k2e(t,[{key:"render",value:function(){var n=this.props,r=n.styles,s=r===void 0?{}:r,a=n.className,i=a===void 0?"":a,l=Xt(ii({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},s));return U.createElement("div",{style:l.picker,className:"photoshop-picker "+i},U.createElement("div",{style:l.head},this.props.header),U.createElement("div",{style:l.body,className:"flexbox-fix"},U.createElement("div",{style:l.saturation},U.createElement(P2,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:O2e,onChange:this.props.onChange})),U.createElement("div",{style:l.hue},U.createElement(rv,{direction:"vertical",hsl:this.props.hsl,pointer:T2e,onChange:this.props.onChange})),U.createElement("div",{style:l.controls},U.createElement("div",{style:l.top,className:"flexbox-fix"},U.createElement("div",{style:l.previews},U.createElement(A2e,{rgb:this.props.rgb,currentColor:this.state.currentColor})),U.createElement("div",{style:l.actions},U.createElement(lU,{label:"OK",onClick:this.props.onAccept,active:!0}),U.createElement(lU,{label:"Cancel",onClick:this.props.onCancel}),U.createElement(R2e,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t})(U.Component);o9.propTypes={header:tt.string,styles:tt.object};o9.defaultProps={header:"Color Picker",styles:{}};oi(o9);var I2e=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,s=e.hex,a=e.disableAlpha,i=Xt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),l=function(u,f){u.hex?Dd(u.hex)&&t({hex:u.hex,source:"hex"},f):u.r||u.g||u.b?t({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,a:n.a,source:"rgb"},f):u.a&&(u.a<0?u.a=0:u.a>100&&(u.a=100),u.a/=100,t({h:r.h,s:r.s,l:r.l,a:u.a,source:"rgb"},f))};return U.createElement("div",{style:i.fields,className:"flexbox-fix"},U.createElement("div",{style:i.double},U.createElement(An,{style:{input:i.input,label:i.label},label:"hex",value:s.replace("#",""),onChange:l})),U.createElement("div",{style:i.single},U.createElement(An,{style:{input:i.input,label:i.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),U.createElement("div",{style:i.single},U.createElement(An,{style:{input:i.input,label:i.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),U.createElement("div",{style:i.single},U.createElement(An,{style:{input:i.input,label:i.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),U.createElement("div",{style:i.alpha},U.createElement(An,{style:{input:i.input,label:i.label},label:"a",value:Math.round(n.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},P2e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gQ=function(e){var t=e.colors,n=e.onClick,r=n===void 0?function(){}:n,s=e.onSwatchHover,a=Xt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),i=function(l,u){r({hex:l,source:"hex"},u)};return U.createElement("div",{style:a.colors,className:"flexbox-fix"},t.map(function(l){var u=typeof l=="string"?{color:l}:l,f=""+u.color+(u.title||"");return U.createElement("div",{key:f,style:a.swatchWrap},U.createElement(Dh,P2e({},u,{style:a.swatch,onClick:i,onHover:s,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};gQ.propTypes={colors:tt.arrayOf(tt.oneOfType([tt.string,tt.shape({color:tt.string,title:tt.string})])).isRequired};var D2e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l9=function(e){var t=e.width,n=e.rgb,r=e.hex,s=e.hsv,a=e.hsl,i=e.onChange,l=e.onSwatchHover,u=e.disableAlpha,f=e.presetColors,h=e.renderers,g=e.styles,v=g===void 0?{}:g,w=e.className,C=w===void 0?"":w,_=Xt(ii({default:D2e({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},v),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},v),{disableAlpha:u});return U.createElement("div",{style:_.picker,className:"sketch-picker "+C},U.createElement("div",{style:_.saturation},U.createElement(P2,{style:_.Saturation,hsl:a,hsv:s,onChange:i})),U.createElement("div",{style:_.controls,className:"flexbox-fix"},U.createElement("div",{style:_.sliders},U.createElement("div",{style:_.hue},U.createElement(rv,{style:_.Hue,hsl:a,onChange:i})),U.createElement("div",{style:_.alpha},U.createElement(GN,{style:_.Alpha,rgb:n,hsl:a,renderers:h,onChange:i}))),U.createElement("div",{style:_.color},U.createElement(nv,null),U.createElement("div",{style:_.activeColor}))),U.createElement(I2e,{rgb:n,hsl:a,hex:r,onChange:i,disableAlpha:u}),U.createElement(gQ,{colors:f,onClick:i,onSwatchHover:l}))};l9.propTypes={disableAlpha:tt.bool,width:tt.oneOfType([tt.string,tt.number]),styles:tt.object};l9.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};oi(l9);var my=function(e){var t=e.hsl,n=e.offset,r=e.onClick,s=r===void 0?function(){}:r,a=e.active,i=e.first,l=e.last,u=Xt({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:i,last:l}),f=function(h){return s({h:t.h,s:.5,l:n,source:"hsl"},h)};return U.createElement("div",{style:u.swatch,onClick:f})},V2e=function(e){var t=e.onClick,n=e.hsl,r=Xt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),s=.1;return U.createElement("div",{style:r.swatches},U.createElement("div",{style:r.swatch},U.createElement(my,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<s&&Math.abs(n.s-.5)<s,onClick:t,first:!0})),U.createElement("div",{style:r.swatch},U.createElement(my,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<s&&Math.abs(n.s-.5)<s,onClick:t})),U.createElement("div",{style:r.swatch},U.createElement(my,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<s&&Math.abs(n.s-.5)<s,onClick:t})),U.createElement("div",{style:r.swatch},U.createElement(my,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<s&&Math.abs(n.s-.5)<s,onClick:t})),U.createElement("div",{style:r.swatch},U.createElement(my,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<s&&Math.abs(n.s-.5)<s,onClick:t,last:!0})),U.createElement("div",{style:r.clear}))},B2e=function(){var e=Xt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return U.createElement("div",{style:e.picker})},u9=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,s=e.styles,a=s===void 0?{}:s,i=e.className,l=i===void 0?"":i,u=Xt(ii({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return U.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},U.createElement("div",{style:u.hue},U.createElement(rv,{style:u.Hue,hsl:t,pointer:r,onChange:n})),U.createElement("div",{style:u.swatches},U.createElement(V2e,{hsl:t,onClick:n})))};u9.propTypes={styles:tt.object};u9.defaultProps={pointer:B2e,styles:{}};oi(u9);var rC={},uU;function F2e(){if(uU)return rC;uU=1,Object.defineProperty(rC,"__esModule",{value:!0});var e=Object.assign||function(i){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(i[f]=u[f])}return i},t=U,n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function s(i,l){var u={};for(var f in i)l.indexOf(f)>=0||Object.prototype.hasOwnProperty.call(i,f)&&(u[f]=i[f]);return u}var a=24;return rC.default=function(i){var l=i.fill,u=l===void 0?"currentColor":l,f=i.width,h=f===void 0?a:f,g=i.height,v=g===void 0?a:g,w=i.style,C=w===void 0?{}:w,_=s(i,["fill","width","height","style"]);return n.default.createElement("svg",e({viewBox:"0 0 "+a+" "+a,style:e({fill:u,width:h,height:v},C)},_),n.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},rC}var U2e=F2e();const G2e=ev(U2e);var z2e=function(e){var t=e.color,n=e.onClick,r=n===void 0?function(){}:n,s=e.onSwatchHover,a=e.first,i=e.last,l=e.active,u=Xt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:WN(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:i,active:l,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return U.createElement(Dh,{color:t,style:u.color,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},U.createElement("div",{style:u.check},U.createElement(G2e,null)))},H2e=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,s=e.active,a=Xt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return U.createElement("div",{style:a.group},Vh(r,function(i,l){return U.createElement(z2e,{key:i,color:i,active:i.toLowerCase()===s,first:l===0,last:l===r.length-1,onClick:t,onSwatchHover:n})}))},c9=function(e){var t=e.width,n=e.height,r=e.onChange,s=e.onSwatchHover,a=e.colors,i=e.hex,l=e.styles,u=l===void 0?{}:l,f=e.className,h=f===void 0?"":f,g=Xt(ii({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),v=function(w,C){return r({hex:w,source:"hex"},C)};return U.createElement("div",{style:g.picker,className:"swatches-picker "+h},U.createElement(cx,null,U.createElement("div",{style:g.overflow},U.createElement("div",{style:g.body},Vh(a,function(w){return U.createElement(H2e,{key:w.toString(),group:w,active:i,onClick:v,onSwatchHover:s})}),U.createElement("div",{style:g.clear})))))};c9.propTypes={width:tt.oneOfType([tt.string,tt.number]),height:tt.oneOfType([tt.string,tt.number]),colors:tt.arrayOf(tt.arrayOf(tt.string)),styles:tt.object};c9.defaultProps={width:320,height:240,colors:[[Gm[900],Gm[700],Gm[500],Gm[300],Gm[100]],[zm[900],zm[700],zm[500],zm[300],zm[100]],[Hm[900],Hm[700],Hm[500],Hm[300],Hm[100]],[qm[900],qm[700],qm[500],qm[300],qm[100]],[Km[900],Km[700],Km[500],Km[300],Km[100]],[Ym[900],Ym[700],Ym[500],Ym[300],Ym[100]],[Zm[900],Zm[700],Zm[500],Zm[300],Zm[100]],[Xm[900],Xm[700],Xm[500],Xm[300],Xm[100]],[Wm[900],Wm[700],Wm[500],Wm[300],Wm[100]],["#194D33",Ay[700],Ay[500],Ay[300],Ay[100]],[Qm[900],Qm[700],Qm[500],Qm[300],Qm[100]],[Jm[900],Jm[700],Jm[500],Jm[300],Jm[100]],[eg[900],eg[700],eg[500],eg[300],eg[100]],[tg[900],tg[700],tg[500],tg[300],tg[100]],[ng[900],ng[700],ng[500],ng[300],ng[100]],[rg[900],rg[700],rg[500],rg[300],rg[100]],[sg[900],sg[700],sg[500],sg[300],sg[100]],[ag[900],ag[700],ag[500],ag[300],ag[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};oi(c9);var d9=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,s=e.colors,a=e.width,i=e.triangle,l=e.styles,u=l===void 0?{}:l,f=e.className,h=f===void 0?"":f,g=Xt(ii({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right"}),v=function(w,C){Dd(w)&&t({hex:w,source:"hex"},C)};return U.createElement("div",{style:g.card,className:"twitter-picker "+h},U.createElement("div",{style:g.triangleShadow}),U.createElement("div",{style:g.triangle}),U.createElement("div",{style:g.body},Vh(s,function(w,C){return U.createElement(Dh,{key:C,color:w,hex:w,style:g.swatch,onClick:v,onHover:n,focusStyle:{boxShadow:"0 0 4px "+w}})}),U.createElement("div",{style:g.hash},"#"),U.createElement(An,{label:null,style:{input:g.input},value:r.replace("#",""),onChange:v}),U.createElement("div",{style:g.clear})))};d9.propTypes={width:tt.oneOfType([tt.string,tt.number]),triangle:tt.oneOf(["hide","top-left","top-right"]),colors:tt.arrayOf(tt.string),styles:tt.object};d9.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};oi(d9);var f9=function(e){var t=Xt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return U.createElement("div",{style:t.picker})};f9.propTypes={hsl:tt.shape({h:tt.number,s:tt.number,l:tt.number,a:tt.number})};f9.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var h9=function(e){var t=Xt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return U.createElement("div",{style:t.picker})};h9.propTypes={hsl:tt.shape({h:tt.number,s:tt.number,l:tt.number,a:tt.number})};h9.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var q2e=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,s=e.hex,a=e.hsv,i=function(g,v){if(g.hex)Dd(g.hex)&&t({hex:g.hex,source:"hex"},v);else if(g.rgb){var w=g.rgb.split(",");o4(g.rgb,"rgb")&&t({r:w[0],g:w[1],b:w[2],a:1,source:"rgb"},v)}else if(g.hsv){var C=g.hsv.split(",");o4(g.hsv,"hsv")&&(C[2]=C[2].replace("%",""),C[1]=C[1].replace("%",""),C[0]=C[0].replace("°",""),C[1]==1?C[1]=.01:C[2]==1&&(C[2]=.01),t({h:Number(C[0]),s:Number(C[1]),v:Number(C[2]),source:"hsv"},v))}else if(g.hsl){var _=g.hsl.split(",");o4(g.hsl,"hsl")&&(_[2]=_[2].replace("%",""),_[1]=_[1].replace("%",""),_[0]=_[0].replace("°",""),h[1]==1?h[1]=.01:h[2]==1&&(h[2]=.01),t({h:Number(_[0]),s:Number(_[1]),v:Number(_[2]),source:"hsl"},v))}},l=Xt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,f=Math.round(r.h)+"°, "+Math.round(r.s*100)+"%, "+Math.round(r.l*100)+"%",h=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return U.createElement("div",{style:l.wrap,className:"flexbox-fix"},U.createElement("div",{style:l.fields},U.createElement("div",{style:l.double},U.createElement(An,{style:{input:l.input,label:l.label},label:"hex",value:s,onChange:i})),U.createElement("div",{style:l.column},U.createElement("div",{style:l.single},U.createElement(An,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:i})),U.createElement("div",{style:l.single},U.createElement(An,{style:{input:l.input2,label:l.label2},label:"hsv",value:h,onChange:i})),U.createElement("div",{style:l.single},U.createElement(An,{style:{input:l.input2,label:l.label2},label:"hsl",value:f,onChange:i})))))},p9=function(e){var t=e.width,n=e.onChange,r=e.rgb,s=e.hsl,a=e.hsv,i=e.hex,l=e.header,u=e.styles,f=u===void 0?{}:u,h=e.className,g=h===void 0?"":h,v=Xt(ii({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},f));return U.createElement("div",{style:v.picker,className:"google-picker "+g},U.createElement("div",{style:v.head},l),U.createElement("div",{style:v.swatch}),U.createElement("div",{style:v.saturation},U.createElement(P2,{hsl:s,hsv:a,pointer:f9,onChange:n})),U.createElement("div",{style:v.body},U.createElement("div",{style:v.controls,className:"flexbox-fix"},U.createElement("div",{style:v.hue},U.createElement(rv,{style:v.Hue,hsl:s,radius:"4px",pointer:h9,onChange:n}))),U.createElement(q2e,{rgb:r,hsl:s,hex:i,hsv:a,onChange:n})))};p9.propTypes={width:tt.oneOfType([tt.string,tt.number]),styles:tt.object,header:tt.string};p9.defaultProps={width:652,styles:{},header:"Color picker"};oi(p9);const K2e={small:"h-6 w-6 p-0.5",default:"h-8 w-8 p-1",large:"h-10 w-10 p-1"},Y2e=({size:e="default",color:t,className:n})=>d.jsx("div",{className:We("border border-secondary-light rounded-xs bg-bg",K2e[e],n),children:d.jsx("div",{className:"w-full h-full",style:{backgroundColor:t}})}),Z2e=({styles:e,width:t="186px",colors:n,circleSize:r,circleSpacing:s,onSwatchHover:a,onChange:i,onChangeComplete:l,dropdownClassName:u,color:f,className:h,pickerClassName:g,size:v,ref:w,...C})=>{const _=($,O)=>i?.($.hex,O),E=($,O)=>l?.($.hex,O);return d.jsx(gW,{content:d.jsx(f2e,{color:f,className:We("pl-2.5 py-2.5",g),styles:e,width:t,colors:n,circleSize:r,circleSpacing:s,onSwatchHover:a,onChange:_,onChangeComplete:E}),className:We("overflow-hidden",u),...C,children:d.jsx(Y2e,{color:f,size:v,className:h})})},X2e={Circle:Z2e};var u4={exports:{}},na={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var cU;function W2e(){if(cU)return na;cU=1;var e=U;function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(u,f,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:u,containerInfo:f,implementation:h}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,na.createPortal=function(u,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(u,f,null,h)},na.flushSync=function(u){var f=i.T,h=r.p;try{if(i.T=null,r.p=2,u)return u()}finally{i.T=f,r.p=h,r.d.f()}},na.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},na.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},na.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var h=f.as,g=l(h,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:w}):h==="script"&&r.d.X(u,{crossOrigin:g,integrity:v,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},na.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=l(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},na.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,g=l(h,f.crossOrigin);r.d.L(u,h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},na.preloadModule=function(u,f){if(typeof u=="string")if(f){var h=l(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},na.requestFormReset=function(u){r.d.r(u)},na.unstable_batchedUpdates=function(u,f){return u(f)},na.useFormState=function(u,f,h){return i.H.useFormState(u,f,h)},na.useFormStatus=function(){return i.H.useHostTransitionStatus()},na.version="19.1.0",na}var dU;function Q2e(){if(dU)return u4.exports;dU=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),u4.exports=W2e(),u4.exports}var av=Q2e();const J2e=ev(av);function gn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function fU(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B2(...e){return t=>{let n=!1;const r=e.map(s=>{const a=fU(s,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():fU(e[s],null)}}}}function Is(...e){return y.useCallback(B2(...e),e)}function e_e(e,t){const n=y.createContext(t),r=a=>{const{children:i,...l}=a,u=y.useMemo(()=>l,Object.values(l));return d.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function s(a){const i=y.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,s]}function iv(e,t=[]){let n=[];function r(a,i){const l=y.createContext(i),u=n.length;n=[...n,i];const f=g=>{var v;const{scope:w,children:C,..._}=g,E=((v=w?.[e])==null?void 0:v[u])||l,$=y.useMemo(()=>_,Object.values(_));return d.jsx(E.Provider,{value:$,children:C})};f.displayName=a+"Provider";function h(g,v){var w;const C=((w=v?.[e])==null?void 0:w[u])||l,_=y.useContext(C);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[f,h]}const s=()=>{const a=n.map(i=>y.createContext(i));return function(i){const l=i?.[e]||a;return y.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return s.scopeName=e,[r,t_e(s,...t)]}function t_e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(s){const a=r.reduce((i,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...i,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Td=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},n_e=Zk[" useId ".trim().toString()]||(()=>{}),r_e=0;function wd(e){const[t,n]=y.useState(n_e());return Td(()=>{n(r=>r??String(r_e++))},[e]),e||(t?`radix-${t}`:"")}var s_e=Zk[" useInsertionEffect ".trim().toString()]||Td;function F2({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,a,i]=a_e({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:s;{const h=y.useRef(e!==void 0);y.useEffect(()=>{const g=h.current;g!==l&&console.warn(`${r} is changing from ${g?"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.`),h.current=l},[l,r])}const f=y.useCallback(h=>{var g;if(l){const v=i_e(h)?h(e):h;v!==e&&((g=i.current)==null||g.call(i,v))}else a(h)},[l,e,a,i]);return[u,f]}function a_e({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),s=y.useRef(n),a=y.useRef(t);return s_e(()=>{a.current=t},[t]),y.useEffect(()=>{var i;s.current!==n&&((i=a.current)==null||i.call(a,n),s.current=n)},[n,s]),[n,r,a]}function i_e(e){return typeof e=="function"}function k1(e){const t=o_e(e),n=y.forwardRef((r,s)=>{const{children:a,...i}=r,l=y.Children.toArray(a),u=l.find(u_e);if(u){const f=u.props.children,h=l.map(g=>g===u?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:g);return d.jsx(t,{...i,ref:s,children:y.isValidElement(f)?y.cloneElement(f,void 0,h):null})}return d.jsx(t,{...i,ref:s,children:a})});return n.displayName=`${e}.Slot`,n}function o_e(e){const t=y.forwardRef((n,r)=>{const{children:s,...a}=n;if(y.isValidElement(s)){const i=d_e(s),l=c_e(a,s.props);return s.type!==y.Fragment&&(l.ref=r?B2(r,i):i),y.cloneElement(s,l)}return y.Children.count(s)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l_e=Symbol("radix.slottable");function u_e(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===l_e}function c_e(e,t){const n={...t};for(const r in t){const s=e[r],a=t[r];/^on[A-Z]/.test(r)?s&&a?n[r]=(...i)=>{const l=a(...i);return s(...i),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...a}:r==="className"&&(n[r]=[s,a].filter(Boolean).join(" "))}return{...e,...n}}function d_e(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var f_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ls=f_e.reduce((e,t)=>{const n=k1(`Primitive.${t}`),r=y.forwardRef((s,a)=>{const{asChild:i,...l}=s,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vQ(e,t){e&&av.flushSync(()=>e.dispatchEvent(t))}function Jl(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function h_e(e,t=globalThis?.document){const n=Jl(e);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var p_e="DismissableLayer",tk="dismissableLayer.update",m_e="dismissableLayer.pointerDownOutside",g_e="dismissableLayer.focusOutside",hU,yQ=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m9=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,f=y.useContext(yQ),[h,g]=y.useState(null),v=h?.ownerDocument??globalThis?.document,[,w]=y.useState({}),C=Is(t,T=>g(T)),_=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),$=_.indexOf(E),O=h?_.indexOf(h):-1,N=f.layersWithOutsidePointerEventsDisabled.size>0,M=O>=$,L=x_e(T=>{const P=T.target,V=[...f.branches].some(q=>q.contains(P));!M||V||(s?.(T),i?.(T),T.defaultPrevented||l==null||l())},v),k=b_e(T=>{const P=T.target;[...f.branches].some(V=>V.contains(P))||(a?.(T),i?.(T),T.defaultPrevented||l==null||l())},v);return h_e(T=>{O===f.layers.size-1&&(r?.(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},v),y.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(hU=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),pU(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=hU)}},[h,v,n,f]),y.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),pU())},[h,f]),y.useEffect(()=>{const T=()=>w({});return document.addEventListener(tk,T),()=>document.removeEventListener(tk,T)},[]),d.jsx(ls.div,{...u,ref:C,style:{pointerEvents:N?M?"auto":"none":void 0,...e.style},onFocusCapture:gn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:gn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:gn(e.onPointerDownCapture,L.onPointerDownCapture)})});m9.displayName=p_e;var v_e="DismissableLayerBranch",y_e=y.forwardRef((e,t)=>{const n=y.useContext(yQ),r=y.useRef(null),s=Is(t,r);return y.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ls.div,{...e,ref:s})});y_e.displayName=v_e;function x_e(e,t=globalThis?.document){const n=Jl(e),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let u=function(){xQ(m_e,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=u,t.addEventListener("click",s.current,{once:!0})):u()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function b_e(e,t=globalThis?.document){const n=Jl(e),r=y.useRef(!1);return y.useEffect(()=>{const s=a=>{a.target&&!r.current&&xQ(g_e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pU(){const e=new CustomEvent(tk);document.dispatchEvent(e)}function xQ(e,t,n,{discrete:r}){const s=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?vQ(s,a):s.dispatchEvent(a)}var c4="focusScope.autoFocusOnMount",d4="focusScope.autoFocusOnUnmount",mU={bubbles:!1,cancelable:!0},w_e="FocusScope",g9=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=e,[l,u]=y.useState(null),f=Jl(s),h=Jl(a),g=y.useRef(null),v=Is(t,_=>u(_)),w=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let _=function(N){if(w.paused||!l)return;const M=N.target;l.contains(M)?g.current=M:od(g.current,{select:!0})},E=function(N){if(w.paused||!l)return;const M=N.relatedTarget;M!==null&&(l.contains(M)||od(g.current,{select:!0}))},$=function(N){if(document.activeElement===document.body)for(const M of N)M.removedNodes.length>0&&od(l)};document.addEventListener("focusin",_),document.addEventListener("focusout",E);const O=new MutationObserver($);return l&&O.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",E),O.disconnect()}}},[r,l,w.paused]),y.useEffect(()=>{if(l){vU.add(w);const _=document.activeElement;if(!l.contains(_)){const E=new CustomEvent(c4,mU);l.addEventListener(c4,f),l.dispatchEvent(E),E.defaultPrevented||(C_e($_e(bQ(l)),{select:!0}),document.activeElement===_&&od(l))}return()=>{l.removeEventListener(c4,f),setTimeout(()=>{const E=new CustomEvent(d4,mU);l.addEventListener(d4,h),l.dispatchEvent(E),E.defaultPrevented||od(_??document.body,{select:!0}),l.removeEventListener(d4,h),vU.remove(w)},0)}}},[l,f,h,w]);const C=y.useCallback(_=>{if(!n&&!r||w.paused)return;const E=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,$=document.activeElement;if(E&&$){const O=_.currentTarget,[N,M]=S_e(O);N&&M?!_.shiftKey&&$===M?(_.preventDefault(),n&&od(N,{select:!0})):_.shiftKey&&$===N&&(_.preventDefault(),n&&od(M,{select:!0})):$===O&&_.preventDefault()}},[n,r,w.paused]);return d.jsx(ls.div,{tabIndex:-1,...i,ref:v,onKeyDown:C})});g9.displayName=w_e;function C_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(od(r,{select:t}),document.activeElement!==n)return}function S_e(e){const t=bQ(e),n=gU(t,e),r=gU(t.reverse(),e);return[n,r]}function bQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gU(e,t){for(const n of e)if(!__e(n,{upTo:t}))return n}function __e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function j_e(e){return e instanceof HTMLInputElement&&"select"in e}function od(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&j_e(e)&&t&&e.select()}}var vU=E_e();function E_e(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=yU(e,t),e.unshift(t)},remove(t){var n;e=yU(e,t),(n=e[0])==null||n.resume()}}}function yU(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $_e(e){return e.filter(t=>t.tagName!=="A")}var R_e="Portal",v9=y.forwardRef((e,t)=>{var n;const{container:r,...s}=e,[a,i]=y.useState(!1);Td(()=>i(!0),[]);const l=r||a&&((n=globalThis?.document)==null?void 0:n.body);return l?J2e.createPortal(d.jsx(ls.div,{...s,ref:t}),l):null});v9.displayName=R_e;function O_e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Vd=e=>{const{present:t,children:n}=e,r=T_e(t),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=Is(r.ref,A_e(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:a}):null};Vd.displayName="Presence";function T_e(e){const[t,n]=y.useState(),r=y.useRef(null),s=y.useRef(e),a=y.useRef("none"),i=e?"mounted":"unmounted",[l,u]=O_e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=sC(r.current);a.current=l==="mounted"?f:"none"},[l]),Td(()=>{const f=r.current,h=s.current;if(h!==e){const g=a.current,v=sC(f);e?u("MOUNT"):v==="none"||f?.display==="none"?u("UNMOUNT"):u(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,u]),Td(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,g=w=>{const C=sC(r.current).includes(CSS.escape(w.animationName));if(w.target===t&&C&&(u("ANIMATION_END"),!s.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},v=w=>{w.target===t&&(a.current=sC(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function sC(e){return e?.animationName||"none"}function A_e(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var f4=0;function wQ(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xU()),document.body.insertAdjacentElement("beforeend",e[1]??xU()),f4++,()=>{f4===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),f4--}},[])}function xU(){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 Pl=function(){return Pl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Pl.apply(this,arguments)};function CQ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function k_e(e,t,n){for(var r=0,s=t.length,a;r<s;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var DC="right-scroll-bar-position",VC="width-before-scroll-bar",N_e="with-scroll-bars-hidden",L_e="--removed-body-scroll-bar-size";function h4(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function M_e(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var I_e=typeof window<"u"?y.useLayoutEffect:y.useEffect,bU=new WeakMap;function P_e(e,t){var n=M_e(null,function(r){return e.forEach(function(s){return h4(s,r)})});return I_e(function(){var r=bU.get(n);if(r){var s=new Set(r),a=new Set(e),i=n.current;s.forEach(function(l){a.has(l)||h4(l,null)}),a.forEach(function(l){s.has(l)||h4(l,i)})}bU.set(n,e)},[e]),n}function D_e(e){return e}function V_e(e,t){t===void 0&&(t=D_e);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(a),i=n}var u=function(){var h=i;i=[],h.forEach(a)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(h){i.push(h),f()},filter:function(h){return i=i.filter(h),n}}}};return s}function B_e(e){e===void 0&&(e={});var t=V_e(null);return t.options=Pl({async:!0,ssr:!1},e),t}var SQ=function(e){var t=e.sideCar,n=CQ(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Pl({},n))};SQ.isSideCarExport=!0;function F_e(e,t){return e.useMedium(t),SQ}var _Q=B_e(),p4=function(){},U2=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:p4,onWheelCapture:p4,onTouchMoveCapture:p4}),s=r[0],a=r[1],i=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,h=e.enabled,g=e.shards,v=e.sideCar,w=e.noRelative,C=e.noIsolation,_=e.inert,E=e.allowPinchZoom,$=e.as,O=$===void 0?"div":$,N=e.gapMode,M=CQ(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=v,k=P_e([n,t]),T=Pl(Pl({},M),s);return y.createElement(y.Fragment,null,h&&y.createElement(L,{sideCar:_Q,removeScrollBar:f,shards:g,noRelative:w,noIsolation:C,inert:_,setCallbacks:a,allowPinchZoom:!!E,lockRef:n,gapMode:N}),i?y.cloneElement(y.Children.only(l),Pl(Pl({},T),{ref:k})):y.createElement(O,Pl({},T,{className:u,ref:k}),l))});U2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};U2.classNames={fullWidth:VC,zeroRight:DC};var U_e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G_e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=U_e();return t&&e.setAttribute("nonce",t),e}function z_e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function H_e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var q_e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G_e())&&(z_e(t,n),H_e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},K_e=function(){var e=q_e();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},jQ=function(){var e=K_e(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},Y_e={left:0,top:0,right:0,gap:0},m4=function(e){return parseInt(e||"",10)||0},Z_e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[m4(n),m4(r),m4(s)]},X_e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Y_e;var t=Z_e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},W_e=jQ(),jg="data-scroll-locked",Q_e=function(e,t,n,r){var s=e.left,a=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(N_e,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(l,"px ").concat(r,`;
  }
  body[`).concat(jg,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(s,`px;
    padding-top: `).concat(a,`px;
    padding-right: `).concat(i,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(DC,` {
    right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(VC,` {
    margin-right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(DC," .").concat(DC,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(VC," .").concat(VC,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(jg,`] {
    `).concat(L_e,": ").concat(l,`px;
  }
`)},wU=function(){var e=parseInt(document.body.getAttribute(jg)||"0",10);return isFinite(e)?e:0},J_e=function(){y.useEffect(function(){return document.body.setAttribute(jg,(wU()+1).toString()),function(){var e=wU()-1;e<=0?document.body.removeAttribute(jg):document.body.setAttribute(jg,e.toString())}},[])},eje=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;J_e();var a=y.useMemo(function(){return X_e(s)},[s]);return y.createElement(W_e,{styles:Q_e(a,!t,s,n?"":"!important")})},nk=!1;if(typeof window<"u")try{var aC=Object.defineProperty({},"passive",{get:function(){return nk=!0,!0}});window.addEventListener("test",aC,aC),window.removeEventListener("test",aC,aC)}catch{nk=!1}var Sm=nk?{passive:!1}:!1,tje=function(e){return e.tagName==="TEXTAREA"},EQ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!tje(e)&&n[t]==="visible")},nje=function(e){return EQ(e,"overflowY")},rje=function(e){return EQ(e,"overflowX")},CU=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=$Q(e,r);if(s){var a=RQ(e,r),i=a[1],l=a[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sje=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},aje=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$Q=function(e,t){return e==="v"?nje(t):rje(t)},RQ=function(e,t){return e==="v"?sje(t):aje(t)},ije=function(e,t){return e==="h"&&t==="rtl"?-1:1},oje=function(e,t,n,r,s){var a=ije(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,u=t.contains(l),f=!1,h=i>0,g=0,v=0;do{if(!l)break;var w=RQ(e,l),C=w[0],_=w[1],E=w[2],$=_-E-a*C;(C||$)&&$Q(e,l)&&(g+=$,v+=C);var O=l.parentNode;l=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(h&&Math.abs(g)<1||!h&&Math.abs(v)<1)&&(f=!0),f},iC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},SU=function(e){return[e.deltaX,e.deltaY]},_U=function(e){return e&&"current"in e?e.current:e},lje=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uje=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},cje=0,_m=[];function dje(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),s=y.useState(cje++)[0],a=y.useState(jQ)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var _=k_e([e.lockRef.current],(e.shards||[]).map(_U)).filter(Boolean);return _.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(_,E){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!i.current.allowPinchZoom;var $=iC(_),O=n.current,N="deltaX"in _?_.deltaX:O[0]-$[0],M="deltaY"in _?_.deltaY:O[1]-$[1],L,k=_.target,T=Math.abs(N)>Math.abs(M)?"h":"v";if("touches"in _&&T==="h"&&k.type==="range")return!1;var P=CU(T,k);if(!P)return!0;if(P?L=T:(L=T==="v"?"h":"v",P=CU(T,k)),!P)return!1;if(!r.current&&"changedTouches"in _&&(N||M)&&(r.current=L),!L)return!0;var V=r.current||L;return oje(V,E,_,V==="h"?N:M)},[]),u=y.useCallback(function(_){var E=_;if(!(!_m.length||_m[_m.length-1]!==a)){var $="deltaY"in E?SU(E):iC(E),O=t.current.filter(function(L){return L.name===E.type&&(L.target===E.target||E.target===L.shadowParent)&&lje(L.delta,$)})[0];if(O&&O.should){E.cancelable&&E.preventDefault();return}if(!O){var N=(i.current.shards||[]).map(_U).filter(Boolean).filter(function(L){return L.contains(E.target)}),M=N.length>0?l(E,N[0]):!i.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),f=y.useCallback(function(_,E,$,O){var N={name:_,delta:E,target:$,should:O,shadowParent:fje($)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(M){return M!==N})},1)},[]),h=y.useCallback(function(_){n.current=iC(_),r.current=void 0},[]),g=y.useCallback(function(_){f(_.type,SU(_),_.target,l(_,e.lockRef.current))},[]),v=y.useCallback(function(_){f(_.type,iC(_),_.target,l(_,e.lockRef.current))},[]);y.useEffect(function(){return _m.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Sm),document.addEventListener("touchmove",u,Sm),document.addEventListener("touchstart",h,Sm),function(){_m=_m.filter(function(_){return _!==a}),document.removeEventListener("wheel",u,Sm),document.removeEventListener("touchmove",u,Sm),document.removeEventListener("touchstart",h,Sm)}},[]);var w=e.removeScrollBar,C=e.inert;return y.createElement(y.Fragment,null,C?y.createElement(a,{styles:uje(s)}):null,w?y.createElement(eje,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fje(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hje=F_e(_Q,dje);var y9=y.forwardRef(function(e,t){return y.createElement(U2,Pl({},e,{ref:t,sideCar:hje}))});y9.classNames=U2.classNames;var pje=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jm=new WeakMap,oC=new WeakMap,lC={},g4=0,OQ=function(e){return e&&(e.host||OQ(e.parentNode))},mje=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OQ(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},gje=function(e,t,n,r){var s=mje(t,Array.isArray(e)?e:[e]);lC[n]||(lC[n]=new WeakMap);var a=lC[n],i=[],l=new Set,u=new Set(s),f=function(g){!g||l.has(g)||(l.add(g),f(g.parentNode))};s.forEach(f);var h=function(g){!g||u.has(g)||Array.prototype.forEach.call(g.children,function(v){if(l.has(v))h(v);else try{var w=v.getAttribute(r),C=w!==null&&w!=="false",_=(jm.get(v)||0)+1,E=(a.get(v)||0)+1;jm.set(v,_),a.set(v,E),i.push(v),_===1&&C&&oC.set(v,!0),E===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch($){console.error("aria-hidden: cannot operate on ",v,$)}})};return h(t),l.clear(),g4++,function(){i.forEach(function(g){var v=jm.get(g)-1,w=a.get(g)-1;jm.set(g,v),a.set(g,w),v||(oC.has(g)||g.removeAttribute(r),oC.delete(g)),w||g.removeAttribute(n)}),g4--,g4||(jm=new WeakMap,jm=new WeakMap,oC=new WeakMap,lC={})}},TQ=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=pje(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),gje(r,s,n,"aria-hidden")):function(){return null}},G2="Dialog",[AQ,vje]=iv(G2),[yje,Qo]=AQ(G2),x9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,l=y.useRef(null),u=y.useRef(null),[f,h]=F2({prop:r,defaultProp:s??!1,onChange:a,caller:G2});return d.jsx(yje,{scope:t,triggerRef:l,contentRef:u,contentId:wd(),titleId:wd(),descriptionId:wd(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(g=>!g),[h]),modal:i,children:n})};x9.displayName=G2;var kQ="DialogTrigger",b9=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qo(kQ,n),a=Is(t,s.triggerRef);return d.jsx(ls.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":O9(s.open),...r,ref:a,onClick:gn(e.onClick,s.onOpenToggle)})});b9.displayName=kQ;var w9="DialogPortal",[xje,NQ]=AQ(w9,{forceMount:void 0}),C9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,a=Qo(w9,t);return d.jsx(xje,{scope:t,forceMount:n,children:y.Children.map(r,i=>d.jsx(Vd,{present:n||a.open,children:d.jsx(v9,{asChild:!0,container:s,children:i})}))})};C9.displayName=w9;var jS="DialogOverlay",S9=y.forwardRef((e,t)=>{const n=NQ(jS,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=Qo(jS,e.__scopeDialog);return a.modal?d.jsx(Vd,{present:r||a.open,children:d.jsx(wje,{...s,ref:t})}):null});S9.displayName=jS;var bje=k1("DialogOverlay.RemoveScroll"),wje=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qo(jS,n);return d.jsx(y9,{as:bje,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(ls.div,{"data-state":O9(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ch="DialogContent",_9=y.forwardRef((e,t)=>{const n=NQ(Ch,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=Qo(Ch,e.__scopeDialog);return d.jsx(Vd,{present:r||a.open,children:a.modal?d.jsx(Cje,{...s,ref:t}):d.jsx(Sje,{...s,ref:t})})});_9.displayName=Ch;var Cje=y.forwardRef((e,t)=>{const n=Qo(Ch,e.__scopeDialog),r=y.useRef(null),s=Is(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return TQ(a)},[]),d.jsx(LQ,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gn(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:gn(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:gn(e.onFocusOutside,a=>a.preventDefault())})}),Sje=y.forwardRef((e,t)=>{const n=Qo(Ch,e.__scopeDialog),r=y.useRef(!1),s=y.useRef(!1);return d.jsx(LQ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var i,l;(i=e.onInteractOutside)==null||i.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const u=a.target;(l=n.triggerRef.current)!=null&&l.contains(u)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),LQ=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...i}=e,l=Qo(Ch,n),u=y.useRef(null),f=Is(t,u);return wQ(),d.jsxs(d.Fragment,{children:[d.jsx(g9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:d.jsx(m9,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":O9(l.open),...i,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(jje,{titleId:l.titleId}),d.jsx($je,{contentRef:u,descriptionId:l.descriptionId})]})]})}),j9="DialogTitle",E9=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qo(j9,n);return d.jsx(ls.h2,{id:s.titleId,...r,ref:t})});E9.displayName=j9;var MQ="DialogDescription",$9=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qo(MQ,n);return d.jsx(ls.p,{id:s.descriptionId,...r,ref:t})});$9.displayName=MQ;var IQ="DialogClose",R9=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qo(IQ,n);return d.jsx(ls.button,{type:"button",...r,ref:t,onClick:gn(e.onClick,()=>s.onOpenChange(!1))})});R9.displayName=IQ;function O9(e){return e?"open":"closed"}var PQ="DialogTitleWarning",[_je,DQ]=e_e(PQ,{contentName:Ch,titleName:j9,docsSlug:"dialog"}),jje=({titleId:e})=>{const t=DQ(PQ),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Eje="DialogDescriptionWarning",$je=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DQ(Eje).contentName}}.`;return y.useEffect(()=>{var r;const s=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Rje=x9,Oje=b9,Tje=C9,VQ=S9,BQ=_9,FQ=E9,UQ=$9,Aje=R9;const kje=Object.freeze(Object.defineProperty({__proto__:null,Close:Aje,Content:BQ,Description:UQ,Dialog:x9,DialogClose:R9,DialogContent:_9,DialogDescription:$9,DialogOverlay:S9,DialogPortal:C9,DialogTitle:E9,DialogTrigger:b9,Overlay:VQ,Portal:Tje,Root:Rje,Title:FQ,Trigger:Oje,WarningProvider:_je,createDialogScope:vje},Symbol.toStringTag,{value:"Module"}));y.forwardRef(({className:e,...t},n)=>d.jsx(VQ,{className:We(e,"fixed top-0 left-0 bottom-0 right-0  p-4 backdrop-blur-[10px] z-20 opacity-0 data-[state=open]:animate-overlayShow"),ref:n,...t}));y.forwardRef(({className:e,...t},n)=>d.jsx(BQ,{className:We(e," w-[465px] max-h-4/6 flex flex-col shadow-bg fixed text-white rounded z-30 top-1/2 left-1/2 -translate-1/2 shadow-md border-1 opacity-0 border-placeholder/50 data-[state=open]:animate-contentShow"),ref:n,...t}));y.forwardRef(({className:e,...t},n)=>d.jsx(FQ,{className:We(e,"py-2 pl-4 border-b border-b-placeholder/50 min-h-[52px] flex items-center bg-panel rounded-t-md"),ref:n,...t}));y.forwardRef(({className:e,...t},n)=>d.jsx(UQ,{className:We(e,"flex flex-col overflow-y-auto px-4 py-2 gap-2 bg-panel border-b border-b-placeholder/50"),ref:n,...t}));({...kje});const Nje=["top","right","bottom","left"],Ad=Math.min,ji=Math.max,ES=Math.round,uC=Math.floor,Zl=e=>({x:e,y:e}),Lje={left:"right",right:"left",bottom:"top",top:"bottom"},Mje={start:"end",end:"start"};function rk(e,t,n){return ji(e,Ad(t,n))}function Xu(e,t){return typeof e=="function"?e(t):e}function Wu(e){return e.split("-")[0]}function ov(e){return e.split("-")[1]}function T9(e){return e==="x"?"y":"x"}function A9(e){return e==="y"?"height":"width"}const Ije=new Set(["top","bottom"]);function Dl(e){return Ije.has(Wu(e))?"y":"x"}function k9(e){return T9(Dl(e))}function Pje(e,t,n){n===void 0&&(n=!1);const r=ov(e),s=k9(e),a=A9(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=$S(i)),[i,$S(i)]}function Dje(e){const t=$S(e);return[sk(e),t,sk(t)]}function sk(e){return e.replace(/start|end/g,t=>Mje[t])}const jU=["left","right"],EU=["right","left"],Vje=["top","bottom"],Bje=["bottom","top"];function Fje(e,t,n){switch(e){case"top":case"bottom":return n?t?EU:jU:t?jU:EU;case"left":case"right":return t?Vje:Bje;default:return[]}}function Uje(e,t,n,r){const s=ov(e);let a=Fje(Wu(e),n==="start",r);return s&&(a=a.map(i=>i+"-"+s),t&&(a=a.concat(a.map(sk)))),a}function $S(e){return e.replace(/left|right|bottom|top/g,t=>Lje[t])}function Gje(e){return{top:0,right:0,bottom:0,left:0,...e}}function GQ(e){return typeof e!="number"?Gje(e):{top:e,right:e,bottom:e,left:e}}function RS(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function $U(e,t,n){let{reference:r,floating:s}=e;const a=Dl(t),i=k9(t),l=A9(i),u=Wu(t),f=a==="y",h=r.x+r.width/2-s.width/2,g=r.y+r.height/2-s.height/2,v=r[l]/2-s[l]/2;let w;switch(u){case"top":w={x:h,y:r.y-s.height};break;case"bottom":w={x:h,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:g};break;case"left":w={x:r.x-s.width,y:g};break;default:w={x:r.x,y:r.y}}switch(ov(t)){case"start":w[i]-=v*(n&&f?-1:1);break;case"end":w[i]+=v*(n&&f?-1:1);break}return w}const zje=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:g}=$U(f,r,u),v=r,w={},C=0;for(let _=0;_<l.length;_++){const{name:E,fn:$}=l[_],{x:O,y:N,data:M,reset:L}=await $({x:h,y:g,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:f,platform:i,elements:{reference:e,floating:t}});h=O??h,g=N??g,w={...w,[E]:{...w[E],...M}},L&&C<=50&&(C++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(f=L.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:h,y:g}=$U(f,v,u)),_=-1)}return{x:h,y:g,placement:v,strategy:s,middlewareData:w}};async function N1(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:v=!1,padding:w=0}=Xu(t,e),C=GQ(w),_=l[v?g==="floating"?"reference":"floating":g],E=RS(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(_)))==null||n?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:u})),$=g==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),N=await(a.isElement==null?void 0:a.isElement(O))?await(a.getScale==null?void 0:a.getScale(O))||{x:1,y:1}:{x:1,y:1},M=RS(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:$,offsetParent:O,strategy:u}):$);return{top:(E.top-M.top+C.top)/N.y,bottom:(M.bottom-E.bottom+C.bottom)/N.y,left:(E.left-M.left+C.left)/N.x,right:(M.right-E.right+C.right)/N.x}}const Hje=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:f,padding:h=0}=Xu(e,t)||{};if(f==null)return{};const g=GQ(h),v={x:n,y:r},w=k9(s),C=A9(w),_=await i.getDimensions(f),E=w==="y",$=E?"top":"left",O=E?"bottom":"right",N=E?"clientHeight":"clientWidth",M=a.reference[C]+a.reference[w]-v[w]-a.floating[C],L=v[w]-a.reference[w],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let T=k?k[N]:0;(!T||!await(i.isElement==null?void 0:i.isElement(k)))&&(T=l.floating[N]||a.floating[C]);const P=M/2-L/2,V=T/2-_[C]/2-1,q=Ad(g[$],V),K=Ad(g[O],V),re=q,ee=T-_[C]-K,ue=T/2-_[C]/2+P,he=rk(re,ue,ee),X=!u.arrow&&ov(s)!=null&&ue!==he&&a.reference[C]/2-(ue<re?q:K)-_[C]/2<0,pe=X?ue<re?ue-re:ue-ee:0;return{[w]:v[w]+pe,data:{[w]:he,centerOffset:ue-he-pe,...X&&{alignmentOffset:pe}},reset:X}}}),qje=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:_=!0,...E}=Xu(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const $=Wu(s),O=Dl(l),N=Wu(l)===l,M=await(u.isRTL==null?void 0:u.isRTL(f.floating)),L=v||(N||!_?[$S(l)]:Dje(l)),k=C!=="none";!v&&k&&L.push(...Uje(l,_,C,M));const T=[l,...L],P=await N1(t,E),V=[];let q=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&V.push(P[$]),g){const ue=Pje(s,i,M);V.push(P[ue[0]],P[ue[1]])}if(q=[...q,{placement:s,overflows:V}],!V.every(ue=>ue<=0)){var K,re;const ue=(((K=a.flip)==null?void 0:K.index)||0)+1,he=T[ue];if(he&&(!(g==="alignment"&&O!==Dl(he))||q.every(pe=>Dl(pe.placement)===O?pe.overflows[0]>0:!0)))return{data:{index:ue,overflows:q},reset:{placement:he}};let X=(re=q.filter(pe=>pe.overflows[0]<=0).sort((pe,xe)=>pe.overflows[1]-xe.overflows[1])[0])==null?void 0:re.placement;if(!X)switch(w){case"bestFit":{var ee;const pe=(ee=q.filter(xe=>{if(k){const be=Dl(xe.placement);return be===O||be==="y"}return!0}).map(xe=>[xe.placement,xe.overflows.filter(be=>be>0).reduce((be,Y)=>be+Y,0)]).sort((xe,be)=>xe[1]-be[1])[0])==null?void 0:ee[0];pe&&(X=pe);break}case"initialPlacement":X=l;break}if(s!==X)return{reset:{placement:X}}}return{}}}};function RU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OU(e){return Nje.some(t=>e[t]>=0)}const Kje=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Xu(e,t);switch(r){case"referenceHidden":{const a=await N1(t,{...s,elementContext:"reference"}),i=RU(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:OU(i)}}}case"escaped":{const a=await N1(t,{...s,altBoundary:!0}),i=RU(a,n.floating);return{data:{escapedOffsets:i,escaped:OU(i)}}}default:return{}}}}},zQ=new Set(["left","top"]);async function Yje(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Wu(n),l=ov(n),u=Dl(n)==="y",f=zQ.has(i)?-1:1,h=a&&u?-1:1,g=Xu(t,e);let{mainAxis:v,crossAxis:w,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return l&&typeof C=="number"&&(w=l==="end"?C*-1:C),u?{x:w*h,y:v*f}:{x:v*f,y:w*h}}const Zje=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:i,middlewareData:l}=t,u=await Yje(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+u.x,y:a+u.y,data:{...u,placement:i}}}}},Xje=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:E=>{let{x:$,y:O}=E;return{x:$,y:O}}},...u}=Xu(e,t),f={x:n,y:r},h=await N1(t,u),g=Dl(Wu(s)),v=T9(g);let w=f[v],C=f[g];if(a){const E=v==="y"?"top":"left",$=v==="y"?"bottom":"right",O=w+h[E],N=w-h[$];w=rk(O,w,N)}if(i){const E=g==="y"?"top":"left",$=g==="y"?"bottom":"right",O=C+h[E],N=C-h[$];C=rk(O,C,N)}const _=l.fn({...t,[v]:w,[g]:C});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[v]:a,[g]:i}}}}}},Wje=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Xu(e,t),h={x:n,y:r},g=Dl(s),v=T9(g);let w=h[v],C=h[g];const _=Xu(l,t),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(u){const N=v==="y"?"height":"width",M=a.reference[v]-a.floating[N]+E.mainAxis,L=a.reference[v]+a.reference[N]-E.mainAxis;w<M?w=M:w>L&&(w=L)}if(f){var $,O;const N=v==="y"?"width":"height",M=zQ.has(Wu(s)),L=a.reference[g]-a.floating[N]+(M&&(($=i.offset)==null?void 0:$[g])||0)+(M?0:E.crossAxis),k=a.reference[g]+a.reference[N]+(M?0:((O=i.offset)==null?void 0:O[g])||0)-(M?E.crossAxis:0);C<L?C=L:C>k&&(C=k)}return{[v]:w,[g]:C}}}},Qje=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...f}=Xu(e,t),h=await N1(t,f),g=Wu(s),v=ov(s),w=Dl(s)==="y",{width:C,height:_}=a.floating;let E,$;g==="top"||g==="bottom"?(E=g,$=v===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):($=g,E=v==="end"?"top":"bottom");const O=_-h.top-h.bottom,N=C-h.left-h.right,M=Ad(_-h[E],O),L=Ad(C-h[$],N),k=!t.middlewareData.shift;let T=M,P=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=O),k&&!v){const q=ji(h.left,0),K=ji(h.right,0),re=ji(h.top,0),ee=ji(h.bottom,0);w?P=C-2*(q!==0||K!==0?q+K:ji(h.left,h.right)):T=_-2*(re!==0||ee!==0?re+ee:ji(h.top,h.bottom))}await u({...t,availableWidth:P,availableHeight:T});const V=await i.getDimensions(l.floating);return C!==V.width||_!==V.height?{reset:{rects:!0}}:{}}}};function z2(){return typeof window<"u"}function lv(e){return HQ(e)?(e.nodeName||"").toLowerCase():"#document"}function Ri(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ru(e){var t;return(t=(HQ(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HQ(e){return z2()?e instanceof Node||e instanceof Ri(e).Node:!1}function Yo(e){return z2()?e instanceof Element||e instanceof Ri(e).Element:!1}function eu(e){return z2()?e instanceof HTMLElement||e instanceof Ri(e).HTMLElement:!1}function TU(e){return!z2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ri(e).ShadowRoot}const Jje=new Set(["inline","contents"]);function dx(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jje.has(s)}const eEe=new Set(["table","td","th"]);function tEe(e){return eEe.has(lv(e))}const nEe=[":popover-open",":modal"];function H2(e){return nEe.some(t=>{try{return e.matches(t)}catch{return!1}})}const rEe=["transform","translate","scale","rotate","perspective"],sEe=["transform","translate","scale","rotate","perspective","filter"],aEe=["paint","layout","strict","content"];function N9(e){const t=L9(),n=Yo(e)?Zo(e):e;return rEe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sEe.some(r=>(n.willChange||"").includes(r))||aEe.some(r=>(n.contain||"").includes(r))}function iEe(e){let t=kd(e);for(;eu(t)&&!Pg(t);){if(N9(t))return t;if(H2(t))return null;t=kd(t)}return null}function L9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const oEe=new Set(["html","body","#document"]);function Pg(e){return oEe.has(lv(e))}function Zo(e){return Ri(e).getComputedStyle(e)}function q2(e){return Yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kd(e){if(lv(e)==="html")return e;const t=e.assignedSlot||e.parentNode||TU(e)&&e.host||ru(e);return TU(t)?t.host:t}function qQ(e){const t=kd(e);return Pg(t)?e.ownerDocument?e.ownerDocument.body:e.body:eu(t)&&dx(t)?t:qQ(t)}function L1(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=qQ(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),i=Ri(s);if(a){const l=ak(i);return t.concat(i,i.visualViewport||[],dx(s)?s:[],l&&n?L1(l):[])}return t.concat(s,L1(s,[],n))}function ak(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KQ(e){const t=Zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=eu(e),a=s?e.offsetWidth:n,i=s?e.offsetHeight:r,l=ES(n)!==a||ES(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function M9(e){return Yo(e)?e:e.contextElement}function Eg(e){const t=M9(e);if(!eu(t))return Zl(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=KQ(t);let i=(a?ES(n.width):n.width)/r,l=(a?ES(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const lEe=Zl(0);function YQ(e){const t=Ri(e);return!L9()||!t.visualViewport?lEe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uEe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ri(e)?!1:t}function Sh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=M9(e);let i=Zl(1);t&&(r?Yo(r)&&(i=Eg(r)):i=Eg(e));const l=uEe(a,n,r)?YQ(a):Zl(0);let u=(s.left+l.x)/i.x,f=(s.top+l.y)/i.y,h=s.width/i.x,g=s.height/i.y;if(a){const v=Ri(a),w=r&&Yo(r)?Ri(r):r;let C=v,_=ak(C);for(;_&&r&&w!==C;){const E=Eg(_),$=_.getBoundingClientRect(),O=Zo(_),N=$.left+(_.clientLeft+parseFloat(O.paddingLeft))*E.x,M=$.top+(_.clientTop+parseFloat(O.paddingTop))*E.y;u*=E.x,f*=E.y,h*=E.x,g*=E.y,u+=N,f+=M,C=Ri(_),_=ak(C)}}return RS({width:h,height:g,x:u,y:f})}function K2(e,t){const n=q2(e).scrollLeft;return t?t.left+n:Sh(ru(e)).left+n}function ZQ(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-K2(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function cEe(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",i=ru(r),l=t?H2(t.floating):!1;if(r===i||l&&a)return n;let u={scrollLeft:0,scrollTop:0},f=Zl(1);const h=Zl(0),g=eu(r);if((g||!g&&!a)&&((lv(r)!=="body"||dx(i))&&(u=q2(r)),eu(r))){const w=Sh(r);f=Eg(r),h.x=w.x+r.clientLeft,h.y=w.y+r.clientTop}const v=i&&!g&&!a?ZQ(i,u):Zl(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x+v.x,y:n.y*f.y-u.scrollTop*f.y+h.y+v.y}}function dEe(e){return Array.from(e.getClientRects())}function fEe(e){const t=ru(e),n=q2(e),r=e.ownerDocument.body,s=ji(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ji(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+K2(e);const l=-n.scrollTop;return Zo(r).direction==="rtl"&&(i+=ji(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:i,y:l}}const AU=25;function hEe(e,t){const n=Ri(e),r=ru(e),s=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(s){a=s.width,i=s.height;const h=L9();(!h||h&&t==="fixed")&&(l=s.offsetLeft,u=s.offsetTop)}const f=K2(r);if(f<=0){const h=r.ownerDocument,g=h.body,v=getComputedStyle(g),w=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,C=Math.abs(r.clientWidth-g.clientWidth-w);C<=AU&&(a-=C)}else f<=AU&&(a+=f);return{width:a,height:i,x:l,y:u}}const pEe=new Set(["absolute","fixed"]);function mEe(e,t){const n=Sh(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=eu(e)?Eg(e):Zl(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,u=s*a.x,f=r*a.y;return{width:i,height:l,x:u,y:f}}function kU(e,t,n){let r;if(t==="viewport")r=hEe(e,n);else if(t==="document")r=fEe(ru(e));else if(Yo(t))r=mEe(t,n);else{const s=YQ(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return RS(r)}function XQ(e,t){const n=kd(e);return n===t||!Yo(n)||Pg(n)?!1:Zo(n).position==="fixed"||XQ(n,t)}function gEe(e,t){const n=t.get(e);if(n)return n;let r=L1(e,[],!1).filter(l=>Yo(l)&&lv(l)!=="body"),s=null;const a=Zo(e).position==="fixed";let i=a?kd(e):e;for(;Yo(i)&&!Pg(i);){const l=Zo(i),u=N9(i);!u&&l.position==="fixed"&&(s=null),(a?!u&&!s:!u&&l.position==="static"&&s&&pEe.has(s.position)||dx(i)&&!u&&XQ(e,i))?r=r.filter(f=>f!==i):s=l,i=kd(i)}return t.set(e,r),r}function vEe(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?H2(t)?[]:gEe(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((u,f)=>{const h=kU(t,f,s);return u.top=ji(h.top,u.top),u.right=Ad(h.right,u.right),u.bottom=Ad(h.bottom,u.bottom),u.left=ji(h.left,u.left),u},kU(t,i,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yEe(e){const{width:t,height:n}=KQ(e);return{width:t,height:n}}function xEe(e,t,n){const r=eu(t),s=ru(t),a=n==="fixed",i=Sh(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=Zl(0);function f(){u.x=K2(s)}if(r||!r&&!a)if((lv(t)!=="body"||dx(s))&&(l=q2(t)),r){const w=Sh(t,!0,a,t);u.x=w.x+t.clientLeft,u.y=w.y+t.clientTop}else s&&f();a&&!r&&s&&f();const h=s&&!r&&!a?ZQ(s,l):Zl(0),g=i.left+l.scrollLeft-u.x-h.x,v=i.top+l.scrollTop-u.y-h.y;return{x:g,y:v,width:i.width,height:i.height}}function v4(e){return Zo(e).position==="static"}function NU(e,t){if(!eu(e)||Zo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ru(e)===n&&(n=n.ownerDocument.body),n}function WQ(e,t){const n=Ri(e);if(H2(e))return n;if(!eu(e)){let s=kd(e);for(;s&&!Pg(s);){if(Yo(s)&&!v4(s))return s;s=kd(s)}return n}let r=NU(e,t);for(;r&&tEe(r)&&v4(r);)r=NU(r,t);return r&&Pg(r)&&v4(r)&&!N9(r)?n:r||iEe(e)||n}const bEe=async function(e){const t=this.getOffsetParent||WQ,n=this.getDimensions,r=await n(e.floating);return{reference:xEe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wEe(e){return Zo(e).direction==="rtl"}const CEe={convertOffsetParentRelativeRectToViewportRelativeRect:cEe,getDocumentElement:ru,getClippingRect:vEe,getOffsetParent:WQ,getElementRects:bEe,getClientRects:dEe,getDimensions:yEe,getScale:Eg,isElement:Yo,isRTL:wEe};function QQ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function SEe(e,t){let n=null,r;const s=ru(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const f=e.getBoundingClientRect(),{left:h,top:g,width:v,height:w}=f;if(l||t(),!v||!w)return;const C=uC(g),_=uC(s.clientWidth-(h+v)),E=uC(s.clientHeight-(g+w)),$=uC(h),O={rootMargin:-C+"px "+-_+"px "+-E+"px "+-$+"px",threshold:ji(0,Ad(1,u))||1};let N=!0;function M(L){const k=L[0].intersectionRatio;if(k!==u){if(!N)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!QQ(f,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(M,{...O,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,O)}n.observe(e)}return i(!0),a}function I9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=M9(e),h=s||a?[...f?L1(f):[],...L1(t)]:[];h.forEach($=>{s&&$.addEventListener("scroll",n,{passive:!0}),a&&$.addEventListener("resize",n)});const g=f&&l?SEe(f,n):null;let v=-1,w=null;i&&(w=new ResizeObserver($=>{let[O]=$;O&&O.target===f&&w&&(w.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(t)})),n()}),f&&!u&&w.observe(f),w.observe(t));let C,_=u?Sh(e):null;u&&E();function E(){const $=Sh(e);_&&!QQ(_,$)&&n(),_=$,C=requestAnimationFrame(E)}return n(),()=>{var $;h.forEach(O=>{s&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),g?.(),($=w)==null||$.disconnect(),w=null,u&&cancelAnimationFrame(C)}}const JQ=Zje,eJ=Xje,tJ=qje,_Ee=Qje,jEe=Kje,ik=Hje,EEe=Wje,ok=(e,t,n)=>{const r=new Map,s={platform:CEe,...n},a={...s.platform,_c:r};return zje(e,t,{...s,platform:a})};var $Ee=typeof document<"u",REe=function(){},BC=$Ee?y.useLayoutEffect:REe;function OS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!OS(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!OS(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function nJ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LU(e,t){const n=nJ(e);return Math.round(t*n)/n}function y4(e){const t=y.useRef(e);return BC(()=>{t.current=e}),t}function OEe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[h,g]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,w]=y.useState(r);OS(v,r)||w(r);const[C,_]=y.useState(null),[E,$]=y.useState(null),O=y.useCallback(xe=>{xe!==k.current&&(k.current=xe,_(xe))},[]),N=y.useCallback(xe=>{xe!==T.current&&(T.current=xe,$(xe))},[]),M=a||C,L=i||E,k=y.useRef(null),T=y.useRef(null),P=y.useRef(h),V=u!=null,q=y4(u),K=y4(s),re=y4(f),ee=y.useCallback(()=>{if(!k.current||!T.current)return;const xe={placement:t,strategy:n,middleware:v};K.current&&(xe.platform=K.current),ok(k.current,T.current,xe).then(be=>{const Y={...be,isPositioned:re.current!==!1};ue.current&&!OS(P.current,Y)&&(P.current=Y,av.flushSync(()=>{g(Y)}))})},[v,t,n,K,re]);BC(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(xe=>({...xe,isPositioned:!1})))},[f]);const ue=y.useRef(!1);BC(()=>(ue.current=!0,()=>{ue.current=!1}),[]),BC(()=>{if(M&&(k.current=M),L&&(T.current=L),M&&L){if(q.current)return q.current(M,L,ee);ee()}},[M,L,ee,q,V]);const he=y.useMemo(()=>({reference:k,floating:T,setReference:O,setFloating:N}),[O,N]),X=y.useMemo(()=>({reference:M,floating:L}),[M,L]),pe=y.useMemo(()=>{const xe={position:n,left:0,top:0};if(!X.floating)return xe;const be=LU(X.floating,h.x),Y=LU(X.floating,h.y);return l?{...xe,transform:"translate("+be+"px, "+Y+"px)",...nJ(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:be,top:Y}},[n,l,X.floating,h.x,h.y]);return y.useMemo(()=>({...h,update:ee,refs:he,elements:X,floatingStyles:pe}),[h,ee,he,X,pe])}const TEe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ik({element:r.current,padding:s}).fn(n):{}:r?ik({element:r,padding:s}).fn(n):{}}}},AEe=(e,t)=>({...JQ(e),options:[e,t]}),kEe=(e,t)=>({...eJ(e),options:[e,t]}),NEe=(e,t)=>({...EEe(e),options:[e,t]}),LEe=(e,t)=>({...tJ(e),options:[e,t]}),MEe=(e,t)=>({..._Ee(e),options:[e,t]}),IEe=(e,t)=>({...jEe(e),options:[e,t]}),PEe=(e,t)=>({...TEe(e),options:[e,t]});var DEe="Arrow",rJ=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...a}=e;return d.jsx(ls.svg,{...a,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});rJ.displayName=DEe;var VEe=rJ;function BEe(e){const[t,n]=y.useState(void 0);return Td(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;i=f.inlineSize,l=f.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var P9="Popper",[sJ,aJ]=iv(P9),[FEe,iJ]=sJ(P9),oJ=e=>{const{__scopePopper:t,children:n}=e,[r,s]=y.useState(null);return d.jsx(FEe,{scope:t,anchor:r,onAnchorChange:s,children:n})};oJ.displayName=P9;var lJ="PopperAnchor",uJ=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,a=iJ(lJ,n),i=y.useRef(null),l=Is(t,i),u=y.useRef(null);return y.useEffect(()=>{const f=u.current;u.current=r?.current||i.current,f!==u.current&&a.onAnchorChange(u.current)}),r?null:d.jsx(ls.div,{...s,ref:l})});uJ.displayName=lJ;var D9="PopperContent",[UEe,GEe]=sJ(D9),cJ=y.forwardRef((e,t)=>{var n,r,s,a,i,l;const{__scopePopper:u,side:f="bottom",sideOffset:h=0,align:g="center",alignOffset:v=0,arrowPadding:w=0,avoidCollisions:C=!0,collisionBoundary:_=[],collisionPadding:E=0,sticky:$="partial",hideWhenDetached:O=!1,updatePositionStrategy:N="optimized",onPlaced:M,...L}=e,k=iJ(D9,u),[T,P]=y.useState(null),V=Is(t,Pt=>P(Pt)),[q,K]=y.useState(null),re=BEe(q),ee=re?.width??0,ue=re?.height??0,he=f+(g!=="center"?"-"+g:""),X=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},pe=Array.isArray(_)?_:[_],xe=pe.length>0,be={padding:X,boundary:pe.filter(HEe),altBoundary:xe},{refs:Y,floatingStyles:se,placement:Oe,isPositioned:de,middlewareData:_e}=OEe({strategy:"fixed",placement:he,whileElementsMounted:(...Pt)=>I9(...Pt,{animationFrame:N==="always"}),elements:{reference:k.anchor},middleware:[AEe({mainAxis:h+ue,alignmentAxis:v}),C&&kEe({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?NEe():void 0,...be}),C&&LEe({...be}),MEe({...be,apply:({elements:Pt,rects:Wt,availableWidth:Lt,availableHeight:Ln})=>{const{width:Ge,height:dt}=Wt.reference,Z=Pt.floating.style;Z.setProperty("--radix-popper-available-width",`${Lt}px`),Z.setProperty("--radix-popper-available-height",`${Ln}px`),Z.setProperty("--radix-popper-anchor-width",`${Ge}px`),Z.setProperty("--radix-popper-anchor-height",`${dt}px`)}}),q&&PEe({element:q,padding:w}),qEe({arrowWidth:ee,arrowHeight:ue}),O&&IEe({strategy:"referenceHidden",...be})]}),[Le,Re]=hJ(Oe),Ye=Jl(M);Td(()=>{de&&Ye?.()},[de,Ye]);const Xe=(n=_e.arrow)==null?void 0:n.x,Je=(r=_e.arrow)==null?void 0:r.y,Ot=((s=_e.arrow)==null?void 0:s.centerOffset)!==0,[tn,an]=y.useState();return Td(()=>{T&&an(window.getComputedStyle(T).zIndex)},[T]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:de?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:tn,"--radix-popper-transform-origin":[(a=_e.transformOrigin)==null?void 0:a.x,(i=_e.transformOrigin)==null?void 0:i.y].join(" "),...((l=_e.hide)==null?void 0:l.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(UEe,{scope:u,placedSide:Le,onArrowChange:K,arrowX:Xe,arrowY:Je,shouldHideArrow:Ot,children:d.jsx(ls.div,{"data-side":Le,"data-align":Re,...L,ref:V,style:{...L.style,animation:de?void 0:"none"}})})})});cJ.displayName=D9;var dJ="PopperArrow",zEe={top:"bottom",right:"left",bottom:"top",left:"right"},fJ=y.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,s=GEe(dJ,n),a=zEe[s.placedSide];return d.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:d.jsx(VEe,{...r,ref:t,style:{...r.style,display:"block"}})})});fJ.displayName=dJ;function HEe(e){return e!==null}var qEe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,s;const{placement:a,rects:i,middlewareData:l}=t,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[g,v]=hJ(a),w={start:"0%",center:"50%",end:"100%"}[v],C=(((r=l.arrow)==null?void 0:r.x)??0)+f/2,_=(((s=l.arrow)==null?void 0:s.y)??0)+h/2;let E="",$="";return g==="bottom"?(E=u?w:`${C}px`,$=`${-h}px`):g==="top"?(E=u?w:`${C}px`,$=`${i.floating.height+h}px`):g==="right"?(E=`${-h}px`,$=u?w:`${_}px`):g==="left"&&(E=`${i.floating.width+h}px`,$=u?w:`${_}px`),{data:{x:E,y:$}}}});function hJ(e){const[t,n="center"]=e.split("-");return[t,n]}var pJ=oJ,KEe=uJ,YEe=cJ,ZEe=fJ;function mJ(e){const t=e+"CollectionProvider",[n,r]=iv(t),[s,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=_=>{const{scope:E,children:$}=_,O=U.useRef(null),N=U.useRef(new Map).current;return d.jsx(s,{scope:E,itemMap:N,collectionRef:O,children:$})};i.displayName=t;const l=e+"CollectionSlot",u=k1(l),f=U.forwardRef((_,E)=>{const{scope:$,children:O}=_,N=a(l,$),M=Is(E,N.collectionRef);return d.jsx(u,{ref:M,children:O})});f.displayName=l;const h=e+"CollectionItemSlot",g="data-radix-collection-item",v=k1(h),w=U.forwardRef((_,E)=>{const{scope:$,children:O,...N}=_,M=U.useRef(null),L=Is(E,M),k=a(h,$);return U.useEffect(()=>(k.itemMap.set(M,{ref:M,...N}),()=>void k.itemMap.delete(M))),d.jsx(v,{[g]:"",ref:L,children:O})});w.displayName=h;function C(_){const E=a(e+"CollectionConsumer",_);return U.useCallback(()=>{const $=E.collectionRef.current;if(!$)return[];const O=Array.from($.querySelectorAll(`[${g}]`));return Array.from(E.itemMap.values()).sort((N,M)=>O.indexOf(N.ref.current)-O.indexOf(M.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:i,Slot:f,ItemSlot:w},C,r]}var XEe=y.createContext(void 0);function gJ(e){const t=y.useContext(XEe);return e||t||"ltr"}var x4="rovingFocusGroup.onEntryFocus",WEe={bubbles:!1,cancelable:!0},fx="RovingFocusGroup",[lk,vJ,QEe]=mJ(fx),[JEe,yJ]=iv(fx,[QEe]),[e5e,t5e]=JEe(fx),xJ=y.forwardRef((e,t)=>d.jsx(lk.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(lk.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(n5e,{...e,ref:t})})}));xJ.displayName=fx;var n5e=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...g}=e,v=y.useRef(null),w=Is(t,v),C=gJ(a),[_,E]=F2({prop:i,defaultProp:l??null,onChange:u,caller:fx}),[$,O]=y.useState(!1),N=Jl(f),M=vJ(n),L=y.useRef(!1),[k,T]=y.useState(0);return y.useEffect(()=>{const P=v.current;if(P)return P.addEventListener(x4,N),()=>P.removeEventListener(x4,N)},[N]),d.jsx(e5e,{scope:n,orientation:r,dir:C,loop:s,currentTabStopId:_,onItemFocus:y.useCallback(P=>E(P),[E]),onItemShiftTab:y.useCallback(()=>O(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:y.useCallback(()=>T(P=>P-1),[]),children:d.jsx(ls.div,{tabIndex:$||k===0?-1:0,"data-orientation":r,...g,ref:w,style:{outline:"none",...e.style},onMouseDown:gn(e.onMouseDown,()=>{L.current=!0}),onFocus:gn(e.onFocus,P=>{const V=!L.current;if(P.target===P.currentTarget&&V&&!$){const q=new CustomEvent(x4,WEe);if(P.currentTarget.dispatchEvent(q),!q.defaultPrevented){const K=M().filter(he=>he.focusable),re=K.find(he=>he.active),ee=K.find(he=>he.id===_),ue=[re,ee,...K].filter(Boolean).map(he=>he.ref.current);CJ(ue,h)}}L.current=!1}),onBlur:gn(e.onBlur,()=>O(!1))})})}),bJ="RovingFocusGroupItem",wJ=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:a,children:i,...l}=e,u=wd(),f=a||u,h=t5e(bJ,n),g=h.currentTabStopId===f,v=vJ(n),{onFocusableItemAdd:w,onFocusableItemRemove:C,currentTabStopId:_}=h;return y.useEffect(()=>{if(r)return w(),()=>C()},[r,w,C]),d.jsx(lk.ItemSlot,{scope:n,id:f,focusable:r,active:s,children:d.jsx(ls.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:gn(e.onMouseDown,E=>{r?h.onItemFocus(f):E.preventDefault()}),onFocus:gn(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:gn(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){h.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const $=a5e(E,h.orientation,h.dir);if($!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let O=v().filter(N=>N.focusable).map(N=>N.ref.current);if($==="last")O.reverse();else if($==="prev"||$==="next"){$==="prev"&&O.reverse();const N=O.indexOf(E.currentTarget);O=h.loop?i5e(O,N+1):O.slice(N+1)}setTimeout(()=>CJ(O))}}),children:typeof i=="function"?i({isCurrentTabStop:g,hasTabStop:_!=null}):i})})});wJ.displayName=bJ;var r5e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s5e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function a5e(e,t,n){const r=s5e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return r5e[r]}function CJ(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function i5e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var o5e=xJ,l5e=wJ,uk=["Enter"," "],u5e=["ArrowDown","PageUp","Home"],SJ=["ArrowUp","PageDown","End"],c5e=[...u5e,...SJ],d5e={ltr:[...uk,"ArrowRight"],rtl:[...uk,"ArrowLeft"]},f5e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},hx="Menu",[M1,h5e,p5e]=mJ(hx),[Bh,_J]=iv(hx,[p5e,aJ,yJ]),px=aJ(),jJ=yJ(),[EJ,Bd]=Bh(hx),[m5e,mx]=Bh(hx),$J=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:a,modal:i=!0}=e,l=px(t),[u,f]=y.useState(null),h=y.useRef(!1),g=Jl(a),v=gJ(s);return y.useEffect(()=>{const w=()=>{h.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>h.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),d.jsx(pJ,{...l,children:d.jsx(EJ,{scope:t,open:n,onOpenChange:g,content:u,onContentChange:f,children:d.jsx(m5e,{scope:t,onClose:y.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:v,modal:i,children:r})})})};$J.displayName=hx;var g5e="MenuAnchor",V9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=px(n);return d.jsx(KEe,{...s,...r,ref:t})});V9.displayName=g5e;var B9="MenuPortal",[v5e,RJ]=Bh(B9,{forceMount:void 0}),OJ=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,a=Bd(B9,t);return d.jsx(v5e,{scope:t,forceMount:n,children:d.jsx(Vd,{present:n||a.open,children:d.jsx(v9,{asChild:!0,container:s,children:r})})})};OJ.displayName=B9;var lo="MenuContent",[y5e,F9]=Bh(lo),TJ=y.forwardRef((e,t)=>{const n=RJ(lo,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,a=Bd(lo,e.__scopeMenu),i=mx(lo,e.__scopeMenu);return d.jsx(M1.Provider,{scope:e.__scopeMenu,children:d.jsx(Vd,{present:r||a.open,children:d.jsx(M1.Slot,{scope:e.__scopeMenu,children:i.modal?d.jsx(x5e,{...s,ref:t}):d.jsx(b5e,{...s,ref:t})})})})}),x5e=y.forwardRef((e,t)=>{const n=Bd(lo,e.__scopeMenu),r=y.useRef(null),s=Is(t,r);return y.useEffect(()=>{const a=r.current;if(a)return TQ(a)},[]),d.jsx(U9,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:gn(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),b5e=y.forwardRef((e,t)=>{const n=Bd(lo,e.__scopeMenu);return d.jsx(U9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),w5e=k1("MenuContent.ScrollLock"),U9=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:g,onInteractOutside:v,onDismiss:w,disableOutsideScroll:C,..._}=e,E=Bd(lo,n),$=mx(lo,n),O=px(n),N=jJ(n),M=h5e(n),[L,k]=y.useState(null),T=y.useRef(null),P=Is(t,T,E.onContentChange),V=y.useRef(0),q=y.useRef(""),K=y.useRef(0),re=y.useRef(null),ee=y.useRef("right"),ue=y.useRef(0),he=C?y9:y.Fragment,X=C?{as:w5e,allowPinchZoom:!0}:void 0,pe=be=>{var Y,se;const Oe=q.current+be,de=M().filter(Je=>!Je.disabled),_e=document.activeElement,Le=(Y=de.find(Je=>Je.ref.current===_e))==null?void 0:Y.textValue,Re=de.map(Je=>Je.textValue),Ye=N5e(Re,Oe,Le),Xe=(se=de.find(Je=>Je.textValue===Ye))==null?void 0:se.ref.current;(function Je(Ot){q.current=Ot,window.clearTimeout(V.current),Ot!==""&&(V.current=window.setTimeout(()=>Je(""),1e3))})(Oe),Xe&&setTimeout(()=>Xe.focus())};y.useEffect(()=>()=>window.clearTimeout(V.current),[]),wQ();const xe=y.useCallback(be=>{var Y,se;return ee.current===((Y=re.current)==null?void 0:Y.side)&&M5e(be,(se=re.current)==null?void 0:se.area)},[]);return d.jsx(y5e,{scope:n,searchRef:q,onItemEnter:y.useCallback(be=>{xe(be)&&be.preventDefault()},[xe]),onItemLeave:y.useCallback(be=>{var Y;xe(be)||((Y=T.current)==null||Y.focus(),k(null))},[xe]),onTriggerLeave:y.useCallback(be=>{xe(be)&&be.preventDefault()},[xe]),pointerGraceTimerRef:K,onPointerGraceIntentChange:y.useCallback(be=>{re.current=be},[]),children:d.jsx(he,{...X,children:d.jsx(g9,{asChild:!0,trapped:s,onMountAutoFocus:gn(a,be=>{var Y;be.preventDefault(),(Y=T.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(m9,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:g,onInteractOutside:v,onDismiss:w,children:d.jsx(o5e,{asChild:!0,...N,dir:$.dir,orientation:"vertical",loop:r,currentTabStopId:L,onCurrentTabStopIdChange:k,onEntryFocus:gn(u,be=>{$.isUsingKeyboardRef.current||be.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(YEe,{role:"menu","aria-orientation":"vertical","data-state":KJ(E.open),"data-radix-menu-content":"",dir:$.dir,...O,..._,ref:P,style:{outline:"none",..._.style},onKeyDown:gn(_.onKeyDown,be=>{const Y=be.target.closest("[data-radix-menu-content]")===be.currentTarget,se=be.ctrlKey||be.altKey||be.metaKey,Oe=be.key.length===1;Y&&(be.key==="Tab"&&be.preventDefault(),!se&&Oe&&pe(be.key));const de=T.current;if(be.target!==de||!c5e.includes(be.key))return;be.preventDefault();const _e=M().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);SJ.includes(be.key)&&_e.reverse(),A5e(_e)}),onBlur:gn(e.onBlur,be=>{be.currentTarget.contains(be.target)||(window.clearTimeout(V.current),q.current="")}),onPointerMove:gn(e.onPointerMove,I1(be=>{const Y=be.target,se=ue.current!==be.clientX;if(be.currentTarget.contains(Y)&&se){const Oe=be.clientX>ue.current?"right":"left";ee.current=Oe,ue.current=be.clientX}}))})})})})})})});TJ.displayName=lo;var C5e="MenuGroup",G9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ls.div,{role:"group",...r,ref:t})});G9.displayName=C5e;var S5e="MenuLabel",AJ=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ls.div,{...r,ref:t})});AJ.displayName=S5e;var TS="MenuItem",MU="menu.itemSelect",Y2=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,a=y.useRef(null),i=mx(TS,e.__scopeMenu),l=F9(TS,e.__scopeMenu),u=Is(t,a),f=y.useRef(!1),h=()=>{const g=a.current;if(!n&&g){const v=new CustomEvent(MU,{bubbles:!0,cancelable:!0});g.addEventListener(MU,w=>r?.(w),{once:!0}),vQ(g,v),v.defaultPrevented?f.current=!1:i.onClose()}};return d.jsx(kJ,{...s,ref:u,disabled:n,onClick:gn(e.onClick,h),onPointerDown:g=>{var v;(v=e.onPointerDown)==null||v.call(e,g),f.current=!0},onPointerUp:gn(e.onPointerUp,g=>{var v;f.current||(v=g.currentTarget)==null||v.click()}),onKeyDown:gn(e.onKeyDown,g=>{const v=l.searchRef.current!=="";n||v&&g.key===" "||uk.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Y2.displayName=TS;var kJ=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...a}=e,i=F9(TS,n),l=jJ(n),u=y.useRef(null),f=Is(t,u),[h,g]=y.useState(!1),[v,w]=y.useState("");return y.useEffect(()=>{const C=u.current;C&&w((C.textContent??"").trim())},[a.children]),d.jsx(M1.ItemSlot,{scope:n,disabled:r,textValue:s??v,children:d.jsx(l5e,{asChild:!0,...l,focusable:!r,children:d.jsx(ls.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:f,onPointerMove:gn(e.onPointerMove,I1(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:gn(e.onPointerLeave,I1(C=>i.onItemLeave(C))),onFocus:gn(e.onFocus,()=>g(!0)),onBlur:gn(e.onBlur,()=>g(!1))})})})}),_5e="MenuCheckboxItem",NJ=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return d.jsx(DJ,{scope:e.__scopeMenu,checked:n,children:d.jsx(Y2,{role:"menuitemcheckbox","aria-checked":AS(n)?"mixed":n,...s,ref:t,"data-state":q9(n),onSelect:gn(s.onSelect,()=>r?.(AS(n)?!0:!n),{checkForDefaultPrevented:!1})})})});NJ.displayName=_5e;var LJ="MenuRadioGroup",[j5e,E5e]=Bh(LJ,{value:void 0,onValueChange:()=>{}}),MJ=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,a=Jl(r);return d.jsx(j5e,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(G9,{...s,ref:t})})});MJ.displayName=LJ;var IJ="MenuRadioItem",PJ=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=E5e(IJ,e.__scopeMenu),a=n===s.value;return d.jsx(DJ,{scope:e.__scopeMenu,checked:a,children:d.jsx(Y2,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":q9(a),onSelect:gn(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});PJ.displayName=IJ;var z9="MenuItemIndicator",[DJ,$5e]=Bh(z9,{checked:!1}),VJ=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,a=$5e(z9,n);return d.jsx(Vd,{present:r||AS(a.checked)||a.checked===!0,children:d.jsx(ls.span,{...s,ref:t,"data-state":q9(a.checked)})})});VJ.displayName=z9;var R5e="MenuSeparator",BJ=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ls.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});BJ.displayName=R5e;var O5e="MenuArrow",FJ=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=px(n);return d.jsx(ZEe,{...s,...r,ref:t})});FJ.displayName=O5e;var H9="MenuSub",[T5e,UJ]=Bh(H9),GJ=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:s}=e,a=Bd(H9,t),i=px(t),[l,u]=y.useState(null),[f,h]=y.useState(null),g=Jl(s);return y.useEffect(()=>(a.open===!1&&g(!1),()=>g(!1)),[a.open,g]),d.jsx(pJ,{...i,children:d.jsx(EJ,{scope:t,open:r,onOpenChange:g,content:f,onContentChange:h,children:d.jsx(T5e,{scope:t,contentId:wd(),triggerId:wd(),trigger:l,onTriggerChange:u,children:n})})})};GJ.displayName=H9;var ky="MenuSubTrigger",zJ=y.forwardRef((e,t)=>{const n=Bd(ky,e.__scopeMenu),r=mx(ky,e.__scopeMenu),s=UJ(ky,e.__scopeMenu),a=F9(ky,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,f={__scopeMenu:e.__scopeMenu},h=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>h,[h]),y.useEffect(()=>{const g=l.current;return()=>{window.clearTimeout(g),u(null)}},[l,u]),d.jsx(V9,{asChild:!0,...f,children:d.jsx(kJ,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":KJ(n.open),...e,ref:B2(t,s.onTriggerChange),onClick:g=>{var v;(v=e.onClick)==null||v.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:gn(e.onPointerMove,I1(g=>{a.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:gn(e.onPointerLeave,I1(g=>{var v,w;h();const C=(v=n.content)==null?void 0:v.getBoundingClientRect();if(C){const _=(w=n.content)==null?void 0:w.dataset.side,E=_==="right",$=E?-5:5,O=C[E?"left":"right"],N=C[E?"right":"left"];a.onPointerGraceIntentChange({area:[{x:g.clientX+$,y:g.clientY},{x:O,y:C.top},{x:N,y:C.top},{x:N,y:C.bottom},{x:O,y:C.bottom}],side:_}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(g),g.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:gn(e.onKeyDown,g=>{var v;const w=a.searchRef.current!=="";e.disabled||w&&g.key===" "||d5e[r.dir].includes(g.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),g.preventDefault())})})})});zJ.displayName=ky;var HJ="MenuSubContent",qJ=y.forwardRef((e,t)=>{const n=RJ(lo,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,a=Bd(lo,e.__scopeMenu),i=mx(lo,e.__scopeMenu),l=UJ(HJ,e.__scopeMenu),u=y.useRef(null),f=Is(t,u);return d.jsx(M1.Provider,{scope:e.__scopeMenu,children:d.jsx(Vd,{present:r||a.open,children:d.jsx(M1.Slot,{scope:e.__scopeMenu,children:d.jsx(U9,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:f,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var g;i.isUsingKeyboardRef.current&&((g=u.current)==null||g.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:gn(e.onFocusOutside,h=>{h.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:gn(e.onEscapeKeyDown,h=>{i.onClose(),h.preventDefault()}),onKeyDown:gn(e.onKeyDown,h=>{var g;const v=h.currentTarget.contains(h.target),w=f5e[i.dir].includes(h.key);v&&w&&(a.onOpenChange(!1),(g=l.trigger)==null||g.focus(),h.preventDefault())})})})})})});qJ.displayName=HJ;function KJ(e){return e?"open":"closed"}function AS(e){return e==="indeterminate"}function q9(e){return AS(e)?"indeterminate":e?"checked":"unchecked"}function A5e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function k5e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function N5e(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=k5e(e,Math.max(s,0));r.length===1&&(a=a.filter(l=>l!==n));const i=a.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function L5e(e,t){const{x:n,y:r}=e;let s=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],f=l.x,h=l.y,g=u.x,v=u.y;h>r!=v>r&&n<(g-f)*(r-h)/(v-h)+f&&(s=!s)}return s}function M5e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return L5e(n,t)}function I1(e){return t=>t.pointerType==="mouse"?e(t):void 0}var I5e=$J,P5e=V9,D5e=OJ,V5e=TJ,B5e=G9,F5e=AJ,U5e=Y2,G5e=NJ,z5e=MJ,H5e=PJ,q5e=VJ,K5e=BJ,Y5e=FJ,Z5e=GJ,X5e=zJ,W5e=qJ,Z2="DropdownMenu",[Q5e,J5e]=iv(Z2,[_J]),da=_J(),[e$e,YJ]=Q5e(Z2),K9=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=da(t),f=y.useRef(null),[h,g]=F2({prop:s,defaultProp:a??!1,onChange:i,caller:Z2});return d.jsx(e$e,{scope:t,triggerId:wd(),triggerRef:f,contentId:wd(),open:h,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(v=>!v),[g]),modal:l,children:d.jsx(I5e,{...u,open:h,onOpenChange:g,dir:r,modal:l,children:n})})};K9.displayName=Z2;var ZJ="DropdownMenuTrigger",Y9=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,a=YJ(ZJ,n),i=da(n);return d.jsx(P5e,{asChild:!0,...i,children:d.jsx(ls.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:B2(t,a.triggerRef),onPointerDown:gn(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:gn(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Y9.displayName=ZJ;var t$e="DropdownMenuPortal",Z9=e=>{const{__scopeDropdownMenu:t,...n}=e,r=da(t);return d.jsx(D5e,{...r,...n})};Z9.displayName=t$e;var XJ="DropdownMenuContent",X9=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=YJ(XJ,n),a=da(n),i=y.useRef(!1);return d.jsx(V5e,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...r,ref:t,onCloseAutoFocus:gn(e.onCloseAutoFocus,l=>{var u;i.current||(u=s.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:gn(e.onInteractOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;(!s.modal||h)&&(i.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)"}})});X9.displayName=XJ;var n$e="DropdownMenuGroup",W9=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(B5e,{...s,...r,ref:t})});W9.displayName=n$e;var r$e="DropdownMenuLabel",Q9=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(F5e,{...s,...r,ref:t})});Q9.displayName=r$e;var s$e="DropdownMenuItem",J9=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(U5e,{...s,...r,ref:t})});J9.displayName=s$e;var a$e="DropdownMenuCheckboxItem",eL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(G5e,{...s,...r,ref:t})});eL.displayName=a$e;var i$e="DropdownMenuRadioGroup",tL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(z5e,{...s,...r,ref:t})});tL.displayName=i$e;var o$e="DropdownMenuRadioItem",nL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(H5e,{...s,...r,ref:t})});nL.displayName=o$e;var l$e="DropdownMenuItemIndicator",rL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(q5e,{...s,...r,ref:t})});rL.displayName=l$e;var u$e="DropdownMenuSeparator",sL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(K5e,{...s,...r,ref:t})});sL.displayName=u$e;var c$e="DropdownMenuArrow",aL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(Y5e,{...s,...r,ref:t})});aL.displayName=c$e;var WJ=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:s,defaultOpen:a}=e,i=da(t),[l,u]=F2({prop:r,defaultProp:a??!1,onChange:s,caller:"DropdownMenuSub"});return d.jsx(Z5e,{...i,open:l,onOpenChange:u,children:n})},d$e="DropdownMenuSubTrigger",iL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(X5e,{...s,...r,ref:t})});iL.displayName=d$e;var f$e="DropdownMenuSubContent",oL=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=da(n);return d.jsx(W5e,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oL.displayName=f$e;var h$e=K9,QJ=Y9,p$e=Z9,JJ=X9,m$e=W9,g$e=Q9,eee=J9,v$e=eL,y$e=tL,x$e=nL,b$e=rL,tee=sL,w$e=aL,C$e=WJ,nee=iL,ree=oL;const S$e=Object.freeze(Object.defineProperty({__proto__:null,Arrow:w$e,CheckboxItem:v$e,Content:JJ,DropdownMenu:K9,DropdownMenuArrow:aL,DropdownMenuCheckboxItem:eL,DropdownMenuContent:X9,DropdownMenuGroup:W9,DropdownMenuItem:J9,DropdownMenuItemIndicator:rL,DropdownMenuLabel:Q9,DropdownMenuPortal:Z9,DropdownMenuRadioGroup:tL,DropdownMenuRadioItem:nL,DropdownMenuSeparator:sL,DropdownMenuSub:WJ,DropdownMenuSubContent:oL,DropdownMenuSubTrigger:iL,DropdownMenuTrigger:Y9,Group:m$e,Item:eee,ItemIndicator:b$e,Label:g$e,Portal:p$e,RadioGroup:y$e,RadioItem:x$e,Root:h$e,Separator:tee,Sub:C$e,SubContent:ree,SubTrigger:nee,Trigger:QJ,createDropdownMenuScope:J5e},Symbol.toStringTag,{value:"Module"})),_$e=y.forwardRef(({className:e,...t},n)=>d.jsx(JJ,{className:We(e,"min-w-[220px] bg-panel rounded p-1 border border-placeholder/50 shadow-bg shadow-md data-[state=open]:animate-contentShow"),ref:n,loop:!0,sideOffset:4,...t})),j$e=y.forwardRef(({className:e,disabled:t,...n},r)=>d.jsx(eee,{className:We(e,"rounded pr-2 pl-8.5 h-7 flex items-center outline-0 ",{"hover:bg-secondary-light focus:bg-secondary-light cursor-pointer":!t}),ref:r,disabled:t,...n}));y.forwardRef(({className:e,...t},n)=>d.jsx(tee,{className:We(e,"bg-secondary-light h-px rounded my-1 m-auto"),ref:n,...t}));const E$e=y.forwardRef(({className:e,...t},n)=>d.jsx(ree,{className:We(e,"min-w-[220px] bg-panel rounded p-1 border border-placeholder/50 shadow-bg shadow-md"),ref:n,loop:!0,...t})),$$e=y.forwardRef(({className:e,children:t,disabled:n,...r},s)=>d.jsxs(nee,{className:We(e,"rounded px-2 pl-8.5 h-7 outline-0 flex items-center ",{"hover:bg-secondary-light focus:bg-secondary-light data-[state=open]:bg-secondary-light cursor-pointer":!n}),ref:s,disabled:n,...r,children:[t,d.jsx(ec,{className:We("size-4 right-2 absolute -rotate-90",{"text-text":!n,"text-placeholder":n})})]})),R$e=y.forwardRef(({className:e,...t},n)=>d.jsx(QJ,{className:We(e,"outline-0"),ref:n,...t})),sn={...S$e,Content:_$e,Item:j$e,SubContent:E$e,Trigger:R$e,SubTrigger:$$e},O$e={sm:"text-xs",base:"text-sm",lg:"text-base",xl:"text-xl"},T$e={sm:"absolute right-0 -top-0.5",base:"absolute right-0 top-0",lg:"absolute right-0 top-0.5",xl:"absolute right-0 top-1"},A$e={normal:"font-normal",strong:"font-medium",underline:"underline",italic:"italic"},k$e={primary:"text-primary","primary-light":"text-primary-light",text:"text-text","danger-orange":"text-danger-orange","danger-red":"text-danger-red",red:"text-red",blue:"text-blue",green:"text-green",yellow:"text-yellow",placeholder:"text-placeholder"},W=({className:e,size:t="base",variant:n="normal",color:r="text",tag:s="p",children:a,copyable:i=!1,mono:l=!1,onMouseEnter:u,onMouseLeave:f,...h})=>{const[g,v]=y.useState(!1),w=s,C=i&&typeof a=="string",_=async()=>{if(a)try{await navigator.clipboard.writeText(a)}catch(O){console.error("Не удалось скопировать текст:",O)}},E=O=>{C&&v(!0),u?.(O)},$=O=>{C&&v(!1),f?.(O)};return d.jsxs(w,{className:We(k$e[r],O$e[t],A$e[n],{"relative pr-[30px]":C,"font-['Ubuntu_Mono',_monospace]":l&&(n==="normal"||n==="italic")},e),onMouseEnter:E,onMouseLeave:$,...h,children:[a,g&&C&&!!a&&d.jsx(Fe,{className:We(T$e[t]),variant:"link",onlyIcon:!0,onClick:_,children:d.jsx(Dfe,{})})]})};W.Heading1=({className:e,children:t,...n})=>d.jsx("h1",{className:We("text-4xl font-medium text-text",e),...n,children:t});W.Heading2=({className:e,children:t,...n})=>d.jsx("h2",{className:We("text-3xl font-medium text-text",e),...n,children:t});W.Heading3=({className:e,children:t,...n})=>d.jsx("h3",{className:We("text-2xl font-medium text-text",e),...n,children:t});W.Heading4=({className:e,children:t,...n})=>d.jsx("h4",{className:We("text-xl font-medium text-text",e),...n,children:t});W.Heading5=({className:e,children:t,...n})=>d.jsx("h5",{className:We("text-base font-medium text-text",e),...n,children:t});var IU={},PU={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/var DU;function N$e(){return DU||(DU=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(a=s(a,r(l)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var l in a)t.call(a,l)&&a[l]&&(i=s(i,l));return i}function s(a,i){return i?a?a+" "+i:a+i:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(PU)),PU.exports}var L$e=N$e();const ck=ev(L$e);/*
* React Tooltip
* {@link https://github.com/ReactTooltip/react-tooltip}
* @copyright ReactTooltip Team
* @license MIT
*/const M$e="react-tooltip-core-styles",I$e="react-tooltip-base-styles",VU={core:!1,base:!1};function BU({css:e,id:t=I$e,type:n="base",ref:r}){var s,a;if(!e||typeof document>"u"||VU[n]||n==="core"&&typeof process<"u"&&!((s=process==null?void 0:IU)===null||s===void 0)&&s.REACT_TOOLTIP_DISABLE_CORE_STYLES||n!=="base"&&typeof process<"u"&&!((a=process==null?void 0:IU)===null||a===void 0)&&a.REACT_TOOLTIP_DISABLE_BASE_STYLES)return;n==="core"&&(t=M$e),r||(r={});const{insertAt:i}=r;if(document.getElementById(t))return;const l=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.id=t,u.type="text/css",i==="top"&&l.firstChild?l.insertBefore(u,l.firstChild):l.appendChild(u),u.styleSheet?u.styleSheet.cssText=e:u.appendChild(document.createTextNode(e)),VU[n]=!0}const FU=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:s=10,strategy:a="absolute",middlewares:i=[JQ(Number(s)),tJ({fallbackAxisSideDirection:"start"}),eJ({padding:5})],border:l,arrowSize:u=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const f=i;return n?(f.push(ik({element:n,padding:5})),ok(e,t,{placement:r,strategy:a,middleware:f}).then(({x:h,y:g,placement:v,middlewareData:w})=>{var C,_;const E={left:`${h}px`,top:`${g}px`,border:l},{x:$,y:O}=(C=w.arrow)!==null&&C!==void 0?C:{x:0,y:0},N=(_={top:"bottom",right:"left",bottom:"top",left:"right"}[v.split("-")[0]])!==null&&_!==void 0?_:"bottom",M=l&&{borderBottom:l,borderRight:l};let L=0;if(l){const k=`${l}`.match(/(\d+)px/);L=k!=null&&k[1]?Number(k[1]):1}return{tooltipStyles:E,tooltipArrowStyles:{left:$!=null?`${$}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",...M,[N]:`-${u/2+L}px`},place:v}})):ok(e,t,{placement:"bottom",strategy:a,middleware:f}).then(({x:h,y:g,placement:v})=>({tooltipStyles:{left:`${h}px`,top:`${g}px`},tooltipArrowStyles:{},place:v}))},UU=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),GU=(e,t,n)=>{let r=null;const s=function(...a){const i=()=>{r=null};!r&&(e.apply(this,a),r=setTimeout(i,t))};return s.cancel=()=>{r&&(clearTimeout(r),r=null)},s},zU=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",dk=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((s,a)=>dk(s,t[a]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!zU(e)||!zU(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(s=>dk(e[s],t[s]))},P$e=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(n=>{const r=t.getPropertyValue(n);return r==="auto"||r==="scroll"})},HU=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(P$e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},D$e=typeof window<"u"?y.useLayoutEffect:y.useEffect,Ji=e=>{e.current&&(clearTimeout(e.current),e.current=null)},V$e="DEFAULT_TOOLTIP_ID",B$e={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},F$e=y.createContext({getTooltipData:()=>B$e});function see(e=V$e){return y.useContext(F$e).getTooltipData(e)}var Em={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},b4={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const U$e=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:s="dark",anchorId:a,anchorSelect:i,place:l="top",offset:u=10,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,wrapper:w,delayShow:C=0,delayHide:_=0,float:E=!1,hidden:$=!1,noArrow:O=!1,clickable:N=!1,closeOnEsc:M=!1,closeOnScroll:L=!1,closeOnResize:k=!1,openEvents:T,closeEvents:P,globalCloseEvents:V,imperativeModeOnly:q,style:K,position:re,afterShow:ee,afterHide:ue,disableTooltip:he,content:X,contentWrapperRef:pe,isOpen:xe,defaultIsOpen:be=!1,setIsOpen:Y,activeAnchor:se,setActiveAnchor:Oe,border:de,opacity:_e,arrowColor:Le,arrowSize:Re=8,role:Ye="tooltip"})=>{var Xe;const Je=y.useRef(null),Ot=y.useRef(null),tn=y.useRef(null),an=y.useRef(null),Pt=y.useRef(null),[Wt,Lt]=y.useState({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[Ln,Ge]=y.useState(!1),[dt,Z]=y.useState(!1),[oe,me]=y.useState(null),He=y.useRef(!1),ze=y.useRef(null),{anchorRefs:Ke,setActiveAnchor:at}=see(t),Dt=y.useRef(!1),[ht,Jt]=y.useState([]),jn=y.useRef(!1),dr=h||f.includes("click"),fa=dr||T?.click||T?.dblclick||T?.mousedown,cs=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&dr&&Object.assign(cs,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const er=P?{...P}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!P&&dr&&Object.assign(er,{mouseleave:!1,blur:!1,mouseout:!1});const Zn=V?{...V}:{escape:M||!1,scroll:L||!1,resize:k||!1,clickOutsideAnchor:fa||!1};q&&(Object.assign(cs,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(er,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Zn,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),D$e(()=>(jn.current=!0,()=>{jn.current=!1}),[]);const Nn=Qe=>{jn.current&&(Qe&&Z(!0),setTimeout(()=>{jn.current&&(Y?.(Qe),xe===void 0&&Ge(Qe))},10))};y.useEffect(()=>{if(xe===void 0)return()=>null;xe&&Z(!0);const Qe=setTimeout(()=>{Ge(xe)},10);return()=>{clearTimeout(Qe)}},[xe]),y.useEffect(()=>{if(Ln!==He.current)if(Ji(Pt),He.current=Ln,Ln)ee?.();else{const Qe=(ft=>{const Et=ft.match(/^([\d.]+)(ms|s)$/);if(!Et)return 0;const[,vr,ts]=Et;return Number(vr)*(ts==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));Pt.current=setTimeout(()=>{Z(!1),me(null),ue?.()},Qe+25)}},[Ln]);const ha=Qe=>{Lt(ft=>dk(ft,Qe)?ft:Qe)},ps=(Qe=C)=>{Ji(tn),dt?Nn(!0):tn.current=setTimeout(()=>{Nn(!0)},Qe)},Jo=(Qe=_)=>{Ji(an),an.current=setTimeout(()=>{Dt.current||Nn(!1)},Qe)},el=Qe=>{var ft;if(!Qe)return;const Et=(ft=Qe.currentTarget)!==null&&ft!==void 0?ft:Qe.target;if(!(Et!=null&&Et.isConnected))return Oe(null),void at({current:null});C?ps():Nn(!0),Oe(Et),at({current:Et}),Ji(an)},go=()=>{N?Jo(_||100):_?Jo():Nn(!1),Ji(tn)},li=({x:Qe,y:ft})=>{var Et;const vr={getBoundingClientRect:()=>({x:Qe,y:ft,width:0,height:0,top:ft,left:Qe,right:Qe,bottom:ft})};FU({place:(Et=oe?.place)!==null&&Et!==void 0?Et:l,offset:u,elementReference:vr,tooltipReference:Je.current,tooltipArrowReference:Ot.current,strategy:g,middlewares:v,border:de,arrowSize:Re}).then(ts=>{ha(ts)})},pa=Qe=>{if(!Qe)return;const ft=Qe,Et={x:ft.clientX,y:ft.clientY};li(Et),ze.current=Et},iu=Qe=>{var ft;if(!Ln)return;const Et=Qe.target;Et.isConnected&&(!((ft=Je.current)===null||ft===void 0)&&ft.contains(Et)||[document.querySelector(`[id='${a}']`),...ht].some(vr=>vr?.contains(Et))||(Nn(!1),Ji(tn)))},ou=GU(el,50),Tr=GU(go,50),ms=Qe=>{Tr.cancel(),ou(Qe)},jt=()=>{ou.cancel(),Tr()},vn=y.useCallback(()=>{var Qe,ft;const Et=(Qe=oe?.position)!==null&&Qe!==void 0?Qe:re;Et?li(Et):E?ze.current&&li(ze.current):se!=null&&se.isConnected&&FU({place:(ft=oe?.place)!==null&&ft!==void 0?ft:l,offset:u,elementReference:se,tooltipReference:Je.current,tooltipArrowReference:Ot.current,strategy:g,middlewares:v,border:de,arrowSize:Re}).then(vr=>{jn.current&&ha(vr)})},[Ln,se,X,K,l,oe?.place,u,g,re,oe?.position,E,Re]);y.useEffect(()=>{var Qe,ft;const Et=new Set(Ke);ht.forEach(Sn=>{he!=null&&he(Sn)||Et.add({current:Sn})});const vr=document.querySelector(`[id='${a}']`);vr&&!(he!=null&&he(vr))&&Et.add({current:vr});const ts=()=>{Nn(!1)},Pa=HU(se),ma=HU(Je.current);Zn.scroll&&(window.addEventListener("scroll",ts),Pa?.addEventListener("scroll",ts),ma?.addEventListener("scroll",ts));let Ar=null;Zn.resize?window.addEventListener("resize",ts):se&&Je.current&&(Ar=I9(se,Je.current,vn,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Cs=Sn=>{Sn.key==="Escape"&&Nn(!1)};Zn.escape&&window.addEventListener("keydown",Cs),Zn.clickOutsideAnchor&&window.addEventListener("click",iu);const Pn=[],ga=Sn=>!!(Sn!=null&&Sn.target&&se!=null&&se.contains(Sn.target)),tl=Sn=>{Ln&&ga(Sn)||el(Sn)},nl=Sn=>{Ln&&ga(Sn)&&go()},kr=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],Gd=["click","dblclick","mousedown","mouseup"];Object.entries(cs).forEach(([Sn,Da])=>{Da&&(kr.includes(Sn)?Pn.push({event:Sn,listener:ms}):Gd.includes(Sn)&&Pn.push({event:Sn,listener:tl}))}),Object.entries(er).forEach(([Sn,Da])=>{Da&&(kr.includes(Sn)?Pn.push({event:Sn,listener:jt}):Gd.includes(Sn)&&Pn.push({event:Sn,listener:nl}))}),E&&Pn.push({event:"pointermove",listener:pa});const zd=()=>{Dt.current=!0},Pi=()=>{Dt.current=!1,go()},vo=N&&(er.mouseout||er.mouseleave);return vo&&((Qe=Je.current)===null||Qe===void 0||Qe.addEventListener("mouseover",zd),(ft=Je.current)===null||ft===void 0||ft.addEventListener("mouseout",Pi)),Pn.forEach(({event:Sn,listener:Da})=>{Et.forEach(yo=>{var lu;(lu=yo.current)===null||lu===void 0||lu.addEventListener(Sn,Da)})}),()=>{var Sn,Da;Zn.scroll&&(window.removeEventListener("scroll",ts),Pa?.removeEventListener("scroll",ts),ma?.removeEventListener("scroll",ts)),Zn.resize?window.removeEventListener("resize",ts):Ar?.(),Zn.clickOutsideAnchor&&window.removeEventListener("click",iu),Zn.escape&&window.removeEventListener("keydown",Cs),vo&&((Sn=Je.current)===null||Sn===void 0||Sn.removeEventListener("mouseover",zd),(Da=Je.current)===null||Da===void 0||Da.removeEventListener("mouseout",Pi)),Pn.forEach(({event:yo,listener:lu})=>{Et.forEach(fc=>{var rl;(rl=fc.current)===null||rl===void 0||rl.removeEventListener(yo,lu)})})}},[se,vn,dt,Ke,ht,T,P,V,dr,C,_]),y.useEffect(()=>{var Qe,ft;let Et=(ft=(Qe=oe?.anchorSelect)!==null&&Qe!==void 0?Qe:i)!==null&&ft!==void 0?ft:"";!Et&&t&&(Et=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const vr=new MutationObserver(ts=>{const Pa=[],ma=[];ts.forEach(Ar=>{if(Ar.type==="attributes"&&Ar.attributeName==="data-tooltip-id"&&(Ar.target.getAttribute("data-tooltip-id")===t?Pa.push(Ar.target):Ar.oldValue===t&&ma.push(Ar.target)),Ar.type==="childList"){if(se){const Cs=[...Ar.removedNodes].filter(Pn=>Pn.nodeType===1);if(Et)try{ma.push(...Cs.filter(Pn=>Pn.matches(Et))),ma.push(...Cs.flatMap(Pn=>[...Pn.querySelectorAll(Et)]))}catch{}Cs.some(Pn=>{var ga;return!!(!((ga=Pn?.contains)===null||ga===void 0)&&ga.call(Pn,se))&&(Z(!1),Nn(!1),Oe(null),Ji(tn),Ji(an),!0)})}if(Et)try{const Cs=[...Ar.addedNodes].filter(Pn=>Pn.nodeType===1);Pa.push(...Cs.filter(Pn=>Pn.matches(Et))),Pa.push(...Cs.flatMap(Pn=>[...Pn.querySelectorAll(Et)]))}catch{}}}),(Pa.length||ma.length)&&Jt(Ar=>[...Ar.filter(Cs=>!ma.includes(Cs)),...Pa])});return vr.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{vr.disconnect()}},[t,i,oe?.anchorSelect,se]),y.useEffect(()=>{vn()},[vn]),y.useEffect(()=>{if(!(pe!=null&&pe.current))return()=>null;const Qe=new ResizeObserver(()=>{setTimeout(()=>vn())});return Qe.observe(pe.current),()=>{Qe.disconnect()}},[X,pe?.current]),y.useEffect(()=>{var Qe;const ft=document.querySelector(`[id='${a}']`),Et=[...ht,ft];se&&Et.includes(se)||Oe((Qe=ht[0])!==null&&Qe!==void 0?Qe:ft)},[a,ht,se]),y.useEffect(()=>(be&&Nn(!0),()=>{Ji(tn),Ji(an)}),[]),y.useEffect(()=>{var Qe;let ft=(Qe=oe?.anchorSelect)!==null&&Qe!==void 0?Qe:i;if(!ft&&t&&(ft=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),ft)try{const Et=Array.from(document.querySelectorAll(ft));Jt(Et)}catch{Jt([])}},[t,i,oe?.anchorSelect]),y.useEffect(()=>{tn.current&&(Ji(tn),ps(C))},[C]);const ws=(Xe=oe?.content)!==null&&Xe!==void 0?Xe:X,gs=Ln&&Object.keys(Wt.tooltipStyles).length>0;return y.useImperativeHandle(e,()=>({open:Qe=>{if(Qe!=null&&Qe.anchorSelect)try{document.querySelector(Qe.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Qe.anchorSelect}" is not a valid CSS selector`)}me(Qe??null),Qe!=null&&Qe.delay?ps(Qe.delay):Nn(!0)},close:Qe=>{Qe!=null&&Qe.delay?Jo(Qe.delay):Nn(!1)},activeAnchor:se,place:Wt.place,isOpen:!!(dt&&!$&&ws&&gs)})),dt&&!$&&ws?U.createElement(w,{id:t,role:Ye,className:ck("react-tooltip",Em.tooltip,b4.tooltip,b4[s],n,`react-tooltip__place-${Wt.place}`,Em[gs?"show":"closing"],gs?"react-tooltip__show":"react-tooltip__closing",g==="fixed"&&Em.fixed,N&&Em.clickable),onTransitionEnd:Qe=>{Ji(Pt),Ln||Qe.propertyName!=="opacity"||(Z(!1),me(null),ue?.())},style:{...K,...Wt.tooltipStyles,opacity:_e!==void 0&&gs?_e:void 0},ref:Je},ws,U.createElement(w,{className:ck("react-tooltip-arrow",Em.arrow,b4.arrow,r,O&&Em.noArrow),style:{...Wt.tooltipArrowStyles,background:Le?`linear-gradient(to right bottom, transparent 50%, ${Le} 50%)`:void 0,"--rt-arrow-size":`${Re}px`},ref:Ot})):null},G$e=({content:e})=>U.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),z$e=U.forwardRef(({id:e,anchorId:t,anchorSelect:n,content:r,html:s,render:a,className:i,classNameArrow:l,variant:u="dark",place:f="top",offset:h=10,wrapper:g="div",children:v=null,events:w=["hover"],openOnClick:C=!1,positionStrategy:_="absolute",middlewares:E,delayShow:$=0,delayHide:O=0,float:N=!1,hidden:M=!1,noArrow:L=!1,clickable:k=!1,closeOnEsc:T=!1,closeOnScroll:P=!1,closeOnResize:V=!1,openEvents:q,closeEvents:K,globalCloseEvents:re,imperativeModeOnly:ee=!1,style:ue,position:he,isOpen:X,defaultIsOpen:pe=!1,disableStyleInjection:xe=!1,border:be,opacity:Y,arrowColor:se,arrowSize:Oe,setIsOpen:de,afterShow:_e,afterHide:Le,disableTooltip:Re,role:Ye="tooltip"},Xe)=>{const[Je,Ot]=y.useState(r),[tn,an]=y.useState(s),[Pt,Wt]=y.useState(f),[Lt,Ln]=y.useState(u),[Ge,dt]=y.useState(h),[Z,oe]=y.useState($),[me,He]=y.useState(O),[ze,Ke]=y.useState(N),[at,Dt]=y.useState(M),[ht,Jt]=y.useState(g),[jn,dr]=y.useState(w),[fa,cs]=y.useState(_),[er,Zn]=y.useState(null),[Nn,ha]=y.useState(null),ps=y.useRef(xe),{anchorRefs:Jo,activeAnchor:el}=see(e),go=Tr=>Tr?.getAttributeNames().reduce((ms,jt)=>{var vn;return jt.startsWith("data-tooltip-")&&(ms[jt.replace(/^data-tooltip-/,"")]=(vn=Tr?.getAttribute(jt))!==null&&vn!==void 0?vn:null),ms},{}),li=Tr=>{const ms={place:jt=>{var vn;Wt((vn=jt)!==null&&vn!==void 0?vn:f)},content:jt=>{Ot(jt??r)},html:jt=>{an(jt??s)},variant:jt=>{var vn;Ln((vn=jt)!==null&&vn!==void 0?vn:u)},offset:jt=>{dt(jt===null?h:Number(jt))},wrapper:jt=>{var vn;Jt((vn=jt)!==null&&vn!==void 0?vn:g)},events:jt=>{const vn=jt?.split(" ");dr(vn??w)},"position-strategy":jt=>{var vn;cs((vn=jt)!==null&&vn!==void 0?vn:_)},"delay-show":jt=>{oe(jt===null?$:Number(jt))},"delay-hide":jt=>{He(jt===null?O:Number(jt))},float:jt=>{Ke(jt===null?N:jt==="true")},hidden:jt=>{Dt(jt===null?M:jt==="true")},"class-name":jt=>{Zn(jt)}};Object.values(ms).forEach(jt=>jt(null)),Object.entries(Tr).forEach(([jt,vn])=>{var ws;(ws=ms[jt])===null||ws===void 0||ws.call(ms,vn)})};y.useEffect(()=>{Ot(r)},[r]),y.useEffect(()=>{an(s)},[s]),y.useEffect(()=>{Wt(f)},[f]),y.useEffect(()=>{Ln(u)},[u]),y.useEffect(()=>{dt(h)},[h]),y.useEffect(()=>{oe($)},[$]),y.useEffect(()=>{He(O)},[O]),y.useEffect(()=>{Ke(N)},[N]),y.useEffect(()=>{Dt(M)},[M]),y.useEffect(()=>{cs(_)},[_]),y.useEffect(()=>{ps.current!==xe&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[xe]),y.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:xe==="core",disableBase:xe}}))},[]),y.useEffect(()=>{var Tr;const ms=new Set(Jo);let jt=n;if(!jt&&e&&(jt=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),jt)try{document.querySelectorAll(jt).forEach(ft=>{ms.add({current:ft})})}catch{console.warn(`[react-tooltip] "${jt}" is not a valid CSS selector`)}const vn=document.querySelector(`[id='${t}']`);if(vn&&ms.add({current:vn}),!ms.size)return()=>null;const ws=(Tr=Nn??vn)!==null&&Tr!==void 0?Tr:el.current,gs=new MutationObserver(ft=>{ft.forEach(Et=>{var vr;if(!ws||Et.type!=="attributes"||!(!((vr=Et.attributeName)===null||vr===void 0)&&vr.startsWith("data-tooltip-")))return;const ts=go(ws);li(ts)})}),Qe={attributes:!0,childList:!1,subtree:!1};if(ws){const ft=go(ws);li(ft),gs.observe(ws,Qe)}return()=>{gs.disconnect()}},[Jo,el,Nn,t,n]),y.useEffect(()=>{ue!=null&&ue.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),be&&!UU("border",`${be}`)&&console.warn(`[react-tooltip] "${be}" is not a valid \`border\`.`),ue!=null&&ue.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),Y&&!UU("opacity",`${Y}`)&&console.warn(`[react-tooltip] "${Y}" is not a valid \`opacity\`.`)},[]);let pa=v;const iu=y.useRef(null);if(a){const Tr=a({content:Nn?.getAttribute("data-tooltip-content")||Je||null,activeAnchor:Nn});pa=Tr?U.createElement("div",{ref:iu,className:"react-tooltip-content-wrapper"},Tr):null}else Je&&(pa=Je);tn&&(pa=U.createElement(G$e,{content:tn}));const ou={forwardRef:Xe,id:e,anchorId:t,anchorSelect:n,className:ck(i,er),classNameArrow:l,content:pa,contentWrapperRef:iu,place:Pt,variant:Lt,offset:Ge,wrapper:ht,events:jn,openOnClick:C,positionStrategy:fa,middlewares:E,delayShow:Z,delayHide:me,float:ze,hidden:at,noArrow:L,clickable:k,closeOnEsc:T,closeOnScroll:P,closeOnResize:V,openEvents:q,closeEvents:K,globalCloseEvents:re,imperativeModeOnly:ee,style:ue,position:he,isOpen:X,defaultIsOpen:pe,border:be,opacity:Y,arrowColor:se,arrowSize:Oe,setIsOpen:de,afterShow:_e,afterHide:Le,disableTooltip:Re,activeAnchor:Nn,setActiveAnchor:Tr=>ha(Tr),role:Ye};return U.createElement(U$e,{...ou})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||BU({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||BU({css:`
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const H$e=({className:e,classNameArrow:t,opacity:n=1,...r})=>d.jsx(z$e,{className:We("rounded! shadow-md! shadow-bg! font-[Ubuntu]! text-text! bg-panel! text-sm",e),classNameArrow:We("bg-panel!",t),opacity:n,...r}),lL=({className:e,children:t,required:n,hint:r,...s})=>{const a=y.useId();return d.jsxs("label",{...s,children:[d.jsxs(W,{variant:"strong",className:We("flex items-center mb-1",e),children:[t," ",n&&d.jsx("span",{className:"text-primary ml-1",children:"*"}),r&&d.jsx("span",{"data-tooltip-id":a,children:d.jsx(zfe,{className:"text-text ml-1.5",width:16,height:16})})]}),d.jsx(H$e,{className:"max-w-[300px] z-[9999]",id:a,children:r})]})},X2=y.forwardRef(({label:e,wrapperClassName:t,inputClassName:n,required:r,hint:s,...a},i)=>{const l=y.useId();return d.jsxs("div",{className:We(t,"flex flex-col"),children:[e&&d.jsx(lL,{required:r,htmlFor:l,hint:s,children:e}),d.jsx("input",{ref:i,className:We(n,"text-sm font-medium bg-bg placeholder:text-placeholder px-4","text-text inset-shadow outline-0","h-8","border border-secondary-light rounded-xs"),id:l,placeholder:"Введите...",...a})]})}),aee=y.createContext({}),q$e=({children:e,...t})=>{const n=y.useMemo(()=>t,[t]);return d.jsx(aee.Provider,{value:n,children:e})},su=({className:e,children:t,direction:n="horizontal",tab:r,variant:s,closable:a,onClick:i,onClose:l,...u})=>{const f=y.useRef(null);return y.useEffect(()=>{var h;if(n==="vertical")return;const g=v=>{var w;const C=v;C.preventDefault(),(w=f.current)==null||w.scrollBy({left:C.deltaY})};return(h=f.current)==null||h.addEventListener("wheel",g),()=>{var v;return(v=f.current)==null?void 0:v.removeEventListener("wheel",g)}},[n]),d.jsx(q$e,{tab:r,variant:s,closable:a,onClick:i,onClose:l,children:d.jsx("div",{role:"tablist",ref:f,className:We(e,"flex overflow-auto",{"gap-0":s==="default","gap-4.5":s==="ghost","gap-0.5":s==="square"||s==="squareGhost","gap-2.5 flex-col flex-1":n==="vertical"}),...u,children:t})})},Yn=({className:e,label:t,active:n,tab:r,readonly:s,isFirst:a,variant:i="default",closable:l=!1,onClick:u,onClose:f,...h})=>{const g=y.useContext(aee),v=n||g.tab===r,w=g.variant||i,C=g.closable||l,_=!!(e&&/(^|\s)w-full(\s|$)/.test(e)),E={default:We("py-1.5 relative","border-0 cursor-pointer hover:brightness-120 ease-in active:brightness-90",{"bg-primary text-bg":v,"bg-panel text-text":!v,"[&&]:hover:brightness-100 [&&]:active:brightness-100 [&&]:cursor-default":s,"pl-4 pr-8":a,"px-8 ml-[-12px]":!a,"[&]:pr-5":C}),ghost:We("bg-transparent","ease-in hover:brightness-120 active:brightness-90","p-0","cursor-pointer","rounded",{"text-primary":v,"text-text":!v},{"[&]:hover:brightness-100 [&]:active:brightness-100 [&]:cursor-default":s}),square:We("px-3 py-1.5","cursor-pointer",{"bg-panel text-text hover:brightness-120 active:brightness-90":!v,"bg-primary text-bg hover:brightness-120 active:brightness-90":v}),squareGhost:We("px-3 py-1.5","cursor-pointer","text-text",{"bg-panel hover:brightness-120 active:brightness-90":v,"hover:bg-panel hover:brightness-120 active:brightness-90":!v})},$={default:{clipPath:a?"polygon(0% 0%, calc(100% - 15px) 0%, 100% 100%, 0% 100%)":_?"polygon(0% 0%, 100% 0%, 100% 100%, calc(0% + 15px) 100%)":"polygon(0% 0%, calc(100% - 15px) 0%, 100% 100%, calc(0% + 15px) 100%)"},ghost:{},square:{},squareGhost:{}},O=M=>{var L;s||(u?.(r,M),(L=g.onClick)==null||L.call(g,r,M))},N=M=>{var L;M.stopPropagation(),f?.(r,M),(L=g.onClose)==null||L.call(g,r,M)};return d.jsxs("div",{role:"tab",tabIndex:s||v?-1:0,className:We("flex gap-2.5 items-center whitespace-nowrap justify-center text-sm font-medium",e,E[w]),style:$[w],onClick:O,...h,children:[t,C&&!s&&d.jsx("div",{role:"button",className:We("h-auto p-0.5 hover:bg-secondary-light/40 active:bg-secondary-light/15"),onClick:N,children:d.jsx(V8,{width:14,height:14})})]})};function $m(e,t,n){let r=n.initialDeps??[],s;function a(){var i,l,u,f;let h;n.key&&(i=n.debug)!=null&&i.call(n)&&(h=Date.now());const g=e();if(!(g.length!==r.length||g.some((w,C)=>r[C]!==w)))return s;r=g;let v;if(n.key&&(l=n.debug)!=null&&l.call(n)&&(v=Date.now()),s=t(...g),n.key&&(u=n.debug)!=null&&u.call(n)){const w=Math.round((Date.now()-h)*100)/100,C=Math.round((Date.now()-v)*100)/100,_=C/16,E=($,O)=>{for($=String($);$.length<O;)$=" "+$;return $};console.info(`%c⏱ ${E(C,5)} /${E(w,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,n?.key)}return(f=n?.onChange)==null||f.call(n,s),s}return a.updateDeps=i=>{r=i},a}function qU(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const K$e=(e,t)=>Math.abs(e-t)<1.01,Y$e=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},KU=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Z$e=e=>e,X$e=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},W$e=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=i=>{const{width:l,height:u}=i;t({width:Math.round(l),height:Math.round(u)})};if(s(KU(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(i=>{const l=()=>{const u=i[0];if(u!=null&&u.borderBoxSize){const f=u.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(KU(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},YU={passive:!0},ZU=typeof window>"u"?!0:"onscrollend"in window,Q$e=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&ZU?()=>{}:Y$e(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),i=h=>()=>{const{horizontal:g,isRtl:v}=e.options;s=g?n.scrollLeft*(v&&-1||1):n.scrollTop,a(),t(s,h)},l=i(!0),u=i(!1);u(),n.addEventListener("scroll",l,YU);const f=e.options.useScrollendEvent&&ZU;return f&&n.addEventListener("scrollend",u,YU),()=>{n.removeEventListener("scroll",l),f&&n.removeEventListener("scrollend",u)}},J$e=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},e3e=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const i=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};let t3e=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Z$e,rangeExtractor:X$e,onChange:()=>{},measureElement:J$e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=$m(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let i=r-1;i>=0;i--){const l=n[i];if(s.has(l.lane))continue;const u=a.get(l.lane);if(u==null||l.end>u.end?a.set(l.lane,l):l.end<u.end&&s.set(l.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=$m(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,s,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=$m(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:i},l)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,u);for(let h=u;h<n;h++){const g=a(h),v=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h),w=v?v.end+this.options.gap:r+s,C=l.get(g),_=typeof C=="number"?C:this.options.estimateSize(h),E=w+_,$=v?v.lane:h%this.options.lanes;f[h]={index:h,start:w,size:_,end:E,key:g,lane:$}}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=$m(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?n3e({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=$m(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,i)=>a===null||i===null?[]:n({startIndex:a,endIndex:i,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),a=this.measurementsCache[s];if(!a)return;const i=a.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const a=this.itemSizeCache.get(s.key)??s.size,i=r-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=$m(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,i=n.length;a<i;a++){const l=n[a],u=r[l];s.push(u)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return qU(r[iee(0,r.length-1,s=>qU(r[s]).start,n)])},this.getOffsetForAlignment=(n,r,s=0)=>{const a=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const l=this.getTotalSize()+this.options.scrollMargin-a;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const a=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const l=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let a=0;const i=10,l=f=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(n,f);if(!h){console.warn("Failed to get offset for index:",n);return}const[g,v]=h;this._scrollToOffset(g,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const w=this.getScrollOffset(),C=this.getOffsetForIndex(n,v);if(!C){console.warn("Failed to get offset for index:",n);return}K$e(C[0],w)||u(v)})},u=f=>{this.targetWindow&&(a++,a<i?this.targetWindow.requestAnimationFrame(()=>l(f)):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&a.some(l=>l===null);){const l=r[i];a[l.lane]===null&&(a[l.lane]=l.end),i--}s=Math.max(...a.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}};const iee=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function n3e({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=u=>e[u].start;if(e.length<=r)return{startIndex:0,endIndex:s};let i=iee(0,s,a,n),l=i;if(r===1)for(;l<s&&e[l].end<n+t;)l++;else if(r>1){const u=Array(r).fill(0);for(;l<s&&u.some(h=>h<n+t);){const h=e[l];u[h.lane]=h.end,l++}const f=Array(r).fill(n+t);for(;i>=0&&f.some(h=>h>=n);){const h=e[i];f[h.lane]=h.start,i--}i=Math.max(0,i-i%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const XU=typeof document<"u"?y.useLayoutEffect:y.useEffect;function r3e(e){const t=y.useReducer(()=>({}),{})[1],n={...e,onChange:(s,a)=>{var i;a?av.flushSync(t):t(),(i=e.onChange)==null||i.call(e,s,a)}},[r]=y.useState(()=>new t3e(n));return r.setOptions(n),XU(()=>r._didMount(),[]),XU(()=>r._willUpdate()),r}function s3e(e){return r3e({observeElementRect:W$e,observeElementOffset:Q$e,scrollToFn:e3e,...e})}const si=y.forwardRef(({label:e,title:t,onChange:n,className:r,checked:s,disabled:a,...i},l)=>{const u=y.useId(),[f,h]=y.useState(!!s),g=v=>{n?.(v.target.checked,v),h(v.target.checked)};return y.useEffect(()=>{s!==void 0&&h(s)},[s]),d.jsxs("div",{children:[d.jsx("input",{type:"checkbox",id:u,onChange:g,className:"sr-only",ref:l,checked:f,disabled:a,...i}),d.jsxs("label",{htmlFor:u,title:t,className:We("flex gap-2.5 cursor-pointer",r),"data-testid":i["data-testid"]&&`${i["data-testid"]}-label`,children:[d.jsx("div",{className:We("min-w-4 h-4 flex items-center justify-center border rounded-xs cursor-pointer mt-0.5",{"bg-primary border-primary":f&&!a,"bg-bg border-secondary-light":!f&&!a,"bg-secondary !text-secondary-light border-secondary-light":a}),children:f&&d.jsx(Pfe,{})}),typeof e=="string"||typeof e=="number"?d.jsx(W,{className:We("select-none",{"!text-secondary-light":a}),variant:"strong",children:e}):e]})]})});/**
   * table-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function md(e,t){return typeof e=="function"?e(t):e}function Mi(e,t){return n=>{t.setState(r=>({...r,[e]:md(n,r[e])}))}}function W2(e){return e instanceof Function}function a3e(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function i3e(e,t){const n=[],r=s=>{s.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i)})};return r(e),n}function Ut(e,t,n){let r=[],s;return a=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(a);if(!(l.length!==r.length||l.some((f,h)=>r[h]!==f)))return s;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),s=t(...l),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-i)*100)/100,h=Math.round((Date.now()-u)*100)/100,g=h/16,v=(w,C)=>{for(w=String(w);w.length<C;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(f,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return s}}function Gt(e,t,n,r){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:!1,onChange:r}}function o3e(e,t,n,r){const s=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:s,getContext:Ut(()=>[e,n,t,a],(i,l,u,f)=>({table:i,column:l,row:u,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Gt(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e)},{}),a}function l3e(e,t,n,r){var s,a;const i={...e._getDefaultColumnDef(),...t},l=i.accessorKey;let u=(s=(a=i.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof i.header=="string"?i.header:void 0,f;if(i.accessorFn?f=i.accessorFn:l&&(l.includes(".")?f=g=>{let v=g;for(const C of l.split(".")){var w;v=(w=v)==null?void 0:w[C]}return v}:f=g=>g[i.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:f,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:Ut(()=>[!0],()=>{var g;return[h,...(g=h.columns)==null?void 0:g.flatMap(v=>v.getFlatColumns())]},Gt(e.options,"debugColumns")),getLeafColumns:Ut(()=>[e._getOrderColumnsFn()],g=>{var v;if((v=h.columns)!=null&&v.length){let w=h.columns.flatMap(C=>C.getLeafColumns());return g(w)}return[h]},Gt(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(h,e);return h}const ra="debugHeaders";function WU(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],i=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(i),a.push(l)};return i(s),a},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const u3e={createTable:e=>{e.getHeaderGroups=Ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>{var a,i;const l=(a=r?.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?a:[],u=(i=s?.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?i:[],f=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(s!=null&&s.includes(h.id)));return cC(t,[...l,...f,...u],e)},Gt(e.options,ra)),e.getCenterHeaderGroups=Ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(s!=null&&s.includes(a.id))),cC(t,n,e,"center")),Gt(e.options,ra)),e.getLeftHeaderGroups=Ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var s;const a=(s=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return cC(t,a,e,"left")},Gt(e.options,ra)),e.getRightHeaderGroups=Ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var s;const a=(s=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return cC(t,a,e,"right")},Gt(e.options,ra)),e.getFooterGroups=Ut(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Gt(e.options,ra)),e.getLeftFooterGroups=Ut(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Gt(e.options,ra)),e.getCenterFooterGroups=Ut(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Gt(e.options,ra)),e.getRightFooterGroups=Ut(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Gt(e.options,ra)),e.getFlatHeaders=Ut(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,ra)),e.getLeftFlatHeaders=Ut(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,ra)),e.getCenterFlatHeaders=Ut(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,ra)),e.getRightFlatHeaders=Ut(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,ra)),e.getCenterLeafHeaders=Ut(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,ra)),e.getLeftLeafHeaders=Ut(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,ra)),e.getRightLeafHeaders=Ut(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,ra)),e.getLeafHeaders=Ut(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var s,a,i,l,u,f;return[...(s=(a=t[0])==null?void 0:a.headers)!=null?s:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(u=(f=r[0])==null?void 0:f.headers)!=null?u:[]].map(h=>h.getLeafHeaders()).flat()},Gt(e.options,ra))}};function cC(e,t,n,r){var s,a;let i=0;const l=function(v,w){w===void 0&&(w=1),i=Math.max(i,w),v.filter(C=>C.getIsVisible()).forEach(C=>{var _;(_=C.columns)!=null&&_.length&&l(C.columns,w+1)},0)};l(e);let u=[];const f=(v,w)=>{const C={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},_=[];v.forEach(E=>{const $=[..._].reverse()[0],O=E.column.depth===C.depth;let N,M=!1;if(O&&E.column.parent?N=E.column.parent:(N=E.column,M=!0),$&&$?.column===N)$.subHeaders.push(E);else{const L=WU(n,N,{id:[r,w,N.id,E?.id].filter(Boolean).join("_"),isPlaceholder:M,placeholderId:M?`${_.filter(k=>k.column===N).length}`:void 0,depth:w,index:_.length});L.subHeaders.push(E),_.push(L)}C.headers.push(E),E.headerGroup=C}),u.push(C),w>0&&f(_,w-1)},h=t.map((v,w)=>WU(n,v,{depth:i,index:w}));f(h,i-1),u.reverse();const g=v=>v.filter(w=>w.column.getIsVisible()).map(w=>{let C=0,_=0,E=[0];w.subHeaders&&w.subHeaders.length?(E=[],g(w.subHeaders).forEach(O=>{let{colSpan:N,rowSpan:M}=O;C+=N,E.push(M)})):C=1;const $=Math.min(...E);return _=_+$,w.colSpan=C,w.rowSpan=_,{colSpan:C,rowSpan:_}});return g((s=(a=u[0])==null?void 0:a.headers)!=null?s:[]),u}const uL=(e,t,n,r,s,a,i)=>{let l={id:t,index:r,original:n,depth:s,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(l._valuesCache.hasOwnProperty(u))return l._valuesCache[u];const f=e.getColumn(u);if(f!=null&&f.accessorFn)return l._valuesCache[u]=f.accessorFn(l.original,r),l._valuesCache[u]},getUniqueValues:u=>{if(l._uniqueValuesCache.hasOwnProperty(u))return l._uniqueValuesCache[u];const f=e.getColumn(u);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(l._uniqueValuesCache[u]=f.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[u]):(l._uniqueValuesCache[u]=[l.getValue(u)],l._uniqueValuesCache[u])},renderValue:u=>{var f;return(f=l.getValue(u))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>i3e(l.subRows,u=>u.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let u=[],f=l;for(;;){const h=f.getParentRow();if(!h)break;u.push(h),f=h}return u.reverse()},getAllCells:Ut(()=>[e.getAllLeafColumns()],u=>u.map(f=>o3e(e,l,f,f.id)),Gt(e.options,"debugRows")),_getAllCellsByColumnId:Ut(()=>[l.getAllCells()],u=>u.reduce((f,h)=>(f[h.column.id]=h,f),{}),Gt(e.options,"debugRows"))};for(let u=0;u<e._features.length;u++){const f=e._features[u];f==null||f.createRow==null||f.createRow(l,e)}return l},c3e={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},oee=(e,t,n)=>{var r,s;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(a))};oee.autoRemove=e=>qo(e);const lee=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};lee.autoRemove=e=>qo(e);const uee=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};uee.autoRemove=e=>qo(e);const cee=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};cee.autoRemove=e=>qo(e);const dee=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});dee.autoRemove=e=>qo(e)||!(e!=null&&e.length);const fee=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});fee.autoRemove=e=>qo(e)||!(e!=null&&e.length);const hee=(e,t,n)=>e.getValue(t)===n;hee.autoRemove=e=>qo(e);const pee=(e,t,n)=>e.getValue(t)==n;pee.autoRemove=e=>qo(e);const cL=(e,t,n)=>{let[r,s]=n;const a=e.getValue(t);return a>=r&&a<=s};cL.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(s)?1/0:s;if(a>i){const l=a;a=i,i=l}return[a,i]};cL.autoRemove=e=>qo(e)||qo(e[0])&&qo(e[1]);const cd={includesString:oee,includesStringSensitive:lee,equalsString:uee,arrIncludes:cee,arrIncludesAll:dee,arrIncludesSome:fee,equals:hee,weakEquals:pee,inNumberRange:cL};function qo(e){return e==null||e===""}const d3e={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Mi("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?cd.includesString:typeof r=="number"?cd.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?cd.equals:Array.isArray(r)?cd.arrIncludes:cd.weakEquals},e.getFilterFn=()=>{var n,r;return W2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:cd[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const s=e.getFilterFn(),a=r?.find(h=>h.id===e.id),i=md(n,a?a.value:void 0);if(QU(s,i,e)){var l;return(l=r?.filter(h=>h.id!==e.id))!=null?l:[]}const u={id:e.id,value:i};if(a){var f;return(f=r?.map(h=>h.id===e.id?u:h))!=null?f:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=s=>{var a;return(a=md(t,s))==null?void 0:a.filter(i=>{const l=n.find(u=>u.id===i.id);if(l){const u=l.getFilterFn();if(QU(u,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function QU(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const f3e=(e,t,n)=>n.reduce((r,s)=>{const a=s.getValue(e);return r+(typeof a=="number"?a:0)},0),h3e=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},p3e=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},m3e=(e,t,n)=>{let r,s;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=s=i):(r>i&&(r=i),s<i&&(s=i)))}),[r,s]},g3e=(e,t)=>{let n=0,r=0;if(t.forEach(s=>{let a=s.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},v3e=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!a3e(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),s=n.sort((a,i)=>a-i);return n.length%2!==0?s[r]:(s[r-1]+s[r])/2},y3e=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),x3e=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,b3e=(e,t)=>t.length,w4={sum:f3e,min:h3e,max:p3e,extent:m3e,mean:g3e,median:v3e,unique:y3e,uniqueCount:x3e,count:b3e},w3e={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Mi("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return w4.sum;if(Object.prototype.toString.call(r)==="[object Date]")return w4.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return W2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:w4[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function C3e(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const S3e={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Mi("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ut(n=>[r1(t,n)],n=>n.findIndex(r=>r.id===e.id),Gt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=r1(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const s=r1(t,n);return((r=s[s.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ut(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>s=>{let a=[];if(!(t!=null&&t.length))a=s;else{const i=[...t],l=[...s];for(;l.length&&i.length;){const u=i.shift(),f=l.findIndex(h=>h.id===u);f>-1&&a.push(l.splice(f,1)[0])}a=[...a,...l]}return C3e(a,n,r)},Gt(e.options,"debugTable"))}},C4=()=>({left:[],right:[]}),_3e={getInitialState:e=>({columnPinning:C4(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Mi("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var a,i;if(n==="right"){var l,u;return{left:((l=s?.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((u=s?.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var f,h;return{left:[...((f=s?.left)!=null?f:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((h=s?.right)!=null?h:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((a=s?.left)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=s?.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var r,s,a;return((r=n.columnDef.enablePinning)!=null?r:!0)&&((s=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:s}=t.getState().columnPinning,a=n.some(l=>r?.includes(l)),i=n.some(l=>s?.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();return s?(n=(r=t.getState().columnPinning)==null||(r=r[s])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,s)=>{const a=[...r??[],...s??[]];return n.filter(i=>!a.includes(i.column.id))},Gt(t.options,"debugRows")),e.getLeftVisibleCells=Ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Gt(t.options,"debugRows")),e.getRightVisibleCells=Ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Gt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?C4():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:C4())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var s,a;return!!((s=r.left)!=null&&s.length||(a=r.right)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getRightLeafColumns=Ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getCenterLeafColumns=Ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const s=[...n??[],...r??[]];return t.filter(a=>!s.includes(a.id))},Gt(e.options,"debugColumns"))}};function j3e(e){return e||(typeof document<"u"?document:null)}const dC={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},S4=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),E3e={getDefaultColumnDef:()=>dC,getInitialState:e=>({columnSizing:{},columnSizingInfo:S4(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Mi("columnSizing",e),onColumnSizingInfoChange:Mi("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,s;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:dC.minSize,(r=a??e.columnDef.size)!=null?r:dC.size),(s=e.columnDef.maxSize)!=null?s:dC.maxSize)},e.getStart=Ut(n=>[n,r1(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((s,a)=>s+a.getSize(),0),Gt(t.options,"debugColumns")),e.getAfter=Ut(n=>[n,r1(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((s,a)=>s+a.getSize(),0),Gt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...s}=n;return s})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=s=>{if(s.subHeaders.length)s.subHeaders.forEach(r);else{var a;n+=(a=s.column.getSize())!=null?a:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),s=r?.getCanResize();return a=>{if(!r||!s||(a.persist==null||a.persist(),_4(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map($=>[$.column.id,$.column.getSize()]):[[r.id,r.getSize()]],u=_4(a)?Math.round(a.touches[0].clientX):a.clientX,f={},h=($,O)=>{typeof O=="number"&&(t.setColumnSizingInfo(N=>{var M,L;const k=t.options.columnResizeDirection==="rtl"?-1:1,T=(O-((M=N?.startOffset)!=null?M:0))*k,P=Math.max(T/((L=N?.startSize)!=null?L:0),-.999999);return N.columnSizingStart.forEach(V=>{let[q,K]=V;f[q]=Math.round(Math.max(K+K*P,0)*100)/100}),{...N,deltaOffset:T,deltaPercentage:P}}),(t.options.columnResizeMode==="onChange"||$==="end")&&t.setColumnSizing(N=>({...N,...f})))},g=$=>h("move",$),v=$=>{h("end",$),t.setColumnSizingInfo(O=>({...O,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=j3e(n),C={moveHandler:$=>g($.clientX),upHandler:$=>{w?.removeEventListener("mousemove",C.moveHandler),w?.removeEventListener("mouseup",C.upHandler),v($.clientX)}},_={moveHandler:$=>($.cancelable&&($.preventDefault(),$.stopPropagation()),g($.touches[0].clientX),!1),upHandler:$=>{var O;w?.removeEventListener("touchmove",_.moveHandler),w?.removeEventListener("touchend",_.upHandler),$.cancelable&&($.preventDefault(),$.stopPropagation()),v((O=$.touches[0])==null?void 0:O.clientX)}},E=$3e()?{passive:!1}:!1;_4(a)?(w?.addEventListener("touchmove",_.moveHandler,E),w?.addEventListener("touchend",_.upHandler,E)):(w?.addEventListener("mousemove",C.moveHandler,E),w?.addEventListener("mouseup",C.upHandler,E)),t.setColumnSizingInfo($=>({...$,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?S4():(n=e.initialState.columnSizingInfo)!=null?n:S4())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0}}};let fC=null;function $3e(){if(typeof fC=="boolean")return fC;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return fC=e,fC}function _4(e){return e.type==="touchstart"}const R3e={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Mi("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const s=e.columns;return(n=s.length?s.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ut(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Gt(t.options,"debugRows")),e.getVisibleCells=Ut(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,s)=>[...n,...r,...s],Gt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ut(()=>[r(),r().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Gt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,a)=>({...s,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function r1(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const O3e={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},T3e={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Mi("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,s,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>cd.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return W2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:cd[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},A3e={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Mi("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var s,a;e.setExpanded(r?{}:(s=(a=e.initialState)==null?void 0:a.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var s;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(s=n)!=null?s:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:l,...u}=i;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},fk=0,hk=10,j4=()=>({pageIndex:fk,pageSize:hk}),k3e={getInitialState:e=>({...e,pagination:{...j4(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Mi("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const s=a=>md(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?j4():(s=e.initialState.pagination)!=null?s:j4())},e.setPageIndex=r=>{e.setPagination(s=>{let a=md(r,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...s,pageIndex:a}})},e.resetPageIndex=r=>{var s,a;e.setPageIndex(r?fk:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?s:fk)},e.resetPageSize=r=>{var s,a;e.setPageSize(r?hk:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:hk)},e.setPageSize=r=>{e.setPagination(s=>{const a=Math.max(1,md(r,s.pageSize)),i=s.pageSize*s.pageIndex,l=Math.floor(i/a);return{...s,pageIndex:l,pageSize:a}})},e.setPageCount=r=>e.setPagination(s=>{var a;let i=md(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...s,pageCount:i}}),e.getPageOptions=Ut(()=>[e.getPageCount()],r=>{let s=[];return r&&r>0&&(s=[...new Array(r)].fill(null).map((a,i)=>i)),s},Gt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:r<s-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},E4=()=>({top:[],bottom:[]}),N3e={getInitialState:e=>({rowPinning:E4(),...e}),getDefaultOptions:e=>({onRowPinningChange:Mi("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,s)=>{const a=r?e.getLeafRows().map(u=>{let{id:f}=u;return f}):[],i=s?e.getParentRows().map(u=>{let{id:f}=u;return f}):[],l=new Set([...i,e.id,...a]);t.setRowPinning(u=>{var f,h;if(n==="bottom"){var g,v;return{top:((g=u?.top)!=null?g:[]).filter(_=>!(l!=null&&l.has(_))),bottom:[...((v=u?.bottom)!=null?v:[]).filter(_=>!(l!=null&&l.has(_))),...Array.from(l)]}}if(n==="top"){var w,C;return{top:[...((w=u?.top)!=null?w:[]).filter(_=>!(l!=null&&l.has(_))),...Array.from(l)],bottom:((C=u?.bottom)!=null?C:[]).filter(_=>!(l!=null&&l.has(_)))}}return{top:((f=u?.top)!=null?f:[]).filter(_=>!(l!=null&&l.has(_))),bottom:((h=u?.bottom)!=null?h:[]).filter(_=>!(l!=null&&l.has(_)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:s}=t.options;return typeof r=="function"?r(e):(n=r??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:s}=t.getState().rowPinning,a=n.some(l=>r?.includes(l)),i=n.some(l=>s?.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();if(!s)return-1;const a=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=a?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?E4():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:E4())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var s,a;return!!((s=r.top)!=null&&s.length||(a=r.bottom)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(a=>{const i=e.getRow(a,!0);return i.getIsAllParentsExpanded()?i:null}):(n??[]).map(a=>t.find(i=>i.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ut(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Gt(e.options,"debugRows")),e.getBottomRows=Ut(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Gt(e.options,"debugRows")),e.getCenterRows=Ut(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const s=new Set([...n??[],...r??[]]);return t.filter(a=>!s.has(a.id))},Gt(e.options,"debugRows"))}},L3e={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Mi("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):s.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(a=>{pk(s,a.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ut(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?$4(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ut(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?$4(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ut(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?$4(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(s=>!n[s.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const s=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return a;const l={...a};return pk(l,e.id,n,(i=r?.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return dL(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return mk(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return mk(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var s;n&&e.toggleSelected((s=r.target)==null?void 0:s.checked)}}}},pk=(e,t,n,r,s)=>{var a;const i=s.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>pk(e,l.id,n,r,s))};function $4(e,t){const n=e.getState().rowSelection,r=[],s={},a=function(i,l){return i.map(u=>{var f;const h=dL(u,n);if(h&&(r.push(u),s[u.id]=u),(f=u.subRows)!=null&&f.length&&(u={...u,subRows:a(u.subRows)}),h)return u}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:s}}function dL(e,t){var n;return(n=t[e.id])!=null?n:!1}function mk(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let s=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!s)&&(i.getCanSelect()&&(dL(i,t)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=mk(i,t);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const gk=/([0-9]+)/gm,M3e=(e,t,n)=>mee(Nd(e.getValue(n)).toLowerCase(),Nd(t.getValue(n)).toLowerCase()),I3e=(e,t,n)=>mee(Nd(e.getValue(n)),Nd(t.getValue(n))),P3e=(e,t,n)=>fL(Nd(e.getValue(n)).toLowerCase(),Nd(t.getValue(n)).toLowerCase()),D3e=(e,t,n)=>fL(Nd(e.getValue(n)),Nd(t.getValue(n))),V3e=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},B3e=(e,t,n)=>fL(e.getValue(n),t.getValue(n));function fL(e,t){return e===t?0:e>t?1:-1}function Nd(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function mee(e,t){const n=e.split(gk).filter(Boolean),r=t.split(gk).filter(Boolean);for(;n.length&&r.length;){const s=n.shift(),a=r.shift(),i=parseInt(s,10),l=parseInt(a,10),u=[i,l].sort();if(isNaN(u[0])){if(s>a)return 1;if(a>s)return-1;continue}if(isNaN(u[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const gy={alphanumeric:M3e,alphanumericCaseSensitive:I3e,text:P3e,textCaseSensitive:D3e,datetime:V3e,basic:B3e},F3e={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Mi("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const s of n){const a=s?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return gy.datetime;if(typeof a=="string"&&(r=!0,a.split(gk).length>1))return gy.alphanumeric}return r?gy.text:gy.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return W2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:gy[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const s=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i?.find(w=>w.id===e.id),u=i?.findIndex(w=>w.id===e.id);let f=[],h,g=a?n:s==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?h="toggle":h="add":i!=null&&i.length&&u!==i.length-1?h="replace":l?h="toggle":h="replace",h==="toggle"&&(a||s||(h="remove")),h==="add"){var v;f=[...i,{id:e.id,desc:g}],f.splice(0,f.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=i.map(w=>w.id===e.id?{...w,desc:g}:w):h==="remove"?f=i.filter(w=>w.id!==e.id):f=[{id:e.id,desc:g}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,s;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},U3e=[u3e,R3e,S3e,_3e,c3e,d3e,O3e,T3e,F3e,w3e,A3e,k3e,N3e,L3e,E3e];function G3e(e){var t,n;const r=[...U3e,...(t=e._features)!=null?t:[]];let s={_features:r};const a=s._features.reduce((g,v)=>Object.assign(g,v.getDefaultOptions==null?void 0:v.getDefaultOptions(s)),{}),i=g=>s.options.mergeOptions?s.options.mergeOptions(a,g):{...a,...g};let l={...(n=e.initialState)!=null?n:{}};s._features.forEach(g=>{var v;l=(v=g.getInitialState==null?void 0:g.getInitialState(l))!=null?v:l});const u=[];let f=!1;const h={_features:r,options:{...a,...e},initialState:l,_queue:g=>{u.push(g),f||(f=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();f=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{s.setState(s.initialState)},setOptions:g=>{const v=md(g,s.options);s.options=i(v)},getState:()=>s.options.state,setState:g=>{s.options.onStateChange==null||s.options.onStateChange(g)},_getRowId:(g,v,w)=>{var C;return(C=s.options.getRowId==null?void 0:s.options.getRowId(g,v,w))!=null?C:`${w?[w.id,v].join("."):v}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(g,v)=>{let w=(v?s.getPrePaginationRowModel():s.getRowModel()).rowsById[g];if(!w&&(w=s.getCoreRowModel().rowsById[g],!w))throw new Error;return w},_getDefaultColumnDef:Ut(()=>[s.options.defaultColumn],g=>{var v;return g=(v=g)!=null?v:{},{header:w=>{const C=w.header.column.columnDef;return C.accessorKey?C.accessorKey:C.accessorFn?C.id:null},cell:w=>{var C,_;return(C=(_=w.renderValue())==null||_.toString==null?void 0:_.toString())!=null?C:null},...s._features.reduce((w,C)=>Object.assign(w,C.getDefaultColumnDef==null?void 0:C.getDefaultColumnDef()),{}),...g}},Gt(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:Ut(()=>[s._getColumnDefs()],g=>{const v=function(w,C,_){return _===void 0&&(_=0),w.map(E=>{const $=l3e(s,E,_,C),O=E;return $.columns=O.columns?v(O.columns,$,_+1):[],$})};return v(g)},Gt(e,"debugColumns")),getAllFlatColumns:Ut(()=>[s.getAllColumns()],g=>g.flatMap(v=>v.getFlatColumns()),Gt(e,"debugColumns")),_getAllFlatColumnsById:Ut(()=>[s.getAllFlatColumns()],g=>g.reduce((v,w)=>(v[w.id]=w,v),{}),Gt(e,"debugColumns")),getAllLeafColumns:Ut(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(g,v)=>{let w=g.flatMap(C=>C.getLeafColumns());return v(w)},Gt(e,"debugColumns")),getColumn:g=>s._getAllFlatColumnsById()[g]};Object.assign(s,h);for(let g=0;g<s._features.length;g++){const v=s._features[g];v==null||v.createTable==null||v.createTable(s)}return s}function z3e(){return e=>Ut(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(s,a,i){a===void 0&&(a=0);const l=[];for(let f=0;f<s.length;f++){const h=uL(e,e._getRowId(s[f],f,i),s[f],f,a,void 0,i?.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,l.push(h),e.options.getSubRows){var u;h.originalSubRows=e.options.getSubRows(s[f],f),(u=h.originalSubRows)!=null&&u.length&&(h.subRows=r(h.originalSubRows,a+1,h))}}return l};return n.rows=r(t),n},Gt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function H3e(e,t,n){return n.options.filterFromLeafRows?q3e(e,t,n):K3e(e,t,n)}function q3e(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(u,f){f===void 0&&(f=0);const h=[];for(let v=0;v<u.length;v++){var g;let w=u[v];const C=uL(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);if(C.columnFilters=w.columnFilters,(g=w.subRows)!=null&&g.length&&f<i){if(C.subRows=l(w.subRows,f+1),w=C,t(w)&&!C.subRows.length){h.push(w),a[w.id]=w,s.push(w);continue}if(t(w)||C.subRows.length){h.push(w),a[w.id]=w,s.push(w);continue}}else w=C,t(w)&&(h.push(w),a[w.id]=w,s.push(w))}return h};return{rows:l(e),flatRows:s,rowsById:a}}function K3e(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(u,f){f===void 0&&(f=0);const h=[];for(let v=0;v<u.length;v++){let w=u[v];if(t(w)){var g;if((g=w.subRows)!=null&&g.length&&f<i){const C=uL(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);C.subRows=l(w.subRows,f+1),w=C}h.push(w),s.push(w),a[w.id]=w}}return h};return{rows:l(e),flatRows:s,rowsById:a}}function Y3e(){return(e,t)=>Ut(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let a=0;a<n.flatRows.length;a++){const i=n.flatRows[a].getUniqueValues(t);for(let l=0;l<i.length;l++){const u=i[l];if(r.has(u)){var s;r.set(u,((s=r.get(u))!=null?s:0)+1)}else r.set(u,1)}}return r},Gt(e.options,"debugTable"))}function Z3e(){return e=>Ut(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let v=0;v<t.flatRows.length;v++)t.flatRows[v].columnFilters={},t.flatRows[v].columnFiltersMeta={};return t}const s=[],a=[];(n??[]).forEach(v=>{var w;const C=e.getColumn(v.id);if(!C)return;const _=C.getFilterFn();_&&s.push({id:v.id,filterFn:_,resolvedValue:(w=_.resolveFilterValue==null?void 0:_.resolveFilterValue(v.value))!=null?w:v.value})});const i=(n??[]).map(v=>v.id),l=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(v=>v.getCanGlobalFilter());r&&l&&u.length&&(i.push("__global__"),u.forEach(v=>{var w;a.push({id:v.id,filterFn:l,resolvedValue:(w=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?w:r})}));let f,h;for(let v=0;v<t.flatRows.length;v++){const w=t.flatRows[v];if(w.columnFilters={},s.length)for(let C=0;C<s.length;C++){f=s[C];const _=f.id;w.columnFilters[_]=f.filterFn(w,_,f.resolvedValue,E=>{w.columnFiltersMeta[_]=E})}if(a.length){for(let C=0;C<a.length;C++){h=a[C];const _=h.id;if(h.filterFn(w,_,h.resolvedValue,E=>{w.columnFiltersMeta[_]=E})){w.columnFilters.__global__=!0;break}}w.columnFilters.__global__!==!0&&(w.columnFilters.__global__=!1)}}const g=v=>{for(let w=0;w<i.length;w++)if(v.columnFilters[i[w]]===!1)return!1;return!0};return H3e(t.rows,g,e)},Gt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function X3e(){return e=>Ut(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,s=[],a=r.filter(u=>{var f;return(f=e.getColumn(u.id))==null?void 0:f.getCanSort()}),i={};a.forEach(u=>{const f=e.getColumn(u.id);f&&(i[u.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const l=u=>{const f=u.map(h=>({...h}));return f.sort((h,g)=>{for(let w=0;w<a.length;w+=1){var v;const C=a[w],_=i[C.id],E=_.sortUndefined,$=(v=C?.desc)!=null?v:!1;let O=0;if(E){const N=h.getValue(C.id),M=g.getValue(C.id),L=N===void 0,k=M===void 0;if(L||k){if(E==="first")return L?-1:1;if(E==="last")return L?1:-1;O=L&&k?0:L?E:-E}}if(O===0&&(O=_.sortingFn(h,g,C.id)),O!==0)return $&&(O*=-1),_.invertSorting&&(O*=-1),O}return h.index-g.index}),f.forEach(h=>{var g;s.push(h),(g=h.subRows)!=null&&g.length&&(h.subRows=l(h.subRows))}),f};return{rows:l(n.rows),flatRows:s,rowsById:n.rowsById}},Gt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function gee(e,t){return e?W3e(e)?y.createElement(e,t):e:null}function W3e(e){return Q3e(e)||typeof e=="function"||J3e(e)}function Q3e(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J3e(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function e4e(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:G3e(t)})),[r,s]=y.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{s(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const hL=(e,t,n)=>{var r;const s=e.getValue(t);if(!Array.isArray(n)||!(n!=null&&n.length))return!0;if(typeof s=="string")return n.some(a=>s.toLowerCase().includes(a.toString()));if(typeof s=="number"||typeof s=="boolean")return n.some(a=>a===s);if(Array.isArray(s)||s!==null&&typeof s=="object"){const a=(r=e.getVisibleCells().find(u=>u.column.id===t))==null?void 0:r.column,{getCellValue:i}=a?.columnDef.meta??{},l=i?.(s)??"";return n.some(u=>l.toLowerCase().includes(u.toString()))}return!0};hL.autoRemove=e=>!(e!=null&&e.length);hL.resolveFilterValue=e=>e?.map(t=>typeof t=="string"?t.toLowerCase():t);const t4e=({column:e,...t})=>{const{filterValues:n,getFilterValue:r}=e.columnDef.meta??{},[s,a]=y.useState(new Set),i=e.getFilterValue(),l=e.getFacetedUniqueValues();y.useEffect(()=>{a(new Set(i??[]))},[i]);const u=y.useMemo(()=>{if(n)return n.map(w=>typeof w=="string"?{value:w,label:w}:w);const v=new Set(Array.from(l.keys()).map(w=>Array.isArray(w)||w!==null&&typeof w=="object"?r?.(w)??w.toString():w));return Array.from(v.values()).sort().map(w=>({value:w,label:w}))},[l,n,r]),f=v=>w=>{a(C=>(w?C.add(v):C.delete(v),C))},h=v=>()=>{e.setFilterValue(Array.from(s.values())),v()},g=v=>()=>{a(new Set),e.setFilterValue([]),v()};return d.jsx(gW,{className:"!overflow-hidden !max-w-[220px]",closeMenuByClick:!1,placement:"bottomRight",portal:!0,closeOthers:!0,content:v=>d.jsxs("div",{className:"flex flex-col flex-1 gap-2.5 overflow-hidden",children:[d.jsx("div",{className:"flex flex-col gap-2.5 overflow-y-auto pt-2.5 px-4",children:u.map((w,C)=>d.jsx(si,{checked:s.has(w.value),onChange:f(w.value),label:w.label,"data-testid":`filter-checkbox-${C}`},w.value))}),d.jsx("div",{className:"border-b border-b-secondary-light"}),d.jsxs("div",{className:"flex justify-between pb-2.5 px-4 gap-2.5",children:[d.jsx(Fe,{size:"small",variant:"secondary",onClick:g(v),"data-testid":"reset-button",children:"Сбросить"}),d.jsx(Fe,{size:"small",variant:"primary",onClick:h(v),"data-testid":"apply-button",children:"Применить"})]})]}),children:d.jsx(Fe,{onlyIcon:!0,variant:"ghost",className:We("!hover:brightness-120 ease-in !active:brightness-90",{"!text-primary":e.getIsFiltered(),"!text-placeholder":!e.getIsFiltered()}),...t,children:d.jsx(PZ,{className:"w-4 h-4"})})})},n4e=()=>{const[e,t]=y.useState(0),n=y.useRef(null);return y.useEffect(()=>{const r=new ResizeObserver(s=>{const[a]=s;n.current&&requestAnimationFrame(()=>t(a.target.clientHeight))});return n.current&&r.observe(n.current),()=>{r.disconnect()}},[]),{tableRef:n,tableHeight:e}},r4e=({tableRef:e,onColumnSizingChange:t})=>{const[n,r]=y.useState({});return{autoSizeColumn:s=>{var a,i;const l=document.createElement("div");l.style.cssText=`
    position: absolute;
    top: -9999px;
    left: -9999px;
    visibility: hidden;
    white-space: nowrap;
    padding: 6px 4px;
    font: inherit;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
  `;let u=0;const f=(a=e.current)==null?void 0:a.querySelector(`[data-header-id="${s.id}"]`);if(f){const g=f.cloneNode(!0);g.style.cssText+="; width: auto !important; max-width: none !important;",document.body.appendChild(g),u=Math.max(u,g.getBoundingClientRect().width),document.body.removeChild(g)}const h=(i=e.current)==null?void 0:i.querySelectorAll(`[data-body-cell-id="${s.id}"]`);h?.forEach(g=>{const v=g.cloneNode(!0);v.style.cssText+="; width: auto !important; max-width: none !important;",document.body.appendChild(v),u=Math.max(u,v.getBoundingClientRect().width),document.body.removeChild(v)}),u>0&&r(g=>{const v={...g,[s.id]:Math.ceil(u)+4};return t?.(v),v})},columnSizing:n,setColumnSizing:r}},s4e=e=>{const{getCellTitle:t}=e.column.columnDef.meta??{},n=t?.(e.getValue()),r=typeof e.getValue()=="string"?e.getValue():"";return n||r},JU=y.forwardRef(({className:e,selectedRows:t,rowKey:n,row:r,...s},a)=>d.jsx("tr",{ref:a,className:We("hover:[&_td]:brightness-150 hover:[&_td]:bg-panel cursor-pointer",{"[&_td]:bg-panel ":t?.includes(n)},e),...s,children:r.getVisibleCells().map((i,l)=>{var u,f;return d.jsx("td",{title:s4e(i),className:We("bg-bg py-1 px-4 text-sm text-text overflow-hidden text-ellipsis text-nowrap",{"text-center":((u=i.column.columnDef.meta)==null?void 0:u.align)==="center"},(f=i.column.columnDef.meta)==null?void 0:f.tdClassName),"data-testid":`table-cell-${l}`,"data-body-cell-id":i.column.id,children:gee(i.column.columnDef.cell,i.getContext())},i.id)})})),pL=y.forwardRef(function({data:e,columns:t,selectedRows:n=[],rowKey:r,onRowClick:s,onRowContextMenu:a,onSortingChange:i,empty:l="Нет данных",enableRowSelection:u=!1,onSelectionChange:f,rowSelection:h,getRowId:g,style:v,isFixed:w,className:C,trClassName:_,theadClassName:E,tbodyClassName:$,resizerClassName:O,wrapperClassName:N,virtualize:M=!1,virtualizeHeight:L="100%",manualFiltering:k,onColumnFiltersChange:T,columnFilters:P,onColumnSizingChange:V,resizerOnHeaderOnly:q=!1,columnSizing:K,...re},ee){const[ue,he]=y.useState([]),[X,pe]=y.useState(h??{}),[xe,be]=y.useState(P??[]),Y=y.useRef(null),{tableRef:se,tableHeight:Oe}=n4e(),{columnSizing:de,setColumnSizing:_e,autoSizeColumn:Le}=r4e({tableRef:Y,onColumnSizingChange:V});y.useEffect(()=>{h!==void 0&&pe(Ge=>Ge!==h?h:Ge)},[h]),y.useEffect(()=>{K!==void 0&&_e(Ge=>Ge!==K?K:Ge)},[K]),y.useEffect(()=>{P!==void 0&&be(Ge=>Ge!==P?P:Ge)},[P]);const Re=y.useMemo(()=>t?.map(Ge=>({...Ge,enableColumnFilter:Ge.enableColumnFilter??!1,filterFn:Ge.filterFn??"defaultFilter"})),[t]),Ye=e4e({data:e,columns:Re,state:{sorting:ue,rowSelection:X,columnFilters:xe,columnSizing:de},defaultColumn:{enableSorting:!1,size:150,minSize:50},onSortingChange:Ge=>{const dt=typeof Ge=="function"?Ge(ue):Ge;he(dt),i?.(dt)},onRowSelectionChange:Ge=>{if(!u)return;const dt=typeof Ge=="function"?Ge(X):Ge;pe(dt);const Z=e.filter((oe,me)=>{const He=g?g(oe,me):`${me}`;return!!dt[He]});f?.(Z,dt)},onColumnFiltersChange:Ge=>{const dt=typeof Ge=="function"?Ge(xe):Ge;be(dt),T?.(dt)},onColumnSizingChange:Ge=>{const dt=typeof Ge=="function"?Ge(de):Ge;_e(dt),V?.(dt)},enableSortingRemoval:!1,getCoreRowModel:z3e(),getSortedRowModel:X3e(),columnResizeMode:"onChange",enableColumnResizing:!0,enableRowSelection:u,getRowId:g,getFilteredRowModel:k?void 0:Z3e(),getFacetedUniqueValues:Y3e(),filterFns:{defaultFilter:hL},manualFiltering:k}),{rows:Xe}=Ye.getRowModel(),Je=M?s3e({count:Xe.length,getScrollElement:()=>Y.current,estimateSize:()=>28,measureElement:Ge=>Ge?.getBoundingClientRect().height??28,overscan:10}):null,Ot=Je?.getVirtualItems()??[],tn=Je?.getTotalSize()??0,an=Ge=>dt=>{s?.(Ge,dt)},Pt=Ge=>dt=>{a?.(Ge,dt)},Wt=d.jsx("tr",{children:d.jsx("td",{colSpan:Ye.getAllColumns().length,className:We("bg-bg py-4 px-4 text-sm text-center font-medium text-text overflow-hidden text-ellipsis text-nowrap","max-w-0"),children:d.jsx("div",{className:"w-full flex justify-center items-center",children:l})})}),Lt=y.useCallback(Ge=>{Y.current=Ge,typeof ee=="function"?ee(Ge):ee!==null&&(ee.current=Ge)},[ee]),Ln=()=>{var Ge,dt;return Xe.length===0?Wt:M?d.jsxs(d.Fragment,{children:[d.jsx("tr",{children:d.jsx("td",{style:{height:`${((Ge=Ot[0])==null?void 0:Ge.start)??0}px`},colSpan:t.length})}),Ot.map((Z,oe)=>{const me=Xe[Z.index],He=g?g(me.original,me.index):r?me.original[r]:`${me.index}`;return d.jsx(JU,{ref:Je.measureElement,rowKey:He,row:me,selectedRows:n,onClick:an(me.original),onContextMenu:Pt(me.original),"data-index":Z.index,"data-testid":`table-row-${oe}`},He)}),d.jsx("tr",{children:d.jsx("td",{style:{height:`${tn-(((dt=Ot[Ot.length-1])==null?void 0:dt.end)??0)}px`},colSpan:t.length})})]}):Ye.getRowModel().rows.map((Z,oe)=>{const me=Z.original[r];return d.jsx(JU,{rowKey:me,selectedRows:n,row:Z,onClick:an(Z.original),onContextMenu:Pt(Z.original),"data-testid":`table-row-${oe}`},me)})};return d.jsx("div",{ref:Lt,className:N,style:{height:"100%",overflow:"auto",position:"relative"},children:d.jsxs("table",{className:We(C,"border-collapse"),...re,ref:se,style:{...v,tableLayout:"fixed",width:w?Ye.getTotalSize():"100%"},children:[d.jsx("thead",{className:We("sticky top-px bg-bg z-10 outline-1 outline-panel cursor-default",E),children:Ye.getHeaderGroups().map((Ge,dt)=>d.jsx("tr",{children:Ge.headers.map((Z,oe)=>{var me,He,ze,Ke;const at=Z.column.getIsSorted(),Dt=Z.column.getCanSort(),ht=Z.column.getCanFilter(),Jt=ue.some(fa=>fa.id===Z.column.id),jn=Dt&&(at==="asc"?d.jsx(qfe,{className:"w-4 h-4"}):d.jsx(Kfe,{className:"w-4 h-4"})),dr=((me=Z.column.columnDef.meta)==null?void 0:me.align)==="center";return d.jsxs("th",{style:{width:`${Z.getSize()}px`},className:We("text-sm text-text font-bold bg-bg py-1 px-4 relative","first:rounded first:rounded-e-none","last:rounded last:rounded-s-none","last:[&_[data-resizer]]:before:right-0 text-start last:[&_[data-resizer]]:hover:*:scale-x-100","last:[&_[data-resizer]]:active:*:scale-x-100",(He=Z.column.columnDef.meta)==null?void 0:He.thClassName),colSpan:Z.colSpan,"data-header-id":Z.column.id,children:[d.jsxs("div",{className:We("flex gap-2.5 ",{"text-center":dr},(ze=Z.column.columnDef.meta)==null?void 0:ze.thLabelClassName),children:[d.jsx(W,{className:"overflow-hidden text-ellipsis text-nowrap w-full",variant:"strong",tag:"div",children:gee(Z.column.columnDef.header,Z.getContext())}),(Dt||ht)&&d.jsxs("div",{className:"flex items-center",children:[Dt&&d.jsx("button",{tabIndex:-1,className:We("w-5 h-5","hover:brightness-120 ease-in active:brightness-90 cursor-pointer",{"text-primary":Jt,"text-placeholder":!Jt}),onClick:Z.column.getToggleSortingHandler(),"data-testid":`sort-button-${dt}-${oe}`,children:jn}),ht&&d.jsx(t4e,{column:Z.column,"data-testid":`filter-button-${dt}-${oe}`})]})]}),d.jsx("button",{style:{height:Xe.length&&!q?Oe:"100%"},tabIndex:-1,className:We("flex justify-center hover:*:bg-secondary-light active:*:bg-secondary-light hover:*:scale-x-[4] active:*:scale-x-[4] absolute top-0 right-0  z-10 cursor-col-resize touch-none select-none outline-0","before:absolute before:top-0 before:-left-4 before:bottom-0 before:-right-4 ",O,(Ke=Z.column.columnDef.meta)==null?void 0:Ke.resizerClassName),onMouseDown:Z.getResizeHandler(),onTouchStart:Z.getResizeHandler(),onDoubleClick:()=>Le(Z.column),"data-resizer":!0,"data-testid":`resize-button-${dt}-${oe}`,children:d.jsx("div",{className:"bg-secondary w-px h-full rounded ease-linear duration-100 "})})]},Z.id)})},Ge.id))}),d.jsx("tbody",{className:We("rounded outline-1 outline-secondary",$),children:Ln()})]})})});function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}function a4e(e,t){if(_h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vee(e){var t=a4e(e,"string");return _h(t)=="symbol"?t:t+""}function Ny(e,t,n){return(t=vee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eG(Object(n),!0).forEach(function(r){Ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i4e(e){if(Array.isArray(e))return e}function o4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,i,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(h){f=!0,s=h}finally{try{if(!u&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(f)throw s}}return l}}function vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yee(e,t){if(e){if(typeof e=="string")return vk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vk(e,t):void 0}}function l4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uu(e,t){return i4e(e)||o4e(e,t)||yee(e,t)||l4e()}function u4e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function sc(e,t){if(e==null)return{};var n,r,s=u4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var c4e=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function d4e(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,s=r===void 0?!1:r,a=e.defaultValue,i=a===void 0?null:a,l=e.inputValue,u=e.menuIsOpen,f=e.onChange,h=e.onInputChange,g=e.onMenuClose,v=e.onMenuOpen,w=e.value,C=sc(e,c4e),_=y.useState(l!==void 0?l:n),E=Uu(_,2),$=E[0],O=E[1],N=y.useState(u!==void 0?u:s),M=Uu(N,2),L=M[0],k=M[1],T=y.useState(w!==void 0?w:i),P=Uu(T,2),V=P[0],q=P[1],K=y.useCallback(function(xe,be){typeof f=="function"&&f(xe,be),q(xe)},[f]),re=y.useCallback(function(xe,be){var Y;typeof h=="function"&&(Y=h(xe,be)),O(Y!==void 0?Y:xe)},[h]),ee=y.useCallback(function(){typeof v=="function"&&v(),k(!0)},[v]),ue=y.useCallback(function(){typeof g=="function"&&g(),k(!1)},[g]),he=l!==void 0?l:$,X=u!==void 0?u:L,pe=w!==void 0?w:V;return kt(kt({},C),{},{inputValue:he,menuIsOpen:X,onChange:K,onInputChange:re,onMenuClose:ue,onMenuOpen:ee,value:pe})}function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ft.apply(null,arguments)}function f4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vee(r.key),r)}}function h4e(e,t,n){return t&&tG(e.prototype,t),n&&tG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yk(e,t){return yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},yk(e,t)}function p4e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yk(e,t)}function kS(e){return kS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kS(e)}function xee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xee=function(){return!!e})()}function m4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g4e(e,t){if(t&&(_h(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m4e(e)}function v4e(e){var t=xee();return function(){var n,r=kS(e);if(t){var s=kS(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return g4e(this,n)}}function y4e(e){if(Array.isArray(e))return vk(e)}function x4e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mL(e){return y4e(e)||x4e(e)||yee(e)||b4e()}function w4e(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function C4e(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var S4e=(function(){function e(n){var r=this;this._insertTag=function(s){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,a),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(C4e(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=w4e(r);try{s.insertRule(n,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var r;return(r=n.parentNode)==null?void 0:r.removeChild(n)}),this.tags=[],this.ctr=0},e})(),sa="-ms-",NS="-moz-",qn="-webkit-",bee="comm",gL="rule",vL="decl",_4e="@import",wee="@keyframes",j4e="@layer",E4e=Math.abs,Q2=String.fromCharCode,$4e=Object.assign;function R4e(e,t){return Ls(e,0)^45?(((t<<2^Ls(e,0))<<2^Ls(e,1))<<2^Ls(e,2))<<2^Ls(e,3):0}function Cee(e){return e.trim()}function O4e(e,t){return(e=t.exec(e))?e[0]:e}function Kn(e,t,n){return e.replace(t,n)}function xk(e,t){return e.indexOf(t)}function Ls(e,t){return e.charCodeAt(t)|0}function P1(e,t,n){return e.slice(t,n)}function Ml(e){return e.length}function yL(e){return e.length}function hC(e,t){return t.push(e),e}function T4e(e,t){return e.map(t).join("")}var J2=1,Dg=1,See=0,ai=0,os=0,uv="";function e_(e,t,n,r,s,a,i){return{value:e,root:t,parent:n,type:r,props:s,children:a,line:J2,column:Dg,length:i,return:""}}function vy(e,t){return $4e(e_("",null,null,"",null,null,0),e,{length:-e.length},t)}function A4e(){return os}function k4e(){return os=ai>0?Ls(uv,--ai):0,Dg--,os===10&&(Dg=1,J2--),os}function Oi(){return os=ai<See?Ls(uv,ai++):0,Dg++,os===10&&(Dg=1,J2++),os}function Xl(){return Ls(uv,ai)}function FC(){return ai}function gx(e,t){return P1(uv,e,t)}function D1(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _ee(e){return J2=Dg=1,See=Ml(uv=e),ai=0,[]}function jee(e){return uv="",e}function UC(e){return Cee(gx(ai-1,bk(e===91?e+2:e===40?e+1:e)))}function N4e(e){for(;(os=Xl())&&os<33;)Oi();return D1(e)>2||D1(os)>3?"":" "}function L4e(e,t){for(;--t&&Oi()&&!(os<48||os>102||os>57&&os<65||os>70&&os<97););return gx(e,FC()+(t<6&&Xl()==32&&Oi()==32))}function bk(e){for(;Oi();)switch(os){case e:return ai;case 34:case 39:e!==34&&e!==39&&bk(os);break;case 40:e===41&&bk(e);break;case 92:Oi();break}return ai}function M4e(e,t){for(;Oi()&&e+os!==57&&!(e+os===84&&Xl()===47););return"/*"+gx(t,ai-1)+"*"+Q2(e===47?e:Oi())}function I4e(e){for(;!D1(Xl());)Oi();return gx(e,ai)}function P4e(e){return jee(GC("",null,null,null,[""],e=_ee(e),0,[0],e))}function GC(e,t,n,r,s,a,i,l,u){for(var f=0,h=0,g=i,v=0,w=0,C=0,_=1,E=1,$=1,O=0,N="",M=s,L=a,k=r,T=N;E;)switch(C=O,O=Oi()){case 40:if(C!=108&&Ls(T,g-1)==58){xk(T+=Kn(UC(O),"&","&\f"),"&\f")!=-1&&($=-1);break}case 34:case 39:case 91:T+=UC(O);break;case 9:case 10:case 13:case 32:T+=N4e(C);break;case 92:T+=L4e(FC()-1,7);continue;case 47:switch(Xl()){case 42:case 47:hC(D4e(M4e(Oi(),FC()),t,n),u);break;default:T+="/"}break;case 123*_:l[f++]=Ml(T)*$;case 125*_:case 59:case 0:switch(O){case 0:case 125:E=0;case 59+h:$==-1&&(T=Kn(T,/\f/g,"")),w>0&&Ml(T)-g&&hC(w>32?rG(T+";",r,n,g-1):rG(Kn(T," ","")+";",r,n,g-2),u);break;case 59:T+=";";default:if(hC(k=nG(T,t,n,f,h,s,l,N,M=[],L=[],g),a),O===123)if(h===0)GC(T,t,k,k,M,a,g,l,L);else switch(v===99&&Ls(T,3)===110?100:v){case 100:case 108:case 109:case 115:GC(e,k,k,r&&hC(nG(e,k,k,0,0,s,l,N,s,M=[],g),L),s,L,g,l,r?M:L);break;default:GC(T,k,k,k,[""],L,0,l,L)}}f=h=w=0,_=$=1,N=T="",g=i;break;case 58:g=1+Ml(T),w=C;default:if(_<1){if(O==123)--_;else if(O==125&&_++==0&&k4e()==125)continue}switch(T+=Q2(O),O*_){case 38:$=h>0?1:(T+="\f",-1);break;case 44:l[f++]=(Ml(T)-1)*$,$=1;break;case 64:Xl()===45&&(T+=UC(Oi())),v=Xl(),h=g=Ml(N=T+=I4e(FC())),O++;break;case 45:C===45&&Ml(T)==2&&(_=0)}}return a}function nG(e,t,n,r,s,a,i,l,u,f,h){for(var g=s-1,v=s===0?a:[""],w=yL(v),C=0,_=0,E=0;C<r;++C)for(var $=0,O=P1(e,g+1,g=E4e(_=i[C])),N=e;$<w;++$)(N=Cee(_>0?v[$]+" "+O:Kn(O,/&\f/g,v[$])))&&(u[E++]=N);return e_(e,t,n,s===0?gL:l,u,f,h)}function D4e(e,t,n){return e_(e,t,n,bee,Q2(A4e()),P1(e,2,-2),0)}function rG(e,t,n,r){return e_(e,t,n,vL,P1(e,0,r),P1(e,r+1,-1),r)}function $g(e,t){for(var n="",r=yL(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function V4e(e,t,n,r){switch(e.type){case j4e:if(e.children.length)break;case _4e:case vL:return e.return=e.return||e.value;case bee:return"";case wee:return e.return=e.value+"{"+$g(e.children,r)+"}";case gL:e.value=e.props.join(",")}return Ml(n=$g(e.children,r))?e.return=e.value+"{"+n+"}":""}function B4e(e){var t=yL(e);return function(n,r,s,a){for(var i="",l=0;l<t;l++)i+=e[l](n,r,s,a)||"";return i}}function F4e(e){return function(t){t.root||(t=t.return)&&e(t)}}function U4e(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var G4e=function(e,t,n){for(var r=0,s=0;r=s,s=Xl(),r===38&&s===12&&(t[n]=1),!D1(s);)Oi();return gx(e,ai)},z4e=function(e,t){var n=-1,r=44;do switch(D1(r)){case 0:r===38&&Xl()===12&&(t[n]=1),e[n]+=G4e(ai-1,t,n);break;case 2:e[n]+=UC(r);break;case 4:if(r===44){e[++n]=Xl()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Q2(r)}while(r=Oi());return e},H4e=function(e,t){return jee(z4e(_ee(e),t))},sG=new WeakMap,q4e=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!sG.get(n))&&!r){sG.set(e,!0);for(var s=[],a=H4e(t,s),i=n.props,l=0,u=0;l<a.length;l++)for(var f=0;f<i.length;f++,u++)e.props[u]=s[l]?a[l].replace(/&\f/g,i[f]):i[f]+" "+a[l]}}},K4e=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function Eee(e,t){switch(R4e(e,t)){case 5103:return qn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qn+e+NS+e+sa+e+e;case 6828:case 4268:return qn+e+sa+e+e;case 6165:return qn+e+sa+"flex-"+e+e;case 5187:return qn+e+Kn(e,/(\w+).+(:[^]+)/,qn+"box-$1$2"+sa+"flex-$1$2")+e;case 5443:return qn+e+sa+"flex-item-"+Kn(e,/flex-|-self/,"")+e;case 4675:return qn+e+sa+"flex-line-pack"+Kn(e,/align-content|flex-|-self/,"")+e;case 5548:return qn+e+sa+Kn(e,"shrink","negative")+e;case 5292:return qn+e+sa+Kn(e,"basis","preferred-size")+e;case 6060:return qn+"box-"+Kn(e,"-grow","")+qn+e+sa+Kn(e,"grow","positive")+e;case 4554:return qn+Kn(e,/([^-])(transform)/g,"$1"+qn+"$2")+e;case 6187:return Kn(Kn(Kn(e,/(zoom-|grab)/,qn+"$1"),/(image-set)/,qn+"$1"),e,"")+e;case 5495:case 3959:return Kn(e,/(image-set\([^]*)/,qn+"$1$`$1");case 4968:return Kn(Kn(e,/(.+:)(flex-)?(.*)/,qn+"box-pack:$3"+sa+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qn+e+e;case 4095:case 3583:case 4068:case 2532:return Kn(e,/(.+)-inline(.+)/,qn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ml(e)-1-t>6)switch(Ls(e,t+1)){case 109:if(Ls(e,t+4)!==45)break;case 102:return Kn(e,/(.+:)(.+)-([^]+)/,"$1"+qn+"$2-$3$1"+NS+(Ls(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xk(e,"stretch")?Eee(Kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ls(e,t+1)!==115)break;case 6444:switch(Ls(e,Ml(e)-3-(~xk(e,"!important")&&10))){case 107:return Kn(e,":",":"+qn)+e;case 101:return Kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qn+(Ls(e,14)===45?"inline-":"")+"box$3$1"+qn+"$2$3$1"+sa+"$2box$3")+e}break;case 5936:switch(Ls(e,t+11)){case 114:return qn+e+sa+Kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qn+e+sa+Kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qn+e+sa+Kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return qn+e+sa+e+e}return e}var Y4e=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case vL:e.return=Eee(e.value,e.length);break;case wee:return $g([vy(e,{value:Kn(e.value,"@","@"+qn)})],r);case gL:if(e.length)return T4e(e.props,function(s){switch(O4e(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $g([vy(e,{props:[Kn(s,/:(read-\w+)/,":"+NS+"$1")]})],r);case"::placeholder":return $g([vy(e,{props:[Kn(s,/:(plac\w+)/,":"+qn+"input-$1")]}),vy(e,{props:[Kn(s,/:(plac\w+)/,":"+NS+"$1")]}),vy(e,{props:[Kn(s,/:(plac\w+)/,sa+"input-$1")]})],r)}return""})}},Z4e=[Y4e],X4e=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(C){var _=C.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var r=e.stylisPlugins||Z4e,s={},a,i=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(C){for(var _=C.getAttribute("data-emotion").split(" "),E=1;E<_.length;E++)s[_[E]]=!0;i.push(C)});var l,u=[q4e,K4e];{var f,h=[V4e,F4e(function(C){f.insert(C)})],g=B4e(u.concat(r,h)),v=function(C){return $g(P4e(C),g)};l=function(C,_,E,$){f=E,v(C?C+"{"+_.styles+"}":_.styles),$&&(w.inserted[_.name]=!0)}}var w={key:t,sheet:new S4e({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:l};return w.sheet.hydrate(i),w},aG={exports:{}},Jn={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var iG;function W4e(){if(iG)return Jn;iG=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,$=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function N(L){if(typeof L=="object"&&L!==null){var k=L.$$typeof;switch(k){case t:switch(L=L.type,L){case u:case f:case r:case a:case s:case g:return L;default:switch(L=L&&L.$$typeof,L){case l:case h:case C:case w:case i:return L;default:return k}}case n:return k}}}function M(L){return N(L)===f}return Jn.AsyncMode=u,Jn.ConcurrentMode=f,Jn.ContextConsumer=l,Jn.ContextProvider=i,Jn.Element=t,Jn.ForwardRef=h,Jn.Fragment=r,Jn.Lazy=C,Jn.Memo=w,Jn.Portal=n,Jn.Profiler=a,Jn.StrictMode=s,Jn.Suspense=g,Jn.isAsyncMode=function(L){return M(L)||N(L)===u},Jn.isConcurrentMode=M,Jn.isContextConsumer=function(L){return N(L)===l},Jn.isContextProvider=function(L){return N(L)===i},Jn.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===t},Jn.isForwardRef=function(L){return N(L)===h},Jn.isFragment=function(L){return N(L)===r},Jn.isLazy=function(L){return N(L)===C},Jn.isMemo=function(L){return N(L)===w},Jn.isPortal=function(L){return N(L)===n},Jn.isProfiler=function(L){return N(L)===a},Jn.isStrictMode=function(L){return N(L)===s},Jn.isSuspense=function(L){return N(L)===g},Jn.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===r||L===f||L===a||L===s||L===g||L===v||typeof L=="object"&&L!==null&&(L.$$typeof===C||L.$$typeof===w||L.$$typeof===i||L.$$typeof===l||L.$$typeof===h||L.$$typeof===E||L.$$typeof===$||L.$$typeof===O||L.$$typeof===_)},Jn.typeOf=N,Jn}var oG;function Q4e(){return oG||(oG=1,aG.exports=W4e()),aG.exports}var R4,lG;function J4e(){if(lG)return R4;lG=1;var e=Q4e(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=s;function i(C){return e.isMemo(C)?s:a[C.$$typeof]||t}var l=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,v=Object.prototype;function w(C,_,E){if(typeof _!="string"){if(v){var $=g(_);$&&$!==v&&w(C,$,E)}var O=u(_);f&&(O=O.concat(f(_)));for(var N=i(C),M=i(_),L=0;L<O.length;++L){var k=O[L];if(!n[k]&&!(E&&E[k])&&!(M&&M[k])&&!(N&&N[k])){var T=h(_,k);try{l(C,k,T)}catch{}}}}return C}return R4=w,R4}J4e();var eRe=!0;function tRe(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var $ee=function(e,t,n){var r=e.key+"-"+t.name;(n===!1||eRe===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},nRe=function(e,t,n){$ee(e,t,n);var r=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var s=t;do e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function rRe(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var sRe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},aRe=/[A-Z]|^ms/g,iRe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ree=function(e){return e.charCodeAt(1)===45},uG=function(e){return e!=null&&typeof e!="boolean"},O4=U4e(function(e){return Ree(e)?e:e.replace(aRe,"-$&").toLowerCase()}),cG=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(iRe,function(n,r,s){return Il={name:r,styles:s,next:Il},r})}return sRe[e]!==1&&!Ree(e)&&typeof t=="number"&&t!==0?t+"px":t};function V1(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Il={name:s.name,styles:s.styles,next:Il},s.name;var a=n;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)Il={name:i.name,styles:i.styles,next:Il},i=i.next;var l=a.styles+";";return l}return oRe(e,t,n)}case"function":{if(e!==void 0){var u=Il,f=n(e);return Il=u,V1(e,t,f)}break}}var h=n;return h}function oRe(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=V1(e,t,n[s])+";";else for(var a in n){var i=n[a];if(typeof i!="object"){var l=i;uG(l)&&(r+=O4(a)+":"+cG(a,l)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var u=0;u<i.length;u++)uG(i[u])&&(r+=O4(a)+":"+cG(a,i[u])+";");else{var f=V1(e,t,i);switch(a){case"animation":case"animationName":{r+=O4(a)+":"+f+";";break}default:r+=a+"{"+f+"}"}}}return r}var dG=/label:\s*([^\s;{]+)\s*(;|$)/g,Il;function Oee(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";Il=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,s+=V1(n,t,a);else{var i=a;s+=i[0]}for(var l=1;l<e.length;l++)if(s+=V1(n,t,e[l]),r){var u=a;s+=u[l]}dG.lastIndex=0;for(var f="",h;(h=dG.exec(s))!==null;)f+="-"+h[1];var g=rRe(s)+f;return{name:g,styles:s,next:Il}}var lRe=function(e){return e()},uRe=y.useInsertionEffect?y.useInsertionEffect:!1,cRe=uRe||lRe,Tee=y.createContext(typeof HTMLElement<"u"?X4e({key:"css"}):null);Tee.Provider;var dRe=function(e){return y.forwardRef(function(t,n){var r=y.useContext(Tee);return e(t,r,n)})},fRe=y.createContext({}),xL={}.hasOwnProperty,wk="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",hRe=function(e,t){var n={};for(var r in t)xL.call(t,r)&&(n[r]=t[r]);return n[wk]=e,n},pRe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return $ee(t,n,r),cRe(function(){return nRe(t,n,r)}),null},mRe=dRe(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var s=e[wk],a=[r],i="";typeof e.className=="string"?i=tRe(t.registered,a,e.className):e.className!=null&&(i=e.className+" ");var l=Oee(a,void 0,y.useContext(fRe));i+=t.key+"-"+l.name;var u={};for(var f in e)xL.call(e,f)&&f!=="css"&&f!==wk&&(u[f]=e[f]);return u.className=i,n&&(u.ref=n),y.createElement(y.Fragment,null,y.createElement(pRe,{cache:t,serialized:l,isStringTag:typeof s=="string"}),y.createElement(s,u))}),gRe=mRe,_t=function(e,t){var n=arguments;if(t==null||!xL.call(t,"css"))return y.createElement.apply(void 0,n);var r=n.length,s=new Array(r);s[0]=gRe,s[1]=hRe(e,t);for(var a=2;a<r;a++)s[a]=n[a];return y.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(_t||(_t={}));function bL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oee(t)}function vRe(){var e=bL.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function yRe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ck=y.useLayoutEffect,xRe=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],LS=function(){};function bRe(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function wRe(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];var a=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&a.push("".concat(bRe(e,i)));return a.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var fG=function(e){return TRe(e)?e.filter(Boolean):_h(e)==="object"&&e!==null?[e]:[]},Aee=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var t=sc(e,xRe);return kt({},t)},Gr=function(e,t,n){var r=e.cx,s=e.getStyles,a=e.getClassNames,i=e.className;return{css:s(t,e),className:r(n??{},a(t,e),i)}};function t_(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function CRe(e){return t_(e)?window.innerHeight:e.clientHeight}function kee(e){return t_(e)?window.pageYOffset:e.scrollTop}function MS(e,t){if(t_(e)){window.scrollTo(0,t);return}e.scrollTop=t}function SRe(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=e;s=s.parentElement;)if(t=getComputedStyle(s),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function _Re(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pC(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:LS,s=kee(e),a=t-s,i=10,l=0;function u(){l+=i;var f=_Re(l,s,a,n);MS(e,f),l<n?window.requestAnimationFrame(u):r(e)}u()}function hG(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=t.offsetHeight/3;r.bottom+s>n.bottom?MS(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+s,e.scrollHeight)):r.top-s<n.top&&MS(e,Math.max(t.offsetTop-s,0))}function jRe(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function pG(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function ERe(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Nee=!1,$Re={get passive(){return Nee=!0}},mC=typeof window<"u"?window:{};mC.addEventListener&&mC.removeEventListener&&(mC.addEventListener("p",LS,$Re),mC.removeEventListener("p",LS,!1));var RRe=Nee;function ORe(e){return e!=null}function TRe(e){return Array.isArray(e)}function gC(e,t,n){return e?t:n}var ARe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var s=Object.entries(e).filter(function(a){var i=Uu(a,1),l=i[0];return!n.includes(l)});return s.reduce(function(a,i){var l=Uu(i,2),u=l[0],f=l[1];return a[u]=f,a},{})},kRe=["children","innerProps"],NRe=["children","innerProps"];function LRe(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,s=e.placement,a=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,u=SRe(n),f={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return f;var h=u.getBoundingClientRect(),g=h.height,v=n.getBoundingClientRect(),w=v.bottom,C=v.height,_=v.top,E=n.offsetParent.getBoundingClientRect(),$=E.top,O=i?window.innerHeight:CRe(u),N=kee(u),M=parseInt(getComputedStyle(n).marginBottom,10),L=parseInt(getComputedStyle(n).marginTop,10),k=$-L,T=O-_,P=k+N,V=g-N-_,q=w-O+N+M,K=N+_-L,re=160;switch(s){case"auto":case"bottom":if(T>=C)return{placement:"bottom",maxHeight:t};if(V>=C&&!i)return a&&pC(u,q,re),{placement:"bottom",maxHeight:t};if(!i&&V>=r||i&&T>=r){a&&pC(u,q,re);var ee=i?T-M:V-M;return{placement:"bottom",maxHeight:ee}}if(s==="auto"||i){var ue=t,he=i?k:P;return he>=r&&(ue=Math.min(he-M-l,t)),{placement:"top",maxHeight:ue}}if(s==="bottom")return a&&MS(u,q),{placement:"bottom",maxHeight:t};break;case"top":if(k>=C)return{placement:"top",maxHeight:t};if(P>=C&&!i)return a&&pC(u,K,re),{placement:"top",maxHeight:t};if(!i&&P>=r||i&&k>=r){var X=t;return(!i&&P>=r||i&&k>=r)&&(X=i?k-L:P-L),a&&pC(u,K,re),{placement:"top",maxHeight:X}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return f}function MRe(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Lee=function(e){return e==="auto"?"bottom":e},IRe=function(e,t){var n,r=e.placement,s=e.theme,a=s.borderRadius,i=s.spacing,l=s.colors;return kt((n={label:"menu"},Ny(n,MRe(r),"100%"),Ny(n,"position","absolute"),Ny(n,"width","100%"),Ny(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Mee=y.createContext(null),PRe=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,a=e.menuPosition,i=e.menuShouldScrollIntoView,l=e.theme,u=y.useContext(Mee)||{},f=u.setPortalPlacement,h=y.useRef(null),g=y.useState(r),v=Uu(g,2),w=v[0],C=v[1],_=y.useState(null),E=Uu(_,2),$=E[0],O=E[1],N=l.spacing.controlHeight;return Ck(function(){var M=h.current;if(M){var L=a==="fixed",k=i&&!L,T=LRe({maxHeight:r,menuEl:M,minHeight:n,placement:s,shouldScroll:k,isFixedPosition:L,controlHeight:N});C(T.maxHeight),O(T.placement),f?.(T.placement)}},[r,s,a,i,n,f,N]),t({ref:h,placerProps:kt(kt({},e),{},{placement:$||Lee(s),maxHeight:w})})},DRe=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return _t("div",Ft({},Gr(e,"menu",{menu:!0}),{ref:n},r),t)},VRe=DRe,BRe=function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return kt({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},FRe=function(e){var t=e.children,n=e.innerProps,r=e.innerRef,s=e.isMulti;return _t("div",Ft({},Gr(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},n),t)},Iee=function(e,t){var n=e.theme,r=n.spacing.baseUnit,s=n.colors;return kt({textAlign:"center"},t?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},URe=Iee,GRe=Iee,zRe=function(e){var t=e.children,n=t===void 0?"No options":t,r=e.innerProps,s=sc(e,kRe);return _t("div",Ft({},Gr(kt(kt({},s),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},HRe=function(e){var t=e.children,n=t===void 0?"Loading...":t,r=e.innerProps,s=sc(e,NRe);return _t("div",Ft({},Gr(kt(kt({},s),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},qRe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},KRe=function(e){var t=e.appendTo,n=e.children,r=e.controlElement,s=e.innerProps,a=e.menuPlacement,i=e.menuPosition,l=y.useRef(null),u=y.useRef(null),f=y.useState(Lee(a)),h=Uu(f,2),g=h[0],v=h[1],w=y.useMemo(function(){return{setPortalPlacement:v}},[]),C=y.useState(null),_=Uu(C,2),E=_[0],$=_[1],O=y.useCallback(function(){if(r){var k=jRe(r),T=i==="fixed"?0:window.pageYOffset,P=k[g]+T;(P!==E?.offset||k.left!==E?.rect.left||k.width!==E?.rect.width)&&$({offset:P,rect:k})}},[r,i,g,E?.offset,E?.rect.left,E?.rect.width]);Ck(function(){O()},[O]);var N=y.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),r&&l.current&&(u.current=I9(r,l.current,O,{elementResize:"ResizeObserver"in window}))},[r,O]);Ck(function(){N()},[N]);var M=y.useCallback(function(k){l.current=k,N()},[N]);if(!t&&i!=="fixed"||!E)return null;var L=_t("div",Ft({ref:M},Gr(kt(kt({},e),{},{offset:E.offset,position:i,rect:E.rect}),"menuPortal",{"menu-portal":!0}),s),n);return _t(Mee.Provider,{value:w},t?av.createPortal(L,t):L)},YRe=function(e){var t=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},ZRe=function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,s=e.isRtl;return _t("div",Ft({},Gr(e,"container",{"--is-disabled":r,"--is-rtl":s}),n),t)},XRe=function(e,t){var n=e.theme.spacing,r=e.isMulti,s=e.hasValue,a=e.selectProps.controlShouldRenderValue;return kt({alignItems:"center",display:r&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},WRe=function(e){var t=e.children,n=e.innerProps,r=e.isMulti,s=e.hasValue;return _t("div",Ft({},Gr(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),n),t)},QRe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},JRe=function(e){var t=e.children,n=e.innerProps;return _t("div",Ft({},Gr(e,"indicatorsContainer",{indicators:!0}),n),t)},mG,e6e=["size"],t6e=["innerProps","isRtl","size"],n6e={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Pee=function(e){var t=e.size,n=sc(e,e6e);return _t("svg",Ft({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:n6e},n))},wL=function(e){return _t(Pee,Ft({size:20},e),_t("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Dee=function(e){return _t(Pee,Ft({size:20},e),_t("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Vee=function(e,t){var n=e.isFocused,r=e.theme,s=r.spacing.baseUnit,a=r.colors;return kt({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:s*2,":hover":{color:n?a.neutral80:a.neutral40}})},r6e=Vee,s6e=function(e){var t=e.children,n=e.innerProps;return _t("div",Ft({},Gr(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||_t(Dee,null))},a6e=Vee,i6e=function(e){var t=e.children,n=e.innerProps;return _t("div",Ft({},Gr(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||_t(wL,null))},o6e=function(e,t){var n=e.isDisabled,r=e.theme,s=r.spacing.baseUnit,a=r.colors;return kt({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},l6e=function(e){var t=e.innerProps;return _t("span",Ft({},t,Gr(e,"indicatorSeparator",{"indicator-separator":!0})))},u6e=vRe(mG||(mG=yRe([`
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
`]))),c6e=function(e,t){var n=e.isFocused,r=e.size,s=e.theme,a=s.colors,i=s.spacing.baseUnit;return kt({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:i*2})},T4=function(e){var t=e.delay,n=e.offset;return _t("span",{css:bL({animation:"".concat(u6e," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},d6e=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,s=r===void 0?4:r,a=sc(e,t6e);return _t("div",Ft({},Gr(kt(kt({},a),{},{innerProps:t,isRtl:n,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),_t(T4,{delay:0,offset:n}),_t(T4,{delay:160,offset:!0}),_t(T4,{delay:320,offset:!n}))},f6e=function(e,t){var n=e.isDisabled,r=e.isFocused,s=e.theme,a=s.colors,i=s.borderRadius,l=s.spacing;return kt({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},h6e=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,s=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return _t("div",Ft({ref:s},Gr(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),a,{"aria-disabled":n||void 0}),t)},p6e=h6e,m6e=["data"],g6e=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},v6e=function(e){var t=e.children,n=e.cx,r=e.getStyles,s=e.getClassNames,a=e.Heading,i=e.headingProps,l=e.innerProps,u=e.label,f=e.theme,h=e.selectProps;return _t("div",Ft({},Gr(e,"group",{group:!0}),l),_t(a,Ft({},i,{selectProps:h,theme:f,getStyles:r,getClassNames:s,cx:n}),u),_t("div",null,t))},y6e=function(e,t){var n=e.theme,r=n.colors,s=n.spacing;return kt({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},x6e=function(e){var t=Aee(e);t.data;var n=sc(t,m6e);return _t("div",Ft({},Gr(e,"groupHeading",{"group-heading":!0}),n))},b6e=v6e,w6e=["innerRef","isDisabled","isHidden","inputClassName"],C6e=function(e,t){var n=e.isDisabled,r=e.value,s=e.theme,a=s.spacing,i=s.colors;return kt(kt({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},S6e),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Bee={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},S6e={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":kt({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Bee)},_6e=function(e){return kt({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Bee)},j6e=function(e){var t=e.cx,n=e.value,r=Aee(e),s=r.innerRef,a=r.isDisabled,i=r.isHidden,l=r.inputClassName,u=sc(r,w6e);return _t("div",Ft({},Gr(e,"input",{"input-container":!0}),{"data-value":n||""}),_t("input",Ft({className:t({input:!0},l),ref:s,style:_6e(i),disabled:a},u)))},E6e=j6e,$6e=function(e,t){var n=e.theme,r=n.spacing,s=n.borderRadius,a=n.colors;return kt({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:r.baseUnit/2})},R6e=function(e,t){var n=e.theme,r=n.borderRadius,s=n.colors,a=e.cropWithEllipsis;return kt({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},O6e=function(e,t){var n=e.theme,r=n.spacing,s=n.borderRadius,a=n.colors,i=e.isFocused;return kt({alignItems:"center",display:"flex"},t?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Fee=function(e){var t=e.children,n=e.innerProps;return _t("div",n,t)},T6e=Fee,A6e=Fee;function k6e(e){var t=e.children,n=e.innerProps;return _t("div",Ft({role:"button"},n),t||_t(wL,{size:14}))}var N6e=function(e){var t=e.children,n=e.components,r=e.data,s=e.innerProps,a=e.isDisabled,i=e.removeProps,l=e.selectProps,u=n.Container,f=n.Label,h=n.Remove;return _t(u,{data:r,innerProps:kt(kt({},Gr(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:l},_t(f,{data:r,innerProps:kt({},Gr(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),_t(h,{data:r,innerProps:kt(kt({},Gr(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:l}))},L6e=N6e,M6e=function(e,t){var n=e.isDisabled,r=e.isFocused,s=e.isSelected,a=e.theme,i=a.spacing,l=a.colors;return kt({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:s?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:s?l.primary:l.primary50}})},I6e=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,s=e.isSelected,a=e.innerRef,i=e.innerProps;return _t("div",Ft({},Gr(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":s}),{ref:a,"aria-disabled":n},i),t)},P6e=I6e,D6e=function(e,t){var n=e.theme,r=n.spacing,s=n.colors;return kt({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:s.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},V6e=function(e){var t=e.children,n=e.innerProps;return _t("div",Ft({},Gr(e,"placeholder",{placeholder:!0}),n),t)},B6e=V6e,F6e=function(e,t){var n=e.isDisabled,r=e.theme,s=r.spacing,a=r.colors;return kt({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},U6e=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return _t("div",Ft({},Gr(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},G6e=U6e,Uee={ClearIndicator:i6e,Control:p6e,DropdownIndicator:s6e,DownChevron:Dee,CrossIcon:wL,Group:b6e,GroupHeading:x6e,IndicatorsContainer:JRe,IndicatorSeparator:l6e,Input:E6e,LoadingIndicator:d6e,Menu:VRe,MenuList:FRe,MenuPortal:KRe,LoadingMessage:HRe,NoOptionsMessage:zRe,MultiValue:L6e,MultiValueContainer:T6e,MultiValueLabel:A6e,MultiValueRemove:k6e,Option:P6e,Placeholder:B6e,SelectContainer:ZRe,SingleValue:G6e,ValueContainer:WRe},z6e=function(e){return kt(kt({},Uee),e.components)},gG=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function H6e(e,t){return!!(e===t||gG(e)&&gG(t))}function q6e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!H6e(e[n],t[n]))return!1;return!0}function K6e(e,t){t===void 0&&(t=q6e);var n=null;function r(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];if(n&&n.lastThis===this&&t(s,n.lastArgs))return n.lastResult;var i=e.apply(this,s);return n={lastResult:i,lastArgs:s,lastThis:this},i}return r.clear=function(){n=null},r}var Y6e={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Z6e=function(e){return _t("span",Ft({css:Y6e},e))},vG=Z6e,X6e={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,s=e.context,a=e.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=n===void 0?"":n,s=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,s=e.label,a=s===void 0?"":s,i=e.selectValue,l=e.isDisabled,u=e.isSelected,f=e.isAppleDevice,h=function(w,C){return w&&w.length?"".concat(w.indexOf(C)+1," of ").concat(w.length):""};if(t==="value"&&i)return"value ".concat(a," focused, ").concat(h(i,n),".");if(t==="menu"&&f){var g=l?" disabled":"",v="".concat(u?" selected":"").concat(g);return"".concat(a).concat(v,", ").concat(h(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},W6e=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,s=e.focusableOptions,a=e.isFocused,i=e.selectValue,l=e.selectProps,u=e.id,f=e.isAppleDevice,h=l.ariaLiveMessages,g=l.getOptionLabel,v=l.inputValue,w=l.isMulti,C=l.isOptionDisabled,_=l.isSearchable,E=l.menuIsOpen,$=l.options,O=l.screenReaderStatus,N=l.tabSelectsValue,M=l.isLoading,L=l["aria-label"],k=l["aria-live"],T=y.useMemo(function(){return kt(kt({},X6e),h||{})},[h]),P=y.useMemo(function(){var ue="";if(t&&T.onChange){var he=t.option,X=t.options,pe=t.removedValue,xe=t.removedValues,be=t.value,Y=function(Re){return Array.isArray(Re)?null:Re},se=pe||he||Y(be),Oe=se?g(se):"",de=X||xe||void 0,_e=de?de.map(g):[],Le=kt({isDisabled:se&&C(se,i),label:Oe,labels:_e},t);ue=T.onChange(Le)}return ue},[t,T,C,i,g]),V=y.useMemo(function(){var ue="",he=n||r,X=!!(n&&i&&i.includes(n));if(he&&T.onFocus){var pe={focused:he,label:g(he),isDisabled:C(he,i),isSelected:X,options:s,context:he===n?"menu":"value",selectValue:i,isAppleDevice:f};ue=T.onFocus(pe)}return ue},[n,r,g,C,T,s,i,f]),q=y.useMemo(function(){var ue="";if(E&&$.length&&!M&&T.onFilter){var he=O({count:s.length});ue=T.onFilter({inputValue:v,resultsMessage:he})}return ue},[s,v,E,T,$,O,M]),K=t?.action==="initial-input-focus",re=y.useMemo(function(){var ue="";if(T.guidance){var he=r?"value":E?"menu":"input";ue=T.guidance({"aria-label":L,context:he,isDisabled:n&&C(n,i),isMulti:w,isSearchable:_,tabSelectsValue:N,isInitialFocus:K})}return ue},[L,n,r,w,C,_,E,T,i,N,K]),ee=_t(y.Fragment,null,_t("span",{id:"aria-selection"},P),_t("span",{id:"aria-focused"},V),_t("span",{id:"aria-results"},q),_t("span",{id:"aria-guidance"},re));return _t(y.Fragment,null,_t(vG,{id:u},K&&ee),_t(vG,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!K&&ee))},Q6e=W6e,Sk=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],J6e=new RegExp("["+Sk.map(function(e){return e.letters}).join("")+"]","g"),Gee={};for(var A4=0;A4<Sk.length;A4++)for(var k4=Sk[A4],N4=0;N4<k4.letters.length;N4++)Gee[k4.letters[N4]]=k4.base;var zee=function(e){return e.replace(J6e,function(t){return Gee[t]})},eOe=K6e(zee),yG=function(e){return e.replace(/^\s+|\s+$/g,"")},tOe=function(e){return"".concat(e.label," ").concat(e.value)},nOe=function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=kt({ignoreCase:!0,ignoreAccents:!0,stringify:tOe,trim:!0,matchFrom:"any"},e),s=r.ignoreCase,a=r.ignoreAccents,i=r.stringify,l=r.trim,u=r.matchFrom,f=l?yG(n):n,h=l?yG(i(t)):i(t);return s&&(f=f.toLowerCase(),h=h.toLowerCase()),a&&(f=eOe(f),h=zee(h)),u==="start"?h.substr(0,f.length)===f:h.indexOf(f)>-1}},rOe=["innerRef"];function sOe(e){var t=e.innerRef,n=sc(e,rOe),r=ARe(n,"onExited","in","enter","exit","appear");return _t("input",Ft({ref:t},r,{css:bL({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var aOe=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function iOe(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,s=e.onTopArrive,a=e.onTopLeave,i=y.useRef(!1),l=y.useRef(!1),u=y.useRef(0),f=y.useRef(null),h=y.useCallback(function(E,$){if(f.current!==null){var O=f.current,N=O.scrollTop,M=O.scrollHeight,L=O.clientHeight,k=f.current,T=$>0,P=M-L-N,V=!1;P>$&&i.current&&(r&&r(E),i.current=!1),T&&l.current&&(a&&a(E),l.current=!1),T&&$>P?(n&&!i.current&&n(E),k.scrollTop=M,V=!0,i.current=!0):!T&&-$>N&&(s&&!l.current&&s(E),k.scrollTop=0,V=!0,l.current=!0),V&&aOe(E)}},[n,r,s,a]),g=y.useCallback(function(E){h(E,E.deltaY)},[h]),v=y.useCallback(function(E){u.current=E.changedTouches[0].clientY},[]),w=y.useCallback(function(E){var $=u.current-E.changedTouches[0].clientY;h(E,$)},[h]),C=y.useCallback(function(E){if(E){var $=RRe?{passive:!1}:!1;E.addEventListener("wheel",g,$),E.addEventListener("touchstart",v,$),E.addEventListener("touchmove",w,$)}},[w,v,g]),_=y.useCallback(function(E){E&&(E.removeEventListener("wheel",g,!1),E.removeEventListener("touchstart",v,!1),E.removeEventListener("touchmove",w,!1))},[w,v,g]);return y.useEffect(function(){if(t){var E=f.current;return C(E),function(){_(E)}}},[t,C,_]),function(E){f.current=E}}var xG=["boxSizing","height","overflow","paddingRight","position"],bG={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function wG(e){e.cancelable&&e.preventDefault()}function CG(e){e.stopPropagation()}function SG(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function _G(){return"ontouchstart"in window||navigator.maxTouchPoints}var jG=!!(typeof window<"u"&&window.document&&window.document.createElement),yy=0,Rm={capture:!1,passive:!1};function oOe(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,s=y.useRef({}),a=y.useRef(null),i=y.useCallback(function(u){if(jG){var f=document.body,h=f&&f.style;if(r&&xG.forEach(function(C){var _=h&&h[C];s.current[C]=_}),r&&yy<1){var g=parseInt(s.current.paddingRight,10)||0,v=document.body?document.body.clientWidth:0,w=window.innerWidth-v+g||0;Object.keys(bG).forEach(function(C){var _=bG[C];h&&(h[C]=_)}),h&&(h.paddingRight="".concat(w,"px"))}f&&_G()&&(f.addEventListener("touchmove",wG,Rm),u&&(u.addEventListener("touchstart",SG,Rm),u.addEventListener("touchmove",CG,Rm))),yy+=1}},[r]),l=y.useCallback(function(u){if(jG){var f=document.body,h=f&&f.style;yy=Math.max(yy-1,0),r&&yy<1&&xG.forEach(function(g){var v=s.current[g];h&&(h[g]=v)}),f&&_G()&&(f.removeEventListener("touchmove",wG,Rm),u&&(u.removeEventListener("touchstart",SG,Rm),u.removeEventListener("touchmove",CG,Rm)))}},[r]);return y.useEffect(function(){if(t){var u=a.current;return i(u),function(){l(u)}}},[t,i,l]),function(u){a.current=u}}var lOe=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},uOe={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function cOe(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,s=r===void 0?!0:r,a=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,u=e.onTopLeave,f=iOe({isEnabled:s,onBottomArrive:a,onBottomLeave:i,onTopArrive:l,onTopLeave:u}),h=oOe({isEnabled:n}),g=function(v){f(v),h(v)};return _t(y.Fragment,null,n&&_t("div",{onClick:lOe,css:uOe}),t(g))}var dOe={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},fOe=function(e){var t=e.name,n=e.onFocus;return _t("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:dOe,value:"",onChange:function(){}})},hOe=fOe;function CL(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function pOe(){return CL(/^iPhone/i)}function Hee(){return CL(/^Mac/i)}function mOe(){return CL(/^iPad/i)||Hee()&&navigator.maxTouchPoints>1}function gOe(){return pOe()||mOe()}function vOe(){return Hee()||gOe()}var yOe=function(e){return e.label},xOe=function(e){return e.label},bOe=function(e){return e.value},wOe=function(e){return!!e.isDisabled},COe={clearIndicator:a6e,container:YRe,control:f6e,dropdownIndicator:r6e,group:g6e,groupHeading:y6e,indicatorsContainer:QRe,indicatorSeparator:o6e,input:C6e,loadingIndicator:c6e,loadingMessage:GRe,menu:IRe,menuList:BRe,menuPortal:qRe,multiValue:$6e,multiValueLabel:R6e,multiValueRemove:O6e,noOptionsMessage:URe,option:M6e,placeholder:D6e,singleValue:F6e,valueContainer:XRe},SOe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},_Oe=4,qee=4,jOe=38,EOe=qee*2,$Oe={baseUnit:qee,controlHeight:jOe,menuGutter:EOe},L4={borderRadius:_Oe,colors:SOe,spacing:$Oe},ROe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:pG(),captureMenuScroll:!pG(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:nOe(),formatGroupLabel:yOe,getOptionLabel:xOe,getOptionValue:bOe,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:wOe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!ERe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function EG(e,t,n,r){var s=Zee(e,t,n),a=Xee(e,t,n),i=Yee(e,t),l=IS(e,t);return{type:"option",data:t,isDisabled:s,isSelected:a,label:i,value:l,index:r}}function zC(e,t){return e.options.map(function(n,r){if("options"in n){var s=n.options.map(function(i,l){return EG(e,i,t,l)}).filter(function(i){return RG(e,i)});return s.length>0?{type:"group",data:n,options:s,index:r}:void 0}var a=EG(e,n,t,r);return RG(e,a)?a:void 0}).filter(ORe)}function Kee(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,mL(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function $G(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,mL(r.options.map(function(s){return{data:s.data,id:"".concat(t,"-").concat(r.index,"-").concat(s.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function OOe(e,t){return Kee(zC(e,t))}function RG(e,t){var n=e.inputValue,r=n===void 0?"":n,s=t.data,a=t.isSelected,i=t.label,l=t.value;return(!Qee(e)||!a)&&Wee(e,{label:i,value:l,data:s},r)}function TOe(e,t){var n=e.focusedValue,r=e.selectValue,s=r.indexOf(n);if(s>-1){var a=t.indexOf(n);if(a>-1)return n;if(s<t.length)return t[s]}return null}function AOe(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var M4=function(e,t){var n,r=(n=e.find(function(s){return s.data===t}))===null||n===void 0?void 0:n.id;return r||null},Yee=function(e,t){return e.getOptionLabel(t)},IS=function(e,t){return e.getOptionValue(t)};function Zee(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Xee(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=IS(e,t);return n.some(function(s){return IS(e,s)===r})}function Wee(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Qee=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},kOe=1,Jee=(function(e){p4e(n,e);var t=v4e(n);function n(r){var s;if(f4e(this,n),s=t.call(this,r),s.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},s.blockOptionHover=!1,s.isComposing=!1,s.commonProps=void 0,s.initialTouchX=0,s.initialTouchY=0,s.openAfterFocus=!1,s.scrollToFocusedOptionOnUpdate=!1,s.userIsDragging=void 0,s.controlRef=null,s.getControlRef=function(u){s.controlRef=u},s.focusedOptionRef=null,s.getFocusedOptionRef=function(u){s.focusedOptionRef=u},s.menuListRef=null,s.getMenuListRef=function(u){s.menuListRef=u},s.inputRef=null,s.getInputRef=function(u){s.inputRef=u},s.focus=s.focusInput,s.blur=s.blurInput,s.onChange=function(u,f){var h=s.props,g=h.onChange,v=h.name;f.name=v,s.ariaOnChange(u,f),g(u,f)},s.setValue=function(u,f,h){var g=s.props,v=g.closeMenuOnSelect,w=g.isMulti,C=g.inputValue;s.onInputChange("",{action:"set-value",prevInputValue:C}),v&&(s.setState({inputIsHiddenAfterUpdate:!w}),s.onMenuClose()),s.setState({clearFocusValueOnUpdate:!0}),s.onChange(u,{action:f,option:h})},s.selectOption=function(u){var f=s.props,h=f.blurInputOnSelect,g=f.isMulti,v=f.name,w=s.state.selectValue,C=g&&s.isOptionSelected(u,w),_=s.isOptionDisabled(u,w);if(C){var E=s.getOptionValue(u);s.setValue(w.filter(function($){return s.getOptionValue($)!==E}),"deselect-option",u)}else if(!_)g?s.setValue([].concat(mL(w),[u]),"select-option",u):s.setValue(u,"select-option");else{s.ariaOnChange(u,{action:"select-option",option:u,name:v});return}h&&s.blurInput()},s.removeValue=function(u){var f=s.props.isMulti,h=s.state.selectValue,g=s.getOptionValue(u),v=h.filter(function(C){return s.getOptionValue(C)!==g}),w=gC(f,v,v[0]||null);s.onChange(w,{action:"remove-value",removedValue:u}),s.focusInput()},s.clearValue=function(){var u=s.state.selectValue;s.onChange(gC(s.props.isMulti,[],null),{action:"clear",removedValues:u})},s.popValue=function(){var u=s.props.isMulti,f=s.state.selectValue,h=f[f.length-1],g=f.slice(0,f.length-1),v=gC(u,g,g[0]||null);h&&s.onChange(v,{action:"pop-value",removedValue:h})},s.getFocusedOptionId=function(u){return M4(s.state.focusableOptionsWithIds,u)},s.getFocusableOptionsWithIds=function(){return $G(zC(s.props,s.state.selectValue),s.getElementId("option"))},s.getValue=function(){return s.state.selectValue},s.cx=function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];return wRe.apply(void 0,[s.props.classNamePrefix].concat(f))},s.getOptionLabel=function(u){return Yee(s.props,u)},s.getOptionValue=function(u){return IS(s.props,u)},s.getStyles=function(u,f){var h=s.props.unstyled,g=COe[u](f,h);g.boxSizing="border-box";var v=s.props.styles[u];return v?v(g,f):g},s.getClassNames=function(u,f){var h,g;return(h=(g=s.props.classNames)[u])===null||h===void 0?void 0:h.call(g,f)},s.getElementId=function(u){return"".concat(s.state.instancePrefix,"-").concat(u)},s.getComponents=function(){return z6e(s.props)},s.buildCategorizedOptions=function(){return zC(s.props,s.state.selectValue)},s.getCategorizedOptions=function(){return s.props.menuIsOpen?s.buildCategorizedOptions():[]},s.buildFocusableOptions=function(){return Kee(s.buildCategorizedOptions())},s.getFocusableOptions=function(){return s.props.menuIsOpen?s.buildFocusableOptions():[]},s.ariaOnChange=function(u,f){s.setState({ariaSelection:kt({value:u},f)})},s.onMenuMouseDown=function(u){u.button===0&&(u.stopPropagation(),u.preventDefault(),s.focusInput())},s.onMenuMouseMove=function(u){s.blockOptionHover=!1},s.onControlMouseDown=function(u){if(!u.defaultPrevented){var f=s.props.openMenuOnClick;s.state.isFocused?s.props.menuIsOpen?u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&s.onMenuClose():f&&s.openMenu("first"):(f&&(s.openAfterFocus=!0),s.focusInput()),u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&u.preventDefault()}},s.onDropdownIndicatorMouseDown=function(u){if(!(u&&u.type==="mousedown"&&u.button!==0)&&!s.props.isDisabled){var f=s.props,h=f.isMulti,g=f.menuIsOpen;s.focusInput(),g?(s.setState({inputIsHiddenAfterUpdate:!h}),s.onMenuClose()):s.openMenu("first"),u.preventDefault()}},s.onClearIndicatorMouseDown=function(u){u&&u.type==="mousedown"&&u.button!==0||(s.clearValue(),u.preventDefault(),s.openAfterFocus=!1,u.type==="touchend"?s.focusInput():setTimeout(function(){return s.focusInput()}))},s.onScroll=function(u){typeof s.props.closeMenuOnScroll=="boolean"?u.target instanceof HTMLElement&&t_(u.target)&&s.props.onMenuClose():typeof s.props.closeMenuOnScroll=="function"&&s.props.closeMenuOnScroll(u)&&s.props.onMenuClose()},s.onCompositionStart=function(){s.isComposing=!0},s.onCompositionEnd=function(){s.isComposing=!1},s.onTouchStart=function(u){var f=u.touches,h=f&&f.item(0);h&&(s.initialTouchX=h.clientX,s.initialTouchY=h.clientY,s.userIsDragging=!1)},s.onTouchMove=function(u){var f=u.touches,h=f&&f.item(0);if(h){var g=Math.abs(h.clientX-s.initialTouchX),v=Math.abs(h.clientY-s.initialTouchY),w=5;s.userIsDragging=g>w||v>w}},s.onTouchEnd=function(u){s.userIsDragging||(s.controlRef&&!s.controlRef.contains(u.target)&&s.menuListRef&&!s.menuListRef.contains(u.target)&&s.blurInput(),s.initialTouchX=0,s.initialTouchY=0)},s.onControlTouchEnd=function(u){s.userIsDragging||s.onControlMouseDown(u)},s.onClearIndicatorTouchEnd=function(u){s.userIsDragging||s.onClearIndicatorMouseDown(u)},s.onDropdownIndicatorTouchEnd=function(u){s.userIsDragging||s.onDropdownIndicatorMouseDown(u)},s.handleInputChange=function(u){var f=s.props.inputValue,h=u.currentTarget.value;s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange(h,{action:"input-change",prevInputValue:f}),s.props.menuIsOpen||s.onMenuOpen()},s.onInputFocus=function(u){s.props.onFocus&&s.props.onFocus(u),s.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(s.openAfterFocus||s.props.openMenuOnFocus)&&s.openMenu("first"),s.openAfterFocus=!1},s.onInputBlur=function(u){var f=s.props.inputValue;if(s.menuListRef&&s.menuListRef.contains(document.activeElement)){s.inputRef.focus();return}s.props.onBlur&&s.props.onBlur(u),s.onInputChange("",{action:"input-blur",prevInputValue:f}),s.onMenuClose(),s.setState({focusedValue:null,isFocused:!1})},s.onOptionHover=function(u){if(!(s.blockOptionHover||s.state.focusedOption===u)){var f=s.getFocusableOptions(),h=f.indexOf(u);s.setState({focusedOption:u,focusedOptionId:h>-1?s.getFocusedOptionId(u):null})}},s.shouldHideSelectedOptions=function(){return Qee(s.props)},s.onValueInputFocus=function(u){u.preventDefault(),u.stopPropagation(),s.focus()},s.onKeyDown=function(u){var f=s.props,h=f.isMulti,g=f.backspaceRemovesValue,v=f.escapeClearsValue,w=f.inputValue,C=f.isClearable,_=f.isDisabled,E=f.menuIsOpen,$=f.onKeyDown,O=f.tabSelectsValue,N=f.openMenuOnFocus,M=s.state,L=M.focusedOption,k=M.focusedValue,T=M.selectValue;if(!_&&!(typeof $=="function"&&($(u),u.defaultPrevented))){switch(s.blockOptionHover=!0,u.key){case"ArrowLeft":if(!h||w)return;s.focusValue("previous");break;case"ArrowRight":if(!h||w)return;s.focusValue("next");break;case"Delete":case"Backspace":if(w)return;if(k)s.removeValue(k);else{if(!g)return;h?s.popValue():C&&s.clearValue()}break;case"Tab":if(s.isComposing||u.shiftKey||!E||!O||!L||N&&s.isOptionSelected(L,T))return;s.selectOption(L);break;case"Enter":if(u.keyCode===229)break;if(E){if(!L||s.isComposing)return;s.selectOption(L);break}return;case"Escape":E?(s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange("",{action:"menu-close",prevInputValue:w}),s.onMenuClose()):C&&v&&s.clearValue();break;case" ":if(w)return;if(!E){s.openMenu("first");break}if(!L)return;s.selectOption(L);break;case"ArrowUp":E?s.focusOption("up"):s.openMenu("last");break;case"ArrowDown":E?s.focusOption("down"):s.openMenu("first");break;case"PageUp":if(!E)return;s.focusOption("pageup");break;case"PageDown":if(!E)return;s.focusOption("pagedown");break;case"Home":if(!E)return;s.focusOption("first");break;case"End":if(!E)return;s.focusOption("last");break;default:return}u.preventDefault()}},s.state.instancePrefix="react-select-"+(s.props.instanceId||++kOe),s.state.selectValue=fG(r.value),r.menuIsOpen&&s.state.selectValue.length){var a=s.getFocusableOptionsWithIds(),i=s.buildFocusableOptions(),l=i.indexOf(s.state.selectValue[0]);s.state.focusableOptionsWithIds=a,s.state.focusedOption=i[l],s.state.focusedOptionId=M4(a,i[l])}return s}return h4e(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&hG(this.menuListRef,this.focusedOptionRef),vOe()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(r){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,l=this.state.isFocused;(l&&!a&&r.isDisabled||l&&i&&!r.menuIsOpen)&&this.focusInput(),l&&a&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(hG(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,s){this.props.onInputChange(r,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var s=this,a=this.state,i=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),f=r==="first"?0:u.length-1;if(!this.props.isMulti){var h=u.indexOf(i[0]);h>-1&&(f=h)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[f],focusedOptionId:this.getFocusedOptionId(u[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(r){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(i);i||(l=-1);var u=a.length-1,f=-1;if(a.length){switch(r){case"previous":l===0?f=0:l===-1?f=u:f=l-1;break;case"next":l>-1&&l<u&&(f=l+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var l=0,u=i.indexOf(a);a||(u=-1),r==="up"?l=u>0?u-1:i.length-1:r==="down"?l=(u+1)%i.length:r==="pageup"?(l=u-s,l<0&&(l=0)):r==="pagedown"?(l=u+s,l>i.length-1&&(l=i.length-1)):r==="last"&&(l=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[l])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(L4):kt(kt({},L4),this.props.theme):L4})},{key:"getCommonProps",value:function(){var r=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,l=this.getValue,u=this.selectOption,f=this.setValue,h=this.props,g=h.isMulti,v=h.isRtl,w=h.options,C=this.hasValue();return{clearValue:r,cx:s,getStyles:a,getClassNames:i,getValue:l,hasValue:C,isMulti:g,isRtl:v,options:w,selectOption:u,selectProps:h,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,s=r.isClearable,a=r.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(r,s){return Zee(this.props,r,s)}},{key:"isOptionSelected",value:function(r,s){return Xee(this.props,r,s)}},{key:"filterOption",value:function(r,s){return Wee(this.props,r,s)}},{key:"formatOptionLabel",value:function(r,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(r,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:(function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))})},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:(function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))})},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:(function(){var r=this.props,s=r.isDisabled,a=r.isSearchable,i=r.inputId,l=r.inputValue,u=r.tabIndex,f=r.form,h=r.menuIsOpen,g=r.required,v=this.getComponents(),w=v.Input,C=this.state,_=C.inputIsHidden,E=C.ariaSelection,$=this.commonProps,O=i||this.getElementId("input"),N=kt(kt(kt({"aria-autocomplete":"list","aria-expanded":h,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},h&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?E?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?y.createElement(w,Ft({},$,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:O,innerRef:this.getInputRef,isDisabled:s,isHidden:_,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:f,type:"text",value:l},N)):y.createElement(sOe,Ft({id:O,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:LS,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:f,value:""},N))})},{key:"renderPlaceholderOrValue",value:function(){var r=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,l=s.MultiValueLabel,u=s.MultiValueRemove,f=s.SingleValue,h=s.Placeholder,g=this.commonProps,v=this.props,w=v.controlShouldRenderValue,C=v.isDisabled,_=v.isMulti,E=v.inputValue,$=v.placeholder,O=this.state,N=O.selectValue,M=O.focusedValue,L=O.isFocused;if(!this.hasValue()||!w)return E?null:y.createElement(h,Ft({},g,{key:"placeholder",isDisabled:C,isFocused:L,innerProps:{id:this.getElementId("placeholder")}}),$);if(_)return N.map(function(T,P){var V=T===M,q="".concat(r.getOptionLabel(T),"-").concat(r.getOptionValue(T));return y.createElement(a,Ft({},g,{components:{Container:i,Label:l,Remove:u},isFocused:V,isDisabled:C,key:q,index:P,removeProps:{onClick:function(){return r.removeValue(T)},onTouchEnd:function(){return r.removeValue(T)},onMouseDown:function(K){K.preventDefault()}},data:T}),r.formatOptionLabel(T,"value"))});if(E)return null;var k=N[0];return y.createElement(f,Ft({},g,{data:k,isDisabled:C}),this.formatOptionLabel(k,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),s=r.ClearIndicator,a=this.commonProps,i=this.props,l=i.isDisabled,u=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||u)return null;var h={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(s,Ft({},a,{innerProps:h,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),s=r.LoadingIndicator,a=this.commonProps,i=this.props,l=i.isDisabled,u=i.isLoading,f=this.state.isFocused;if(!s||!u)return null;var h={"aria-hidden":"true"};return y.createElement(s,Ft({},a,{innerProps:h,isDisabled:l,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator,a=r.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return y.createElement(a,Ft({},i,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(s,Ft({},a,{innerProps:u,isDisabled:i,isFocused:l}))}},{key:"renderMenu",value:function(){var r=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,l=s.Menu,u=s.MenuList,f=s.MenuPortal,h=s.LoadingMessage,g=s.NoOptionsMessage,v=s.Option,w=this.commonProps,C=this.state.focusedOption,_=this.props,E=_.captureMenuScroll,$=_.inputValue,O=_.isLoading,N=_.loadingMessage,M=_.minMenuHeight,L=_.maxMenuHeight,k=_.menuIsOpen,T=_.menuPlacement,P=_.menuPosition,V=_.menuPortalTarget,q=_.menuShouldBlockScroll,K=_.menuShouldScrollIntoView,re=_.noOptionsMessage,ee=_.onMenuScrollToTop,ue=_.onMenuScrollToBottom;if(!k)return null;var he=function(se,Oe){var de=se.type,_e=se.data,Le=se.isDisabled,Re=se.isSelected,Ye=se.label,Xe=se.value,Je=C===_e,Ot=Le?void 0:function(){return r.onOptionHover(_e)},tn=Le?void 0:function(){return r.selectOption(_e)},an="".concat(r.getElementId("option"),"-").concat(Oe),Pt={id:an,onClick:tn,onMouseMove:Ot,onMouseOver:Ot,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:Re};return y.createElement(v,Ft({},w,{innerProps:Pt,data:_e,isDisabled:Le,isSelected:Re,key:an,label:Ye,type:de,value:Xe,isFocused:Je,innerRef:Je?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(se.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(se){if(se.type==="group"){var Oe=se.data,de=se.options,_e=se.index,Le="".concat(r.getElementId("group"),"-").concat(_e),Re="".concat(Le,"-heading");return y.createElement(a,Ft({},w,{key:Le,data:Oe,options:de,Heading:i,headingProps:{id:Re,data:se.data},label:r.formatGroupLabel(se.data)}),se.options.map(function(Ye){return he(Ye,"".concat(_e,"-").concat(Ye.index))}))}else if(se.type==="option")return he(se,"".concat(se.index))});else if(O){var pe=N({inputValue:$});if(pe===null)return null;X=y.createElement(h,w,pe)}else{var xe=re({inputValue:$});if(xe===null)return null;X=y.createElement(g,w,xe)}var be={minMenuHeight:M,maxMenuHeight:L,menuPlacement:T,menuPosition:P,menuShouldScrollIntoView:K},Y=y.createElement(PRe,Ft({},w,be),function(se){var Oe=se.ref,de=se.placerProps,_e=de.placement,Le=de.maxHeight;return y.createElement(l,Ft({},w,be,{innerRef:Oe,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:O,placement:_e}),y.createElement(cOe,{captureEnabled:E,onTopArrive:ee,onBottomArrive:ue,lockEnabled:q},function(Re){return y.createElement(u,Ft({},w,{innerRef:function(Ye){r.getMenuListRef(Ye),Re(Ye)},innerProps:{role:"listbox","aria-multiselectable":w.isMulti,id:r.getElementId("listbox")},isLoading:O,maxHeight:Le,focusedOption:C}),X)}))});return V||P==="fixed"?y.createElement(f,Ft({},w,{appendTo:V,controlElement:this.controlRef,menuPlacement:T,menuPosition:P}),Y):Y}},{key:"renderFormField",value:function(){var r=this,s=this.props,a=s.delimiter,i=s.isDisabled,l=s.isMulti,u=s.name,f=s.required,h=this.state.selectValue;if(f&&!this.hasValue()&&!i)return y.createElement(hOe,{name:u,onFocus:this.onValueInputFocus});if(!(!u||i))if(l)if(a){var g=h.map(function(C){return r.getOptionValue(C)}).join(a);return y.createElement("input",{name:u,type:"hidden",value:g})}else{var v=h.length>0?h.map(function(C,_){return y.createElement("input",{key:"i-".concat(_),name:u,type:"hidden",value:r.getOptionValue(C)})}):y.createElement("input",{name:u,type:"hidden",value:""});return y.createElement("div",null,v)}else{var w=h[0]?this.getOptionValue(h[0]):"";return y.createElement("input",{name:u,type:"hidden",value:w})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,l=s.focusedValue,u=s.isFocused,f=s.selectValue,h=this.getFocusableOptions();return y.createElement(Q6e,Ft({},r,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:l,isFocused:u,selectValue:f,focusableOptions:h,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),s=r.Control,a=r.IndicatorsContainer,i=r.SelectContainer,l=r.ValueContainer,u=this.props,f=u.className,h=u.id,g=u.isDisabled,v=u.menuIsOpen,w=this.state.isFocused,C=this.commonProps=this.getCommonProps();return y.createElement(i,Ft({},C,{className:f,innerProps:{id:h,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:w}),this.renderLiveRegion(),y.createElement(s,Ft({},C,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:w,menuIsOpen:v}),y.createElement(l,Ft({},C,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),y.createElement(a,Ft({},C,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,f=s.isFocused,h=s.prevWasFocused,g=s.instancePrefix,v=r.options,w=r.value,C=r.menuIsOpen,_=r.inputValue,E=r.isMulti,$=fG(w),O={};if(a&&(w!==a.value||v!==a.options||C!==a.menuIsOpen||_!==a.inputValue)){var N=C?OOe(r,$):[],M=C?$G(zC(r,$),"".concat(g,"-option")):[],L=i?TOe(s,$):null,k=AOe(s,N),T=M4(M,k);O={selectValue:$,focusedOption:k,focusedOptionId:T,focusableOptionsWithIds:M,focusedValue:L,clearFocusValueOnUpdate:!1}}var P=l!=null&&r!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},V=u,q=f&&h;return f&&!q&&(V={value:gC(E,$,$[0]||null),options:$,action:"initial-input-focus"},q=!h),u?.action==="initial-input-focus"&&(V=null),kt(kt(kt({},O),P),{},{prevProps:r,ariaSelection:V,prevWasFocused:q})}}]),n})(y.Component);Jee.defaultProps=ROe;var NOe=y.forwardRef(function(e,t){var n=d4e(e);return y.createElement(Jee,Ft({ref:t},n))}),LOe=NOe;const Ly=(e,t)=>typeof e=="function"?e(t):t[e],MOe=(e,t)=>{const n={},r=new Set;return e.forEach(s=>{const a=Ly(t,s);n[a]=s,r.add(a)}),{ids:Array.from(r),entities:n}},IOe=({labelProperty:e,valueProperty:t,onChange:n,inputClassName:r,valueContainerClassName:s,openButtonClassName:a,clearButtonClassName:i,dropdownClassName:l,classNames:u,value:f,options:h})=>{const g=$=>Ly(e,$),v=$=>Ly(t,$),w=$=>{let O;Array.isArray($)?O=$.map(N=>Ly(t,N)):O=Ly(t,$),n?.(O,$)},C={...u,input:$=>{var O;return We(r,(O=u?.input)==null?void 0:O.call(u,$))},valueContainer:$=>{var O;return We(s,(O=u?.valueContainer)==null?void 0:O.call(u,$))},dropdownIndicator:$=>{var O;return We(a,(O=u?.dropdownIndicator)==null?void 0:O.call(u,$))},clearIndicator:$=>{var O;return We(i,(O=u?.clearIndicator)==null?void 0:O.call(u,$))},menu:$=>{var O;return We(l,(O=u?.menu)==null?void 0:O.call(u,$))}},_=MOe(h,t),E=f===void 0?f:Array.isArray(f)?f.map($=>_.entities[$]).filter($=>$!==void 0):_.entities[f];return{getOptionLabel:g,getOptionValue:v,onChange:w,classNames:C,value:E}},POe=e=>({container:(t,n)=>{var r;return{...t,minHeight:32,borderRadius:"var(--radius-xs)",...(r=e?.container)==null?void 0:r.call(e,t,n)}},valueContainer:(t,n)=>{var r;return{...t,padding:"0px 16px 0 8px",...(r=e?.valueContainer)==null?void 0:r.call(e,t,n)}},control:(t,n)=>{var r;return{...t,minHeight:32,boxShadow:"none",border:"none",backgroundColor:"var(--color-panel)",...(r=e?.control)==null?void 0:r.call(e,t,n)}},dropdownIndicator:(t,n)=>{var r;const s=(r=e?.dropdownIndicator)==null?void 0:r.call(e,t,n);return{...t,padding:"6px",color:"var(--color-text)",...s,":hover":{cursor:"pointer",opacity:.8,...s?.[":hover"]}}},menu:(t,n)=>{var r;return{...t,backgroundColor:"var(--color-panel)",borderRadius:"var(--radius-xs)",marginTop:2,marginBottom:2,...(r=e?.menu)==null?void 0:r.call(e,t,n)}},option:(t,n)=>{var r;const s=(r=e?.option)==null?void 0:r.call(e,t,n);return{...t,backgroundColor:n.isFocused?"var(--color-secondary-light)":"initial",...s,":hover":{backgroundColor:"var(--color-secondary-light)",cursor:"pointer",...s?.[":hover"]},":focus":{backgroundColor:"var(--color-primary)"}}},singleValue:(t,n)=>{var r;return{...t,color:"var(--color-text)",...(r=e?.singleValue)==null?void 0:r.call(e,t,n)}},indicatorSeparator:(t,n)=>{var r;return{...t,display:"none",...(r=e?.indicatorSeparator)==null?void 0:r.call(e,t,n)}},multiValue:(t,n)=>{var r;return{...t,backgroundColor:"var(--color-secondary-light)",...(r=e?.multiValue)==null?void 0:r.call(e,t,n)}},multiValueLabel:(t,n)=>{var r;return{...t,color:"var(--color-text)",fontSize:"var(--text-sm)",...(r=e?.multiValueLabel)==null?void 0:r.call(e,t,n)}},multiValueRemove:(t,n)=>{var r;const s=(r=e?.multiValueRemove)==null?void 0:r.call(e,t,n);return{...t,...s,":hover":{backgroundColor:"var(--color-secondary-saturation)",cursor:"pointer",...s?.[":hover"]}}},clearIndicator:(t,n)=>{var r;const s=(r=e?.clearIndicator)==null?void 0:r.call(e,t,n);return{...t,padding:"6px",color:"var(--color-text)",...s,":hover":{cursor:"pointer",opacity:.8,...s?.[":hover"]}}},input:(t,n)=>{var r;return{...t,color:"var(--color-text)",...(r=e?.input)==null?void 0:r.call(e,t,n)}},menuPortal:(t,n)=>{var r;return{...t,...(r=e?.menuPortal)==null?void 0:r.call(e,t,n)}}}),DOe=e=>{const[t,n]=y.useState(!!e.isOpen),r=!e.multiple,s=()=>{var i;n(!0),(i=e.onMenuOpen)==null||i.call(e)},a=()=>{var i;n(!1),(i=e.onMenuClose)==null||i.call(e)};return y.useEffect(()=>{n(!!e.isOpen)},[e.isOpen]),{menuIsOpen:t,closeMenuOnSelect:r,onMenuOpen:s,onMenuClose:a}},cv=e=>{const{label:t,required:n,hint:r,isOpen:s,multiple:a,clearable:i,styles:l,components:u,placeholder:f="Выберите...",dataTestId:h,...g}=e,{getOptionLabel:v,getOptionValue:w,onChange:C,value:_,classNames:E}=IOe(e),$=POe(l),O=y.useId(),N=DOe(e),M=y.useMemo(()=>({LoadingIndicator:()=>d.jsx(ho,{className:"m-1.5",size:"small"}),Input:L=>d.jsx(Uee.Input,{autoComplete:"none","data-testid":h,...L}),...u}),[u]);return d.jsxs("div",{children:[t&&d.jsx(lL,{required:n,htmlFor:O,hint:r,children:t}),d.jsx(LOe,{...g,inputId:O,getOptionLabel:v,getOptionValue:w,isMulti:a,isClearable:i,classNames:E,value:_,onChange:C,components:M,styles:$,placeholder:f,noOptionsMessage:VOe,className:We("text-text min-h-8 text-sm bg-panel!"),...N})]})},VOe=()=>"Нет доступных опций",BOe=({value:e,autoExpand:t=!0,maxRows:n=3,rows:r=1})=>{const s=y.useRef(null),a=y.useRef(null),[i,l]=y.useState("auto"),u=()=>{const h=s.current,g=a.current;if(!h||!g)return;const v=window.getComputedStyle(h);FOe.forEach(w=>{const C=v[w];C!==void 0&&typeof C=="string"&&(g.style[w]=C)})},f=()=>{if(!t)return;const h=s.current,g=a.current;if(!h||!g)return;u();const v=e&&e.endsWith(`
`)?e+" ":e;g.textContent=v||" ";const w=window.getComputedStyle(h),C=parseInt(w.paddingTop,10),_=parseInt(w.paddingBottom,10),E=parseInt(w.borderTop,10),$=parseInt(w.borderBottom,10),O=parseInt(w.lineHeight,10),N=_+C+E+$,M=O*n+N,L=O*r+N,k=Math.min(Math.max(g.offsetHeight,L),M);l(`${k}px`)};return y.useEffect(()=>{f()},[e,t]),{textareaRef:s,shadowRef:a,height:i,updateHeight:f}},FOe=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordBreak","overflowWrap","whiteSpace","boxSizing","paddingTop","paddingRight","paddingBottom","paddingLeft","borderWidth","borderStyle","borderColor","boxShadow","width","wordSpacing","lineHeight"],ete=y.forwardRef(({label:e,wrapperClassName:t,inputClassName:n,hint:r,rows:s=3,maxRows:a,autoExpand:i,value:l,...u},f)=>{const h=y.useId(),{textareaRef:g,shadowRef:v,height:w}=BOe({value:l,autoExpand:i,maxRows:a,rows:s}),C=_=>{g.current=_,typeof f=="function"?f(_):f&&(f.current=_)};return d.jsxs("div",{className:We(t,"flex flex-col"),children:[e&&d.jsx(lL,{htmlFor:h,hint:r,children:e}),d.jsx(Lg.textarea,{ref:C,className:We(n,"text-sm font-medium text-text","bg-bg","placeholder:text-placeholder","py-1.5 px-4","rounded","inset-shadow","outline-0","h-max","resize-none","border border-secondary-light rounded-xs"),id:h,placeholder:"Введите...",rows:s,value:l,style:i?{height:w}:void 0,animate:{height:w},transition:{type:"tween",duration:.2},...u}),d.jsx("div",{ref:v,className:"fixed -z-10 invisible whitespace-pre-wrap break-words outline-0 pointer-events-none left-[-9999px] top-0"})]})}),UOe="modulepreload",GOe=function(e){return"/__root_path__/"+e},OG={},zOe=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let i=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");s=i(n.map(f=>{if(f=GOe(f),f in OG)return;OG[f]=!0;const h=f.endsWith(".css"),g=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":UOe,h||(v.as="script"),v.crossOrigin="",v.href=f,u&&v.setAttribute("nonce",u),document.head.appendChild(v),h)return new Promise((w,C)=>{v.addEventListener("load",w),v.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return s.then(i=>{for(const l of i||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})},tte=({nodes:e,meta:t,keyNode:n,path:r="",activePath:s,onClick:a,onDoubleClick:i,renderNode:l,onChange:u,className:f,isExpanded:h,...g})=>{const[v,w]=y.useState(),C=!!(e!=null&&e.size),_=s===r,[E,$]=y.useState(!1),[O,N]=y.useState(!1),M=y.useRef(null);y.useEffect(()=>{u&&h!==void 0&&w(h)},[h]);const L=()=>{w(q=>{const K=!q;return u?.(n,K,e),K})},k=(q,K)=>re=>{if(!i){L(),a?.(q,re,K);return}M.current&&(window.clearTimeout(M.current),M.current=null),M.current=window.setTimeout(()=>{L(),a?.(q,re,K)},200)},T=(q,K)=>re=>{M.current!==null&&(clearTimeout(M.current),M.current=null),L(),i?.(q,re,K)},P=()=>E?d.jsx(ho,{size:"small",className:"[&]:w-3.5 [&]:h-3.5"}):C?d.jsx(ec,{width:14,height:14,className:We("absolute left-0.5 ease-in",{"-rotate-90":!v,"rotate-0":v})}):null;y.useEffect(()=>{v===void 0&&s.includes(r)&&w(!0)},[s]);const V=(q,K,re)=>{if(!e||!u)return;const ee=e.get(q);e.set(q,{...ee,isExpanded:K,children:re??ee.children}),u(n,v??!1,e)};return d.jsxs("li",{children:[d.jsxs("div",{title:n,className:We("w-full","flex justify-start items-center","relative","cursor-pointer p-1 pr-3","rounded ease-in hover:bg-secondary hover:brightness-120 active:brightness-90",{"bg-secondary":_,"pl-5":C,"pl-3":!C},f),onClick:k(r,{setLoading:$,meta:t}),onDoubleClick:T(r,{setLoading:$,meta:t}),role:"button",onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),...g,children:[P(),l?l({keyNode:n,hasChild:C,path:r,isSelected:_,isUnderHover:O,meta:t,onClick:k(r,{setLoading:$,meta:t})}):d.jsx(W,{className:We("block w-full","text-ellipsis whitespace-nowrap","overflow-hidden","text-start"),variant:"strong",children:n})]}),C&&v&&d.jsx("ul",{className:"pl-6",children:Array.from(e).map(([q],K)=>d.jsx(tte,{keyNode:q,nodes:e.get(q).children,meta:e.get(q).meta,isExpanded:e.get(q).isExpanded,path:`${r}/${q}`,activePath:s,onClick:a,onDoubleClick:i,renderNode:l,dataTestId:`${g.dataTestId}-${K}`,onChange:u?V:void 0},q))})]})},HOe=({nodes:e,onNodeClick:t,onNodeDoubleClick:n,path:r,className:s,nodeClassName:a,renderNode:i,onChange:l,...u})=>{const[f,h]=y.useState(r??""),g=(C,_,E)=>{r===void 0&&h(C),t?.(C,_,E)},v=(C,_,E)=>{r===void 0&&h(C),n?.(C,_,E)};y.useEffect(()=>{r!==void 0&&h(r)},[r]);const w=(C,_,E)=>{if(!l)return;const $=e.get(C);e.set(C,{...$,isExpanded:_,children:E??$.children}),l(e)};return d.jsx("ul",{className:We("text-text bg-bg w-full",s),...u,children:Array.from(e).map(([C],_)=>d.jsx(tte,{keyNode:C,nodes:e.get(C).children,meta:e.get(C).meta,isExpanded:e.get(C).isExpanded,path:C,activePath:f,onClick:g,onDoubleClick:v,renderNode:i,className:a,dataTestId:`node-${_}`,onChange:l?w:void 0},C))})},Gu=({children:e,className:t})=>d.jsx("div",{className:We("border-2 border-panel rounded-xs text-text",t),children:e});Gu.Header=({children:e,className:t})=>d.jsx("div",{className:We("px-4 py-2.5 border-b-2 border-b-panel min-h-[52px] flex items-center gap-2.5",t),children:e});Gu.Body=({children:e,className:t})=>d.jsx("div",{className:We("px-4 py-2.5 flex flex-col gap-2.5",t),children:e});Gu.Footer=({children:e,className:t})=>d.jsx("div",{className:We("px-4 py-2.5 border-t-2 border-t-panel min-h-[52px] flex items-center gap-2.5",t),children:e});const ne=({children:e,className:t,isOpen:n,onClose:r,overlayClassName:s,...a})=>{const i=y.useRef(!1),l=y.useRef(null),u=()=>{i.current=!1},f=()=>{i.current=!0},h=g=>{i.current||l.current&&!l.current.contains(g.target)&&r?.()};return y.useEffect(()=>{const g=v=>{v.key==="Escape"&&r?.()};return n&&window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[n,r]),d.jsx(uY,{children:n&&d.jsx(Lg.div,{...a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:We("fixed top-0 left-0 bottom-0 right-0 flex items-center","justify-center p-4 backdrop-blur-[10px] z-[100]",s),onClick:h,onMouseDown:u,onMouseMove:f,children:d.jsxs(Lg.div,{ref:l,initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},className:We("bg-panel w-[465px] max-h-4/6 flex flex-col shadow-md shadow-bg relative text-white rounded",t),children:[d.jsx(Fe,{className:"absolute top-2.5 right-4 !px-1 !h-8",onlyIcon:!0,variant:"ghost","data-testid":"close-button",onClick:r,children:d.jsx(V8,{width:20,height:20})}),e]})})})};ne.Header=({children:e,className:t,...n})=>d.jsx("div",{...n,className:We("py-2.5 pl-4 pr-[57px] border-b-2 border-b-secondary-saturation min-h-[52px] flex items-center",t),children:e});ne.Body=({children:e,className:t,...n})=>d.jsx("div",{...n,className:We("flex flex-col overflow-y-auto px-4 py-2.5 gap-2.5",t),children:e});ne.Footer=({children:e,className:t,...n})=>d.jsx("div",{...n,className:We("py-2.5 px-4 border-t-2 border-t-secondary-saturation min-h-[52px] flex items-center gap-2.5 justify-end",t),children:e});var vx=e=>typeof e=="number"&&!isNaN(e),jh=e=>typeof e=="string",Qu=e=>typeof e=="function",qOe=e=>jh(e)||vx(e),_k=e=>jh(e)||Qu(e)?e:null,KOe=(e,t)=>e===!1||vx(e)&&e>0?e:t,jk=e=>y.isValidElement(e)||jh(e)||Qu(e)||vx(e);function YOe(e,t,n=300){let{scrollHeight:r,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=r+"px",s.transition=`all ${n}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)})})}function nte({enter:e,exit:t,appendPosition:n=!1,collapse:r=!0,collapseDuration:s=300}){return function({children:a,position:i,preventExitTransition:l,done:u,nodeRef:f,isIn:h,playToast:g}){let v=n?`${e}--${i}`:e,w=n?`${t}--${i}`:t,C=y.useRef(0);return y.useLayoutEffect(()=>{let _=f.current,E=v.split(" "),$=O=>{O.target===f.current&&(g(),_.removeEventListener("animationend",$),_.removeEventListener("animationcancel",$),C.current===0&&O.type!=="animationcancel"&&_.classList.remove(...E))};_.classList.add(...E),_.addEventListener("animationend",$),_.addEventListener("animationcancel",$)},[]),y.useEffect(()=>{let _=f.current,E=()=>{_.removeEventListener("animationend",E),r?YOe(_,u,s):u()};h||(l?E():(C.current=1,_.className+=` ${w}`,_.addEventListener("animationend",E)))},[h]),U.createElement(U.Fragment,null,a)}}function TG(e,t){return{content:rte(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function rte(e,t,n=!1){return y.isValidElement(e)&&!jh(e.type)?y.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):Qu(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function ZOe({closeToast:e,theme:t,ariaLabel:n="close"}){return U.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:r=>{r.stopPropagation(),e(!0)},"aria-label":n},U.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},U.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function XOe({delay:e,isRunning:t,closeToast:n,type:r="default",hide:s,className:a,controlledProgress:i,progress:l,rtl:u,isIn:f,theme:h}){let g=s||i&&l===0,v={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};i&&(v.transform=`scaleX(${l})`);let w=We("Toastify__progress-bar",i?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":u}),C=Qu(a)?a({rtl:u,type:r,defaultClassName:w}):We(w,a),_={[i&&l>=1?"onTransitionEnd":"onAnimationEnd"]:i&&l<1?null:()=>{f&&n()}};return U.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},U.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${h} Toastify__progress-bar--${r}`}),U.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:C,style:v,..._}))}var WOe=1,ste=()=>`${WOe++}`;function QOe(e,t,n){let r=1,s=0,a=[],i=[],l=t,u=new Map,f=new Set,h=O=>(f.add(O),()=>f.delete(O)),g=()=>{i=Array.from(u.values()),f.forEach(O=>O())},v=({containerId:O,toastId:N,updateId:M})=>{let L=O?O!==e:e!==1,k=u.has(N)&&M==null;return L||k},w=(O,N)=>{u.forEach(M=>{var L;(N==null||N===M.props.toastId)&&((L=M.toggle)==null||L.call(M,O))})},C=O=>{var N,M;(M=(N=O.props)==null?void 0:N.onClose)==null||M.call(N,O.removalReason),O.isActive=!1},_=O=>{if(O==null)u.forEach(C);else{let N=u.get(O);N&&C(N)}g()},E=()=>{s-=a.length,a=[]},$=O=>{var N,M;let{toastId:L,updateId:k}=O.props,T=k==null;O.staleId&&u.delete(O.staleId),O.isActive=!0,u.set(L,O),g(),n(TG(O,T?"added":"updated")),T&&((M=(N=O.props).onOpen)==null||M.call(N))};return{id:e,props:l,observe:h,toggle:w,removeToast:_,toasts:u,clearQueue:E,buildToast:(O,N)=>{if(v(N))return;let{toastId:M,updateId:L,data:k,staleId:T,delay:P}=N,V=L==null;V&&s++;let q={...l,style:l.toastStyle,key:r++,...Object.fromEntries(Object.entries(N).filter(([re,ee])=>ee!=null)),toastId:M,updateId:L,data:k,isIn:!1,className:_k(N.className||l.toastClassName),progressClassName:_k(N.progressClassName||l.progressClassName),autoClose:N.isLoading?!1:KOe(N.autoClose,l.autoClose),closeToast(re){u.get(M).removalReason=re,_(M)},deleteToast(){let re=u.get(M);if(re!=null){if(n(TG(re,"removed")),u.delete(M),s--,s<0&&(s=0),a.length>0){$(a.shift());return}g()}}};q.closeButton=l.closeButton,N.closeButton===!1||jk(N.closeButton)?q.closeButton=N.closeButton:N.closeButton===!0&&(q.closeButton=jk(l.closeButton)?l.closeButton:!0);let K={content:O,props:q,staleId:T};l.limit&&l.limit>0&&s>l.limit&&V?a.push(K):vx(P)?setTimeout(()=>{$(K)},P):$(K)},setProps(O){l=O},setToggle:(O,N)=>{let M=u.get(O);M&&(M.toggle=N)},isToastActive:O=>{var N;return(N=u.get(O))==null?void 0:N.isActive},getSnapshot:()=>i}}var Na=new Map,B1=[],Ek=new Set,JOe=e=>Ek.forEach(t=>t(e)),ate=()=>Na.size>0;function eTe(){B1.forEach(e=>ote(e.content,e.options)),B1=[]}var tTe=(e,{containerId:t})=>{var n;return(n=Na.get(t||1))==null?void 0:n.toasts.get(e)};function ite(e,t){var n;if(t)return!!((n=Na.get(t))!=null&&n.isToastActive(e));let r=!1;return Na.forEach(s=>{s.isToastActive(e)&&(r=!0)}),r}function nTe(e){if(!ate()){B1=B1.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||qOe(e))Na.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Na.get(e.containerId);t?t.removeToast(e.id):Na.forEach(n=>{n.removeToast(e.id)})}}var rTe=(e={})=>{Na.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ote(e,t){jk(e)&&(ate()||B1.push({content:e,options:t}),Na.forEach(n=>{n.buildToast(e,t)}))}function sTe(e){var t;(t=Na.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function lte(e,t){Na.forEach(n=>{(t==null||!(t!=null&&t.containerId)||t?.containerId===n.id)&&n.toggle(e,t?.id)})}function aTe(e){let t=e.containerId||1;return{subscribe(n){let r=QOe(t,e,JOe);Na.set(t,r);let s=r.observe(n);return eTe(),()=>{s(),Na.delete(t)}},setProps(n){var r;(r=Na.get(t))==null||r.setProps(n)},getSnapshot(){var n;return(n=Na.get(t))==null?void 0:n.getSnapshot()}}}function iTe(e){return Ek.add(e),()=>{Ek.delete(e)}}function oTe(e){return e&&(jh(e.toastId)||vx(e.toastId))?e.toastId:ste()}function yx(e,t){return ote(e,t),t.toastId}function n_(e,t){return{...t,type:t&&t.type||e,toastId:oTe(t)}}function r_(e){return(t,n)=>yx(t,n_(e,n))}function Bn(e,t){return yx(e,n_("default",t))}Bn.loading=(e,t)=>yx(e,n_("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function lTe(e,{pending:t,error:n,success:r},s){let a;t&&(a=jh(t)?Bn.loading(t,s):Bn.loading(t.render,{...s,...t}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(f,h,g)=>{if(h==null){Bn.dismiss(a);return}let v={type:f,...i,...s,data:g},w=jh(h)?{render:h}:h;return a?Bn.update(a,{...v,...w}):Bn(w.render,{...v,...w}),g},u=Qu(e)?e():e;return u.then(f=>l("success",r,f)).catch(f=>l("error",n,f)),u}Bn.promise=lTe;Bn.success=r_("success");Bn.info=r_("info");Bn.error=r_("error");Bn.warning=r_("warning");Bn.warn=Bn.warning;Bn.dark=(e,t)=>yx(e,n_("default",{theme:"dark",...t}));function uTe(e){nTe(e)}Bn.dismiss=uTe;Bn.clearWaitingQueue=rTe;Bn.isActive=ite;Bn.update=(e,t={})=>{let n=tTe(e,t);if(n){let{props:r,content:s}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:ste()};a.toastId!==e&&(a.staleId=e);let i=a.render||s;delete a.render,yx(i,a)}};Bn.done=e=>{Bn.update(e,{progress:1})};Bn.onChange=iTe;Bn.play=e=>lte(!0,e);Bn.pause=e=>lte(!1,e);function cTe(e){var t;let{subscribe:n,getSnapshot:r,setProps:s}=y.useRef(aTe(e)).current;s(e);let a=(t=y.useSyncExternalStore(n,r,r))==null?void 0:t.slice();function i(l){if(!a)return[];let u=new Map;return e.newestOnTop&&a.reverse(),a.forEach(f=>{let{position:h}=f.props;u.has(h)||u.set(h,[]),u.get(h).push(f)}),Array.from(u,f=>l(f[0],f[1]))}return{getToastToRender:i,isToastActive:ite,count:a?.length}}function dTe(e){let[t,n]=y.useState(!1),[r,s]=y.useState(!1),a=y.useRef(null),i=y.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:u,closeToast:f,onClick:h,closeOnClick:g}=e;sTe({id:e.toastId,containerId:e.containerId,fn:n}),y.useEffect(()=>{if(e.pauseOnFocusLoss)return v(),()=>{w()}},[e.pauseOnFocusLoss]);function v(){document.hasFocus()||$(),window.addEventListener("focus",E),window.addEventListener("blur",$)}function w(){window.removeEventListener("focus",E),window.removeEventListener("blur",$)}function C(T){if(e.draggable===!0||e.draggable===T.pointerType){O();let P=a.current;i.canCloseOnClick=!0,i.canDrag=!0,P.style.transition="none",e.draggableDirection==="x"?(i.start=T.clientX,i.removalDistance=P.offsetWidth*(e.draggablePercent/100)):(i.start=T.clientY,i.removalDistance=P.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function _(T){let{top:P,bottom:V,left:q,right:K}=a.current.getBoundingClientRect();T.nativeEvent.type!=="touchend"&&e.pauseOnHover&&T.clientX>=q&&T.clientX<=K&&T.clientY>=P&&T.clientY<=V?$():E()}function E(){n(!0)}function $(){n(!1)}function O(){i.didMove=!1,document.addEventListener("pointermove",M),document.addEventListener("pointerup",L)}function N(){document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",L)}function M(T){let P=a.current;if(i.canDrag&&P){i.didMove=!0,t&&$(),e.draggableDirection==="x"?i.delta=T.clientX-i.start:i.delta=T.clientY-i.start,i.start!==T.clientX&&(i.canCloseOnClick=!1);let V=e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`;P.style.transform=`translate3d(${V},0)`,P.style.opacity=`${1-Math.abs(i.delta/i.removalDistance)}`}}function L(){N();let T=a.current;if(i.canDrag&&i.didMove&&T){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance){s(!0),e.closeToast(!0),e.collapseAll();return}T.style.transition="transform 0.2s, opacity 0.2s",T.style.removeProperty("transform"),T.style.removeProperty("opacity")}}let k={onPointerDown:C,onPointerUp:_};return l&&u&&(k.onMouseEnter=$,e.stacked||(k.onMouseLeave=E)),g&&(k.onClick=T=>{h&&h(T),i.canCloseOnClick&&f(!0)}),{playToast:E,pauseToast:$,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:k}}var fTe=typeof window<"u"?y.useLayoutEffect:y.useEffect,s_=({theme:e,type:t,isLoading:n,...r})=>U.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r});function hTe(e){return U.createElement(s_,{...e},U.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function pTe(e){return U.createElement(s_,{...e},U.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function mTe(e){return U.createElement(s_,{...e},U.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function gTe(e){return U.createElement(s_,{...e},U.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function vTe(){return U.createElement("div",{className:"Toastify__spinner"})}var $k={info:pTe,warning:hTe,success:mTe,error:gTe,spinner:vTe},yTe=e=>e in $k;function xTe({theme:e,type:t,isLoading:n,icon:r}){let s=null,a={theme:e,type:t};return r===!1||(Qu(r)?s=r({...a,isLoading:n}):y.isValidElement(r)?s=y.cloneElement(r,a):n?s=$k.spinner():yTe(t)&&(s=$k[t](a))),s}var bTe=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:s,playToast:a}=dTe(e),{closeButton:i,children:l,autoClose:u,onClick:f,type:h,hideProgressBar:g,closeToast:v,transition:w,position:C,className:_,style:E,progressClassName:$,updateId:O,role:N,progress:M,rtl:L,toastId:k,deleteToast:T,isIn:P,isLoading:V,closeOnClick:q,theme:K,ariaLabel:re}=e,ee=We("Toastify__toast",`Toastify__toast-theme--${K}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":L},{"Toastify__toast--close-on-click":q}),ue=Qu(_)?_({rtl:L,position:C,type:h,defaultClassName:ee}):We(ee,_),he=xTe(e),X=!!M||!u,pe={closeToast:v,type:h,theme:K},xe=null;return i===!1||(Qu(i)?xe=i(pe):y.isValidElement(i)?xe=y.cloneElement(i,pe):xe=ZOe(pe)),U.createElement(w,{isIn:P,done:T,position:C,preventExitTransition:n,nodeRef:r,playToast:a},U.createElement("div",{id:k,tabIndex:0,onClick:f,"data-in":P,className:ue,...s,style:E,ref:r,...P&&{role:N,"aria-label":re}},he!=null&&U.createElement("div",{className:We("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!V})},he),rte(l,e,!t),xe,!e.customProgressBar&&U.createElement(XOe,{...O&&!X?{key:`p-${O}`}:{},rtl:L,theme:K,delay:u,isRunning:t,isIn:P,closeToast:v,hide:g,type:h,className:$,controlledProgress:X,progress:M||0})))},ute=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),wTe=nte(ute("bounce",!0)),CTe=nte(ute("zoom")),STe={position:"top-right",transition:wTe,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function _Te(e){let t={...STe,...e},n=e.stacked,[r,s]=y.useState(!0),a=y.useRef(null),{getToastToRender:i,isToastActive:l,count:u}=cTe(t),{className:f,style:h,rtl:g,containerId:v,hotKeys:w}=t;function C(E){let $=We("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":g});return Qu(f)?f({position:E,rtl:g,defaultClassName:$}):We($,_k(f))}function _(){n&&(s(!0),Bn.play())}return fTe(()=>{var E;if(n){let $=a.current.querySelectorAll('[data-in="true"]'),O=12,N=(E=t.position)==null?void 0:E.includes("top"),M=0,L=0;Array.from($).reverse().forEach((k,T)=>{let P=k;P.classList.add("Toastify__toast--stacked"),T>0&&(P.dataset.collapsed=`${r}`),P.dataset.pos||(P.dataset.pos=N?"top":"bot");let V=M*(r?.2:1)+(r?0:O*T);P.style.setProperty("--y",`${N?V:V*-1}px`),P.style.setProperty("--g",`${O}`),P.style.setProperty("--s",`${1-(r?L:0)}`),M+=P.offsetHeight,L+=.025})}},[r,u,n]),y.useEffect(()=>{function E($){var O;let N=a.current;w($)&&((O=N.querySelector('[tabIndex="0"]'))==null||O.focus(),s(!1),Bn.pause()),$.key==="Escape"&&(document.activeElement===N||N!=null&&N.contains(document.activeElement))&&(s(!0),Bn.play())}return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[w]),U.createElement("section",{ref:a,className:"Toastify",id:v,onMouseEnter:()=>{n&&(s(!1),Bn.pause())},onMouseLeave:_,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},i((E,$)=>{let O=$.length?{...h}:{...h,pointerEvents:"none"};return U.createElement("div",{tabIndex:-1,className:C(E),"data-stacked":n,style:O,key:`c-${E}`},$.map(({content:N,props:M})=>U.createElement(bTe,{...M,stacked:n,collapseAll:_,isIn:l(M.toastId,M.containerId),key:`t-${M.key}`},N)))}))}const jTe=({hideProgressBar:e=!0,transition:t=CTe,...n})=>d.jsx(_Te,{hideProgressBar:e,transition:t,icon:({type:r})=>r==="success"?d.jsx(ehe,{className:"text-primary-light"}):r==="warning"?d.jsx(the,{className:"text-yellow"}):r==="error"?d.jsx(nhe,{className:"text-danger-red"}):null,...n}),je={success:(e,t)=>Bn.success(e,{className:We(xy),...t}),error:(e,t)=>Bn.error(e,{className:We(xy),...t}),info:(e,t)=>Bn.info(e,{className:We(xy),...t}),warn:(e,t)=>Bn.warn(e,{className:We(xy),...t}),base:(e,t)=>Bn(e,{...t,className:We(xy,t?.className)})},xy="relative flex py-1! px-3! mb-2 min-h-8 rounded-md shadow-lg bg-panel text-sm items-center shadow-md shadow-bg font-[Ubuntu]! text-text! bg-panel! [&_button_svg]:text-text pr-6!";var ETe=Object.defineProperty,$Te=(e,t,n)=>t in e?ETe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vC=(e,t,n)=>$Te(e,typeof t!="symbol"?t+"":t,n);const Rk=({left:e,right:t})=>{if(t!==void 0&&e!==void 0)throw new Error(`Received both left and right values at runtime when opening an Either
Left: ${JSON.stringify(e)}
Right: ${JSON.stringify(t)}`);if(e!==void 0)return e;if(t!==void 0)return t;throw new Error("Received no left or right values at runtime when opening Either")},RTe=e=>e.left!==void 0,cte=e=>e.right!==void 0,ke=e=>({left:e}),Ae=e=>({right:e});var gd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function OTe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I4,AG;function SL(){if(AG)return I4;AG=1;var e=Array.isArray;return I4=e,I4}var P4,kG;function TTe(){if(kG)return P4;kG=1;var e=typeof gd=="object"&&gd&&gd.Object===Object&&gd;return P4=e,P4}var D4,NG;function _L(){if(NG)return D4;NG=1;var e=TTe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return D4=n,D4}var V4,LG;function jL(){if(LG)return V4;LG=1;var e=_L(),t=e.Symbol;return V4=t,V4}var B4,MG;function ATe(){if(MG)return B4;MG=1;var e=jL(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,s=e?e.toStringTag:void 0;function a(i){var l=n.call(i,s),u=i[s];try{i[s]=void 0;var f=!0}catch{}var h=r.call(i);return f&&(l?i[s]=u:delete i[s]),h}return B4=a,B4}var F4,IG;function kTe(){if(IG)return F4;IG=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return F4=n,F4}var U4,PG;function dte(){if(PG)return U4;PG=1;var e=jL(),t=ATe(),n=kTe(),r="[object Null]",s="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?s:r:a&&a in Object(l)?t(l):n(l)}return U4=i,U4}var G4,DG;function NTe(){if(DG)return G4;DG=1;function e(t){return t!=null&&typeof t=="object"}return G4=e,G4}var z4,VG;function EL(){if(VG)return z4;VG=1;var e=dte(),t=NTe(),n="[object Symbol]";function r(s){return typeof s=="symbol"||t(s)&&e(s)==n}return z4=r,z4}var H4,BG;function LTe(){if(BG)return H4;BG=1;var e=SL(),t=EL(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(a,i){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||i!=null&&a in Object(i)}return H4=s,H4}var q4,FG;function fte(){if(FG)return q4;FG=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return q4=e,q4}var K4,UG;function MTe(){if(UG)return K4;UG=1;var e=dte(),t=fte(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",a="[object Proxy]";function i(l){if(!t(l))return!1;var u=e(l);return u==r||u==s||u==n||u==a}return K4=i,K4}var Y4,GG;function ITe(){if(GG)return Y4;GG=1;var e=_L(),t=e["__core-js_shared__"];return Y4=t,Y4}var Z4,zG;function PTe(){if(zG)return Z4;zG=1;var e=ITe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Z4=n,Z4}var X4,HG;function DTe(){if(HG)return X4;HG=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return X4=n,X4}var W4,qG;function VTe(){if(qG)return W4;qG=1;var e=MTe(),t=PTe(),n=fte(),r=DTe(),s=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){if(!n(v)||t(v))return!1;var w=e(v)?h:a;return w.test(r(v))}return W4=g,W4}var Q4,KG;function BTe(){if(KG)return Q4;KG=1;function e(t,n){return t?.[n]}return Q4=e,Q4}var J4,YG;function hte(){if(YG)return J4;YG=1;var e=VTe(),t=BTe();function n(r,s){var a=t(r,s);return e(a)?a:void 0}return J4=n,J4}var eR,ZG;function a_(){if(ZG)return eR;ZG=1;var e=hte(),t=e(Object,"create");return eR=t,eR}var tR,XG;function FTe(){if(XG)return tR;XG=1;var e=a_();function t(){this.__data__=e?e(null):{},this.size=0}return tR=t,tR}var nR,WG;function UTe(){if(WG)return nR;WG=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return nR=e,nR}var rR,QG;function GTe(){if(QG)return rR;QG=1;var e=a_(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(a){var i=this.__data__;if(e){var l=i[a];return l===t?void 0:l}return r.call(i,a)?i[a]:void 0}return rR=s,rR}var sR,JG;function zTe(){if(JG)return sR;JG=1;var e=a_(),t=Object.prototype,n=t.hasOwnProperty;function r(s){var a=this.__data__;return e?a[s]!==void 0:n.call(a,s)}return sR=r,sR}var aR,ez;function HTe(){if(ez)return aR;ez=1;var e=a_(),t="__lodash_hash_undefined__";function n(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&s===void 0?t:s,this}return aR=n,aR}var iR,tz;function qTe(){if(tz)return iR;tz=1;var e=FTe(),t=UTe(),n=GTe(),r=zTe(),s=HTe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,iR=a,iR}var oR,nz;function KTe(){if(nz)return oR;nz=1;function e(){this.__data__=[],this.size=0}return oR=e,oR}var lR,rz;function YTe(){if(rz)return lR;rz=1;function e(t,n){return t===n||t!==t&&n!==n}return lR=e,lR}var uR,sz;function i_(){if(sz)return uR;sz=1;var e=YTe();function t(n,r){for(var s=n.length;s--;)if(e(n[s][0],r))return s;return-1}return uR=t,uR}var cR,az;function ZTe(){if(az)return cR;az=1;var e=i_(),t=Array.prototype,n=t.splice;function r(s){var a=this.__data__,i=e(a,s);if(i<0)return!1;var l=a.length-1;return i==l?a.pop():n.call(a,i,1),--this.size,!0}return cR=r,cR}var dR,iz;function XTe(){if(iz)return dR;iz=1;var e=i_();function t(n){var r=this.__data__,s=e(r,n);return s<0?void 0:r[s][1]}return dR=t,dR}var fR,oz;function WTe(){if(oz)return fR;oz=1;var e=i_();function t(n){return e(this.__data__,n)>-1}return fR=t,fR}var hR,lz;function QTe(){if(lz)return hR;lz=1;var e=i_();function t(n,r){var s=this.__data__,a=e(s,n);return a<0?(++this.size,s.push([n,r])):s[a][1]=r,this}return hR=t,hR}var pR,uz;function JTe(){if(uz)return pR;uz=1;var e=KTe(),t=ZTe(),n=XTe(),r=WTe(),s=QTe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,pR=a,pR}var mR,cz;function eAe(){if(cz)return mR;cz=1;var e=hte(),t=_L(),n=e(t,"Map");return mR=n,mR}var gR,dz;function tAe(){if(dz)return gR;dz=1;var e=qTe(),t=JTe(),n=eAe();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return gR=r,gR}var vR,fz;function nAe(){if(fz)return vR;fz=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return vR=e,vR}var yR,hz;function o_(){if(hz)return yR;hz=1;var e=nAe();function t(n,r){var s=n.__data__;return e(r)?s[typeof r=="string"?"string":"hash"]:s.map}return yR=t,yR}var xR,pz;function rAe(){if(pz)return xR;pz=1;var e=o_();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return xR=t,xR}var bR,mz;function sAe(){if(mz)return bR;mz=1;var e=o_();function t(n){return e(this,n).get(n)}return bR=t,bR}var wR,gz;function aAe(){if(gz)return wR;gz=1;var e=o_();function t(n){return e(this,n).has(n)}return wR=t,wR}var CR,vz;function iAe(){if(vz)return CR;vz=1;var e=o_();function t(n,r){var s=e(this,n),a=s.size;return s.set(n,r),this.size+=s.size==a?0:1,this}return CR=t,CR}var SR,yz;function oAe(){if(yz)return SR;yz=1;var e=tAe(),t=rAe(),n=sAe(),r=aAe(),s=iAe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,SR=a,SR}var _R,xz;function lAe(){if(xz)return _R;xz=1;var e=oAe(),t="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var a=function(){var i=arguments,l=s?s.apply(this,i):i[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,i);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,_R=n,_R}var jR,bz;function uAe(){if(bz)return jR;bz=1;var e=lAe(),t=500;function n(r){var s=e(r,function(i){return a.size===t&&a.clear(),i}),a=s.cache;return s}return jR=n,jR}var ER,wz;function cAe(){if(wz)return ER;wz=1;var e=uAe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(t,function(i,l,u,f){a.push(u?f.replace(n,"$1"):l||i)}),a});return ER=r,ER}var $R,Cz;function dAe(){if(Cz)return $R;Cz=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r<s;)a[r]=n(t[r],r,t);return a}return $R=e,$R}var RR,Sz;function fAe(){if(Sz)return RR;Sz=1;var e=jL(),t=dAe(),n=SL(),r=EL(),s=e?e.prototype:void 0,a=s?s.toString:void 0;function i(l){if(typeof l=="string")return l;if(n(l))return t(l,i)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return RR=i,RR}var OR,_z;function hAe(){if(_z)return OR;_z=1;var e=fAe();function t(n){return n==null?"":e(n)}return OR=t,OR}var TR,jz;function pAe(){if(jz)return TR;jz=1;var e=SL(),t=LTe(),n=cAe(),r=hAe();function s(a,i){return e(a)?a:t(a,i)?[a]:n(r(a))}return TR=s,TR}var AR,Ez;function mAe(){if(Ez)return AR;Ez=1;var e=EL();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return AR=t,AR}var kR,$z;function gAe(){if($z)return kR;$z=1;var e=pAe(),t=mAe();function n(r,s){s=e(s,r);for(var a=0,i=s.length;r!=null&&a<i;)r=r[t(s[a++])];return a&&a==i?r:void 0}return kR=n,kR}var NR,Rz;function vAe(){if(Rz)return NR;Rz=1;var e=gAe();function t(n,r,s){var a=n==null?void 0:e(n,r);return a===void 0?s:a}return NR=t,NR}var yAe=vAe();const Oz=OTe(yAe);var HC={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var xAe=HC.exports,Tz;function bAe(){return Tz||(Tz=1,(function(e,t){(function(){var n,r="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,v=2,w=4,C=1,_=2,E=1,$=2,O=4,N=8,M=16,L=32,k=64,T=128,P=256,V=512,q=30,K="...",re=800,ee=16,ue=1,he=2,X=3,pe=1/0,xe=9007199254740991,be=17976931348623157e292,Y=NaN,se=4294967295,Oe=se-1,de=se>>>1,_e=[["ary",T],["bind",E],["bindKey",$],["curry",N],["curryRight",M],["flip",V],["partial",L],["partialRight",k],["rearg",P]],Le="[object Arguments]",Re="[object Array]",Ye="[object AsyncFunction]",Xe="[object Boolean]",Je="[object Date]",Ot="[object DOMException]",tn="[object Error]",an="[object Function]",Pt="[object GeneratorFunction]",Wt="[object Map]",Lt="[object Number]",Ln="[object Null]",Ge="[object Object]",dt="[object Promise]",Z="[object Proxy]",oe="[object RegExp]",me="[object Set]",He="[object String]",ze="[object Symbol]",Ke="[object Undefined]",at="[object WeakMap]",Dt="[object WeakSet]",ht="[object ArrayBuffer]",Jt="[object DataView]",jn="[object Float32Array]",dr="[object Float64Array]",fa="[object Int8Array]",cs="[object Int16Array]",er="[object Int32Array]",Zn="[object Uint8Array]",Nn="[object Uint8ClampedArray]",ha="[object Uint16Array]",ps="[object Uint32Array]",Jo=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,go=/(__e\(.*?\)|\b__t\)) \+\n'';/g,li=/&(?:amp|lt|gt|quot|#39);/g,pa=/[&<>"']/g,iu=RegExp(li.source),ou=RegExp(pa.source),Tr=/<%-([\s\S]+?)%>/g,ms=/<%([\s\S]+?)%>/g,jt=/<%=([\s\S]+?)%>/g,vn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ws=/^\w*$/,gs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qe=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(Qe.source),Et=/^\s+/,vr=/\s/,ts=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pa=/\{\n\/\* \[wrapped with (.+)\] \*/,ma=/,? & /,Ar=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Cs=/[()=,{}\[\]\/\s]/,Pn=/\\(\\)?/g,ga=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tl=/\w*$/,nl=/^[-+]0x[0-9a-f]+$/i,kr=/^0b[01]+$/i,Gd=/^\[object .+?Constructor\]$/,zd=/^0o[0-7]+$/i,Pi=/^(?:0|[1-9]\d*)$/,vo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sn=/($^)/,Da=/['\n\r\u2028\u2029\\]/g,yo="\\ud800-\\udfff",lu="\\u0300-\\u036f",fc="\\ufe20-\\ufe2f",rl="\\u20d0-\\u20ff",Di=lu+fc+rl,zh="\\u2700-\\u27bf",vv="a-z\\xdf-\\xf6\\xf8-\\xff",hc="\\xac\\xb1\\xd7\\xf7",yv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xv="\\u2000-\\u206f",$_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bv="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",wv=hc+yv+xv+$_,Cv="['’]",Hh="["+yo+"]",Sv="["+wv+"]",uu="["+Di+"]",Ex="\\d+",Va="["+zh+"]",qh="["+vv+"]",_v="[^"+yo+wv+Ex+zh+vv+bv+"]",Hd="\\ud83c[\\udffb-\\udfff]",pc="(?:"+uu+"|"+Hd+")",jv="[^"+yo+"]",Kh="(?:\\ud83c[\\udde6-\\uddff]){2}",sl="[\\ud800-\\udbff][\\udc00-\\udfff]",mc="["+bv+"]",Ev="\\u200d",$v="(?:"+qh+"|"+_v+")",Rv="(?:"+mc+"|"+_v+")",$x="(?:"+Cv+"(?:d|ll|m|re|s|t|ve))?",Rx="(?:"+Cv+"(?:D|LL|M|RE|S|T|VE))?",qd=pc+"?",Yh="["+va+"]?",Ov="(?:"+Ev+"(?:"+[jv,Kh,sl].join("|")+")"+Yh+qd+")*",gc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Tv=Yh+qd+Ov,Av="(?:"+[Va,Kh,sl].join("|")+")"+Tv,Ox="(?:"+[jv+uu+"?",uu,Kh,sl,Hh].join("|")+")",Kd=RegExp(Cv,"g"),xo=RegExp(uu,"g"),Yd=RegExp(Hd+"(?="+Hd+")|"+Ox+Tv,"g"),Zd=RegExp([mc+"?"+qh+"+"+$x+"(?="+[Sv,mc,"$"].join("|")+")",Rv+"+"+Rx+"(?="+[Sv,mc+$v,"$"].join("|")+")",mc+"?"+$v+"+"+$x,mc+"+"+Rx,vc,gc,Ex,Av].join("|"),"g"),al=RegExp("["+Ev+yo+Di+va+"]"),kv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tx=-1,Xn={};Xn[jn]=Xn[dr]=Xn[fa]=Xn[cs]=Xn[er]=Xn[Zn]=Xn[Nn]=Xn[ha]=Xn[ps]=!0,Xn[Le]=Xn[Re]=Xn[ht]=Xn[Xe]=Xn[Jt]=Xn[Je]=Xn[tn]=Xn[an]=Xn[Wt]=Xn[Lt]=Xn[Ge]=Xn[oe]=Xn[me]=Xn[He]=Xn[at]=!1;var Un={};Un[Le]=Un[Re]=Un[ht]=Un[Jt]=Un[Xe]=Un[Je]=Un[jn]=Un[dr]=Un[fa]=Un[cs]=Un[er]=Un[Wt]=Un[Lt]=Un[Ge]=Un[oe]=Un[me]=Un[He]=Un[ze]=Un[Zn]=Un[Nn]=Un[ha]=Un[ps]=!0,Un[tn]=Un[an]=Un[at]=!1;var Ax={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},Us={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Xh={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xd=parseFloat,R_=parseInt,Wh=typeof gd=="object"&&gd&&gd.Object===Object&&gd,Nv=typeof self=="object"&&self&&self.Object===Object&&self,Nr=Wh||Nv||Function("return this")(),yc=t&&!t.nodeType&&t,il=yc&&!0&&e&&!e.nodeType&&e,kx=il&&il.exports===yc,Lv=kx&&Wh.process,Ba=(function(){try{var le=il&&il.require&&il.require("util").types;return le||Lv&&Lv.binding&&Lv.binding("util")}catch{}})(),Qh=Ba&&Ba.isArrayBuffer,Nx=Ba&&Ba.isDate,Lx=Ba&&Ba.isMap,Mx=Ba&&Ba.isRegExp,Ix=Ba&&Ba.isSet,Px=Ba&&Ba.isTypedArray;function Gs(le,Ee,Se){switch(Se.length){case 0:return le.call(Ee);case 1:return le.call(Ee,Se[0]);case 2:return le.call(Ee,Se[0],Se[1]);case 3:return le.call(Ee,Se[0],Se[1],Se[2])}return le.apply(Ee,Se)}function O_(le,Ee,Se,nt){for(var Mt=-1,En=le==null?0:le.length;++Mt<En;){var Dr=le[Mt];Ee(nt,Dr,Se(Dr),le)}return nt}function Fa(le,Ee){for(var Se=-1,nt=le==null?0:le.length;++Se<nt&&Ee(le[Se],Se,le)!==!1;);return le}function T_(le,Ee){for(var Se=le==null?0:le.length;Se--&&Ee(le[Se],Se,le)!==!1;);return le}function Dx(le,Ee){for(var Se=-1,nt=le==null?0:le.length;++Se<nt;)if(!Ee(le[Se],Se,le))return!1;return!0}function Vi(le,Ee){for(var Se=-1,nt=le==null?0:le.length,Mt=0,En=[];++Se<nt;){var Dr=le[Se];Ee(Dr,Se,le)&&(En[Mt++]=Dr)}return En}function Jh(le,Ee){var Se=le==null?0:le.length;return!!Se&&xc(le,Ee,0)>-1}function Mv(le,Ee,Se){for(var nt=-1,Mt=le==null?0:le.length;++nt<Mt;)if(Se(Ee,le[nt]))return!0;return!1}function fr(le,Ee){for(var Se=-1,nt=le==null?0:le.length,Mt=Array(nt);++Se<nt;)Mt[Se]=Ee(le[Se],Se,le);return Mt}function bo(le,Ee){for(var Se=-1,nt=Ee.length,Mt=le.length;++Se<nt;)le[Mt+Se]=Ee[Se];return le}function Iv(le,Ee,Se,nt){var Mt=-1,En=le==null?0:le.length;for(nt&&En&&(Se=le[++Mt]);++Mt<En;)Se=Ee(Se,le[Mt],Mt,le);return Se}function A_(le,Ee,Se,nt){var Mt=le==null?0:le.length;for(nt&&Mt&&(Se=le[--Mt]);Mt--;)Se=Ee(Se,le[Mt],Mt,le);return Se}function Pv(le,Ee){for(var Se=-1,nt=le==null?0:le.length;++Se<nt;)if(Ee(le[Se],Se,le))return!0;return!1}var k_=tp("length");function N_(le){return le.split("")}function L_(le){return le.match(Ar)||[]}function Vx(le,Ee,Se){var nt;return Se(le,function(Mt,En,Dr){if(Ee(Mt,En,Dr))return nt=En,!1}),nt}function ep(le,Ee,Se,nt){for(var Mt=le.length,En=Se+(nt?1:-1);nt?En--:++En<Mt;)if(Ee(le[En],En,le))return En;return-1}function xc(le,Ee,Se){return Ee===Ee?D_(le,Ee,Se):ep(le,bc,Se)}function Dv(le,Ee,Se,nt){for(var Mt=Se-1,En=le.length;++Mt<En;)if(nt(le[Mt],Ee))return Mt;return-1}function bc(le){return le!==le}function Bx(le,Ee){var Se=le==null?0:le.length;return Se?rp(le,Ee)/Se:Y}function tp(le){return function(Ee){return Ee==null?n:Ee[le]}}function np(le){return function(Ee){return le==null?n:le[Ee]}}function Vv(le,Ee,Se,nt,Mt){return Mt(le,function(En,Dr,$n){Se=nt?(nt=!1,En):Ee(Se,En,Dr,$n)}),Se}function Fx(le,Ee){var Se=le.length;for(le.sort(Ee);Se--;)le[Se]=le[Se].value;return le}function rp(le,Ee){for(var Se,nt=-1,Mt=le.length;++nt<Mt;){var En=Ee(le[nt]);En!==n&&(Se=Se===n?En:Se+En)}return Se}function ol(le,Ee){for(var Se=-1,nt=Array(le);++Se<le;)nt[Se]=Ee(Se);return nt}function M_(le,Ee){return fr(Ee,function(Se){return[Se,le[Se]]})}function Ux(le){return le&&le.slice(0,Fv(le)+1).replace(Et,"")}function ya(le){return function(Ee){return le(Ee)}}function sp(le,Ee){return fr(Ee,function(Se){return le[Se]})}function wc(le,Ee){return le.has(Ee)}function Cc(le,Ee){for(var Se=-1,nt=le.length;++Se<nt&&xc(Ee,le[Se],0)>-1;);return Se}function Sc(le,Ee){for(var Se=le.length;Se--&&xc(Ee,le[Se],0)>-1;);return Se}function I_(le,Ee){for(var Se=le.length,nt=0;Se--;)le[Se]===Ee&&++nt;return nt}var ap=np(Ax),Gx=np(Us);function zx(le){return"\\"+Xh[le]}function Bv(le,Ee){return le==null?n:le[Ee]}function ll(le){return al.test(le)}function Hx(le){return kv.test(le)}function qx(le){for(var Ee,Se=[];!(Ee=le.next()).done;)Se.push(Ee.value);return Se}function ip(le){var Ee=-1,Se=Array(le.size);return le.forEach(function(nt,Mt){Se[++Ee]=[Mt,nt]}),Se}function Kx(le,Ee){return function(Se){return le(Ee(Se))}}function ul(le,Ee){for(var Se=-1,nt=le.length,Mt=0,En=[];++Se<nt;){var Dr=le[Se];(Dr===Ee||Dr===h)&&(le[Se]=h,En[Mt++]=Se)}return En}function op(le){var Ee=-1,Se=Array(le.size);return le.forEach(function(nt){Se[++Ee]=nt}),Se}function P_(le){var Ee=-1,Se=Array(le.size);return le.forEach(function(nt){Se[++Ee]=[nt,nt]}),Se}function D_(le,Ee,Se){for(var nt=Se-1,Mt=le.length;++nt<Mt;)if(le[nt]===Ee)return nt;return-1}function xa(le,Ee,Se){for(var nt=Se+1;nt--;)if(le[nt]===Ee)return nt;return nt}function Bi(le){return ll(le)?Zx(le):k_(le)}function Ua(le){return ll(le)?Uv(le):N_(le)}function Fv(le){for(var Ee=le.length;Ee--&&vr.test(le.charAt(Ee)););return Ee}var Yx=np(cu);function Zx(le){for(var Ee=Yd.lastIndex=0;Yd.test(le);)++Ee;return Ee}function Uv(le){return le.match(Yd)||[]}function V_(le){return le.match(Zd)||[]}var _c=function le(Ee){Ee=Ee==null?Nr:cl.defaults(Nr.Object(),Ee,cl.pick(Nr,Zh));var Se=Ee.Array,nt=Ee.Date,Mt=Ee.Error,En=Ee.Function,Dr=Ee.Math,$n=Ee.Object,lp=Ee.RegExp,Xx=Ee.String,ba=Ee.TypeError,up=Se.prototype,B_=En.prototype,jc=$n.prototype,Wd=Ee["__core-js_shared__"],Qd=B_.toString,Mn=jc.hasOwnProperty,ui=0,Gv=(function(){var m=/[^.]+$/.exec(Wd&&Wd.keys&&Wd.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""})(),Ss=jc.toString,Ga=Qd.call($n),Ec=Nr._,zv=lp("^"+Qd.call(Mn).replace(Qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),du=kx?Ee.Buffer:n,ci=Ee.Symbol,$c=Ee.Uint8Array,fu=du?du.allocUnsafe:n,Jd=Kx($n.getPrototypeOf,$n),ef=$n.create,hu=jc.propertyIsEnumerable,cp=up.splice,zs=ci?ci.isConcatSpreadable:n,pu=ci?ci.iterator:n,_s=ci?ci.toStringTag:n,tf=(function(){try{var m=xl($n,"defineProperty");return m({},"",{}),m}catch{}})(),dp=Ee.clearTimeout!==Nr.clearTimeout&&Ee.clearTimeout,mu=nt&&nt.now!==Nr.Date.now&&nt.now,Hv=Ee.setTimeout!==Nr.setTimeout&&Ee.setTimeout,Rc=Dr.ceil,wo=Dr.floor,dl=$n.getOwnPropertySymbols,fp=du?du.isBuffer:n,nf=Ee.isFinite,za=up.join,Ha=Kx($n.keys,$n),or=Dr.max,hr=Dr.min,Co=nt.now,gu=Ee.parseInt,qv=Dr.random,Kv=up.reverse,rf=xl(Ee,"DataView"),zr=xl(Ee,"Map"),pr=xl(Ee,"Promise"),yn=xl(Ee,"Set"),di=xl(Ee,"WeakMap"),Hs=xl($n,"create"),Oc=di&&new di,qa={},Wx=Ao(rf),Qx=Ao(zr),sf=Ao(pr),af=Ao(yn),Jx=Ao(di),fl=ci?ci.prototype:n,vu=fl?fl.valueOf:n,hl=fl?fl.toString:n;function B(m){if(yr(m)&&!zt(m)&&!(m instanceof un)){if(m instanceof qs)return m;if(Mn.call(m,"__wrapped__"))return qr(m)}return new qs(m)}var wa=(function(){function m(){}return function(b){if(!gr(b))return{};if(ef)return ef(b);m.prototype=b;var j=new m;return m.prototype=n,j}})();function Ka(){}function qs(m,b){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=n}B.templateSettings={escape:Tr,evaluate:ms,interpolate:jt,variable:"",imports:{_:B}},B.prototype=Ka.prototype,B.prototype.constructor=B,qs.prototype=wa(Ka.prototype),qs.prototype.constructor=qs;function un(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function of(){var m=new un(this.__wrapped__);return m.__actions__=Hr(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=Hr(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=Hr(this.__views__),m}function hp(){if(this.__filtered__){var m=new un(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function yu(){var m=this.__wrapped__.value(),b=this.__dir__,j=zt(m),A=b<0,D=j?m.length:0,z=kb(0,D,this.__views__),Q=z.start,ae=z.end,fe=ae-Q,Pe=A?ae:Q-1,Be=this.__iteratees__,qe=Be.length,rt=0,mt=hr(fe,this.__takeCount__);if(!j||!A&&D==fe&&mt==fe)return yb(m,this.__actions__);var Vt=[];e:for(;fe--&&rt<mt;){Pe+=b;for(var dn=-1,Bt=m[Pe];++dn<qe;){var Cn=Be[dn],On=Cn.iteratee,yi=Cn.type,Ra=On(Bt);if(yi==he)Bt=Ra;else if(!Ra){if(yi==ue)continue e;break e}}Vt[rt++]=Bt}return Vt}un.prototype=wa(Ka.prototype),un.prototype.constructor=un;function Sr(m){var b=-1,j=m==null?0:m.length;for(this.clear();++b<j;){var A=m[b];this.set(A[0],A[1])}}function pp(){this.__data__=Hs?Hs(null):{},this.size=0}function eb(m){var b=this.has(m)&&delete this.__data__[m];return this.size-=b?1:0,b}function F_(m){var b=this.__data__;if(Hs){var j=b[m];return j===u?n:j}return Mn.call(b,m)?b[m]:n}function U_(m){var b=this.__data__;return Hs?b[m]!==n:Mn.call(b,m)}function G_(m,b){var j=this.__data__;return this.size+=this.has(m)?0:1,j[m]=Hs&&b===n?u:b,this}Sr.prototype.clear=pp,Sr.prototype.delete=eb,Sr.prototype.get=F_,Sr.prototype.has=U_,Sr.prototype.set=G_;function tr(m){var b=-1,j=m==null?0:m.length;for(this.clear();++b<j;){var A=m[b];this.set(A[0],A[1])}}function Yv(){this.__data__=[],this.size=0}function lf(m){var b=this.__data__,j=kc(b,m);if(j<0)return!1;var A=b.length-1;return j==A?b.pop():cp.call(b,j,1),--this.size,!0}function uf(m){var b=this.__data__,j=kc(b,m);return j<0?n:b[j][1]}function Zv(m){return kc(this.__data__,m)>-1}function Tc(m,b){var j=this.__data__,A=kc(j,m);return A<0?(++this.size,j.push([m,b])):j[A][1]=b,this}tr.prototype.clear=Yv,tr.prototype.delete=lf,tr.prototype.get=uf,tr.prototype.has=Zv,tr.prototype.set=Tc;function Ks(m){var b=-1,j=m==null?0:m.length;for(this.clear();++b<j;){var A=m[b];this.set(A[0],A[1])}}function z_(){this.size=0,this.__data__={hash:new Sr,map:new(zr||tr),string:new Sr}}function tb(m){var b=Dc(this,m).delete(m);return this.size-=b?1:0,b}function H_(m){return Dc(this,m).get(m)}function nb(m){return Dc(this,m).has(m)}function xu(m,b){var j=Dc(this,m),A=j.size;return j.set(m,b),this.size+=j.size==A?0:1,this}Ks.prototype.clear=z_,Ks.prototype.delete=tb,Ks.prototype.get=H_,Ks.prototype.has=nb,Ks.prototype.set=xu;function So(m){var b=-1,j=m==null?0:m.length;for(this.__data__=new Ks;++b<j;)this.add(m[b])}function mp(m){return this.__data__.set(m,u),this}function rb(m){return this.__data__.has(m)}So.prototype.add=So.prototype.push=mp,So.prototype.has=rb;function js(m){var b=this.__data__=new tr(m);this.size=b.size}function sb(){this.__data__=new tr,this.size=0}function gp(m){var b=this.__data__,j=b.delete(m);return this.size=b.size,j}function Xv(m){return this.__data__.get(m)}function ab(m){return this.__data__.has(m)}function vp(m,b){var j=this.__data__;if(j instanceof tr){var A=j.__data__;if(!zr||A.length<s-1)return A.push([m,b]),this.size=++j.size,this;j=this.__data__=new Ks(A)}return j.set(m,b),this.size=j.size,this}js.prototype.clear=sb,js.prototype.delete=gp,js.prototype.get=Xv,js.prototype.has=ab,js.prototype.set=vp;function Wv(m,b){var j=zt(m),A=!j&&Mo(m),D=!j&&!A&&Ol(m),z=!j&&!A&&!D&&Qc(m),Q=j||A||D||z,ae=Q?ol(m.length,Xx):[],fe=ae.length;for(var Pe in m)(b||Mn.call(m,Pe))&&!(Q&&(Pe=="length"||D&&(Pe=="offset"||Pe=="parent")||z&&(Pe=="buffer"||Pe=="byteLength"||Pe=="byteOffset")||mi(Pe,fe)))&&ae.push(Pe);return ae}function Ac(m){var b=m.length;return b?m[$p(0,b-1)]:n}function ib(m,b){return If(Hr(m),hi(b,0,m.length))}function ob(m){return If(Hr(m))}function Fi(m,b,j){(j!==n&&!ea(m[b],j)||j===n&&!(b in m))&&fi(m,b,j)}function bu(m,b,j){var A=m[b];(!(Mn.call(m,b)&&ea(A,j))||j===n&&!(b in m))&&fi(m,b,j)}function kc(m,b){for(var j=m.length;j--;)if(ea(m[j][0],b))return j;return-1}function pl(m,b,j,A){return jo(m,function(D,z,Q){b(A,D,j(D),Q)}),A}function _o(m,b){return m&&Xs(b,Zr(b),m)}function cf(m,b){return m&&Xs(b,ss(b),m)}function fi(m,b,j){b=="__proto__"&&tf?tf(m,b,{configurable:!0,enumerable:!0,value:j,writable:!0}):m[b]=j}function df(m,b){for(var j=-1,A=b.length,D=Se(A),z=m==null;++j<A;)D[j]=z?n:Xf(m,b[j]);return D}function hi(m,b,j){return m===m&&(j!==n&&(m=m<=j?m:j),b!==n&&(m=m>=b?m:b)),m}function vs(m,b,j,A,D,z){var Q,ae=b&g,fe=b&v,Pe=b&w;if(j&&(Q=D?j(m,A,D,z):j(m)),Q!==n)return Q;if(!gr(m))return m;var Be=zt(m);if(Be){if(Q=S0(m),!ae)return Hr(m,Q)}else{var qe=rs(m),rt=qe==an||qe==Pt;if(Ol(m))return m0(m,ae);if(qe==Ge||qe==Le||rt&&!D){if(Q=fe||rt?{}:_0(m),!ae)return fe?_f(m,cf(Q,m)):Np(m,_o(Q,m))}else{if(!Un[qe])return D?m:{};Q=j0(m,qe,ae)}}z||(z=new js);var mt=z.get(m);if(mt)return mt;z.set(m,Q),_w(m)?m.forEach(function(Bt){Q.add(vs(Bt,b,j,Bt,m,z))}):sm(m)&&m.forEach(function(Bt,Cn){Q.set(Cn,vs(Bt,b,j,Cn,m,z))});var Vt=Pe?fe?Pp:Ip:fe?ss:Zr,dn=Be?n:Vt(m);return Fa(dn||m,function(Bt,Cn){dn&&(Cn=Bt,Bt=m[Cn]),bu(Q,Cn,vs(Bt,b,j,Cn,m,z))}),Q}function lb(m){var b=Zr(m);return function(j){return Qv(j,m,b)}}function Qv(m,b,j){var A=j.length;if(m==null)return!A;for(m=$n(m);A--;){var D=j[A],z=b[D],Q=m[D];if(Q===n&&!(D in m)||!z(Q))return!1}return!0}function wu(m,b,j){if(typeof m!="function")throw new ba(i);return Bc(function(){m.apply(n,j)},b)}function ml(m,b,j,A){var D=-1,z=Jh,Q=!0,ae=m.length,fe=[],Pe=b.length;if(!ae)return fe;j&&(b=fr(b,ya(j))),A?(z=Mv,Q=!1):b.length>=s&&(z=wc,Q=!1,b=new So(b));e:for(;++D<ae;){var Be=m[D],qe=j==null?Be:j(Be);if(Be=A||Be!==0?Be:0,Q&&qe===qe){for(var rt=Pe;rt--;)if(b[rt]===qe)continue e;fe.push(Be)}else z(b,qe,A)||fe.push(Be)}return fe}var jo=x0(ys),yp=x0(Lc,!0);function Jv(m,b){var j=!0;return jo(m,function(A,D,z){return j=!!b(A,D,z),j}),j}function pi(m,b,j){for(var A=-1,D=m.length;++A<D;){var z=m[A],Q=b(z);if(Q!=null&&(ae===n?Q===Q&&!Rs(Q):j(Q,ae)))var ae=Q,fe=z}return fe}function on(m,b,j,A){var D=m.length;for(j=Kt(j),j<0&&(j=-j>D?0:D+j),A=A===n||A>D?D:Kt(A),A<0&&(A+=D),A=j>A?0:Xi(A);j<A;)m[j++]=b;return m}function Gn(m,b){var j=[];return jo(m,function(A,D,z){b(A,D,z)&&j.push(A)}),j}function xn(m,b,j,A,D){var z=-1,Q=m.length;for(j||(j=Oo),D||(D=[]);++z<Q;){var ae=m[z];b>0&&j(ae)?b>1?xn(ae,b-1,j,A,D):bo(D,ae):A||(D[D.length]=ae)}return D}var Nc=Ru(),Cu=Ru(!0);function ys(m,b){return m&&Nc(m,b,Zr)}function Lc(m,b){return m&&Cu(m,b,Zr)}function gl(m,b){return Vi(b,function(j){return gi(m[j])})}function Ya(m,b){b=$o(b,m);for(var j=0,A=b.length;m!=null&&j<A;)m=m[Dn(b[j++])];return j&&j==A?m:n}function ub(m,b,j){var A=b(m);return zt(m)?A:bo(A,j(m))}function wn(m){return m==null?m===n?Ke:Ln:_s&&_s in $n(m)?Ab(m):Pb(m)}function ff(m,b){return m>b}function e0(m,b){return m!=null&&Mn.call(m,b)}function cb(m,b){return m!=null&&b in $n(m)}function db(m,b,j){return m>=hr(b,j)&&m<or(b,j)}function t0(m,b,j){for(var A=j?Mv:Jh,D=m[0].length,z=m.length,Q=z,ae=Se(z),fe=1/0,Pe=[];Q--;){var Be=m[Q];Q&&b&&(Be=fr(Be,ya(b))),fe=hr(Be.length,fe),ae[Q]=!j&&(b||D>=120&&Be.length>=120)?new So(Q&&Be):n}Be=m[0];var qe=-1,rt=ae[0];e:for(;++qe<D&&Pe.length<fe;){var mt=Be[qe],Vt=b?b(mt):mt;if(mt=j||mt!==0?mt:0,!(rt?wc(rt,Vt):A(Pe,Vt,j))){for(Q=z;--Q;){var dn=ae[Q];if(!(dn?wc(dn,Vt):A(m[Q],Vt,j)))continue e}rt&&rt.push(Vt),Pe.push(mt)}}return Pe}function n0(m,b,j,A){return ys(m,function(D,z,Q){b(A,j(D),z,Q)}),A}function Su(m,b,j){b=$o(b,m),m=Vc(m,b);var A=m==null?m:m[Dn(xs(b))];return A==null?n:Gs(A,m,j)}function xp(m){return yr(m)&&wn(m)==Le}function Ys(m){return yr(m)&&wn(m)==ht}function Vr(m){return yr(m)&&wn(m)==Je}function _u(m,b,j,A,D){return m===b?!0:m==null||b==null||!yr(m)&&!yr(b)?m!==m&&b!==b:hf(m,b,j,A,_u,D)}function hf(m,b,j,A,D,z){var Q=zt(m),ae=zt(b),fe=Q?Re:rs(m),Pe=ae?Re:rs(b);fe=fe==Le?Ge:fe,Pe=Pe==Le?Ge:Pe;var Be=fe==Ge,qe=Pe==Ge,rt=fe==Pe;if(rt&&Ol(m)){if(!Ol(b))return!1;Q=!0,Be=!1}if(rt&&!Be)return z||(z=new js),Q||Qc(m)?Ob(m,b,j,A,D,z):Tb(m,b,fe,j,A,D,z);if(!(j&C)){var mt=Be&&Mn.call(m,"__wrapped__"),Vt=qe&&Mn.call(b,"__wrapped__");if(mt||Vt){var dn=mt?m.value():m,Bt=Vt?b.value():b;return z||(z=new js),D(dn,Bt,j,A,z)}}return rt?(z||(z=new js),ns(m,b,j,A,D,z)):!1}function bp(m){return yr(m)&&rs(m)==Wt}function pf(m,b,j,A){var D=j.length,z=D,Q=!A;if(m==null)return!z;for(m=$n(m);D--;){var ae=j[D];if(Q&&ae[2]?ae[1]!==m[ae[0]]:!(ae[0]in m))return!1}for(;++D<z;){ae=j[D];var fe=ae[0],Pe=m[fe],Be=ae[1];if(Q&&ae[2]){if(Pe===n&&!(fe in m))return!1}else{var qe=new js;if(A)var rt=A(Pe,Be,fe,m,b,qe);if(!(rt===n?_u(Be,Pe,C|_,A,qe):rt))return!1}}return!0}function Ui(m){if(!gr(m)||Gp(m))return!1;var b=gi(m)?zv:Gd;return b.test(Ao(m))}function wp(m){return yr(m)&&wn(m)==oe}function r0(m){return yr(m)&&rs(m)==me}function s0(m){return yr(m)&&Nu(m.length)&&!!Xn[wn(m)]}function a0(m){return typeof m=="function"?m:m==null?ye:typeof m=="object"?zt(m)?_p(m[0],m[1]):o0(m):Rn(m)}function Cp(m){if(!nr(m))return Ha(m);var b=[];for(var j in $n(m))Mn.call(m,j)&&j!="constructor"&&b.push(j);return b}function fb(m){if(!gr(m))return bl(m);var b=nr(m),j=[];for(var A in m)A=="constructor"&&(b||!Mn.call(m,A))||j.push(A);return j}function Sp(m,b){return m<b}function i0(m,b){var j=-1,A=Kr(m)?Se(m.length):[];return jo(m,function(D,z,Q){A[++j]=b(D,z,Q)}),A}function o0(m){var b=Vp(m);return b.length==1&&b[0][2]?Mb(b[0][0],b[0][1]):function(j){return j===m||pf(j,m,b)}}function _p(m,b){return Fp(m)&&Lb(b)?Mb(Dn(m),b):function(j){var A=Xf(j,m);return A===n&&A===b?nd(j,m):_u(b,A,C|_)}}function mf(m,b,j,A,D){m!==b&&Nc(b,function(z,Q){if(D||(D=new js),gr(z))q_(m,b,Q,j,mf,A,D);else{var ae=A?A(zp(m,Q),z,Q+"",m,b,D):n;ae===n&&(ae=z),Fi(m,Q,ae)}},ss)}function q_(m,b,j,A,D,z,Q){var ae=zp(m,j),fe=zp(b,j),Pe=Q.get(fe);if(Pe){Fi(m,j,Pe);return}var Be=z?z(ae,fe,j+"",m,b,Q):n,qe=Be===n;if(qe){var rt=zt(fe),mt=!rt&&Ol(fe),Vt=!rt&&!mt&&Qc(fe);Be=fe,rt||mt||Vt?zt(ae)?Be=ae:Er(ae)?Be=Hr(ae):mt?(qe=!1,Be=m0(fe,!0)):Vt?(qe=!1,Be=v0(fe,!0)):Be=[]:Qa(fe)||Mo(fe)?(Be=ae,Mo(ae)?Be=$w(ae):(!gr(ae)||gi(ae))&&(Be=_0(fe))):qe=!1}qe&&(Q.set(fe,Be),D(Be,fe,A,z,Q),Q.delete(fe)),Fi(m,j,Be)}function l0(m,b){var j=m.length;if(j)return b+=b<0?j:0,mi(b,j)?m[b]:n}function u0(m,b,j){b.length?b=fr(b,function(z){return zt(z)?function(Q){return Ya(Q,z.length===1?z[0]:z)}:z}):b=[ye];var A=-1;b=fr(b,ya(St()));var D=i0(m,function(z,Q,ae){var fe=fr(b,function(Pe){return Pe(z)});return{criteria:fe,index:++A,value:z}});return Fx(D,function(z,Q){return Cb(z,Q,j)})}function hb(m,b){return jp(m,b,function(j,A){return nd(m,A)})}function jp(m,b,j){for(var A=-1,D=b.length,z={};++A<D;){var Q=b[A],ae=Ya(m,Q);j(ae,Q)&&Ic(z,$o(Q,m),ae)}return z}function pb(m){return function(b){return Ya(b,m)}}function Ep(m,b,j,A){var D=A?Dv:xc,z=-1,Q=b.length,ae=m;for(m===b&&(b=Hr(b)),j&&(ae=fr(m,ya(j)));++z<Q;)for(var fe=0,Pe=b[z],Be=j?j(Pe):Pe;(fe=D(ae,Be,fe,A))>-1;)ae!==m&&cp.call(ae,fe,1),cp.call(m,fe,1);return m}function c0(m,b){for(var j=m?b.length:0,A=j-1;j--;){var D=b[j];if(j==A||D!==z){var z=D;mi(D)?cp.call(m,D,1):xf(m,D)}}return m}function $p(m,b){return m+wo(qv()*(b-m+1))}function mb(m,b,j,A){for(var D=-1,z=or(Rc((b-m)/(j||1)),0),Q=Se(z);z--;)Q[A?z:++D]=m,m+=j;return Q}function d0(m,b){var j="";if(!m||b<1||b>xe)return j;do b%2&&(j+=m),b=wo(b/2),b&&(m+=m);while(b);return j}function nn(m,b){return Lf(E0(m,b,ye),m+"")}function Mc(m){return Ac(sd(m))}function Rp(m,b){var j=sd(m);return If(j,hi(b,0,j.length))}function Ic(m,b,j,A){if(!gr(m))return m;b=$o(b,m);for(var D=-1,z=b.length,Q=z-1,ae=m;ae!=null&&++D<z;){var fe=Dn(b[D]),Pe=j;if(fe==="__proto__"||fe==="constructor"||fe==="prototype")return m;if(D!=Q){var Be=ae[fe];Pe=A?A(Be,fe,ae):n,Pe===n&&(Pe=gr(Be)?Be:mi(b[D+1])?[]:{})}bu(ae,fe,Pe),ae=ae[fe]}return m}var gf=Oc?function(m,b){return Oc.set(m,b),m}:ye,vf=tf?function(m,b){return tf(m,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:ye;function gb(m){return If(sd(m))}function Ca(m,b,j){var A=-1,D=m.length;b<0&&(b=-b>D?0:D+b),j=j>D?D:j,j<0&&(j+=D),D=b>j?0:j-b>>>0,b>>>=0;for(var z=Se(D);++A<D;)z[A]=m[A+b];return z}function vb(m,b){var j;return jo(m,function(A,D,z){return j=b(A,D,z),!j}),!!j}function yf(m,b,j){var A=0,D=m==null?A:m.length;if(typeof b=="number"&&b===b&&D<=de){for(;A<D;){var z=A+D>>>1,Q=m[z];Q!==null&&!Rs(Q)&&(j?Q<=b:Q<b)?A=z+1:D=z}return D}return Op(m,b,ye,j)}function Op(m,b,j,A){var D=0,z=m==null?0:m.length;if(z===0)return 0;b=j(b);for(var Q=b!==b,ae=b===null,fe=Rs(b),Pe=b===n;D<z;){var Be=wo((D+z)/2),qe=j(m[Be]),rt=qe!==n,mt=qe===null,Vt=qe===qe,dn=Rs(qe);if(Q)var Bt=A||Vt;else Pe?Bt=Vt&&(A||rt):ae?Bt=Vt&&rt&&(A||!mt):fe?Bt=Vt&&rt&&!mt&&(A||!dn):mt||dn?Bt=!1:Bt=A?qe<=b:qe<b;Bt?D=Be+1:z=Be}return hr(z,Oe)}function f0(m,b){for(var j=-1,A=m.length,D=0,z=[];++j<A;){var Q=m[j],ae=b?b(Q):Q;if(!j||!ea(ae,fe)){var fe=ae;z[D++]=Q===0?0:Q}}return z}function Tp(m){return typeof m=="number"?m:Rs(m)?Y:+m}function Zs(m){if(typeof m=="string")return m;if(zt(m))return fr(m,Zs)+"";if(Rs(m))return hl?hl.call(m):"";var b=m+"";return b=="0"&&1/m==-1/0?"-0":b}function Eo(m,b,j){var A=-1,D=Jh,z=m.length,Q=!0,ae=[],fe=ae;if(j)Q=!1,D=Mv;else if(z>=s){var Pe=b?null:$b(m);if(Pe)return op(Pe);Q=!1,D=wc,fe=new So}else fe=b?[]:ae;e:for(;++A<z;){var Be=m[A],qe=b?b(Be):Be;if(Be=j||Be!==0?Be:0,Q&&qe===qe){for(var rt=fe.length;rt--;)if(fe[rt]===qe)continue e;b&&fe.push(qe),ae.push(Be)}else D(fe,qe,j)||(fe!==ae&&fe.push(qe),ae.push(Be))}return ae}function xf(m,b){return b=$o(b,m),m=Vc(m,b),m==null||delete m[Dn(xs(b))]}function h0(m,b,j,A){return Ic(m,b,j(Ya(m,b)),A)}function bf(m,b,j,A){for(var D=m.length,z=A?D:-1;(A?z--:++z<D)&&b(m[z],z,m););return j?Ca(m,A?0:z,A?z+1:D):Ca(m,A?z+1:0,A?D:z)}function yb(m,b){var j=m;return j instanceof un&&(j=j.value()),Iv(b,function(A,D){return D.func.apply(D.thisArg,bo([A],D.args))},j)}function wf(m,b,j){var A=m.length;if(A<2)return A?Eo(m[0]):[];for(var D=-1,z=Se(A);++D<A;)for(var Q=m[D],ae=-1;++ae<A;)ae!=D&&(z[D]=ml(z[D]||Q,m[ae],b,j));return Eo(xn(z,1),b,j)}function p0(m,b,j){for(var A=-1,D=m.length,z=b.length,Q={};++A<D;){var ae=A<z?b[A]:n;j(Q,m[A],ae)}return Q}function Ap(m){return Er(m)?m:[]}function Cf(m){return typeof m=="function"?m:ye}function $o(m,b){return zt(m)?m:Fp(m,b)?[m]:qi(In(m))}var xb=nn;function vl(m,b,j){var A=m.length;return j=j===n?A:j,!b&&j>=A?m:Ca(m,b,j)}var bb=dp||function(m){return Nr.clearTimeout(m)};function m0(m,b){if(b)return m.slice();var j=m.length,A=fu?fu(j):new m.constructor(j);return m.copy(A),A}function ju(m){var b=new m.constructor(m.byteLength);return new $c(b).set(new $c(m)),b}function g0(m,b){var j=b?ju(m.buffer):m.buffer;return new m.constructor(j,m.byteOffset,m.byteLength)}function kp(m){var b=new m.constructor(m.source,tl.exec(m));return b.lastIndex=m.lastIndex,b}function wb(m){return vu?$n(vu.call(m)):{}}function v0(m,b){var j=b?ju(m.buffer):m.buffer;return new m.constructor(j,m.byteOffset,m.length)}function Sf(m,b){if(m!==b){var j=m!==n,A=m===null,D=m===m,z=Rs(m),Q=b!==n,ae=b===null,fe=b===b,Pe=Rs(b);if(!ae&&!Pe&&!z&&m>b||z&&Q&&fe&&!ae&&!Pe||A&&Q&&fe||!j&&fe||!D)return 1;if(!A&&!z&&!Pe&&m<b||Pe&&j&&D&&!A&&!z||ae&&j&&D||!Q&&D||!fe)return-1}return 0}function Cb(m,b,j){for(var A=-1,D=m.criteria,z=b.criteria,Q=D.length,ae=j.length;++A<Q;){var fe=Sf(D[A],z[A]);if(fe){if(A>=ae)return fe;var Pe=j[A];return fe*(Pe=="desc"?-1:1)}}return m.index-b.index}function y0(m,b,j,A){for(var D=-1,z=m.length,Q=j.length,ae=-1,fe=b.length,Pe=or(z-Q,0),Be=Se(fe+Pe),qe=!A;++ae<fe;)Be[ae]=b[ae];for(;++D<Q;)(qe||D<z)&&(Be[j[D]]=m[D]);for(;Pe--;)Be[ae++]=m[D++];return Be}function Sb(m,b,j,A){for(var D=-1,z=m.length,Q=-1,ae=j.length,fe=-1,Pe=b.length,Be=or(z-ae,0),qe=Se(Be+Pe),rt=!A;++D<Be;)qe[D]=m[D];for(var mt=D;++fe<Pe;)qe[mt+fe]=b[fe];for(;++Q<ae;)(rt||D<z)&&(qe[mt+j[Q]]=m[D++]);return qe}function Hr(m,b){var j=-1,A=m.length;for(b||(b=Se(A));++j<A;)b[j]=m[j];return b}function Xs(m,b,j,A){var D=!j;j||(j={});for(var z=-1,Q=b.length;++z<Q;){var ae=b[z],fe=A?A(j[ae],m[ae],ae,j,m):n;fe===n&&(fe=m[ae]),D?fi(j,ae,fe):bu(j,ae,fe)}return j}function Np(m,b){return Xs(m,Tf(m),b)}function _f(m,b){return Xs(m,Bp(m),b)}function Eu(m,b){return function(j,A){var D=zt(j)?O_:pl,z=b?b():{};return D(j,m,St(A,2),z)}}function $u(m){return nn(function(b,j){var A=-1,D=j.length,z=D>1?j[D-1]:n,Q=D>2?j[2]:n;for(z=m.length>3&&typeof z=="function"?(D--,z):n,Q&&$s(j[0],j[1],Q)&&(z=D<3?n:z,D=1),b=$n(b);++A<D;){var ae=j[A];ae&&m(b,ae,A,z)}return b})}function x0(m,b){return function(j,A){if(j==null)return j;if(!Kr(j))return m(j,A);for(var D=j.length,z=b?D:-1,Q=$n(j);(b?z--:++z<D)&&A(Q[z],z,Q)!==!1;);return j}}function Ru(m){return function(b,j,A){for(var D=-1,z=$n(b),Q=A(b),ae=Q.length;ae--;){var fe=Q[m?ae:++D];if(j(z[fe],fe,z)===!1)break}return b}}function _b(m,b,j){var A=b&E,D=Za(m);function z(){var Q=this&&this!==Nr&&this instanceof z?D:m;return Q.apply(A?j:this,arguments)}return z}function Sa(m){return function(b){b=In(b);var j=ll(b)?Ua(b):n,A=j?j[0]:b.charAt(0),D=j?vl(j,1).join(""):b.slice(1);return A[m]()+D}}function Es(m){return function(b){return Iv(S(Io(b).replace(Kd,"")),m,"")}}function Za(m){return function(){var b=arguments;switch(b.length){case 0:return new m;case 1:return new m(b[0]);case 2:return new m(b[0],b[1]);case 3:return new m(b[0],b[1],b[2]);case 4:return new m(b[0],b[1],b[2],b[3]);case 5:return new m(b[0],b[1],b[2],b[3],b[4]);case 6:return new m(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new m(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var j=wa(m.prototype),A=m.apply(j,b);return gr(A)?A:j}}function jb(m,b,j){var A=Za(m);function D(){for(var z=arguments.length,Q=Se(z),ae=z,fe=Tu(D);ae--;)Q[ae]=arguments[ae];var Pe=z<3&&Q[0]!==fe&&Q[z-1]!==fe?[]:ul(Q,fe);if(z-=Pe.length,z<j)return b0(m,b,_r,D.placeholder,n,Q,Pe,n,n,j-z);var Be=this&&this!==Nr&&this instanceof D?A:m;return Gs(Be,this,Q)}return D}function Ro(m){return function(b,j,A){var D=$n(b);if(!Kr(b)){var z=St(j,3);b=Zr(b),j=function(ae){return z(D[ae],ae,D)}}var Q=m(b,j,A);return Q>-1?D[z?b[Q]:Q]:n}}function Gi(m){return lr(function(b){var j=b.length,A=j,D=qs.prototype.thru;for(m&&b.reverse();A--;){var z=b[A];if(typeof z!="function")throw new ba(i);if(D&&!Q&&Of(z)=="wrapper")var Q=new qs([],!0)}for(A=Q?A:j;++A<j;){z=b[A];var ae=Of(z),fe=ae=="wrapper"?Dp(z):n;fe&&Up(fe[0])&&fe[1]==(T|N|L|P)&&!fe[4].length&&fe[9]==1?Q=Q[Of(fe[0])].apply(Q,fe[3]):Q=z.length==1&&Up(z)?Q[ae]():Q.thru(z)}return function(){var Pe=arguments,Be=Pe[0];if(Q&&Pe.length==1&&zt(Be))return Q.plant(Be).value();for(var qe=0,rt=j?b[qe].apply(this,Pe):Be;++qe<j;)rt=b[qe].call(this,rt);return rt}})}function _r(m,b,j,A,D,z,Q,ae,fe,Pe){var Be=b&T,qe=b&E,rt=b&$,mt=b&(N|M),Vt=b&V,dn=rt?n:Za(m);function Bt(){for(var Cn=arguments.length,On=Se(Cn),yi=Cn;yi--;)On[yi]=arguments[yi];if(mt)var Ra=Tu(Bt),xi=I_(On,Ra);if(A&&(On=y0(On,A,D,mt)),z&&(On=Sb(On,z,Q,mt)),Cn-=xi,mt&&Cn<Pe){var Xr=ul(On,Ra);return b0(m,b,_r,Bt.placeholder,j,On,Xr,ae,fe,Pe-Cn)}var Po=qe?j:this,Lu=rt?Po[m]:m;return Cn=On.length,ae?On=Hi(On,ae):Vt&&Cn>1&&On.reverse(),Be&&fe<Cn&&(On.length=fe),this&&this!==Nr&&this instanceof Bt&&(Lu=dn||Za(Lu)),Lu.apply(Po,On)}return Bt}function jf(m,b){return function(j,A){return n0(j,m,b(A),{})}}function Pc(m,b){return function(j,A){var D;if(j===n&&A===n)return b;if(j!==n&&(D=j),A!==n){if(D===n)return A;typeof j=="string"||typeof A=="string"?(j=Zs(j),A=Zs(A)):(j=Tp(j),A=Tp(A)),D=m(j,A)}return D}}function Ef(m){return lr(function(b){return b=fr(b,ya(St())),nn(function(j){var A=this;return m(b,function(D){return Gs(D,A,j)})})})}function $f(m,b){b=b===n?" ":Zs(b);var j=b.length;if(j<2)return j?d0(b,m):b;var A=d0(b,Rc(m/Bi(b)));return ll(b)?vl(Ua(A),0,m).join(""):A.slice(0,m)}function Eb(m,b,j,A){var D=b&E,z=Za(m);function Q(){for(var ae=-1,fe=arguments.length,Pe=-1,Be=A.length,qe=Se(Be+fe),rt=this&&this!==Nr&&this instanceof Q?z:m;++Pe<Be;)qe[Pe]=A[Pe];for(;fe--;)qe[Pe++]=arguments[++ae];return Gs(rt,D?j:this,qe)}return Q}function yl(m){return function(b,j,A){return A&&typeof A!="number"&&$s(b,j,A)&&(j=A=n),b=Zi(b),j===n?(j=b,b=0):j=Zi(j),A=A===n?b<j?1:-1:Zi(A),mb(b,j,A,m)}}function Ou(m){return function(b,j){return typeof b=="string"&&typeof j=="string"||(b=Ja(b),j=Ja(j)),m(b,j)}}function b0(m,b,j,A,D,z,Q,ae,fe,Pe){var Be=b&N,qe=Be?Q:n,rt=Be?n:Q,mt=Be?z:n,Vt=Be?n:z;b|=Be?L:k,b&=~(Be?k:L),b&O||(b&=-4);var dn=[m,b,D,mt,qe,Vt,rt,ae,fe,Pe],Bt=j.apply(n,dn);return Up(m)&&Hp(Bt,dn),Bt.placeholder=A,qp(Bt,m,b)}function Lp(m){var b=Dr[m];return function(j,A){if(j=Ja(j),A=A==null?0:hr(Kt(A),292),A&&nf(j)){var D=(In(j)+"e").split("e"),z=b(D[0]+"e"+(+D[1]+A));return D=(In(z)+"e").split("e"),+(D[0]+"e"+(+D[1]-A))}return b(j)}}var $b=yn&&1/op(new yn([,-0]))[1]==pe?function(m){return new yn(m)}:lt;function Rf(m){return function(b){var j=rs(b);return j==Wt?ip(b):j==me?P_(b):M_(b,m(b))}}function zi(m,b,j,A,D,z,Q,ae){var fe=b&$;if(!fe&&typeof m!="function")throw new ba(i);var Pe=A?A.length:0;if(Pe||(b&=-97,A=D=n),Q=Q===n?Q:or(Kt(Q),0),ae=ae===n?ae:Kt(ae),Pe-=D?D.length:0,b&k){var Be=A,qe=D;A=D=n}var rt=fe?n:Dp(m),mt=[m,b,j,A,D,Be,qe,z,Q,ae];if(rt&&Nf(mt,rt),m=mt[0],b=mt[1],j=mt[2],A=mt[3],D=mt[4],ae=mt[9]=mt[9]===n?fe?0:m.length:or(mt[9]-Pe,0),!ae&&b&(N|M)&&(b&=-25),!b||b==E)var Vt=_b(m,b,j);else b==N||b==M?Vt=jb(m,b,ae):(b==L||b==(E|L))&&!D.length?Vt=Eb(m,b,j,A):Vt=_r.apply(n,mt);var dn=rt?gf:Hp;return qp(dn(Vt,mt),m,b)}function Mp(m,b,j,A){return m===n||ea(m,jc[j])&&!Mn.call(A,j)?b:m}function w0(m,b,j,A,D,z){return gr(m)&&gr(b)&&(z.set(b,m),mf(m,b,n,w0,z),z.delete(b)),m}function Rb(m){return Qa(m)?n:m}function Ob(m,b,j,A,D,z){var Q=j&C,ae=m.length,fe=b.length;if(ae!=fe&&!(Q&&fe>ae))return!1;var Pe=z.get(m),Be=z.get(b);if(Pe&&Be)return Pe==b&&Be==m;var qe=-1,rt=!0,mt=j&_?new So:n;for(z.set(m,b),z.set(b,m);++qe<ae;){var Vt=m[qe],dn=b[qe];if(A)var Bt=Q?A(dn,Vt,qe,b,m,z):A(Vt,dn,qe,m,b,z);if(Bt!==n){if(Bt)continue;rt=!1;break}if(mt){if(!Pv(b,function(Cn,On){if(!wc(mt,On)&&(Vt===Cn||D(Vt,Cn,j,A,z)))return mt.push(On)})){rt=!1;break}}else if(!(Vt===dn||D(Vt,dn,j,A,z))){rt=!1;break}}return z.delete(m),z.delete(b),rt}function Tb(m,b,j,A,D,z,Q){switch(j){case Jt:if(m.byteLength!=b.byteLength||m.byteOffset!=b.byteOffset)return!1;m=m.buffer,b=b.buffer;case ht:return!(m.byteLength!=b.byteLength||!z(new $c(m),new $c(b)));case Xe:case Je:case Lt:return ea(+m,+b);case tn:return m.name==b.name&&m.message==b.message;case oe:case He:return m==b+"";case Wt:var ae=ip;case me:var fe=A&C;if(ae||(ae=op),m.size!=b.size&&!fe)return!1;var Pe=Q.get(m);if(Pe)return Pe==b;A|=_,Q.set(m,b);var Be=Ob(ae(m),ae(b),A,D,z,Q);return Q.delete(m),Be;case ze:if(vu)return vu.call(m)==vu.call(b)}return!1}function ns(m,b,j,A,D,z){var Q=j&C,ae=Ip(m),fe=ae.length,Pe=Ip(b),Be=Pe.length;if(fe!=Be&&!Q)return!1;for(var qe=fe;qe--;){var rt=ae[qe];if(!(Q?rt in b:Mn.call(b,rt)))return!1}var mt=z.get(m),Vt=z.get(b);if(mt&&Vt)return mt==b&&Vt==m;var dn=!0;z.set(m,b),z.set(b,m);for(var Bt=Q;++qe<fe;){rt=ae[qe];var Cn=m[rt],On=b[rt];if(A)var yi=Q?A(On,Cn,rt,b,m,z):A(Cn,On,rt,m,b,z);if(!(yi===n?Cn===On||D(Cn,On,j,A,z):yi)){dn=!1;break}Bt||(Bt=rt=="constructor")}if(dn&&!Bt){var Ra=m.constructor,xi=b.constructor;Ra!=xi&&"constructor"in m&&"constructor"in b&&!(typeof Ra=="function"&&Ra instanceof Ra&&typeof xi=="function"&&xi instanceof xi)&&(dn=!1)}return z.delete(m),z.delete(b),dn}function lr(m){return Lf(E0(m,n,Qs),m+"")}function Ip(m){return ub(m,Zr,Tf)}function Pp(m){return ub(m,ss,Bp)}var Dp=Oc?function(m){return Oc.get(m)}:lt;function Of(m){for(var b=m.name+"",j=qa[b],A=Mn.call(qa,b)?j.length:0;A--;){var D=j[A],z=D.func;if(z==null||z==m)return D.name}return b}function Tu(m){var b=Mn.call(B,"placeholder")?B:m;return b.placeholder}function St(){var m=B.iteratee||Tt;return m=m===Tt?a0:m,arguments.length?m(arguments[0],arguments[1]):m}function Dc(m,b){var j=m.__data__;return To(b)?j[typeof b=="string"?"string":"hash"]:j.map}function Vp(m){for(var b=Zr(m),j=b.length;j--;){var A=b[j],D=m[A];b[j]=[A,D,Lb(D)]}return b}function xl(m,b){var j=Bv(m,b);return Ui(j)?j:n}function Ab(m){var b=Mn.call(m,_s),j=m[_s];try{m[_s]=n;var A=!0}catch{}var D=Ss.call(m);return A&&(b?m[_s]=j:delete m[_s]),D}var Tf=dl?function(m){return m==null?[]:(m=$n(m),Vi(dl(m),function(b){return hu.call(m,b)}))}:Oj,Bp=dl?function(m){for(var b=[];m;)bo(b,Tf(m)),m=Jd(m);return b}:Oj,rs=wn;(rf&&rs(new rf(new ArrayBuffer(1)))!=Jt||zr&&rs(new zr)!=Wt||pr&&rs(pr.resolve())!=dt||yn&&rs(new yn)!=me||di&&rs(new di)!=at)&&(rs=function(m){var b=wn(m),j=b==Ge?m.constructor:n,A=j?Ao(j):"";if(A)switch(A){case Wx:return Jt;case Qx:return Wt;case sf:return dt;case af:return me;case Jx:return at}return b});function kb(m,b,j){for(var A=-1,D=j.length;++A<D;){var z=j[A],Q=z.size;switch(z.type){case"drop":m+=Q;break;case"dropRight":b-=Q;break;case"take":b=hr(b,m+Q);break;case"takeRight":m=or(m,b-Q);break}}return{start:m,end:b}}function C0(m){var b=m.match(Pa);return b?b[1].split(ma):[]}function Af(m,b,j){b=$o(b,m);for(var A=-1,D=b.length,z=!1;++A<D;){var Q=Dn(b[A]);if(!(z=m!=null&&j(m,Q)))break;m=m[Q]}return z||++A!=D?z:(D=m==null?0:m.length,!!D&&Nu(D)&&mi(Q,D)&&(zt(m)||Mo(m)))}function S0(m){var b=m.length,j=new m.constructor(b);return b&&typeof m[0]=="string"&&Mn.call(m,"index")&&(j.index=m.index,j.input=m.input),j}function _0(m){return typeof m.constructor=="function"&&!nr(m)?wa(Jd(m)):{}}function j0(m,b,j){var A=m.constructor;switch(b){case ht:return ju(m);case Xe:case Je:return new A(+m);case Jt:return g0(m,j);case jn:case dr:case fa:case cs:case er:case Zn:case Nn:case ha:case ps:return v0(m,j);case Wt:return new A;case Lt:case He:return new A(m);case oe:return kp(m);case me:return new A;case ze:return wb(m)}}function Nb(m,b){var j=b.length;if(!j)return m;var A=j-1;return b[A]=(j>1?"& ":"")+b[A],b=b.join(j>2?", ":" "),m.replace(ts,`{
/* [wrapped with `+b+`] */
`)}function Oo(m){return zt(m)||Mo(m)||!!(zs&&m&&m[zs])}function mi(m,b){var j=typeof m;return b=b??xe,!!b&&(j=="number"||j!="symbol"&&Pi.test(m))&&m>-1&&m%1==0&&m<b}function $s(m,b,j){if(!gr(j))return!1;var A=typeof b;return(A=="number"?Kr(j)&&mi(b,j.length):A=="string"&&b in j)?ea(j[b],m):!1}function Fp(m,b){if(zt(m))return!1;var j=typeof m;return j=="number"||j=="symbol"||j=="boolean"||m==null||Rs(m)?!0:ws.test(m)||!vn.test(m)||b!=null&&m in $n(b)}function To(m){var b=typeof m;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?m!=="__proto__":m===null}function Up(m){var b=Of(m),j=B[b];if(typeof j!="function"||!(b in un.prototype))return!1;if(m===j)return!0;var A=Dp(j);return!!A&&m===A[0]}function Gp(m){return!!Gv&&Gv in m}var kf=Wd?gi:Tj;function nr(m){var b=m&&m.constructor,j=typeof b=="function"&&b.prototype||jc;return m===j}function Lb(m){return m===m&&!gr(m)}function Mb(m,b){return function(j){return j==null?!1:j[m]===b&&(b!==n||m in $n(j))}}function Ib(m){var b=zf(m,function(A){return j.size===f&&j.clear(),A}),j=b.cache;return b}function Nf(m,b){var j=m[1],A=b[1],D=j|A,z=D<(E|$|T),Q=A==T&&j==N||A==T&&j==P&&m[7].length<=b[8]||A==(T|P)&&b[7].length<=b[8]&&j==N;if(!(z||Q))return m;A&E&&(m[2]=b[2],D|=j&E?0:O);var ae=b[3];if(ae){var fe=m[3];m[3]=fe?y0(fe,ae,b[4]):ae,m[4]=fe?ul(m[3],h):b[4]}return ae=b[5],ae&&(fe=m[5],m[5]=fe?Sb(fe,ae,b[6]):ae,m[6]=fe?ul(m[5],h):b[6]),ae=b[7],ae&&(m[7]=ae),A&T&&(m[8]=m[8]==null?b[8]:hr(m[8],b[8])),m[9]==null&&(m[9]=b[9]),m[0]=b[0],m[1]=D,m}function bl(m){var b=[];if(m!=null)for(var j in $n(m))b.push(j);return b}function Pb(m){return Ss.call(m)}function E0(m,b,j){return b=or(b===n?m.length-1:b,0),function(){for(var A=arguments,D=-1,z=or(A.length-b,0),Q=Se(z);++D<z;)Q[D]=A[b+D];D=-1;for(var ae=Se(b+1);++D<b;)ae[D]=A[D];return ae[b]=j(Q),Gs(m,this,ae)}}function Vc(m,b){return b.length<2?m:Ya(m,Ca(b,0,-1))}function Hi(m,b){for(var j=m.length,A=hr(b.length,j),D=Hr(m);A--;){var z=b[A];m[A]=mi(z,j)?D[z]:n}return m}function zp(m,b){if(!(b==="constructor"&&typeof m[b]=="function")&&b!="__proto__")return m[b]}var Hp=Mf(gf),Bc=Hv||function(m,b){return Nr.setTimeout(m,b)},Lf=Mf(vf);function qp(m,b,j){var A=b+"";return Lf(m,Nb(A,Db(C0(A),j)))}function Mf(m){var b=0,j=0;return function(){var A=Co(),D=ee-(A-j);if(j=A,D>0){if(++b>=re)return arguments[0]}else b=0;return m.apply(n,arguments)}}function If(m,b){var j=-1,A=m.length,D=A-1;for(b=b===n?A:b;++j<b;){var z=$p(j,D),Q=m[z];m[z]=m[j],m[j]=Q}return m.length=b,m}var qi=Ib(function(m){var b=[];return m.charCodeAt(0)===46&&b.push(""),m.replace(gs,function(j,A,D,z){b.push(D?z.replace(Pn,"$1"):A||j)}),b});function Dn(m){if(typeof m=="string"||Rs(m))return m;var b=m+"";return b=="0"&&1/m==-1/0?"-0":b}function Ao(m){if(m!=null){try{return Qd.call(m)}catch{}try{return m+""}catch{}}return""}function Db(m,b){return Fa(_e,function(j){var A="_."+j[0];b&j[1]&&!Jh(m,A)&&m.push(A)}),m.sort()}function qr(m){if(m instanceof un)return m.clone();var b=new qs(m.__wrapped__,m.__chain__);return b.__actions__=Hr(m.__actions__),b.__index__=m.__index__,b.__values__=m.__values__,b}function K_(m,b,j){(j?$s(m,b,j):b===n)?b=1:b=or(Kt(b),0);var A=m==null?0:m.length;if(!A||b<1)return[];for(var D=0,z=0,Q=Se(Rc(A/b));D<A;)Q[z++]=Ca(m,D,D+=b);return Q}function Vb(m){for(var b=-1,j=m==null?0:m.length,A=0,D=[];++b<j;){var z=m[b];z&&(D[A++]=z)}return D}function Bb(){var m=arguments.length;if(!m)return[];for(var b=Se(m-1),j=arguments[0],A=m;A--;)b[A-1]=arguments[A];return bo(zt(j)?Hr(j):[j],xn(b,1))}var mr=nn(function(m,b){return Er(m)?ml(m,xn(b,1,Er,!0)):[]}),Ws=nn(function(m,b){var j=xs(b);return Er(j)&&(j=n),Er(m)?ml(m,xn(b,1,Er,!0),St(j,2)):[]}),ko=nn(function(m,b){var j=xs(b);return Er(j)&&(j=n),Er(m)?ml(m,xn(b,1,Er,!0),n,j):[]});function Fb(m,b,j){var A=m==null?0:m.length;return A?(b=j||b===n?1:Kt(b),Ca(m,b<0?0:b,A)):[]}function Ub(m,b,j){var A=m==null?0:m.length;return A?(b=j||b===n?1:Kt(b),b=A-b,Ca(m,0,b<0?0:b)):[]}function Y_(m,b){return m&&m.length?bf(m,St(b,3),!0,!0):[]}function $0(m,b){return m&&m.length?bf(m,St(b,3),!0):[]}function _a(m,b,j,A){var D=m==null?0:m.length;return D?(j&&typeof j!="number"&&$s(m,b,j)&&(j=0,A=D),on(m,b,j,A)):[]}function Xa(m,b,j){var A=m==null?0:m.length;if(!A)return-1;var D=j==null?0:Kt(j);return D<0&&(D=or(A+D,0)),ep(m,St(b,3),D)}function R0(m,b,j){var A=m==null?0:m.length;if(!A)return-1;var D=A-1;return j!==n&&(D=Kt(j),D=j<0?or(A+D,0):hr(D,A-1)),ep(m,St(b,3),D,!0)}function Qs(m){var b=m==null?0:m.length;return b?xn(m,1):[]}function Gb(m){var b=m==null?0:m.length;return b?xn(m,pe):[]}function wl(m,b){var j=m==null?0:m.length;return j?(b=b===n?1:Kt(b),xn(m,b)):[]}function Au(m){for(var b=-1,j=m==null?0:m.length,A={};++b<j;){var D=m[b];A[D[0]]=D[1]}return A}function No(m){return m&&m.length?m[0]:n}function O0(m,b,j){var A=m==null?0:m.length;if(!A)return-1;var D=j==null?0:Kt(j);return D<0&&(D=or(A+D,0)),xc(m,b,D)}function T0(m){var b=m==null?0:m.length;return b?Ca(m,0,-1):[]}var Ki=nn(function(m){var b=fr(m,Ap);return b.length&&b[0]===m[0]?t0(b):[]}),zb=nn(function(m){var b=xs(m),j=fr(m,Ap);return b===xs(j)?b=n:j.pop(),j.length&&j[0]===m[0]?t0(j,St(b,2)):[]}),Fc=nn(function(m){var b=xs(m),j=fr(m,Ap);return b=typeof b=="function"?b:n,b&&j.pop(),j.length&&j[0]===m[0]?t0(j,n,b):[]});function Pf(m,b){return m==null?"":za.call(m,b)}function xs(m){var b=m==null?0:m.length;return b?m[b-1]:n}function Uc(m,b,j){var A=m==null?0:m.length;if(!A)return-1;var D=A;return j!==n&&(D=Kt(j),D=D<0?or(A+D,0):hr(D,A-1)),b===b?xa(m,b,D):ep(m,bc,D,!0)}function Hb(m,b){return m&&m.length?l0(m,Kt(b)):n}var qb=nn(Gc);function Gc(m,b){return m&&m.length&&b&&b.length?Ep(m,b):m}function Kb(m,b,j){return m&&m.length&&b&&b.length?Ep(m,b,St(j,2)):m}function Kp(m,b,j){return m&&m.length&&b&&b.length?Ep(m,b,n,j):m}var Yb=lr(function(m,b){var j=m==null?0:m.length,A=df(m,b);return c0(m,fr(b,function(D){return mi(D,j)?+D:D}).sort(Sf)),A});function Z_(m,b){var j=[];if(!(m&&m.length))return j;var A=-1,D=[],z=m.length;for(b=St(b,3);++A<z;){var Q=m[A];b(Q,A,m)&&(j.push(Q),D.push(A))}return c0(m,D),j}function A0(m){return m==null?m:Kv.call(m)}function zn(m,b,j){var A=m==null?0:m.length;return A?(j&&typeof j!="number"&&$s(m,b,j)?(b=0,j=A):(b=b==null?0:Kt(b),j=j===n?A:Kt(j)),Ca(m,b,j)):[]}function ar(m,b){return yf(m,b)}function pn(m,b,j){return Op(m,b,St(j,2))}function _n(m,b){var j=m==null?0:m.length;if(j){var A=yf(m,b);if(A<j&&ea(m[A],b))return A}return-1}function Hn(m,b){return yf(m,b,!0)}function ja(m,b,j){return Op(m,b,St(j,2),!0)}function Cl(m,b){var j=m==null?0:m.length;if(j){var A=yf(m,b,!0)-1;if(ea(m[A],b))return A}return-1}function zc(m){return m&&m.length?f0(m):[]}function k0(m,b){return m&&m.length?f0(m,St(b,2)):[]}function Lo(m){var b=m==null?0:m.length;return b?Ca(m,1,b):[]}function jr(m,b,j){return m&&m.length?(b=j||b===n?1:Kt(b),Ca(m,0,b<0?0:b)):[]}function Sl(m,b,j){var A=m==null?0:m.length;return A?(b=j||b===n?1:Kt(b),b=A-b,Ca(m,b<0?0:b,A)):[]}function ku(m,b){return m&&m.length?bf(m,St(b,3),!1,!0):[]}function N0(m,b){return m&&m.length?bf(m,St(b,3)):[]}var Wa=nn(function(m){return Eo(xn(m,1,Er,!0))}),Hc=nn(function(m){var b=xs(m);return Er(b)&&(b=n),Eo(xn(m,1,Er,!0),St(b,2))}),Df=nn(function(m){var b=xs(m);return b=typeof b=="function"?b:n,Eo(xn(m,1,Er,!0),n,b)});function Js(m){return m&&m.length?Eo(m):[]}function L0(m,b){return m&&m.length?Eo(m,St(b,2)):[]}function M0(m,b){return b=typeof b=="function"?b:n,m&&m.length?Eo(m,n,b):[]}function qc(m){if(!(m&&m.length))return[];var b=0;return m=Vi(m,function(j){if(Er(j))return b=or(j.length,b),!0}),ol(b,function(j){return fr(m,tp(j))})}function Vf(m,b){if(!(m&&m.length))return[];var j=qc(m);return b==null?j:fr(j,function(A){return Gs(b,n,A)})}var _l=nn(function(m,b){return Er(m)?ml(m,b):[]}),ds=nn(function(m){return wf(Vi(m,Er))}),jl=nn(function(m){var b=xs(m);return Er(b)&&(b=n),wf(Vi(m,Er),St(b,2))}),Kc=nn(function(m){var b=xs(m);return b=typeof b=="function"?b:n,wf(Vi(m,Er),n,b)}),Yc=nn(qc);function I0(m,b){return p0(m||[],b||[],bu)}function P0(m,b){return p0(m||[],b||[],Ic)}var Zb=nn(function(m){var b=m.length,j=b>1?m[b-1]:n;return j=typeof j=="function"?(m.pop(),j):n,Vf(m,j)});function Zc(m){var b=B(m);return b.__chain__=!0,b}function D0(m,b){return b(m),m}function bs(m,b){return b(m)}var Xb=lr(function(m){var b=m.length,j=b?m[0]:0,A=this.__wrapped__,D=function(z){return df(z,m)};return b>1||this.__actions__.length||!(A instanceof un)||!mi(j)?this.thru(D):(A=A.slice(j,+j+(b?1:0)),A.__actions__.push({func:bs,args:[D],thisArg:n}),new qs(A,this.__chain__).thru(function(z){return b&&!z.length&&z.push(n),z}))});function Ea(){return Zc(this)}function Wb(){return new qs(this.value(),this.__chain__)}function Qb(){this.__values__===n&&(this.__values__=$a(this.value()));var m=this.__index__>=this.__values__.length,b=m?n:this.__values__[this.__index__++];return{done:m,value:b}}function X_(){return this}function El(m){for(var b,j=this;j instanceof Ka;){var A=qr(j);A.__index__=0,A.__values__=n,b?D.__wrapped__=A:b=A;var D=A;j=j.__wrapped__}return D.__wrapped__=m,b}function Yp(){var m=this.__wrapped__;if(m instanceof un){var b=m;return this.__actions__.length&&(b=new un(this)),b=b.reverse(),b.__actions__.push({func:bs,args:[A0],thisArg:n}),new qs(b,this.__chain__)}return this.thru(A0)}function V0(){return yb(this.__wrapped__,this.__actions__)}var Xc=Eu(function(m,b,j){Mn.call(m,j)?++m[j]:fi(m,j,1)});function Jb(m,b,j){var A=zt(m)?Dx:Jv;return j&&$s(m,b,j)&&(b=n),A(m,St(b,3))}function ew(m,b){var j=zt(m)?Vi:Gn;return j(m,St(b,3))}var tw=Ro(Xa),B0=Ro(R0);function F0(m,b){return xn(Bf(m,b),1)}function W_(m,b){return xn(Bf(m,b),pe)}function Q_(m,b,j){return j=j===n?1:Kt(j),xn(Bf(m,b),j)}function nw(m,b){var j=zt(m)?Fa:jo;return j(m,St(b,3))}function U0(m,b){var j=zt(m)?T_:yp;return j(m,St(b,3))}var rw=Eu(function(m,b,j){Mn.call(m,j)?m[j].push(b):fi(m,j,[b])});function Wc(m,b,j,A){m=Kr(m)?m:sd(m),j=j&&!A?Kt(j):0;var D=m.length;return j<0&&(j=or(D+j,0)),im(m)?j<=D&&m.indexOf(b,j)>-1:!!D&&xc(m,b,j)>-1}var Zp=nn(function(m,b,j){var A=-1,D=typeof b=="function",z=Kr(m)?Se(m.length):[];return jo(m,function(Q){z[++A]=D?Gs(b,Q,j):Su(Q,b,j)}),z}),sw=Eu(function(m,b,j){fi(m,j,b)});function Bf(m,b){var j=zt(m)?fr:i0;return j(m,St(b,3))}function aw(m,b,j,A){return m==null?[]:(zt(b)||(b=b==null?[]:[b]),j=A?n:j,zt(j)||(j=j==null?[]:[j]),u0(m,b,j))}var iw=Eu(function(m,b,j){m[j?0:1].push(b)},function(){return[[],[]]});function ow(m,b,j){var A=zt(m)?Iv:Vv,D=arguments.length<3;return A(m,St(b,4),j,D,jo)}function lw(m,b,j){var A=zt(m)?A_:Vv,D=arguments.length<3;return A(m,St(b,4),j,D,yp)}function Xp(m,b){var j=zt(m)?Vi:Gn;return j(m,Hf(St(b,3)))}function uw(m){var b=zt(m)?Ac:Mc;return b(m)}function cw(m,b,j){(j?$s(m,b,j):b===n)?b=1:b=Kt(b);var A=zt(m)?ib:Rp;return A(m,b)}function rr(m){var b=zt(m)?ob:gb;return b(m)}function G0(m){if(m==null)return 0;if(Kr(m))return im(m)?Bi(m):m.length;var b=rs(m);return b==Wt||b==me?m.size:Cp(m).length}function J_(m,b,j){var A=zt(m)?Pv:vb;return j&&$s(m,b,j)&&(b=n),A(m,St(b,3))}var dw=nn(function(m,b){if(m==null)return[];var j=b.length;return j>1&&$s(m,b[0],b[1])?b=[]:j>2&&$s(b[0],b[1],b[2])&&(b=[b[0]]),u0(m,xn(b,1),[])}),Wp=mu||function(){return Nr.Date.now()};function ej(m,b){if(typeof b!="function")throw new ba(i);return m=Kt(m),function(){if(--m<1)return b.apply(this,arguments)}}function fw(m,b,j){return b=j?n:b,b=m&&b==null?m.length:b,zi(m,T,n,n,n,n,b)}function Ff(m,b){var j;if(typeof b!="function")throw new ba(i);return m=Kt(m),function(){return--m>0&&(j=b.apply(this,arguments)),m<=1&&(b=n),j}}var $l=nn(function(m,b,j){var A=E;if(j.length){var D=ul(j,Tu($l));A|=L}return zi(m,A,b,j,D)}),Qp=nn(function(m,b,j){var A=E|$;if(j.length){var D=ul(j,Tu(Qp));A|=L}return zi(b,A,m,j,D)});function Uf(m,b,j){b=j?n:b;var A=zi(m,N,n,n,n,n,n,b);return A.placeholder=Uf.placeholder,A}function Jp(m,b,j){b=j?n:b;var A=zi(m,M,n,n,n,n,n,b);return A.placeholder=Jp.placeholder,A}function Rl(m,b,j){var A,D,z,Q,ae,fe,Pe=0,Be=!1,qe=!1,rt=!0;if(typeof m!="function")throw new ba(i);b=Ja(b)||0,gr(j)&&(Be=!!j.leading,qe="maxWait"in j,z=qe?or(Ja(j.maxWait)||0,b):z,rt="trailing"in j?!!j.trailing:rt);function mt(Xr){var Po=A,Lu=D;return A=D=n,Pe=Xr,Q=m.apply(Lu,Po),Q}function Vt(Xr){return Pe=Xr,ae=Bc(Cn,b),Be?mt(Xr):Q}function dn(Xr){var Po=Xr-fe,Lu=Xr-Pe,OM=b-Po;return qe?hr(OM,z-Lu):OM}function Bt(Xr){var Po=Xr-fe,Lu=Xr-Pe;return fe===n||Po>=b||Po<0||qe&&Lu>=z}function Cn(){var Xr=Wp();if(Bt(Xr))return On(Xr);ae=Bc(Cn,dn(Xr))}function On(Xr){return ae=n,rt&&A?mt(Xr):(A=D=n,Q)}function yi(){ae!==n&&bb(ae),Pe=0,A=fe=D=ae=n}function Ra(){return ae===n?Q:On(Wp())}function xi(){var Xr=Wp(),Po=Bt(Xr);if(A=arguments,D=this,fe=Xr,Po){if(ae===n)return Vt(fe);if(qe)return bb(ae),ae=Bc(Cn,b),mt(fe)}return ae===n&&(ae=Bc(Cn,b)),Q}return xi.cancel=yi,xi.flush=Ra,xi}var Yi=nn(function(m,b){return wu(m,1,b)}),Gf=nn(function(m,b,j){return wu(m,Ja(b)||0,j)});function tj(m){return zi(m,V)}function zf(m,b){if(typeof m!="function"||b!=null&&typeof b!="function")throw new ba(i);var j=function(){var A=arguments,D=b?b.apply(this,A):A[0],z=j.cache;if(z.has(D))return z.get(D);var Q=m.apply(this,A);return j.cache=z.set(D,Q)||z,Q};return j.cache=new(zf.Cache||Ks),j}zf.Cache=Ks;function Hf(m){if(typeof m!="function")throw new ba(i);return function(){var b=arguments;switch(b.length){case 0:return!m.call(this);case 1:return!m.call(this,b[0]);case 2:return!m.call(this,b[0],b[1]);case 3:return!m.call(this,b[0],b[1],b[2])}return!m.apply(this,b)}}function hw(m){return Ff(2,m)}var pw=xb(function(m,b){b=b.length==1&&zt(b[0])?fr(b[0],ya(St())):fr(xn(b,1),ya(St()));var j=b.length;return nn(function(A){for(var D=-1,z=hr(A.length,j);++D<z;)A[D]=b[D].call(this,A[D]);return Gs(m,this,A)})}),z0=nn(function(m,b){var j=ul(b,Tu(z0));return zi(m,L,n,b,j)}),em=nn(function(m,b){var j=ul(b,Tu(em));return zi(m,k,n,b,j)}),mw=lr(function(m,b){return zi(m,P,n,n,n,b)});function gw(m,b){if(typeof m!="function")throw new ba(i);return b=b===n?b:Kt(b),nn(m,b)}function nj(m,b){if(typeof m!="function")throw new ba(i);return b=b==null?0:or(Kt(b),0),nn(function(j){var A=j[b],D=vl(j,0,b);return A&&bo(D,A),Gs(m,this,D)})}function H0(m,b,j){var A=!0,D=!0;if(typeof m!="function")throw new ba(i);return gr(j)&&(A="leading"in j?!!j.leading:A,D="trailing"in j?!!j.trailing:D),Rl(m,b,{leading:A,maxWait:b,trailing:D})}function q0(m){return fw(m,1)}function rj(m,b){return z0(Cf(b),m)}function sj(){if(!arguments.length)return[];var m=arguments[0];return zt(m)?m:[m]}function qf(m){return vs(m,w)}function aj(m,b){return b=typeof b=="function"?b:n,vs(m,w,b)}function vw(m){return vs(m,g|w)}function mn(m,b){return b=typeof b=="function"?b:n,vs(m,g|w,b)}function K0(m,b){return b==null||Qv(m,b,Zr(b))}function ea(m,b){return m===b||m!==m&&b!==b}var Y0=Ou(ff),yw=Ou(function(m,b){return m>=b}),Mo=xp((function(){return arguments})())?xp:function(m){return yr(m)&&Mn.call(m,"callee")&&!hu.call(m,"callee")},zt=Se.isArray,tm=Qh?ya(Qh):Ys;function Kr(m){return m!=null&&Nu(m.length)&&!gi(m)}function Er(m){return yr(m)&&Kr(m)}function ij(m){return m===!0||m===!1||yr(m)&&wn(m)==Xe}var Ol=fp||Tj,xw=Nx?ya(Nx):Vr;function bw(m){return yr(m)&&m.nodeType===1&&!Qa(m)}function nm(m){if(m==null)return!0;if(Kr(m)&&(zt(m)||typeof m=="string"||typeof m.splice=="function"||Ol(m)||Qc(m)||Mo(m)))return!m.length;var b=rs(m);if(b==Wt||b==me)return!m.size;if(nr(m))return!Cp(m).length;for(var j in m)if(Mn.call(m,j))return!1;return!0}function Wn(m,b){return _u(m,b)}function Z0(m,b,j){j=typeof j=="function"?j:n;var A=j?j(m,b):n;return A===n?_u(m,b,n,j):!!A}function Yr(m){if(!yr(m))return!1;var b=wn(m);return b==tn||b==Ot||typeof m.message=="string"&&typeof m.name=="string"&&!Qa(m)}function oj(m){return typeof m=="number"&&nf(m)}function gi(m){if(!gr(m))return!1;var b=wn(m);return b==an||b==Pt||b==Ye||b==Z}function rm(m){return typeof m=="number"&&m==Kt(m)}function Nu(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=xe}function gr(m){var b=typeof m;return m!=null&&(b=="object"||b=="function")}function yr(m){return m!=null&&typeof m=="object"}var sm=Lx?ya(Lx):bp;function X0(m,b){return m===b||pf(m,b,Vp(b))}function lj(m,b,j){return j=typeof j=="function"?j:n,pf(m,b,Vp(b),j)}function ww(m){return Sw(m)&&m!=+m}function uj(m){if(kf(m))throw new Mt(a);return Ui(m)}function Cw(m){return m===null}function cj(m){return m==null}function Sw(m){return typeof m=="number"||yr(m)&&wn(m)==Lt}function Qa(m){if(!yr(m)||wn(m)!=Ge)return!1;var b=Jd(m);if(b===null)return!0;var j=Mn.call(b,"constructor")&&b.constructor;return typeof j=="function"&&j instanceof j&&Qd.call(j)==Ga}var am=Mx?ya(Mx):wp;function W0(m){return rm(m)&&m>=-9007199254740991&&m<=xe}var _w=Ix?ya(Ix):r0;function im(m){return typeof m=="string"||!zt(m)&&yr(m)&&wn(m)==He}function Rs(m){return typeof m=="symbol"||yr(m)&&wn(m)==ze}var Qc=Px?ya(Px):s0;function vi(m){return m===n}function Q0(m){return yr(m)&&rs(m)==at}function jw(m){return yr(m)&&wn(m)==Dt}var Ew=Ou(Sp),Kf=Ou(function(m,b){return m<=b});function $a(m){if(!m)return[];if(Kr(m))return im(m)?Ua(m):Hr(m);if(pu&&m[pu])return qx(m[pu]());var b=rs(m),j=b==Wt?ip:b==me?op:sd;return j(m)}function Zi(m){if(!m)return m===0?m:0;if(m=Ja(m),m===pe||m===-1/0){var b=m<0?-1:1;return b*be}return m===m?m:0}function Kt(m){var b=Zi(m),j=b%1;return b===b?j?b-j:b:0}function Xi(m){return m?hi(Kt(m),0,se):0}function Ja(m){if(typeof m=="number")return m;if(Rs(m))return Y;if(gr(m)){var b=typeof m.valueOf=="function"?m.valueOf():m;m=gr(b)?b+"":b}if(typeof m!="string")return m===0?m:+m;m=Ux(m);var j=kr.test(m);return j||zd.test(m)?R_(m.slice(2),j?2:8):nl.test(m)?Y:+m}function $w(m){return Xs(m,ss(m))}function Jc(m){return m?hi(Kt(m),-9007199254740991,xe):m===0?m:0}function In(m){return m==null?"":Zs(m)}var dj=$u(function(m,b){if(nr(b)||Kr(b)){Xs(b,Zr(b),m);return}for(var j in b)Mn.call(b,j)&&bu(m,j,b[j])}),Rw=$u(function(m,b){Xs(b,ss(b),m)}),om=$u(function(m,b,j,A){Xs(b,ss(b),m,A)}),fj=$u(function(m,b,j,A){Xs(b,Zr(b),m,A)}),hj=lr(df);function pj(m,b){var j=wa(m);return b==null?j:_o(j,b)}var mj=nn(function(m,b){m=$n(m);var j=-1,A=b.length,D=A>2?b[2]:n;for(D&&$s(b[0],b[1],D)&&(A=1);++j<A;)for(var z=b[j],Q=ss(z),ae=-1,fe=Q.length;++ae<fe;){var Pe=Q[ae],Be=m[Pe];(Be===n||ea(Be,jc[Pe])&&!Mn.call(m,Pe))&&(m[Pe]=z[Pe])}return m}),Ow=nn(function(m){return m.push(n,w0),Gs(Wf,n,m)});function ed(m,b){return Vx(m,St(b,3),ys)}function Yf(m,b){return Vx(m,St(b,3),Lc)}function Tw(m,b){return m==null?m:Nc(m,St(b,3),ss)}function gj(m,b){return m==null?m:Cu(m,St(b,3),ss)}function td(m,b){return m&&ys(m,St(b,3))}function Zf(m,b){return m&&Lc(m,St(b,3))}function Aw(m){return m==null?[]:gl(m,Zr(m))}function lm(m){return m==null?[]:gl(m,ss(m))}function Xf(m,b,j){var A=m==null?n:Ya(m,b);return A===n?j:A}function J0(m,b){return m!=null&&Af(m,b,e0)}function nd(m,b){return m!=null&&Af(m,b,cb)}var kw=jf(function(m,b,j){b!=null&&typeof b.toString!="function"&&(b=Ss.call(b)),m[b]=j},ve(ye)),Nw=jf(function(m,b,j){b!=null&&typeof b.toString!="function"&&(b=Ss.call(b)),Mn.call(m,b)?m[b].push(j):m[b]=[j]},St),vj=nn(Su);function Zr(m){return Kr(m)?Wv(m):Cp(m)}function ss(m){return Kr(m)?Wv(m,!0):fb(m)}function yj(m,b){var j={};return b=St(b,3),ys(m,function(A,D,z){fi(j,b(A,D,z),A)}),j}function xj(m,b){var j={};return b=St(b,3),ys(m,function(A,D,z){fi(j,D,b(A,D,z))}),j}var bj=$u(function(m,b,j){mf(m,b,j)}),Wf=$u(function(m,b,j,A){mf(m,b,j,A)}),um=lr(function(m,b){var j={};if(m==null)return j;var A=!1;b=fr(b,function(z){return z=$o(z,m),A||(A=z.length>1),z}),Xs(m,Pp(m),j),A&&(j=vs(j,g|v|w,Rb));for(var D=b.length;D--;)xf(j,b[D]);return j});function ey(m,b){return rd(m,Hf(St(b)))}var wj=lr(function(m,b){return m==null?{}:hb(m,b)});function rd(m,b){if(m==null)return{};var j=fr(Pp(m),function(A){return[A]});return b=St(b),jp(m,j,function(A,D){return b(A,D[0])})}function Cj(m,b,j){b=$o(b,m);var A=-1,D=b.length;for(D||(D=1,m=n);++A<D;){var z=m==null?n:m[Dn(b[A])];z===n&&(A=D,z=j),m=gi(z)?z.call(m):z}return m}function Lw(m,b,j){return m==null?m:Ic(m,b,j)}function Mw(m,b,j,A){return A=typeof A=="function"?A:n,m==null?m:Ic(m,b,j,A)}var ty=Rf(Zr),ny=Rf(ss);function ry(m,b,j){var A=zt(m),D=A||Ol(m)||Qc(m);if(b=St(b,4),j==null){var z=m&&m.constructor;D?j=A?new z:[]:gr(m)?j=gi(z)?wa(Jd(m)):{}:j={}}return(D?Fa:ys)(m,function(Q,ae,fe){return b(j,Q,ae,fe)}),j}function Iw(m,b){return m==null?!0:xf(m,b)}function cm(m,b,j){return m==null?m:h0(m,b,Cf(j))}function Sj(m,b,j,A){return A=typeof A=="function"?A:n,m==null?m:h0(m,b,Cf(j),A)}function sd(m){return m==null?[]:sp(m,Zr(m))}function sy(m){return m==null?[]:sp(m,ss(m))}function ay(m,b,j){return j===n&&(j=b,b=n),j!==n&&(j=Ja(j),j=j===j?j:0),b!==n&&(b=Ja(b),b=b===b?b:0),hi(Ja(m),b,j)}function dm(m,b,j){return b=Zi(b),j===n?(j=b,b=0):j=Zi(j),m=Ja(m),db(m,b,j)}function iy(m,b,j){if(j&&typeof j!="boolean"&&$s(m,b,j)&&(b=j=n),j===n&&(typeof b=="boolean"?(j=b,b=n):typeof m=="boolean"&&(j=m,m=n)),m===n&&b===n?(m=0,b=1):(m=Zi(m),b===n?(b=m,m=0):b=Zi(b)),m>b){var A=m;m=b,b=A}if(j||m%1||b%1){var D=qv();return hr(m+D*(b-m+Xd("1e-"+((D+"").length-1))),b)}return $p(m,b)}var Pw=Es(function(m,b,j){return b=b.toLowerCase(),m+(j?fm(b):b)});function fm(m){return x(In(m).toLowerCase())}function Io(m){return m=In(m),m&&m.replace(vo,ap).replace(xo,"")}function Tl(m,b,j){m=In(m),b=Zs(b);var A=m.length;j=j===n?A:hi(Kt(j),0,A);var D=j;return j-=b.length,j>=0&&m.slice(j,D)==b}function Al(m){return m=In(m),m&&ou.test(m)?m.replace(pa,Gx):m}function Qf(m){return m=In(m),m&&ft.test(m)?m.replace(Qe,"\\$&"):m}var Jf=Es(function(m,b,j){return m+(j?"-":"")+b.toLowerCase()}),kl=Es(function(m,b,j){return m+(j?" ":"")+b.toLowerCase()}),_j=Sa("toLowerCase");function Dw(m,b,j){m=In(m),b=Kt(b);var A=b?Bi(m):0;if(!b||A>=b)return m;var D=(b-A)/2;return $f(wo(D),j)+m+$f(Rc(D),j)}function eh(m,b,j){m=In(m),b=Kt(b);var A=b?Bi(m):0;return b&&A<b?m+$f(b-A,j):m}function jj(m,b,j){m=In(m),b=Kt(b);var A=b?Bi(m):0;return b&&A<b?$f(b-A,j)+m:m}function Vw(m,b,j){return j||b==null?b=0:b&&(b=+b),gu(In(m).replace(Et,""),b||0)}function hm(m,b,j){return(j?$s(m,b,j):b===n)?b=1:b=Kt(b),d0(In(m),b)}function Bw(){var m=arguments,b=In(m[0]);return m.length<3?b:b.replace(m[1],m[2])}var Ej=Es(function(m,b,j){return m+(j?"_":"")+b.toLowerCase()});function pm(m,b,j){return j&&typeof j!="number"&&$s(m,b,j)&&(b=j=n),j=j===n?se:j>>>0,j?(m=In(m),m&&(typeof b=="string"||b!=null&&!am(b))&&(b=Zs(b),!b&&ll(m))?vl(Ua(m),0,j):m.split(b,j)):[]}var mm=Es(function(m,b,j){return m+(j?" ":"")+x(b)});function Fw(m,b,j){return m=In(m),j=j==null?0:hi(Kt(j),0,m.length),b=Zs(b),m.slice(j,j+b.length)==b}function th(m,b,j){var A=B.templateSettings;j&&$s(m,b,j)&&(b=n),m=In(m),b=om({},b,A,Mp);var D=om({},b.imports,A.imports,Mp),z=Zr(D),Q=sp(D,z),ae,fe,Pe=0,Be=b.interpolate||Sn,qe="__p += '",rt=lp((b.escape||Sn).source+"|"+Be.source+"|"+(Be===jt?ga:Sn).source+"|"+(b.evaluate||Sn).source+"|$","g"),mt="//# sourceURL="+(Mn.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tx+"]")+`
`;m.replace(rt,function(Bt,Cn,On,yi,Ra,xi){return On||(On=yi),qe+=m.slice(Pe,xi).replace(Da,zx),Cn&&(ae=!0,qe+=`' +
__e(`+Cn+`) +
'`),Ra&&(fe=!0,qe+=`';
`+Ra+`;
__p += '`),On&&(qe+=`' +
((__t = (`+On+`)) == null ? '' : __t) +
'`),Pe=xi+Bt.length,Bt}),qe+=`';
`;var Vt=Mn.call(b,"variable")&&b.variable;if(!Vt)qe=`with (obj) {
`+qe+`
}
`;else if(Cs.test(Vt))throw new Mt(l);qe=(fe?qe.replace(Jo,""):qe).replace(el,"$1").replace(go,"$1;"),qe="function("+(Vt||"obj")+`) {
`+(Vt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+qe+`return __p
}`;var dn=R(function(){return En(z,mt+"return "+qe).apply(n,Q)});if(dn.source=qe,Yr(dn))throw dn;return dn}function oy(m){return In(m).toLowerCase()}function gm(m){return In(m).toUpperCase()}function Uw(m,b,j){if(m=In(m),m&&(j||b===n))return Ux(m);if(!m||!(b=Zs(b)))return m;var A=Ua(m),D=Ua(b),z=Cc(A,D),Q=Sc(A,D)+1;return vl(A,z,Q).join("")}function $j(m,b,j){if(m=In(m),m&&(j||b===n))return m.slice(0,Fv(m)+1);if(!m||!(b=Zs(b)))return m;var A=Ua(m),D=Sc(A,Ua(b))+1;return vl(A,0,D).join("")}function vm(m,b,j){if(m=In(m),m&&(j||b===n))return m.replace(Et,"");if(!m||!(b=Zs(b)))return m;var A=Ua(m),D=Cc(A,Ua(b));return vl(A,D).join("")}function o(m,b){var j=q,A=K;if(gr(b)){var D="separator"in b?b.separator:D;j="length"in b?Kt(b.length):j,A="omission"in b?Zs(b.omission):A}m=In(m);var z=m.length;if(ll(m)){var Q=Ua(m);z=Q.length}if(j>=z)return m;var ae=j-Bi(A);if(ae<1)return A;var fe=Q?vl(Q,0,ae).join(""):m.slice(0,ae);if(D===n)return fe+A;if(Q&&(ae+=fe.length-ae),am(D)){if(m.slice(ae).search(D)){var Pe,Be=fe;for(D.global||(D=lp(D.source,In(tl.exec(D))+"g")),D.lastIndex=0;Pe=D.exec(Be);)var qe=Pe.index;fe=fe.slice(0,qe===n?ae:qe)}}else if(m.indexOf(Zs(D),ae)!=ae){var rt=fe.lastIndexOf(D);rt>-1&&(fe=fe.slice(0,rt))}return fe+A}function c(m){return m=In(m),m&&iu.test(m)?m.replace(li,Yx):m}var p=Es(function(m,b,j){return m+(j?" ":"")+b.toUpperCase()}),x=Sa("toUpperCase");function S(m,b,j){return m=In(m),b=j?n:b,b===n?Hx(m)?V_(m):L_(m):m.match(b)||[]}var R=nn(function(m,b){try{return Gs(m,n,b)}catch(j){return Yr(j)?j:new Mt(j)}}),I=lr(function(m,b){return Fa(b,function(j){j=Dn(j),fi(m,j,$l(m[j],m))}),m});function F(m){var b=m==null?0:m.length,j=St();return m=b?fr(m,function(A){if(typeof A[1]!="function")throw new ba(i);return[j(A[0]),A[1]]}):[],nn(function(A){for(var D=-1;++D<b;){var z=m[D];if(Gs(z[0],this,A))return Gs(z[1],this,A)}})}function J(m){return lb(vs(m,g))}function ve(m){return function(){return m}}function $e(m,b){return m==null||m!==m?b:m}var Ve=Gi(),Ce=Gi(!0);function ye(m){return m}function Tt(m){return a0(typeof m=="function"?m:vs(m,g))}function $t(m){return o0(vs(m,g))}function Qn(m,b){return _p(m,vs(b,g))}var ce=nn(function(m,b){return function(j){return Su(j,m,b)}}),ie=nn(function(m,b){return function(j){return Su(m,j,b)}});function ge(m,b,j){var A=Zr(b),D=gl(b,A);j==null&&!(gr(b)&&(D.length||!A.length))&&(j=b,b=m,m=this,D=gl(b,Zr(b)));var z=!(gr(j)&&"chain"in j)||!!j.chain,Q=gi(m);return Fa(D,function(ae){var fe=b[ae];m[ae]=fe,Q&&(m.prototype[ae]=function(){var Pe=this.__chain__;if(z||Pe){var Be=m(this.__wrapped__),qe=Be.__actions__=Hr(this.__actions__);return qe.push({func:fe,args:arguments,thisArg:m}),Be.__chain__=Pe,Be}return fe.apply(m,bo([this.value()],arguments))})}),m}function Te(){return Nr._===this&&(Nr._=Ec),this}function lt(){}function cn(m){return m=Kt(m),nn(function(b){return l0(b,m)})}var xt=Ef(fr),At=Ef(Dx),as=Ef(Pv);function Rn(m){return Fp(m)?tp(Dn(m)):pb(m)}function Nl(m){return function(b){return m==null?n:Ya(m,b)}}var Rj=yl(),Vae=yl(!0);function Oj(){return[]}function Tj(){return!1}function Bae(){return{}}function Fae(){return""}function Uae(){return!0}function Gae(m,b){if(m=Kt(m),m<1||m>xe)return[];var j=se,A=hr(m,se);b=St(b),m-=se;for(var D=ol(A,b);++j<m;)b(j);return D}function zae(m){return zt(m)?fr(m,Dn):Rs(m)?[m]:Hr(qi(In(m)))}function Hae(m){var b=++ui;return In(m)+b}var qae=Pc(function(m,b){return m+b},0),Kae=Lp("ceil"),Yae=Pc(function(m,b){return m/b},1),Zae=Lp("floor");function Xae(m){return m&&m.length?pi(m,ye,ff):n}function Wae(m,b){return m&&m.length?pi(m,St(b,2),ff):n}function Qae(m){return Bx(m,ye)}function Jae(m,b){return Bx(m,St(b,2))}function eie(m){return m&&m.length?pi(m,ye,Sp):n}function tie(m,b){return m&&m.length?pi(m,St(b,2),Sp):n}var nie=Pc(function(m,b){return m*b},1),rie=Lp("round"),sie=Pc(function(m,b){return m-b},0);function aie(m){return m&&m.length?rp(m,ye):0}function iie(m,b){return m&&m.length?rp(m,St(b,2)):0}return B.after=ej,B.ary=fw,B.assign=dj,B.assignIn=Rw,B.assignInWith=om,B.assignWith=fj,B.at=hj,B.before=Ff,B.bind=$l,B.bindAll=I,B.bindKey=Qp,B.castArray=sj,B.chain=Zc,B.chunk=K_,B.compact=Vb,B.concat=Bb,B.cond=F,B.conforms=J,B.constant=ve,B.countBy=Xc,B.create=pj,B.curry=Uf,B.curryRight=Jp,B.debounce=Rl,B.defaults=mj,B.defaultsDeep=Ow,B.defer=Yi,B.delay=Gf,B.difference=mr,B.differenceBy=Ws,B.differenceWith=ko,B.drop=Fb,B.dropRight=Ub,B.dropRightWhile=Y_,B.dropWhile=$0,B.fill=_a,B.filter=ew,B.flatMap=F0,B.flatMapDeep=W_,B.flatMapDepth=Q_,B.flatten=Qs,B.flattenDeep=Gb,B.flattenDepth=wl,B.flip=tj,B.flow=Ve,B.flowRight=Ce,B.fromPairs=Au,B.functions=Aw,B.functionsIn=lm,B.groupBy=rw,B.initial=T0,B.intersection=Ki,B.intersectionBy=zb,B.intersectionWith=Fc,B.invert=kw,B.invertBy=Nw,B.invokeMap=Zp,B.iteratee=Tt,B.keyBy=sw,B.keys=Zr,B.keysIn=ss,B.map=Bf,B.mapKeys=yj,B.mapValues=xj,B.matches=$t,B.matchesProperty=Qn,B.memoize=zf,B.merge=bj,B.mergeWith=Wf,B.method=ce,B.methodOf=ie,B.mixin=ge,B.negate=Hf,B.nthArg=cn,B.omit=um,B.omitBy=ey,B.once=hw,B.orderBy=aw,B.over=xt,B.overArgs=pw,B.overEvery=At,B.overSome=as,B.partial=z0,B.partialRight=em,B.partition=iw,B.pick=wj,B.pickBy=rd,B.property=Rn,B.propertyOf=Nl,B.pull=qb,B.pullAll=Gc,B.pullAllBy=Kb,B.pullAllWith=Kp,B.pullAt=Yb,B.range=Rj,B.rangeRight=Vae,B.rearg=mw,B.reject=Xp,B.remove=Z_,B.rest=gw,B.reverse=A0,B.sampleSize=cw,B.set=Lw,B.setWith=Mw,B.shuffle=rr,B.slice=zn,B.sortBy=dw,B.sortedUniq=zc,B.sortedUniqBy=k0,B.split=pm,B.spread=nj,B.tail=Lo,B.take=jr,B.takeRight=Sl,B.takeRightWhile=ku,B.takeWhile=N0,B.tap=D0,B.throttle=H0,B.thru=bs,B.toArray=$a,B.toPairs=ty,B.toPairsIn=ny,B.toPath=zae,B.toPlainObject=$w,B.transform=ry,B.unary=q0,B.union=Wa,B.unionBy=Hc,B.unionWith=Df,B.uniq=Js,B.uniqBy=L0,B.uniqWith=M0,B.unset=Iw,B.unzip=qc,B.unzipWith=Vf,B.update=cm,B.updateWith=Sj,B.values=sd,B.valuesIn=sy,B.without=_l,B.words=S,B.wrap=rj,B.xor=ds,B.xorBy=jl,B.xorWith=Kc,B.zip=Yc,B.zipObject=I0,B.zipObjectDeep=P0,B.zipWith=Zb,B.entries=ty,B.entriesIn=ny,B.extend=Rw,B.extendWith=om,ge(B,B),B.add=qae,B.attempt=R,B.camelCase=Pw,B.capitalize=fm,B.ceil=Kae,B.clamp=ay,B.clone=qf,B.cloneDeep=vw,B.cloneDeepWith=mn,B.cloneWith=aj,B.conformsTo=K0,B.deburr=Io,B.defaultTo=$e,B.divide=Yae,B.endsWith=Tl,B.eq=ea,B.escape=Al,B.escapeRegExp=Qf,B.every=Jb,B.find=tw,B.findIndex=Xa,B.findKey=ed,B.findLast=B0,B.findLastIndex=R0,B.findLastKey=Yf,B.floor=Zae,B.forEach=nw,B.forEachRight=U0,B.forIn=Tw,B.forInRight=gj,B.forOwn=td,B.forOwnRight=Zf,B.get=Xf,B.gt=Y0,B.gte=yw,B.has=J0,B.hasIn=nd,B.head=No,B.identity=ye,B.includes=Wc,B.indexOf=O0,B.inRange=dm,B.invoke=vj,B.isArguments=Mo,B.isArray=zt,B.isArrayBuffer=tm,B.isArrayLike=Kr,B.isArrayLikeObject=Er,B.isBoolean=ij,B.isBuffer=Ol,B.isDate=xw,B.isElement=bw,B.isEmpty=nm,B.isEqual=Wn,B.isEqualWith=Z0,B.isError=Yr,B.isFinite=oj,B.isFunction=gi,B.isInteger=rm,B.isLength=Nu,B.isMap=sm,B.isMatch=X0,B.isMatchWith=lj,B.isNaN=ww,B.isNative=uj,B.isNil=cj,B.isNull=Cw,B.isNumber=Sw,B.isObject=gr,B.isObjectLike=yr,B.isPlainObject=Qa,B.isRegExp=am,B.isSafeInteger=W0,B.isSet=_w,B.isString=im,B.isSymbol=Rs,B.isTypedArray=Qc,B.isUndefined=vi,B.isWeakMap=Q0,B.isWeakSet=jw,B.join=Pf,B.kebabCase=Jf,B.last=xs,B.lastIndexOf=Uc,B.lowerCase=kl,B.lowerFirst=_j,B.lt=Ew,B.lte=Kf,B.max=Xae,B.maxBy=Wae,B.mean=Qae,B.meanBy=Jae,B.min=eie,B.minBy=tie,B.stubArray=Oj,B.stubFalse=Tj,B.stubObject=Bae,B.stubString=Fae,B.stubTrue=Uae,B.multiply=nie,B.nth=Hb,B.noConflict=Te,B.noop=lt,B.now=Wp,B.pad=Dw,B.padEnd=eh,B.padStart=jj,B.parseInt=Vw,B.random=iy,B.reduce=ow,B.reduceRight=lw,B.repeat=hm,B.replace=Bw,B.result=Cj,B.round=rie,B.runInContext=le,B.sample=uw,B.size=G0,B.snakeCase=Ej,B.some=J_,B.sortedIndex=ar,B.sortedIndexBy=pn,B.sortedIndexOf=_n,B.sortedLastIndex=Hn,B.sortedLastIndexBy=ja,B.sortedLastIndexOf=Cl,B.startCase=mm,B.startsWith=Fw,B.subtract=sie,B.sum=aie,B.sumBy=iie,B.template=th,B.times=Gae,B.toFinite=Zi,B.toInteger=Kt,B.toLength=Xi,B.toLower=oy,B.toNumber=Ja,B.toSafeInteger=Jc,B.toString=In,B.toUpper=gm,B.trim=Uw,B.trimEnd=$j,B.trimStart=vm,B.truncate=o,B.unescape=c,B.uniqueId=Hae,B.upperCase=p,B.upperFirst=x,B.each=nw,B.eachRight=U0,B.first=No,ge(B,(function(){var m={};return ys(B,function(b,j){Mn.call(B.prototype,j)||(m[j]=b)}),m})(),{chain:!1}),B.VERSION=r,Fa(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){B[m].placeholder=B}),Fa(["drop","take"],function(m,b){un.prototype[m]=function(j){j=j===n?1:or(Kt(j),0);var A=this.__filtered__&&!b?new un(this):this.clone();return A.__filtered__?A.__takeCount__=hr(j,A.__takeCount__):A.__views__.push({size:hr(j,se),type:m+(A.__dir__<0?"Right":"")}),A},un.prototype[m+"Right"]=function(j){return this.reverse()[m](j).reverse()}}),Fa(["filter","map","takeWhile"],function(m,b){var j=b+1,A=j==ue||j==X;un.prototype[m]=function(D){var z=this.clone();return z.__iteratees__.push({iteratee:St(D,3),type:j}),z.__filtered__=z.__filtered__||A,z}}),Fa(["head","last"],function(m,b){var j="take"+(b?"Right":"");un.prototype[m]=function(){return this[j](1).value()[0]}}),Fa(["initial","tail"],function(m,b){var j="drop"+(b?"":"Right");un.prototype[m]=function(){return this.__filtered__?new un(this):this[j](1)}}),un.prototype.compact=function(){return this.filter(ye)},un.prototype.find=function(m){return this.filter(m).head()},un.prototype.findLast=function(m){return this.reverse().find(m)},un.prototype.invokeMap=nn(function(m,b){return typeof m=="function"?new un(this):this.map(function(j){return Su(j,m,b)})}),un.prototype.reject=function(m){return this.filter(Hf(St(m)))},un.prototype.slice=function(m,b){m=Kt(m);var j=this;return j.__filtered__&&(m>0||b<0)?new un(j):(m<0?j=j.takeRight(-m):m&&(j=j.drop(m)),b!==n&&(b=Kt(b),j=b<0?j.dropRight(-b):j.take(b-m)),j)},un.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},un.prototype.toArray=function(){return this.take(se)},ys(un.prototype,function(m,b){var j=/^(?:filter|find|map|reject)|While$/.test(b),A=/^(?:head|last)$/.test(b),D=B[A?"take"+(b=="last"?"Right":""):b],z=A||/^find/.test(b);D&&(B.prototype[b]=function(){var Q=this.__wrapped__,ae=A?[1]:arguments,fe=Q instanceof un,Pe=ae[0],Be=fe||zt(Q),qe=function(Cn){var On=D.apply(B,bo([Cn],ae));return A&&rt?On[0]:On};Be&&j&&typeof Pe=="function"&&Pe.length!=1&&(fe=Be=!1);var rt=this.__chain__,mt=!!this.__actions__.length,Vt=z&&!rt,dn=fe&&!mt;if(!z&&Be){Q=dn?Q:new un(this);var Bt=m.apply(Q,ae);return Bt.__actions__.push({func:bs,args:[qe],thisArg:n}),new qs(Bt,rt)}return Vt&&dn?m.apply(this,ae):(Bt=this.thru(qe),Vt?A?Bt.value()[0]:Bt.value():Bt)})}),Fa(["pop","push","shift","sort","splice","unshift"],function(m){var b=up[m],j=/^(?:push|sort|unshift)$/.test(m)?"tap":"thru",A=/^(?:pop|shift)$/.test(m);B.prototype[m]=function(){var D=arguments;if(A&&!this.__chain__){var z=this.value();return b.apply(zt(z)?z:[],D)}return this[j](function(Q){return b.apply(zt(Q)?Q:[],D)})}}),ys(un.prototype,function(m,b){var j=B[b];if(j){var A=j.name+"";Mn.call(qa,A)||(qa[A]=[]),qa[A].push({name:b,func:j})}}),qa[_r(n,$).name]=[{name:"wrapper",func:n}],un.prototype.clone=of,un.prototype.reverse=hp,un.prototype.value=yu,B.prototype.at=Xb,B.prototype.chain=Ea,B.prototype.commit=Wb,B.prototype.next=Qb,B.prototype.plant=El,B.prototype.reverse=Yp,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=V0,B.prototype.first=B.prototype.head,pu&&(B.prototype[pu]=X_),B},cl=_c();il?((il.exports=cl)._=cl,yc._=cl):Nr._=cl}).call(xAe)})(HC,HC.exports)),HC.exports}var wAe=bAe();function CAe(e,t){const n={},r=new Set;return e.forEach(s=>{const a=wAe.get(s,t);n[a]=s,r.add(a)}),{ids:Array.from(r),entities:n}}class en{constructor(t=[],n){vC(this,"entities"),vC(this,"ids"),vC(this,"isEmpty"),vC(this,"key");const r=CAe(t,n);this.ids=r.ids,this.entities=r.entities,this.isEmpty=!t.length,this.key=n}get values(){return this.ids.map(t=>this.entities[t])}get length(){return this.ids.length}push(t){const n=Oz(t,this.key);return this.entities[n]=t,this.ids.push(n),Object.assign(this,new en(this.values,this.key)),this}unshift(t){const n=Oz(t,this.key);return this.entities[n]=t,this.ids.unshift(n),Object.assign(this,new en(this.values,this.key)),this}concat(t){return new en([...this,...t],this.key)}map(t){return this.ids.map((n,r)=>t(this.entities[n],r))}remove(t){return this.ids.includes(t)||console.warn(`В списке нет id = ${t}`),this.ids=this.ids.filter(n=>n!==t),Object.assign(this,new en(this.values,this.key)),this}static deserialize(t,n="id"){if(typeof t=="string")try{return Az(JSON.parse(t),n)}catch(r){return console.error(r),new en([],"")}else if(typeof t=="object"&&t!==null)return Az(t,n);return new en([],"")}clone(){return new en(this.values,this.key)}[Symbol.iterator](){let t=0;return{next:()=>{if(t<this.ids.length){const n=this.ids[t++];return{value:this.entities[n],done:!1}}else return{value:null,done:!0}}}}}const SAe=e=>typeof e=="object"&&e!==null&&"entities"in e&&"ids"in e,Az=(e,t)=>{if(SAe(e)){const n=e.ids.map(r=>e.entities[r]);return new en(n,t)}return new en([],"")},$L=(e,t)=>{t?e.displayName=`${t}${e.name}`:e.displayName=e.name};var yC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},LR,kz;function RL(){if(kz)return LR;kz=1;var e=Array.isArray;return LR=e,LR}var MR,Nz;function _Ae(){if(Nz)return MR;Nz=1;var e=typeof yC=="object"&&yC&&yC.Object===Object&&yC;return MR=e,MR}var IR,Lz;function OL(){if(Lz)return IR;Lz=1;var e=_Ae(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return IR=n,IR}var PR,Mz;function TL(){if(Mz)return PR;Mz=1;var e=OL(),t=e.Symbol;return PR=t,PR}var DR,Iz;function jAe(){if(Iz)return DR;Iz=1;var e=TL(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,s=e?e.toStringTag:void 0;function a(i){var l=n.call(i,s),u=i[s];try{i[s]=void 0;var f=!0}catch{}var h=r.call(i);return f&&(l?i[s]=u:delete i[s]),h}return DR=a,DR}var VR,Pz;function EAe(){if(Pz)return VR;Pz=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return VR=n,VR}var BR,Dz;function pte(){if(Dz)return BR;Dz=1;var e=TL(),t=jAe(),n=EAe(),r="[object Null]",s="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?s:r:a&&a in Object(l)?t(l):n(l)}return BR=i,BR}var FR,Vz;function $Ae(){if(Vz)return FR;Vz=1;function e(t){return t!=null&&typeof t=="object"}return FR=e,FR}var UR,Bz;function AL(){if(Bz)return UR;Bz=1;var e=pte(),t=$Ae(),n="[object Symbol]";function r(s){return typeof s=="symbol"||t(s)&&e(s)==n}return UR=r,UR}var GR,Fz;function RAe(){if(Fz)return GR;Fz=1;var e=RL(),t=AL(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(a,i){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||i!=null&&a in Object(i)}return GR=s,GR}var zR,Uz;function mte(){if(Uz)return zR;Uz=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return zR=e,zR}var HR,Gz;function OAe(){if(Gz)return HR;Gz=1;var e=pte(),t=mte(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",a="[object Proxy]";function i(l){if(!t(l))return!1;var u=e(l);return u==r||u==s||u==n||u==a}return HR=i,HR}var qR,zz;function TAe(){if(zz)return qR;zz=1;var e=OL(),t=e["__core-js_shared__"];return qR=t,qR}var KR,Hz;function AAe(){if(Hz)return KR;Hz=1;var e=TAe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return KR=n,KR}var YR,qz;function kAe(){if(qz)return YR;qz=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return YR=n,YR}var ZR,Kz;function NAe(){if(Kz)return ZR;Kz=1;var e=OAe(),t=AAe(),n=mte(),r=kAe(),s=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(v){if(!n(v)||t(v))return!1;var w=e(v)?h:a;return w.test(r(v))}return ZR=g,ZR}var XR,Yz;function LAe(){if(Yz)return XR;Yz=1;function e(t,n){return t?.[n]}return XR=e,XR}var WR,Zz;function gte(){if(Zz)return WR;Zz=1;var e=NAe(),t=LAe();function n(r,s){var a=t(r,s);return e(a)?a:void 0}return WR=n,WR}var QR,Xz;function l_(){if(Xz)return QR;Xz=1;var e=gte(),t=e(Object,"create");return QR=t,QR}var JR,Wz;function MAe(){if(Wz)return JR;Wz=1;var e=l_();function t(){this.__data__=e?e(null):{},this.size=0}return JR=t,JR}var e6,Qz;function IAe(){if(Qz)return e6;Qz=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return e6=e,e6}var t6,Jz;function PAe(){if(Jz)return t6;Jz=1;var e=l_(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(a){var i=this.__data__;if(e){var l=i[a];return l===t?void 0:l}return r.call(i,a)?i[a]:void 0}return t6=s,t6}var n6,eH;function DAe(){if(eH)return n6;eH=1;var e=l_(),t=Object.prototype,n=t.hasOwnProperty;function r(s){var a=this.__data__;return e?a[s]!==void 0:n.call(a,s)}return n6=r,n6}var r6,tH;function VAe(){if(tH)return r6;tH=1;var e=l_(),t="__lodash_hash_undefined__";function n(r,s){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&s===void 0?t:s,this}return r6=n,r6}var s6,nH;function BAe(){if(nH)return s6;nH=1;var e=MAe(),t=IAe(),n=PAe(),r=DAe(),s=VAe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,s6=a,s6}var a6,rH;function FAe(){if(rH)return a6;rH=1;function e(){this.__data__=[],this.size=0}return a6=e,a6}var i6,sH;function UAe(){if(sH)return i6;sH=1;function e(t,n){return t===n||t!==t&&n!==n}return i6=e,i6}var o6,aH;function u_(){if(aH)return o6;aH=1;var e=UAe();function t(n,r){for(var s=n.length;s--;)if(e(n[s][0],r))return s;return-1}return o6=t,o6}var l6,iH;function GAe(){if(iH)return l6;iH=1;var e=u_(),t=Array.prototype,n=t.splice;function r(s){var a=this.__data__,i=e(a,s);if(i<0)return!1;var l=a.length-1;return i==l?a.pop():n.call(a,i,1),--this.size,!0}return l6=r,l6}var u6,oH;function zAe(){if(oH)return u6;oH=1;var e=u_();function t(n){var r=this.__data__,s=e(r,n);return s<0?void 0:r[s][1]}return u6=t,u6}var c6,lH;function HAe(){if(lH)return c6;lH=1;var e=u_();function t(n){return e(this.__data__,n)>-1}return c6=t,c6}var d6,uH;function qAe(){if(uH)return d6;uH=1;var e=u_();function t(n,r){var s=this.__data__,a=e(s,n);return a<0?(++this.size,s.push([n,r])):s[a][1]=r,this}return d6=t,d6}var f6,cH;function KAe(){if(cH)return f6;cH=1;var e=FAe(),t=GAe(),n=zAe(),r=HAe(),s=qAe();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,f6=a,f6}var h6,dH;function YAe(){if(dH)return h6;dH=1;var e=gte(),t=OL(),n=e(t,"Map");return h6=n,h6}var p6,fH;function ZAe(){if(fH)return p6;fH=1;var e=BAe(),t=KAe(),n=YAe();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return p6=r,p6}var m6,hH;function XAe(){if(hH)return m6;hH=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return m6=e,m6}var g6,pH;function c_(){if(pH)return g6;pH=1;var e=XAe();function t(n,r){var s=n.__data__;return e(r)?s[typeof r=="string"?"string":"hash"]:s.map}return g6=t,g6}var v6,mH;function WAe(){if(mH)return v6;mH=1;var e=c_();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return v6=t,v6}var y6,gH;function QAe(){if(gH)return y6;gH=1;var e=c_();function t(n){return e(this,n).get(n)}return y6=t,y6}var x6,vH;function JAe(){if(vH)return x6;vH=1;var e=c_();function t(n){return e(this,n).has(n)}return x6=t,x6}var b6,yH;function eke(){if(yH)return b6;yH=1;var e=c_();function t(n,r){var s=e(this,n),a=s.size;return s.set(n,r),this.size+=s.size==a?0:1,this}return b6=t,b6}var w6,xH;function tke(){if(xH)return w6;xH=1;var e=ZAe(),t=WAe(),n=QAe(),r=JAe(),s=eke();function a(i){var l=-1,u=i==null?0:i.length;for(this.clear();++l<u;){var f=i[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=s,w6=a,w6}var C6,bH;function nke(){if(bH)return C6;bH=1;var e=tke(),t="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var a=function(){var i=arguments,l=s?s.apply(this,i):i[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,i);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,C6=n,C6}var S6,wH;function rke(){if(wH)return S6;wH=1;var e=nke(),t=500;function n(r){var s=e(r,function(i){return a.size===t&&a.clear(),i}),a=s.cache;return s}return S6=n,S6}var _6,CH;function ske(){if(CH)return _6;CH=1;var e=rke(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(t,function(i,l,u,f){a.push(u?f.replace(n,"$1"):l||i)}),a});return _6=r,_6}var j6,SH;function ake(){if(SH)return j6;SH=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r<s;)a[r]=n(t[r],r,t);return a}return j6=e,j6}var E6,_H;function ike(){if(_H)return E6;_H=1;var e=TL(),t=ake(),n=RL(),r=AL(),s=e?e.prototype:void 0,a=s?s.toString:void 0;function i(l){if(typeof l=="string")return l;if(n(l))return t(l,i)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return E6=i,E6}var $6,jH;function oke(){if(jH)return $6;jH=1;var e=ike();function t(n){return n==null?"":e(n)}return $6=t,$6}var R6,EH;function lke(){if(EH)return R6;EH=1;var e=RL(),t=RAe(),n=ske(),r=oke();function s(a,i){return e(a)?a:t(a,i)?[a]:n(r(a))}return R6=s,R6}var O6,$H;function uke(){if($H)return O6;$H=1;var e=AL();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return O6=t,O6}var T6,RH;function cke(){if(RH)return T6;RH=1;var e=lke(),t=uke();function n(r,s){s=e(s,r);for(var a=0,i=s.length;r!=null&&a<i;)r=r[t(s[a++])];return a&&a==i?r:void 0}return T6=n,T6}var A6,OH;function dke(){if(OH)return A6;OH=1;var e=cke();function t(n,r,s){var a=n==null?void 0:e(n,r);return a===void 0?s:a}return A6=t,A6}dke();const Fd=e=>{const[t,n]=y.useState(null),r=y.useCallback(s=>{s!==null&&n(s)},[]);return y.useEffect(()=>{const s=new IntersectionObserver(async a=>{const[i]=a;i.isIntersecting&&e()});return t!==null&&s.observe(t),()=>{t!==null&&s.unobserve(t)}},[e,t]),{intersector:d.jsx("span",{ref:r})}},fke=["shift","alt","meta","mod","ctrl","control"],hke={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function TH(e){return(hke[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function pke(e){return fke.includes(e)}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&mke([TH(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&gke([TH(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{vd.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{vd.clear()},0)}));const vd=new Set;function mke(e){const t=Array.isArray(e)?e:[e];vd.has("meta")&&vd.forEach(n=>!pke(n)&&vd.delete(n.toLowerCase())),t.forEach(n=>vd.add(n.toLowerCase()))}function gke(e){const t=Array.isArray(e)?e:[e];e==="meta"?vd.clear():t.forEach(n=>vd.delete(n.toLowerCase()))}y.createContext(void 0);y.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}});const vke="Agent",oa={select:"select",name:"name",id:"id",lastIpList:"lastIpList",lastPingDate:"lastPingDate",tags:"tags",os:"os",architecture:"architecture"},vt={search:"s",projectId:"pid",projectIds:"pids",tagIds:"tids",agentGroupIds:"agids",consoleId:"cid",tokenId:"tid",interval:"i",tab:"tab"},st={main:"/",get monitor(){return this.main},agents:"agents",agent:"agents/:agentId",login:"/login",settings:"settings",projects:"projects",project:":projectId",userGroups:"user-groups",userGroup:":userGroupId",agentGroups:"agent-groups",agentGroup:":agentGroupId",currentUser:"current-user",users:"users",user:":userId",clientKeys:"client-keys",clientKey:":clientKeyId",clientVersions:"client-versions",clientVersion:":clientVersionId",clientSchemas:"client-schemas",clientSchema:":clientSchemaId",clientHandshakes:"client-handshakes",clientHandshake:":clientHandshakeId"},Du={information:"info",console:"cl",fileManager:"fm",portTunneling:"pt"},Ti="/",sh={agentGroups:"ag",users:"u"},so={userGroups:"ug",agentGroups:"ag",clientKeys:"ck",clientVersions:"cv",clientSchemas:"cs",clientHandshakes:"ch"},ah={clientKeys:"clientKeys",userGroups:"userGroups"},yke=["projectCreate","projectList","projectListFull"],vte=["agentGroupCreate","agentGroupList","agentGroupListByProject"],yte=["clientKeyCreate","clientKeyList","clientKeyListAll"],xte=["clientVersionCreate","clientVersionList","clientVersionListAll"],bte=["clientHandshakeCreate","clientHandshakeList","clientHandshakeListAll"],wte=["clientSchemaCreate","clientSchemaList","clientSchemaListAll"],xke=["userCreate","userList","userListAll"],Cte=["userGroupCreate","userGroupList","userGroupListByProject"],Ste=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],ca={container:()=>({borderWidth:"1px",borderColor:"var(--color-secondary-light)"}),control:()=>({backgroundColor:"var(--color-bg)",borderRadius:"var(--radius-xs)",boxShadow:"none"})},Ok=65535,Eh="00000000-0000-0000-0000-000000000001",_te=y.createContext({});var k6={exports:{}};const bke={},wke=Object.freeze(Object.defineProperty({__proto__:null,default:bke},Symbol.toStringTag,{value:"Module"})),AH=cie(wke);/**
 * [js-sha256]{@link https://github.com/emn178/js-sha256}
 *
 * @version 0.11.1
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2014-2025
 * @license MIT
 */var kH;function Cke(){return kH||(kH=1,(function(e){(function(){var t="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",a=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node&&process.type!="renderer";a?r=uie:s&&(r=self);var i=!r.JS_SHA256_NO_COMMON_JS&&!0&&e.exports,l=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),f=[-2147483648,8388608,32768,128],h=[24,16,8,0],g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],v=["hex","array","digest","arrayBuffer"],w=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"}),l&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(k){return typeof k=="object"&&k.buffer&&k.buffer.constructor===ArrayBuffer});var C=function(k,T){return function(P){return new N(T,!0).update(P)[k]()}},_=function(k){var T=C("hex",k);a&&(T=E(T,k)),T.create=function(){return new N(k)},T.update=function(q){return T.create().update(q)};for(var P=0;P<v.length;++P){var V=v[P];T[V]=C(V,k)}return T},E=function(k,T){var P=AH,V=AH.Buffer,q=T?"sha224":"sha256",K;V.from&&!r.JS_SHA256_NO_BUFFER_FROM?K=V.from:K=function(ee){return new V(ee)};var re=function(ee){if(typeof ee=="string")return P.createHash(q).update(ee,"utf8").digest("hex");if(ee==null)throw new Error(t);return ee.constructor===ArrayBuffer&&(ee=new Uint8Array(ee)),Array.isArray(ee)||ArrayBuffer.isView(ee)||ee.constructor===V?P.createHash(q).update(K(ee)).digest("hex"):k(ee)};return re},$=function(k,T){return function(P,V){return new M(P,T,!0).update(V)[k]()}},O=function(k){var T=$("hex",k);T.create=function(q){return new M(q,k)},T.update=function(q,K){return T.create(q).update(K)};for(var P=0;P<v.length;++P){var V=v[P];T[V]=$(V,k)}return T};function N(k,T){T?(w[0]=w[16]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=0,this.blocks=w):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=k}N.prototype.update=function(k){if(!this.finalized){var T,P=typeof k;if(P!=="string"){if(P==="object"){if(k===null)throw new Error(t);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(t)}else throw new Error(t);T=!0}for(var V,q=0,K,re=k.length,ee=this.blocks;q<re;){if(this.hashed&&(this.hashed=!1,ee[0]=this.block,this.block=ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0),T)for(K=this.start;q<re&&K<64;++q)ee[K>>>2]|=k[q]<<h[K++&3];else for(K=this.start;q<re&&K<64;++q)V=k.charCodeAt(q),V<128?ee[K>>>2]|=V<<h[K++&3]:V<2048?(ee[K>>>2]|=(192|V>>>6)<<h[K++&3],ee[K>>>2]|=(128|V&63)<<h[K++&3]):V<55296||V>=57344?(ee[K>>>2]|=(224|V>>>12)<<h[K++&3],ee[K>>>2]|=(128|V>>>6&63)<<h[K++&3],ee[K>>>2]|=(128|V&63)<<h[K++&3]):(V=65536+((V&1023)<<10|k.charCodeAt(++q)&1023),ee[K>>>2]|=(240|V>>>18)<<h[K++&3],ee[K>>>2]|=(128|V>>>12&63)<<h[K++&3],ee[K>>>2]|=(128|V>>>6&63)<<h[K++&3],ee[K>>>2]|=(128|V&63)<<h[K++&3]);this.lastByteIndex=K,this.bytes+=K-this.start,K>=64?(this.block=ee[16],this.start=K-64,this.hash(),this.hashed=!0):this.start=K}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var k=this.blocks,T=this.lastByteIndex;k[16]=this.block,k[T>>>2]|=f[T&3],this.block=k[16],T>=56&&(this.hashed||this.hash(),k[0]=this.block,k[16]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=0),k[14]=this.hBytes<<3|this.bytes>>>29,k[15]=this.bytes<<3,this.hash()}},N.prototype.hash=function(){var k=this.h0,T=this.h1,P=this.h2,V=this.h3,q=this.h4,K=this.h5,re=this.h6,ee=this.h7,ue=this.blocks,he,X,pe,xe,be,Y,se,Oe,de,_e,Le;for(he=16;he<64;++he)be=ue[he-15],X=(be>>>7|be<<25)^(be>>>18|be<<14)^be>>>3,be=ue[he-2],pe=(be>>>17|be<<15)^(be>>>19|be<<13)^be>>>10,ue[he]=ue[he-16]+X+ue[he-7]+pe<<0;for(Le=T&P,he=0;he<64;he+=4)this.first?(this.is224?(Oe=300032,be=ue[0]-1413257819,ee=be-150054599<<0,V=be+24177077<<0):(Oe=704751109,be=ue[0]-210244248,ee=be-1521486534<<0,V=be+143694565<<0),this.first=!1):(X=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),pe=(q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7),Oe=k&T,xe=Oe^k&P^Le,se=q&K^~q&re,be=ee+pe+se+g[he]+ue[he],Y=X+xe,ee=V+be<<0,V=be+Y<<0),X=(V>>>2|V<<30)^(V>>>13|V<<19)^(V>>>22|V<<10),pe=(ee>>>6|ee<<26)^(ee>>>11|ee<<21)^(ee>>>25|ee<<7),de=V&k,xe=de^V&T^Oe,se=ee&q^~ee&K,be=re+pe+se+g[he+1]+ue[he+1],Y=X+xe,re=P+be<<0,P=be+Y<<0,X=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),pe=(re>>>6|re<<26)^(re>>>11|re<<21)^(re>>>25|re<<7),_e=P&V,xe=_e^P&k^de,se=re&ee^~re&q,be=K+pe+se+g[he+2]+ue[he+2],Y=X+xe,K=T+be<<0,T=be+Y<<0,X=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),pe=(K>>>6|K<<26)^(K>>>11|K<<21)^(K>>>25|K<<7),Le=T&P,xe=Le^T&V^_e,se=K&re^~K&ee,be=q+pe+se+g[he+3]+ue[he+3],Y=X+xe,q=k+be<<0,k=be+Y<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+k<<0,this.h1=this.h1+T<<0,this.h2=this.h2+P<<0,this.h3=this.h3+V<<0,this.h4=this.h4+q<<0,this.h5=this.h5+K<<0,this.h6=this.h6+re<<0,this.h7=this.h7+ee<<0},N.prototype.hex=function(){this.finalize();var k=this.h0,T=this.h1,P=this.h2,V=this.h3,q=this.h4,K=this.h5,re=this.h6,ee=this.h7,ue=u[k>>>28&15]+u[k>>>24&15]+u[k>>>20&15]+u[k>>>16&15]+u[k>>>12&15]+u[k>>>8&15]+u[k>>>4&15]+u[k&15]+u[T>>>28&15]+u[T>>>24&15]+u[T>>>20&15]+u[T>>>16&15]+u[T>>>12&15]+u[T>>>8&15]+u[T>>>4&15]+u[T&15]+u[P>>>28&15]+u[P>>>24&15]+u[P>>>20&15]+u[P>>>16&15]+u[P>>>12&15]+u[P>>>8&15]+u[P>>>4&15]+u[P&15]+u[V>>>28&15]+u[V>>>24&15]+u[V>>>20&15]+u[V>>>16&15]+u[V>>>12&15]+u[V>>>8&15]+u[V>>>4&15]+u[V&15]+u[q>>>28&15]+u[q>>>24&15]+u[q>>>20&15]+u[q>>>16&15]+u[q>>>12&15]+u[q>>>8&15]+u[q>>>4&15]+u[q&15]+u[K>>>28&15]+u[K>>>24&15]+u[K>>>20&15]+u[K>>>16&15]+u[K>>>12&15]+u[K>>>8&15]+u[K>>>4&15]+u[K&15]+u[re>>>28&15]+u[re>>>24&15]+u[re>>>20&15]+u[re>>>16&15]+u[re>>>12&15]+u[re>>>8&15]+u[re>>>4&15]+u[re&15];return this.is224||(ue+=u[ee>>>28&15]+u[ee>>>24&15]+u[ee>>>20&15]+u[ee>>>16&15]+u[ee>>>12&15]+u[ee>>>8&15]+u[ee>>>4&15]+u[ee&15]),ue},N.prototype.toString=N.prototype.hex,N.prototype.digest=function(){this.finalize();var k=this.h0,T=this.h1,P=this.h2,V=this.h3,q=this.h4,K=this.h5,re=this.h6,ee=this.h7,ue=[k>>>24&255,k>>>16&255,k>>>8&255,k&255,T>>>24&255,T>>>16&255,T>>>8&255,T&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255,V>>>24&255,V>>>16&255,V>>>8&255,V&255,q>>>24&255,q>>>16&255,q>>>8&255,q&255,K>>>24&255,K>>>16&255,K>>>8&255,K&255,re>>>24&255,re>>>16&255,re>>>8&255,re&255];return this.is224||ue.push(ee>>>24&255,ee>>>16&255,ee>>>8&255,ee&255),ue},N.prototype.array=N.prototype.digest,N.prototype.arrayBuffer=function(){this.finalize();var k=new ArrayBuffer(this.is224?28:32),T=new DataView(k);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),k};function M(k,T,P){var V,q=typeof k;if(q==="string"){var K=[],re=k.length,ee=0,ue;for(V=0;V<re;++V)ue=k.charCodeAt(V),ue<128?K[ee++]=ue:ue<2048?(K[ee++]=192|ue>>>6,K[ee++]=128|ue&63):ue<55296||ue>=57344?(K[ee++]=224|ue>>>12,K[ee++]=128|ue>>>6&63,K[ee++]=128|ue&63):(ue=65536+((ue&1023)<<10|k.charCodeAt(++V)&1023),K[ee++]=240|ue>>>18,K[ee++]=128|ue>>>12&63,K[ee++]=128|ue>>>6&63,K[ee++]=128|ue&63);k=K}else if(q==="object"){if(k===null)throw new Error(t);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(t)}else throw new Error(t);k.length>64&&(k=new N(T,!0).update(k).array());var he=[],X=[];for(V=0;V<64;++V){var pe=k[V]||0;he[V]=92^pe,X[V]=54^pe}N.call(this,T,P),this.update(X),this.oKeyPad=he,this.inner=!0,this.sharedMemory=P}M.prototype=new N,M.prototype.finalize=function(){if(N.prototype.finalize.call(this),this.inner){this.inner=!1;var k=this.array();N.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(k),N.prototype.finalize.call(this)}};var L=_();L.sha256=L,L.sha224=_(!0),L.sha256.hmac=O(),L.sha224.hmac=O(!0),i?e.exports=L:(r.sha256=L.sha256,r.sha224=L.sha224)})()})(k6)),k6.exports}var Ske=Cke();const _ke=255,PS=(e,t=_ke)=>{let n=0,r=e;for(;n<t;)r=Ske.sha256(r),n++;return r},jke=e=>{const t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!0),new Uint8Array(t)},Eke=e=>{const t=e.reduce((s,a)=>s+a.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n},DS=e=>new TextEncoder().encode(JSON.stringify(e)),NH=e=>JSON.parse(new TextDecoder("utf-8").decode(e)),N6=8,$ke=(e,t=!1)=>{const n=new Uint8Array(e.slice(0,N6)),s=new DataView(n.buffer).getBigUint64(0,!0),a=N6+Number(s),i=e.slice(N6,a),l=NH(i),u=Number(l.data_size);let f=null;if(u){const h=e.slice(a,a+u);f=t?h:NH(h)}return{response:l,data:f}},by=(e,t,n={})=>{let r=`${e}=${t}`;n.path&&(r+=`; path=${n.path}`),n.expires instanceof Date&&n.maxAge===void 0&&(r+=`; expires=${n.expires.toUTCString()}`),n.maxAge&&n.expires===void 0&&(r+=`; max-age=${n.maxAge}`),n.domain&&(r+=`; domain=${n.domain}`),n.secure&&(r+="; secure"),n.sameSite&&(r+=`; samesite=${n.sameSite}`),document.cookie=r};var Me=(e=>(e[e.NONE=0]="NONE",e[e.NEW=1]="NEW",e[e.LOGIN=2]="LOGIN",e[e.CLOSE=3]="CLOSE",e[e.OPEN=4]="OPEN",e[e.INPUT=5]="INPUT",e[e.OUTPUT=6]="OUTPUT",e[e.READ=7]="READ",e[e.WRITE=8]="WRITE",e[e.SEND=9]="SEND",e[e.RECEIVE=10]="RECEIVE",e[e.GET=11]="GET",e[e.SET=12]="SET",e[e.UPLOAD=13]="UPLOAD",e[e.DOWNLOAD=14]="DOWNLOAD",e[e.PING=15]="PING",e[e.PONG=16]="PONG",e[e.TICK=17]="TICK",e[e.BLOCK=18]="BLOCK",e[e.UNBLOC=19]="UNBLOC",e[e.REBOOT=20]="REBOOT",e[e.MIGRATE=21]="MIGRATE",e[e.UNINSTALL=22]="UNINSTALL",e[e.INSTALL=23]="INSTALL",e[e.RUN=24]="RUN",e[e.LIST=25]="LIST",e[e.CREATE=26]="CREATE",e[e.UPDATE=27]="UPDATE",e[e.DELETE=28]="DELETE",e[e.EXECUTE=29]="EXECUTE",e[e.ADD=30]="ADD",e[e.REQUEST=31]="REQUEST",e[e.RESPONSE=32]="RESPONSE",e[e.STOP=33]="STOP",e[e.START=34]="START",e[e.SYNC=35]="SYNC",e[e.MOVE=36]="MOVE",e[e.COPY=37]="COPY",e[e.RENAME=38]="RENAME",e[e.PIN=39]="PIN",e[e.LOCK=40]="LOCK",e[e.UNLOCK=41]="UNLOCK",e[e.COUNT=42]="COUNT",e[e.PARSE=43]="PARSE",e[e.RESET=44]="RESET",e[e.CANCEL=45]="CANCEL",e[e.UNBLOCK=46]="UNBLOCK",e[e.SHUTDOWN=47]="SHUTDOWN",e[e.THROTTLE=48]="THROTTLE",e[e.RELOGIN=49]="RELOGIN",e[e.LOGOUT=50]="LOGOUT",e[e.CHECK=51]="CHECK",e[e.IMPORT=52]="IMPORT",e[e.EXPORT=53]="EXPORT",e[e.RELOAD=54]="RELOAD",e[e.LISTEN=55]="LISTEN",e[e.REDIRECT=56]="REDIRECT",e))(Me||{}),G=(e=>(e[e.NONE=0]="NONE",e[e.AGENT=1]="AGENT",e[e.AGENT_GROUP=2]="AGENT_GROUP",e[e.KEY=3]="KEY",e[e.USER=4]="USER",e[e.USER_GROUP=5]="USER_GROUP",e[e.SERVICE=6]="SERVICE",e[e.PROJECT=7]="PROJECT",e[e.RESULT=8]="RESULT",e[e.STATUS=9]="STATUS",e[e.EVENT=10]="EVENT",e[e.NEXT_EVENT=11]="NEXT_EVENT",e[e.NEXT_EVENT_LIST=12]="NEXT_EVENT_LIST",e[e.CONSOLE=13]="CONSOLE",e[e.INPUT=14]="INPUT",e[e.OUTPUT=15]="OUTPUT",e[e.FILE_MANAGER=16]="FILE_MANAGER",e[e.FILE=17]="FILE",e[e.FOLDER=18]="FOLDER",e[e.DEVICE=19]="DEVICE",e[e.INFO=20]="INFO",e[e.TUNNEL=21]="TUNNEL",e[e.MODULE=22]="MODULE",e[e.HANDLER=23]="HANDLER",e[e.MULTI_PART=24]="MULTI_PART",e[e.NOTE=25]="NOTE",e[e.COMMAND=26]="COMMAND",e[e.PENDING=27]="PENDING",e[e.ERROR=28]="ERROR",e[e.NEXT=29]="NEXT",e[e.PROCESSED=30]="PROCESSED",e[e.TOKEN=31]="TOKEN",e[e.GLOBAL=32]="GLOBAL",e[e.HISTORY=33]="HISTORY",e[e.RIGHT=35]="RIGHT",e[e.ACCESS=36]="ACCESS",e[e.TYPE=37]="TYPE",e[e.HTTP=38]="HTTP",e[e.REQUEST=39]="REQUEST",e[e.RESPONSE=40]="RESPONSE",e[e.TEMP=41]="TEMP",e[e.LFS=42]="LFS",e[e.ITEM=43]="ITEM",e[e.RFS=45]="RFS",e[e.ACTION=46]="ACTION",e[e.DATA=47]="DATA",e[e.NAME=48]="NAME",e[e.STREAM=49]="STREAM",e[e.INTERVAL=50]="INTERVAL",e[e.RAW=51]="RAW",e[e.TCP=52]="TCP",e[e.TLS=53]="TLS",e[e.INTERNAL=54]="INTERNAL",e[e.PAYLOAD=55]="PAYLOAD",e[e.PATH=56]="PATH",e[e.TAG=57]="TAG",e[e.ALIAS=58]="ALIAS",e[e.CLIENT=59]="CLIENT",e[e.VERSION=60]="VERSION",e[e.PROXY=61]="PROXY",e[e.DEBUG=62]="DEBUG",e[e.SCHEMA=63]="SCHEMA",e[e.PASSWORD=64]="PASSWORD",e[e.CURRENT=65]="CURRENT",e[e.CONFIG=66]="CONFIG",e[e.HANDSHAKE=67]="HANDSHAKE",e[e.DISPATCHER=68]="DISPATCHER",e[e.PORT=69]="PORT",e[e.BASE=70]="BASE",e[e.SCHEDULE=71]="SCHEDULE",e[e.HEALTH=72]="HEALTH",e[e.LOCALE=73]="LOCALE",e[e.LICENSE=74]="LICENSE",e))(G||{}),Os=(e=>(e.CMD_ID="cmd_id",e.CMD_TAG="cmd_tag",e.UUID="uuid",e.KIND="kind",e.CATEGORY="category",e.ACTION="action",e.TYPE="type",e.PRIORITY="priority",e.STATUS="status",e.META="meta",e.OWNER="owner",e.DATA="data",e.DATA_SIZE="data_size",e.DATA_MAX_SIZE="data_max_size",e.DATA_TYPE="data_type",e.CREATED="created",e.RESP="response",e.REQUEST="request",e.DEST="dest",e.ERROR="err",e))(Os||{}),Ie=(e=>(e[e.NONE=0]="NONE",e[e.SERVICE=1]="SERVICE",e[e.AGENT_TO_SERVICE=11]="AGENT_TO_SERVICE",e[e.USER_TO_AGENT=21]="USER_TO_AGENT",e[e.USER_TO_SERVICE=22]="USER_TO_SERVICE",e[e.SERVICE_TO_AGENT=30]="SERVICE_TO_AGENT",e[e.SERVICE_TO_USER=31]="SERVICE_TO_USER",e[e.SERVICE_TO_TUNNEL=32]="SERVICE_TO_TUNNEL",e[e.TUNNEL_TO_SERVICE=40]="TUNNEL_TO_SERVICE",e[e.FIBER=41]="FIBER",e))(Ie||{}),jte=(e=>(e[e.NONE=0]="NONE",e[e.RESULT=1]="RESULT",e[e.RESULT_ERROR=2]="RESULT_ERROR",e[e.EMPTY=3]="EMPTY",e[e.SERVICE_CANCEL=4]="SERVICE_CANCEL",e))(jte||{}),uh=(e=>(e.BY_PROJECTS_AND_USER_GROUPS="by_projects_and_user_groups",e.BY_PROJECTS_AND_AGENT_GROUPS="by_projects_and_agent_groups",e.BY_PROJECTS="by_projects",e.BY_USER_GROUPS="by_user_groups",e.BY_AGENT_GROUPS="by_agent_groups",e.ALL="all",e))(uh||{}),s1=(e=>(e.BY_AGENT="by_agent",e.ALL="all",e))(s1||{}),Ts=(e=>(e.BY_PROJECT_AND_USER_GROUPS="by_project_and_user_groups",e.BY_PROJECT_AND_CLIENT_KEY="by_project_and_client_key",e.BY_PROJECT_AND_AGENTS="by_project_and_agents",e.BY_PROJECT="by_project",e.BY_USER_GROUPS="by_user_groups",e.BY_CLIENT_KEY="by_client_key",e.BY_AGENTS="by_agents",e.ALL="all",e))(Ts||{}),ld=(e=>(e.BY_PROJECTS_AND_USER_GROUPS="by_projects_and_user_groups",e.BY_PROJECTS_AND_AGENT_GROUPS="by_projects_and_agent_groups",e.BY_PROJECTS="by_projects",e.BY_USER_GROUPS="by_user_groups",e.BY_AGENT_GROUPS="by_agent_groups",e.BY_AGENT="by_agent",e.ALL="all",e))(ld||{}),zu=(e=>(e[e.NONE=0]="NONE",e[e.FIXED_UTC_TIME=1]="FIXED_UTC_TIME",e[e.RELATIVE_TO_CREATED=2]="RELATIVE_TO_CREATED",e[e.RELATIVE_TO_PING=3]="RELATIVE_TO_PING",e[e.RELATIVE_TO_CREATED_AND_PING=4]="RELATIVE_TO_CREATED_AND_PING",e))(zu||{}),dv=(e=>(e[e.NONE=0]="NONE",e[e.AGENT=2]="AGENT",e[e.FRONTEND=3]="FRONTEND",e[e.TEST_API=4]="TEST_API",e))(dv||{}),d_=(e=>(e[e.NONE=0]="NONE",e[e.AGENT=1]="AGENT",e[e.USER=2]="USER",e[e.TUNNEL=3]="TUNNEL",e[e.PAYLOAD=4]="PAYLOAD",e[e.SYSTEM=100]="SYSTEM",e))(d_||{}),Vg=(e=>(e[e.NONE=0]="NONE",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED",e))(Vg||{}),Ho=(e=>(e[e.NONE=0]="NONE",e[e.PUBLIC=1]="PUBLIC",e[e.PRIVATE=3]="PRIVATE",e))(Ho||{}),kL=(e=>(e[e.NONE=0]="NONE",e[e.CONSOLE=100]="CONSOLE",e))(kL||{}),$h=(e=>(e[e.NONE=0]="NONE",e[e.SUPER_ADMIN=20]="SUPER_ADMIN",e[e.PROJECT_ADMIN=30]="PROJECT_ADMIN",e[e.DEFAULT=1e3]="DEFAULT",e))($h||{}),ch=(e=>(e.BY_PROJECT_AND_USER="by_project_and_user",e.BY_PROJECT="by_project",e.BY_USER="by_user",e.BY_AGENT="by_agent",e.BY_AGENT_GROUPS="by_agent_groups",e.ALL="all",e))(ch||{}),Ci=(e=>(e[e.NONE=0]="NONE",e[e.CREATE=1]="CREATE",e[e.COPY=2]="COPY",e[e.RENAME=3]="RENAME",e[e.MOVE=4]="MOVE",e[e.GET=5]="GET",e[e.GET_INFO=6]="GET_INFO",e[e.LIST=7]="LIST",e[e.DELETE=8]="DELETE",e[e.RESET=9]="RESET",e))(Ci||{}),Vu=(e=>(e[e.NONE=0]="NONE",e[e.NEW=1]="NEW",e[e.COMPLETE=2]="COMPLETE",e[e.ERROR=3]="ERROR",e))(Vu||{}),Ll=(e=>(e.BY_PROJECT_AND_USER_GROUPS="by_project_and_user_groups",e.BY_PROJECT="by_project",e.BY_USER_GROUPS="by_user_groups",e.BY_AGENT="by_agent",e.ALL="all",e))(Ll||{}),ig=(e=>(e.BY_PROJECT="by_project",e.BY_AGENT_GROUPS="by_agent_groups",e.ALL="all",e))(ig||{}),qC=(e=>(e.BY_PROJECT="by_project",e.ALL="all",e))(qC||{}),KC=(e=>(e.BY_PROJECT="by_project",e.ALL="all",e))(KC||{}),YC=(e=>(e.BY_PROJECT="by_project",e.ALL="all",e))(YC||{}),Bu=(e=>(e[e.NONE=0]="NONE",e[e.OPEN=1]="OPEN",e[e.LISTEN=2]="LISTEN",e))(Bu||{}),Tk=(e=>(e.BY_AGENT="by_agent",e.ALL="all",e))(Tk||{}),My=(e=>(e.BY_ACTION_AND_STATUS="by_action_and_status",e.BY_ACTION="by_action",e.BY_STATUS="by_status",e.ALL="all",e))(My||{});const LH=e=>{const t={token:e??null,expired:0,client:{version:"AlphaAlias",schema:"default",key:"default_key",type:"user"},cipher:{name:"NONE",key:""}};return e||(t.client.transport_format=dv.FRONTEND),t},Rke=e=>{const t=`${e}=`,n=document.cookie.split(";").map(r=>r.trim()).find(r=>r.startsWith(t));return n?n.substring(t.length):null};class Ia{limit=20;offset=0;hasNextPage;hasPreviousPage;data;constructor(t){Object.assign(this,t)}}const bn=e=>new Date(Math.round(Number(BigInt(e)/1000000n))),Ete=e=>(BigInt(e.getTime())*1000000n).toString(),Oke=(e,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}},F1=e=>e!=="00000000-0000-0000-0000-000000000000"?e:null,Tke=(e,t)=>{const n=e.is_dir,r=t.is_dir;if(n!==r)return n?-1:1;const s=e.name,a=t.name;return s.localeCompare(a)},Vs=e=>e instanceof DOMException&&e.name==="AbortError",og={authData:"AUTH_DATA"};class Ct{abortControllers=new Map;result=null;rightCallback;leftCallback;getAbortController(t){this.abortControllers.has(t)&&this.abortControllers.get(t)?.abort();const n=new AbortController;return this.abortControllers.set(t,n),n}deleteAbortController(t){this.abortControllers.delete(t)}right(t){this.rightCallback=t,this.result!==null&&cte(this.result)&&this.rightCallback(Rk(this.result))}left(t){this.leftCallback=t,this.result!==null&&RTe(this.result)&&this.leftCallback(Rk(this.result))}}class Ake{apiBasePath;async request(t,{isFile:n=!1,signal:r}={}){const s=await fetch(this.apiBasePath,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:t,signal:r});if(!s.ok)throw{status:s.status,statusText:s.statusText};const i=await(await s.blob()).arrayBuffer();if(!i.byteLength)throw new Error("Ответ пуст");const l=$ke(i,n),{type:u,err:f}=l.response;if(u!==jte.RESULT)throw new Error(f?`${f.stacktrace??""} ${f.text} ${f.parents??""}`:"Неизвестная ошибка");return l}constructor(t){this.apiBasePath=t}}const Ne=new Ake("/api");class De{kind;category;action;priority;meta;created;cmdId;cmdTag;uuid;data;dataMaxSize;dataOnly;destination;constructor(t){Object.assign(this,t)}toBinary(){const{[Os.DATA]:t,...n}=this.request,r=t instanceof ArrayBuffer;let s=t&&!r?DS(t):null;r&&(s=new Uint8Array(t),n[Os.DATA_MAX_SIZE]=s.length),s?.length&&(n[Os.DATA_SIZE]=s.length);const a=DS(n),l=[jke(a.length),a];return s?.length&&l.push(s),Eke(l)}get request(){const{kind:t,category:n,action:r,priority:s,meta:a={},created:i,cmdId:l,cmdTag:u,uuid:f,data:h,dataMaxSize:g,dataOnly:v,destination:w}=this,C={[Os.META]:a};if(i){const _=Ete(i||new Date);C[Os.CREATED]=_}return l!==void 0?C[Os.CMD_ID]=l:u!==void 0?C[Os.CMD_TAG]=u:(C[Os.KIND]=t,C[Os.CATEGORY]=n,C[Os.ACTION]=r),s&&(C[Os.PRIORITY]=s),f!==void 0&&(C[Os.UUID]=f),h&&(C[Os.DATA]=h),v&&(C[Os.RESP]={data_only:v}),w&&(C[Os.DEST]=this._destination),g&&(C[Os.DATA_MAX_SIZE]=g),C}get _destination(){const{destination:t}=this,n={groups:[],items:[]};return t?.groups?.length&&(n.groups=t.groups.map(r=>{const s={};return r.projectId&&(s.project_uuid=r.projectId),r.agentGroupId&&(s.agent_group_uuid=r.agentGroupId),r.clientKeyId&&(s.client_key_uuid=r.clientKeyId),r.clientKeyValue&&(s.client_key_value=r.clientKeyValue),s})),t?.items?.length&&(n.items=t.items.map(r=>{const s={};return r.agentId&&(s.client_uuid=r.agentId),r.tokenId&&(s.token_uuid=r.tokenId),r.token&&(s.token=r.token),s})),n}}class kke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.USER],this.action=Me.LOGIN,Object.assign(this,t)}}class Nke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT],this.action=Me.LIST,Object.assign(this,t)}}class Lke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.LOGOUT,Object.assign(this,t)}}class Mke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT],this.action=Me.GET,Object.assign(this,t)}}class Ike extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT],this.action=Me.UPDATE,Object.assign(this,t)}}class Pke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TOKEN],this.action=Me.LIST,Object.assign(this,t)}}class Dke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.CLOSE,this.priority=kL.CONSOLE,Object.assign(this,t)}}class Vke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.DELETE,Object.assign(this,t)}}class Bke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.NEW,Object.assign(this,t)}}class Fke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.INFO],this.action=Me.GET,Object.assign(this,t)}}class Uke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.LIST,Object.assign(this,t)}}class Gke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.LOCK,Object.assign(this,t)}}class zke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.OPEN,this.priority=kL.CONSOLE,Object.assign(this,t)}}class Hke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.UNLOCK,Object.assign(this,t)}}class qke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.OUTPUT],this.action=Me.GET,Object.assign(this,t)}}class Kke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE],this.action=Me.PIN,Object.assign(this,t)}}class Yke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.INPUT],this.action=Me.SET,Object.assign(this,t)}}class Zke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.INPUT],this.action=Me.GET,Object.assign(this,t)}}class Xke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.TYPE],this.action=Me.SET,Object.assign(this,t)}}class Wke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.PROJECT],this.action=Me.CREATE,Object.assign(this,t)}}class Qke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.PROJECT],this.action=Me.DELETE,Object.assign(this,t)}}class Jke extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.PROJECT],this.action=Me.GET,Object.assign(this,t)}}class e8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.PROJECT],this.action=Me.LIST,Object.assign(this,t)}}class t8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.PROJECT],this.action=Me.UPDATE,Object.assign(this,t)}}class n8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP],this.action=Me.CREATE,Object.assign(this,t)}}class r8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP],this.action=Me.DELETE,Object.assign(this,t)}}class s8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP],this.action=Me.GET,Object.assign(this,t)}}class a8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP],this.action=Me.LIST,Object.assign(this,t)}}class i8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP],this.action=Me.UPDATE,Object.assign(this,t)}}class o8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP,G.USER],this.action=Me.ADD,Object.assign(this,t)}}class l8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER_GROUP,G.USER],this.action=Me.DELETE,Object.assign(this,t)}}class u8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.FILE],this.action=Me.CREATE,Object.assign(this,t)}}class c8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.ITEM],this.action=Me.DELETE,Object.assign(this,t)}}class d8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.FOLDER],this.action=Me.CREATE,Object.assign(this,t)}}class f8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.FILE],this.action=Me.GET,Object.assign(this,t)}}class h8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.FOLDER],this.action=Me.LIST,Object.assign(this,t)}}class p8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.ITEM],this.action=Me.RENAME,Object.assign(this,t)}}class m8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.LFS,G.ITEM],this.action=Me.MOVE,Object.assign(this,t)}}class g8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.CREATE,Object.assign(this,t)}}class v8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.DELETE,Object.assign(this,t)}}class $te extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.GET,Object.assign(this,t)}}class y8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.LIST,Object.assign(this,t)}}class x8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.UPDATE,Object.assign(this,t)}}class b8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.KEY],this.action=Me.CREATE,Object.assign(this,t)}}class w8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.FILE],this.action=Me.CREATE,Object.assign(this,t)}}class C8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.FOLDER],this.action=Me.CREATE,Object.assign(this,t)}}class S8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.ITEM],this.action=Me.DELETE,Object.assign(this,t)}}class _8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.FILE],this.action=Me.GET,Object.assign(this,t)}}class j8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.RFS,G.ACTION,G.STATUS],this.action=Me.LIST,Object.assign(this,t)}}class E8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.FOLDER],this.action=Me.LIST,Object.assign(this,t)}}class $8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.ITEM],this.action=Me.RENAME,Object.assign(this,t)}}class R8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.RFS,G.FOLDER],this.action=Me.LIST,Object.assign(this,t)}}class O8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_AGENT,this.category=[G.AGENT,G.RFS,G.ITEM],this.action=Me.MOVE,Object.assign(this,t)}}class T8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP],this.action=Me.LIST,Object.assign(this,t)}}class A8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP],this.action=Me.CREATE,Object.assign(this,t)}}class k8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP],this.action=Me.DELETE,Object.assign(this,t)}}class N8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP],this.action=Me.GET,Object.assign(this,t)}}class L8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP],this.action=Me.UPDATE,Object.assign(this,t)}}class M8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.CLIENT,G.KEY],this.action=Me.ADD,Object.assign(this,t)}}class I8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.CLIENT,G.KEY],this.action=Me.DELETE,Object.assign(this,t)}}class P8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.USER_GROUP],this.action=Me.ADD,Object.assign(this,t)}}class D8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.USER_GROUP],this.action=Me.DELETE,Object.assign(this,t)}}class V8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.AGENT],this.action=Me.ADD,Object.assign(this,t)}}class B8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT_GROUP,G.AGENT],this.action=Me.DELETE,Object.assign(this,t)}}class F8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER,G.CURRENT],this.action=Me.GET,Object.assign(this,t)}}class U8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.CREATE,Object.assign(this,t)}}class G8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.DELETE,Object.assign(this,t)}}class z8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.GET,Object.assign(this,t)}}class H8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.LIST,Object.assign(this,t)}}class q8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.USER],this.action=Me.UPDATE,Object.assign(this,t)}}class K8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.CREATE,Object.assign(this,t)}}class Y8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.DELETE,Object.assign(this,t)}}class Rte extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.GET,Object.assign(this,t)}}class Z8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.LIST,Object.assign(this,t)}}class X8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.UPDATE,Object.assign(this,t)}}class W8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.SCHEMA],this.action=Me.CREATE,Object.assign(this,t)}}class Q8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.VERSION],this.action=Me.CREATE,Object.assign(this,t)}}class J8e extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.VERSION],this.action=Me.DELETE,Object.assign(this,t)}}class eNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.VERSION],this.action=Me.GET,Object.assign(this,t)}}class tNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.VERSION],this.action=Me.LIST,Object.assign(this,t)}}class nNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.VERSION],this.action=Me.UPDATE,Object.assign(this,t)}}class rNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.HANDSHAKE,G.KEY],this.action=Me.CREATE,Object.assign(this,t)}}class sNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.HANDSHAKE,G.KEY],this.action=Me.DELETE,Object.assign(this,t)}}class aNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.HANDSHAKE,G.KEY],this.action=Me.GET,Object.assign(this,t)}}class iNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.HANDSHAKE,G.KEY],this.action=Me.LIST,Object.assign(this,t)}}class oNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.CLIENT,G.HANDSHAKE,G.KEY],this.action=Me.UPDATE,Object.assign(this,t)}}class lNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER],this.action=Me.ADD,Object.assign(this,t)}}class uNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER],this.action=Me.DELETE,Object.assign(this,t)}}class cNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER],this.action=Me.GET,Object.assign(this,t)}}class dNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER],this.action=Me.LIST,Object.assign(this,t)}}class fNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER],this.action=Me.UPDATE,Object.assign(this,t)}}class hNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER_GROUP],this.action=Me.ADD,Object.assign(this,t)}}class pNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER_GROUP],this.action=Me.DELETE,Object.assign(this,t)}}class mNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER_GROUP],this.action=Me.GET,Object.assign(this,t)}}class gNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER_GROUP],this.action=Me.LIST,Object.assign(this,t)}}class vNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.CONSOLE,G.RIGHT,G.USER_GROUP],this.action=Me.UPDATE,Object.assign(this,t)}}class yNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG,G.BASE],this.action=Me.CREATE,Object.assign(this,t)}}class xNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG,G.BASE],this.action=Me.DELETE,Object.assign(this,t)}}class bNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG,G.BASE],this.action=Me.GET,Object.assign(this,t)}}class wNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG,G.BASE],this.action=Me.LIST,Object.assign(this,t)}}class CNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG,G.BASE],this.action=Me.UPDATE,Object.assign(this,t)}}class SNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG],this.action=Me.ADD,Object.assign(this,t)}}class _Ne extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG],this.action=Me.DELETE,Object.assign(this,t)}}class jNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG],this.action=Me.LIST,Object.assign(this,t)}}class ENe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.TAG],this.action=Me.SET,Object.assign(this,t)}}class $Ne extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.SCHEDULE],this.action=Me.GET,Object.assign(this,t)}}class RNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.AGENT,G.SCHEDULE],this.action=Me.SET,Object.assign(this,t)}}class ONe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.CLOSE,Object.assign(this,t)}}class TNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.GET,Object.assign(this,t)}}class ANe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.LIST,Object.assign(this,t)}}class kNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.LISTEN,Object.assign(this,t)}}class NNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.OPEN,Object.assign(this,t)}}class LNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.AGENT,G.TUNNEL,G.PORT],this.action=Me.UPDATE,Object.assign(this,t)}}class MNe extends De{constructor(t){super(t),this.kind=Ie.USER_TO_SERVICE,this.category=[G.SERVICE,G.LICENSE],this.action=Me.GET,Object.assign(this,t)}}class Ote extends Ct{async login(t,n){try{by(og.authData,"",{maxAge:"-1",path:"/"}),by(og.authData,btoa(JSON.stringify(LH())),{path:"/"});const r=new kke({meta:{login:t,passw:PS(n)}}),{data:s}=await Ne.request(r.toBinary());return by(og.authData,"",{maxAge:"-1",path:"/"}),by(og.authData,btoa(JSON.stringify(LH(s.token))),{path:"/"}),this.result=Ae(s.token),this.result}catch(r){return console.warn(r),this.result=ke("Не удалось проверить учетные данные"),this.result}}async logout(){try{const t=new Lke({});return await Ne.request(t.toBinary()),by(og.authData,"",{expires:new Date(0)}),this.result=Ae("OK"),this.result}catch(t){console.warn(t),this.result=ke("Не удалось выполнить выход из системы")}}async ping(){try{const t=new De({kind:Ie.USER_TO_SERVICE,category:[G.USER],action:Me.PING,meta:{utime:Ete(new Date)}});return await Ne.request(t.toBinary()),this.result=Ae("pong!"),this.result}catch(t){return console.warn(t),this.result=ke("Не удалось проверить доступ к серверу"),this.result}}}var Vn;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},e.getValidEnumValues=s=>{const a=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),i={};for(const l of a)i[l]=s[l];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(a){return s[a]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},e.find=(s,a)=>{for(const i of s)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(Vn||(Vn={}));var MH;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(MH||(MH={}));const ct=Vn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),dd=e=>{switch(typeof e){case"undefined":return ct.undefined;case"string":return ct.string;case"number":return Number.isNaN(e)?ct.nan:ct.number;case"boolean":return ct.boolean;case"function":return ct.function;case"bigint":return ct.bigint;case"symbol":return ct.symbol;case"object":return Array.isArray(e)?ct.array:e===null?ct.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ct.promise:typeof Map<"u"&&e instanceof Map?ct.map:typeof Set<"u"&&e instanceof Set?ct.set:typeof Date<"u"&&e instanceof Date?ct.date:ct.object;default:return ct.unknown}},Ze=Vn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ju extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let l=r,u=0;for(;u<i.path.length;){const f=i.path[u];u===i.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(n(i))):l[f]=l[f]||{_errors:[]},l=l[f],u++}}};return s(this),r}static assert(t){if(!(t instanceof Ju))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Vn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];n[a]=n[a]||[],n[a].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ju.create=e=>new Ju(e);const Ak=(e,t)=>{let n;switch(e.code){case Ze.invalid_type:e.received===ct.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ze.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Vn.jsonStringifyReplacer)}`;break;case Ze.unrecognized_keys:n=`Unrecognized key(s) in object: ${Vn.joinValues(e.keys,", ")}`;break;case Ze.invalid_union:n="Invalid input";break;case Ze.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Vn.joinValues(e.options)}`;break;case Ze.invalid_enum_value:n=`Invalid enum value. Expected ${Vn.joinValues(e.options)}, received '${e.received}'`;break;case Ze.invalid_arguments:n="Invalid function arguments";break;case Ze.invalid_return_type:n="Invalid function return type";break;case Ze.invalid_date:n="Invalid date";break;case Ze.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Vn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ze.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ze.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ze.custom:n="Invalid input";break;case Ze.invalid_intersection_types:n="Intersection results could not be merged";break;case Ze.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ze.not_finite:n="Number must be finite";break;default:n=t.defaultError,Vn.assertNever(e)}return{message:n}};let INe=Ak;function PNe(){return INe}const DNe=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,a=[...n,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let l="";const u=r.filter(f=>!!f).slice().reverse();for(const f of u)l=f(i,{data:t,defaultError:l}).message;return{...s,path:a,message:l}};function ot(e,t){const n=PNe(),r=DNe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ak?void 0:Ak].filter(s=>!!s)});e.common.issues.push(r)}class La{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return Qt;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const a=await s.key,i=await s.value;r.push({key:a,value:i})}return La.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return Qt;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[a.value]=i.value)}return{status:t.value,value:r}}}const Qt=Object.freeze({status:"aborted"}),Iy=e=>({status:"dirty",value:e}),po=e=>({status:"valid",value:e}),IH=e=>e.status==="aborted",PH=e=>e.status==="dirty",Bg=e=>e.status==="valid",VS=e=>typeof Promise<"u"&&e instanceof Promise;var gt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(gt||(gt={}));class tu{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DH=(e,t)=>{if(Bg(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ju(e.common.issues);return this._error=n,this._error}}};function hn(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,l)=>{const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??r??l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:u??n??l.defaultError}},description:s}}class kn{get description(){return this._def.description}_getType(t){return dd(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:dd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new La,ctx:{common:t.parent.common,data:t.data,parsedType:dd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(VS(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)},s=this._parseSync({data:t,path:r.path,parent:r});return DH(r,s)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Bg(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Bg(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)},s=this._parse({data:t,path:r.path,parent:r}),a=await(VS(s)?s:Promise.resolve(s));return DH(r,a)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,a)=>{const i=t(s),l=()=>a.addIssue({code:Ze.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(l(),!1)):i?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Gg({schema:this,typeName:Zt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Cd.create(this,this._def)}nullable(){return zg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wl.create(this)}promise(){return zS.create(this,this._def)}or(t){return FS.create([this,t],this._def)}and(t){return US.create(this,t,this._def)}transform(t){return new Gg({...hn(this._def),schema:this,typeName:Zt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Lk({...hn(this._def),innerType:this,defaultValue:n,typeName:Zt.ZodDefault})}brand(){return new o9e({typeName:Zt.ZodBranded,type:this,...hn(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Mk({...hn(this._def),innerType:this,catchValue:n,typeName:Zt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return NL.create(this,t)}readonly(){return Ik.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const VNe=/^c[^\s-]{8,}$/i,BNe=/^[0-9a-z]+$/,FNe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,UNe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GNe=/^[a-z0-9_-]{21}$/i,zNe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,HNe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qNe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,KNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let L6;const YNe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ZNe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,XNe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,WNe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,QNe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,JNe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Tte="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",e9e=new RegExp(`^${Tte}$`);function Ate(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function t9e(e){return new RegExp(`^${Ate(e)}$`)}function n9e(e){let t=`${Tte}T${Ate(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function r9e(e,t){return!!((t==="v4"||!t)&&YNe.test(e)||(t==="v6"||!t)&&XNe.test(e))}function s9e(e,t){if(!zNe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function a9e(e,t){return!!((t==="v4"||!t)&&ZNe.test(e)||(t==="v6"||!t)&&WNe.test(e))}class Vl extends kn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ct.string){const a=this._getOrReturnCtx(t);return ot(a,{code:Ze.invalid_type,expected:ct.string,received:a.parsedType}),Qt}const r=new La;let s;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,l=t.data.length<a.value;(i||l)&&(s=this._getOrReturnCtx(t,s),i?ot(s,{code:Ze.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&ot(s,{code:Ze.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")qNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"email",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")L6||(L6=new RegExp(KNe,"u")),L6.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"emoji",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")UNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"uuid",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")GNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"nanoid",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")VNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"cuid",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")BNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"cuid2",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")FNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"ulid",code:Ze.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ot(s,{validation:"url",code:Ze.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"regex",code:Ze.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?n9e(a).test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?e9e.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?t9e(a).test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?HNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"duration",code:Ze.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?r9e(t.data,a.version)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"ip",code:Ze.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?s9e(t.data,a.alg)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"jwt",code:Ze.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?a9e(t.data,a.version)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"cidr",code:Ze.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?QNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"base64",code:Ze.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?JNe.test(t.data)||(s=this._getOrReturnCtx(t,s),ot(s,{validation:"base64url",code:Ze.invalid_string,message:a.message}),r.dirty()):Vn.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:Ze.invalid_string,...gt.errToObj(r)})}_addCheck(t){return new Vl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...gt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...gt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...gt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...gt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...gt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...gt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...gt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...gt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...gt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...gt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...gt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...gt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...gt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...gt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...gt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...gt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...gt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...gt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...gt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...gt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...gt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...gt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...gt.errToObj(n)})}nonempty(t){return this.min(1,gt.errToObj(t))}trim(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vl.create=e=>new Vl({checks:[],typeName:Zt.ZodString,coerce:e?.coerce??!1,...hn(e)});function i9e(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,a=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return a%i/10**s}class Rh extends kn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ct.number){const a=this._getOrReturnCtx(t);return ot(a,{code:Ze.invalid_type,expected:ct.number,received:a.parsedType}),Qt}let r;const s=new La;for(const a of this._def.checks)a.kind==="int"?Vn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?i9e(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.not_finite,message:a.message}),s.dirty()):Vn.assertNever(a);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,gt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,gt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,gt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,gt.toString(n))}setLimit(t,n,r,s){return new Rh({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:gt.toString(s)}]})}_addCheck(t){return new Rh({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:gt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:gt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:gt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:gt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:gt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:gt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:gt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:gt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:gt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Vn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Rh.create=e=>new Rh({checks:[],typeName:Zt.ZodNumber,coerce:e?.coerce||!1,...hn(e)});class Oh extends kn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ct.bigint)return this._getInvalidInput(t);let r;const s=new La;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ot(r,{code:Ze.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):Vn.assertNever(a);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ot(n,{code:Ze.invalid_type,expected:ct.bigint,received:n.parsedType}),Qt}gte(t,n){return this.setLimit("min",t,!0,gt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,gt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,gt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,gt.toString(n))}setLimit(t,n,r,s){return new Oh({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:gt.toString(s)}]})}_addCheck(t){return new Oh({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:gt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:gt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:gt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:gt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:gt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Oh.create=e=>new Oh({checks:[],typeName:Zt.ZodBigInt,coerce:e?.coerce??!1,...hn(e)});class BS extends kn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ct.boolean){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.boolean,received:r.parsedType}),Qt}return po(t.data)}}BS.create=e=>new BS({typeName:Zt.ZodBoolean,coerce:e?.coerce||!1,...hn(e)});class Fg extends kn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ct.date){const a=this._getOrReturnCtx(t);return ot(a,{code:Ze.invalid_type,expected:ct.date,received:a.parsedType}),Qt}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ot(a,{code:Ze.invalid_date}),Qt}const r=new La;let s;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(s=this._getOrReturnCtx(t,s),ot(s,{code:Ze.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):Vn.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fg({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:gt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:gt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fg.create=e=>new Fg({checks:[],coerce:e?.coerce||!1,typeName:Zt.ZodDate,...hn(e)});class VH extends kn{_parse(t){if(this._getType(t)!==ct.symbol){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.symbol,received:r.parsedType}),Qt}return po(t.data)}}VH.create=e=>new VH({typeName:Zt.ZodSymbol,...hn(e)});class BH extends kn{_parse(t){if(this._getType(t)!==ct.undefined){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.undefined,received:r.parsedType}),Qt}return po(t.data)}}BH.create=e=>new BH({typeName:Zt.ZodUndefined,...hn(e)});class FH extends kn{_parse(t){if(this._getType(t)!==ct.null){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.null,received:r.parsedType}),Qt}return po(t.data)}}FH.create=e=>new FH({typeName:Zt.ZodNull,...hn(e)});class UH extends kn{constructor(){super(...arguments),this._any=!0}_parse(t){return po(t.data)}}UH.create=e=>new UH({typeName:Zt.ZodAny,...hn(e)});class GH extends kn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return po(t.data)}}GH.create=e=>new GH({typeName:Zt.ZodUnknown,...hn(e)});class Ld extends kn{_parse(t){const n=this._getOrReturnCtx(t);return ot(n,{code:Ze.invalid_type,expected:ct.never,received:n.parsedType}),Qt}}Ld.create=e=>new Ld({typeName:Zt.ZodNever,...hn(e)});class zH extends kn{_parse(t){if(this._getType(t)!==ct.undefined){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.void,received:r.parsedType}),Qt}return po(t.data)}}zH.create=e=>new zH({typeName:Zt.ZodVoid,...hn(e)});class Wl extends kn{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==ct.array)return ot(n,{code:Ze.invalid_type,expected:ct.array,received:n.parsedType}),Qt;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(i||l)&&(ot(n,{code:i?Ze.too_big:Ze.too_small,minimum:l?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ot(n,{code:Ze.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ot(n,{code:Ze.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,l)=>s.type._parseAsync(new tu(n,i,n.path,l)))).then(i=>La.mergeArray(r,i));const a=[...n.data].map((i,l)=>s.type._parseSync(new tu(n,i,n.path,l)));return La.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Wl({...this._def,minLength:{value:t,message:gt.toString(n)}})}max(t,n){return new Wl({...this._def,maxLength:{value:t,message:gt.toString(n)}})}length(t,n){return new Wl({...this._def,exactLength:{value:t,message:gt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wl.create=(e,t)=>new Wl({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Zt.ZodArray,...hn(t)});function lg(e){if(e instanceof is){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Cd.create(lg(r))}return new is({...e._def,shape:()=>t})}else return e instanceof Wl?new Wl({...e._def,type:lg(e.element)}):e instanceof Cd?Cd.create(lg(e.unwrap())):e instanceof zg?zg.create(lg(e.unwrap())):e instanceof Th?Th.create(e.items.map(t=>lg(t))):e}class is extends kn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Vn.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ct.object){const f=this._getOrReturnCtx(t);return ot(f,{code:Ze.invalid_type,expected:ct.object,received:f.parsedType}),Qt}const{status:r,ctx:s}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ld&&this._def.unknownKeys==="strip"))for(const f in s.data)i.includes(f)||l.push(f);const u=[];for(const f of i){const h=a[f],g=s.data[f];u.push({key:{status:"valid",value:f},value:h._parse(new tu(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ld){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of l)u.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(f==="strict")l.length>0&&(ot(s,{code:Ze.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const h of l){const g=s.data[h];u.push({key:{status:"valid",value:h},value:f._parse(new tu(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of u){const g=await h.key,v=await h.value;f.push({key:g,value:v,alwaysSet:h.alwaysSet})}return f}).then(f=>La.mergeObjectSync(r,f)):La.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return gt.errToObj,new is({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:gt.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new is({...this._def,unknownKeys:"strip"})}passthrough(){return new is({...this._def,unknownKeys:"passthrough"})}extend(t){return new is({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new is({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Zt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new is({...this._def,catchall:t})}pick(t){const n={};for(const r of Vn.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new is({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Vn.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new is({...this._def,shape:()=>n})}deepPartial(){return lg(this)}partial(t){const n={};for(const r of Vn.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new is({...this._def,shape:()=>n})}required(t){const n={};for(const r of Vn.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Cd;)a=a._def.innerType;n[r]=a}return new is({...this._def,shape:()=>n})}keyof(){return kte(Vn.objectKeys(this.shape))}}is.create=(e,t)=>new is({shape:()=>e,unknownKeys:"strip",catchall:Ld.create(),typeName:Zt.ZodObject,...hn(t)});is.strictCreate=(e,t)=>new is({shape:()=>e,unknownKeys:"strict",catchall:Ld.create(),typeName:Zt.ZodObject,...hn(t)});is.lazycreate=(e,t)=>new is({shape:e,unknownKeys:"strip",catchall:Ld.create(),typeName:Zt.ZodObject,...hn(t)});class FS extends kn{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const i=a.map(l=>new Ju(l.ctx.common.issues));return ot(n,{code:Ze.invalid_union,unionErrors:i}),Qt}if(n.common.async)return Promise.all(r.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const u of r){const f={...n,common:{...n.common,issues:[]},parent:null},h=u._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const l=i.map(u=>new Ju(u));return ot(n,{code:Ze.invalid_union,unionErrors:l}),Qt}}get options(){return this._def.options}}FS.create=(e,t)=>new FS({options:e,typeName:Zt.ZodUnion,...hn(t)});function kk(e,t){const n=dd(e),r=dd(t);if(e===t)return{valid:!0,data:e};if(n===ct.object&&r===ct.object){const s=Vn.objectKeys(t),a=Vn.objectKeys(e).filter(l=>s.indexOf(l)!==-1),i={...e,...t};for(const l of a){const u=kk(e[l],t[l]);if(!u.valid)return{valid:!1};i[l]=u.data}return{valid:!0,data:i}}else if(n===ct.array&&r===ct.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let a=0;a<e.length;a++){const i=e[a],l=t[a],u=kk(i,l);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return n===ct.date&&r===ct.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class US extends kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(a,i)=>{if(IH(a)||IH(i))return Qt;const l=kk(a.value,i.value);return l.valid?((PH(a)||PH(i))&&n.dirty(),{status:n.value,value:l.data}):(ot(r,{code:Ze.invalid_intersection_types}),Qt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}US.create=(e,t,n)=>new US({left:e,right:t,typeName:Zt.ZodIntersection,...hn(n)});class Th extends kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.array)return ot(r,{code:Ze.invalid_type,expected:ct.array,received:r.parsedType}),Qt;if(r.data.length<this._def.items.length)return ot(r,{code:Ze.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Qt;!this._def.rest&&r.data.length>this._def.items.length&&(ot(r,{code:Ze.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((i,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new tu(r,i,r.path,l)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>La.mergeArray(n,i)):La.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Th({...this._def,rest:t})}}Th.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Th({items:e,typeName:Zt.ZodTuple,rest:null,...hn(t)})};class GS extends kn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.object)return ot(r,{code:Ze.invalid_type,expected:ct.object,received:r.parsedType}),Qt;const s=[],a=this._def.keyType,i=this._def.valueType;for(const l in r.data)s.push({key:a._parse(new tu(r,l,r.path,l)),value:i._parse(new tu(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?La.mergeObjectAsync(n,s):La.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof kn?new GS({keyType:t,valueType:n,typeName:Zt.ZodRecord,...hn(r)}):new GS({keyType:Vl.create(),valueType:t,typeName:Zt.ZodRecord,...hn(n)})}}class HH extends kn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.map)return ot(r,{code:Ze.invalid_type,expected:ct.map,received:r.parsedType}),Qt;const s=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([l,u],f)=>({key:s._parse(new tu(r,l,r.path,[f,"key"])),value:a._parse(new tu(r,u,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of i){const f=await u.key,h=await u.value;if(f.status==="aborted"||h.status==="aborted")return Qt;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),l.set(f.value,h.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const u of i){const f=u.key,h=u.value;if(f.status==="aborted"||h.status==="aborted")return Qt;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),l.set(f.value,h.value)}return{status:n.value,value:l}}}}HH.create=(e,t,n)=>new HH({valueType:t,keyType:e,typeName:Zt.ZodMap,...hn(n)});class U1 extends kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.set)return ot(r,{code:Ze.invalid_type,expected:ct.set,received:r.parsedType}),Qt;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ot(r,{code:Ze.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ot(r,{code:Ze.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const a=this._def.valueType;function i(u){const f=new Set;for(const h of u){if(h.status==="aborted")return Qt;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}const l=[...r.data.values()].map((u,f)=>a._parse(new tu(r,u,r.path,f)));return r.common.async?Promise.all(l).then(u=>i(u)):i(l)}min(t,n){return new U1({...this._def,minSize:{value:t,message:gt.toString(n)}})}max(t,n){return new U1({...this._def,maxSize:{value:t,message:gt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}U1.create=(e,t)=>new U1({valueType:e,minSize:null,maxSize:null,typeName:Zt.ZodSet,...hn(t)});class Nk extends kn{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Nk.create=(e,t)=>new Nk({getter:e,typeName:Zt.ZodLazy,...hn(t)});class qH extends kn{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ot(n,{received:n.data,code:Ze.invalid_literal,expected:this._def.value}),Qt}return{status:"valid",value:t.data}}get value(){return this._def.value}}qH.create=(e,t)=>new qH({value:e,typeName:Zt.ZodLiteral,...hn(t)});function kte(e,t){return new Ug({values:e,typeName:Zt.ZodEnum,...hn(t)})}class Ug extends kn{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ot(n,{expected:Vn.joinValues(r),received:n.parsedType,code:Ze.invalid_type}),Qt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ot(n,{received:n.data,code:Ze.invalid_enum_value,options:r}),Qt}return po(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ug.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ug.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ug.create=kte;class KH extends kn{_parse(t){const n=Vn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ct.string&&r.parsedType!==ct.number){const s=Vn.objectValues(n);return ot(r,{expected:Vn.joinValues(s),received:r.parsedType,code:Ze.invalid_type}),Qt}if(this._cache||(this._cache=new Set(Vn.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Vn.objectValues(n);return ot(r,{received:r.data,code:Ze.invalid_enum_value,options:s}),Qt}return po(t.data)}get enum(){return this._def.values}}KH.create=(e,t)=>new KH({values:e,typeName:Zt.ZodNativeEnum,...hn(t)});class zS extends kn{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.promise&&n.common.async===!1)return ot(n,{code:Ze.invalid_type,expected:ct.promise,received:n.parsedType}),Qt;const r=n.parsedType===ct.promise?n.data:Promise.resolve(n.data);return po(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zS.create=(e,t)=>new zS({type:e,typeName:Zt.ZodPromise,...hn(t)});class Gg extends kn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Zt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,a={addIssue:i=>{ot(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async l=>{if(n.value==="aborted")return Qt;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?Qt:u.status==="dirty"||n.value==="dirty"?Iy(u.value):u});{if(n.value==="aborted")return Qt;const l=this._def.schema._parseSync({data:i,path:r.path,parent:r});return l.status==="aborted"?Qt:l.status==="dirty"||n.value==="dirty"?Iy(l.value):l}}if(s.type==="refinement"){const i=l=>{const u=s.refinement(l,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Qt:(l.status==="dirty"&&n.dirty(),i(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Qt:(l.status==="dirty"&&n.dirty(),i(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Bg(i))return Qt;const l=s.transform(i.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Bg(i)?Promise.resolve(s.transform(i.value,a)).then(l=>({status:n.value,value:l})):Qt);Vn.assertNever(s)}}Gg.create=(e,t,n)=>new Gg({schema:e,typeName:Zt.ZodEffects,effect:t,...hn(n)});Gg.createWithPreprocess=(e,t,n)=>new Gg({schema:t,effect:{type:"preprocess",transform:e},typeName:Zt.ZodEffects,...hn(n)});class Cd extends kn{_parse(t){return this._getType(t)===ct.undefined?po(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Cd.create=(e,t)=>new Cd({innerType:e,typeName:Zt.ZodOptional,...hn(t)});class zg extends kn{_parse(t){return this._getType(t)===ct.null?po(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zg.create=(e,t)=>new zg({innerType:e,typeName:Zt.ZodNullable,...hn(t)});class Lk extends kn{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ct.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Lk.create=(e,t)=>new Lk({innerType:e,typeName:Zt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...hn(t)});class Mk extends kn{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return VS(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ju(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ju(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Mk.create=(e,t)=>new Mk({innerType:e,typeName:Zt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...hn(t)});class YH extends kn{_parse(t){if(this._getType(t)!==ct.nan){const r=this._getOrReturnCtx(t);return ot(r,{code:Ze.invalid_type,expected:ct.nan,received:r.parsedType}),Qt}return{status:"valid",value:t.data}}}YH.create=e=>new YH({typeName:Zt.ZodNaN,...hn(e)});class o9e extends kn{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class NL extends kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Qt:a.status==="dirty"?(n.dirty(),Iy(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Qt:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new NL({in:t,out:n,typeName:Zt.ZodPipeline})}}class Ik extends kn{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Bg(s)&&(s.value=Object.freeze(s.value)),s);return VS(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Ik.create=(e,t)=>new Ik({innerType:e,typeName:Zt.ZodReadonly,...hn(t)});var Zt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Zt||(Zt={}));const te=Vl.create,ut=Rh.create;Oh.create;const we=BS.create;Fg.create;Ld.create;const Or=Wl.create,et=is.create;FS.create;US.create;Th.create;const Pk=GS.create,l9e=Nk.create;Ug.create;zS.create;Cd.create;zg.create;const Dk={string:(e=>Vl.create({...e,coerce:!0})),number:(e=>Rh.create({...e,coerce:!0})),boolean:(e=>BS.create({...e,coerce:!0})),bigint:(e=>Oh.create({...e,coerce:!0})),date:(e=>Fg.create({...e,coerce:!0}))},HS=et({"agent.block":we().optional(),"agent.console.admin":we().optional(),"agent.console.close":we().optional(),"agent.console.delete":we().optional(),"agent.console.list":we().optional(),"agent.console.lock":we().optional(),"agent.console.new":we().optional(),"agent.console.open":we().optional(),"agent.console.pin":we().optional(),"agent.console.read":we().optional(),"agent.console.unlock":we().optional(),"agent.console.write":we().optional(),"agent.create":we().optional(),"agent.delete":we().optional(),"agent.get_full":we().optional(),"agent.lfs.file.create":we().optional(),"agent.lfs.file.get":we().optional(),"agent.lfs.folder.create":we().optional(),"agent.lfs.folder.list":we().optional(),"agent.lfs.item.delete":we().optional(),"agent.lfs.item.get_info":we().optional(),"agent.lfs.item.move":we().optional(),"agent.lfs.item.rename":we().optional(),"agent.lfs.reset":we().optional(),"agent.note.get":we().optional(),"agent.note.set":we().optional(),"agent.rfs.action_status.list":we().optional(),"agent.rfs.file.create":we().optional(),"agent.rfs.file.get":we().optional(),"agent.rfs.folder.create":we().optional(),"agent.rfs.folder.list":we().optional(),"agent.rfs.item.copy":we().optional(),"agent.rfs.item.delete":we().optional(),"agent.rfs.item.move":we().optional(),"agent.rfs.item.rename":we().optional(),"agent.rfs.reset":we().optional(),"agent.unblock":we().optional(),"agent.update":we().optional(),"agent_group.agent.add":we().optional(),"agent_group.agent.delete":we().optional(),"agent_group.client_key.add":we().optional(),"agent_group.client_key.delete":we().optional(),"agent_group.client_key.list":we().optional(),"agent_group.create":we().optional(),"agent_group.delete":we().optional(),"agent_group.get_full":we().optional(),"agent_group.list":we().optional(),"agent_group.list_by_project":we().optional(),"agent_group.update":we().optional(),"agent_group.user_group.add":we().optional(),"agent_group.user_group.delete":we().optional(),"agent_group.user_group.list":we().optional(),"client.key.create":we().optional(),"client.key.delete":we().optional(),"client.key.get_full":we().optional(),"client.key.list":we().optional(),"client.key.update":we().optional(),"client.key.list_all":we().optional(),"client.version.create":we().optional(),"client.version.delete":we().optional(),"client.version.update":we().optional(),"client.version.get_full":we().optional(),"client.version.list":we().optional(),"client.version.list_all":we().optional(),"client.handshake.create":we().optional(),"client.handshake.delete":we().optional(),"client.handshake.update":we().optional(),"client.handshake.get_full":we().optional(),"client.handshake.list":we().optional(),"client.handshake.list_all":we().optional(),"client.schema.create":we().optional(),"client.schema.delete":we().optional(),"client.schema.update":we().optional(),"client.schema.get_full":we().optional(),"client.schema.list":we().optional(),"client.schema.list_all":we().optional(),"project.create":we().optional(),"project.delete":we().optional(),"project.get_full":we().optional(),"project.list":we().optional(),"project.list_full":we().optional(),"project.update":we().optional(),"right.create":we().optional(),"right.delete":we().optional(),"right.update":we().optional(),"right.get_full":we().optional(),"right.list":we().optional(),"user.create":we().optional(),"user.delete":we().optional(),"user.get_full":we().optional(),"user.list":we().optional(),"user.list_all":we().optional(),"user.list_by_project":we().optional(),"user.update":we().optional(),"user_group.create":we().optional(),"user_group.delete":we().optional(),"user_group.get_full":we().optional(),"user_group.list":we().optional(),"user_group.list_by_project":we().optional(),"user_group.right.add":we().optional(),"user_group.right.delete":we().optional(),"user_group.update":we().optional(),"user_group.user.add":we().optional(),"user_group.user.delete":we().optional()}),ZC=et({created:te(),creator_uuid:te(),name:te(),description:te().optional(),updated:te(),uuid:te(),settings:et({}).optional(),editor_rights:HS.optional()}),u9e=Or(ZC),XC=et({color:te(),created:te().optional(),name:te(),position:ut().optional(),updated:te().optional(),uuid:te()}),bg=Or(XC),LL=et({arch:te(),created:te(),last_command:te(),last_ip_addr_hash:te(),last_ip_addr_list:Or(te()),last_login:te(),last_ping:te(),name:te(),os:te(),os_short_name:te(),project_uuids:Or(te()).nullable(),short_note:te(),updated:te(),uuid:te(),tags:bg.optional()}),Fh=et({exist:we(),limit:ut(),offset:ut()}),c9e=et({items:Or(LL).nullable(),next_page:Fh}),WC=et({created:te(),creator_uuid:te(),name:te(),project_name:te().optional(),project_uuid:te(),updated:te(),settings:et({}).optional(),uuid:te(),is_default:we()}),d9e=Or(WC),G1=et({admin:we().optional(),close:we().optional(),delete:we().optional(),list:we().optional(),lock:we().optional(),open:we().optional(),pin:we().optional(),read:we().optional(),unlock:we().optional(),write:we().optional()}),yd=et({created:te(),debug:we().optional(),login:te(),name:te(),rights:Pk(HS).nullable().optional(),console_editor_rights:G1.optional(),console_rights:G1.optional(),settings:et({description:te().optional()}).optional(),updated:te(),uuid:te()}),f9e=et({items:Or(yd).nullable(),next_page:Fh}),h9e=Or(yd),p9e=et({agent_uuid:te(),arch:te().optional(),cipher_id:ut(),cipher_key:te().optional(),client_key_uuid:te(),command_per_round:ut(),command_round:ut(),count:ut(),created:te(),cwd:te().optional(),data_updated:ut().optional(),debug:we(),device_uuid:te(),expiration:te(),expiration_type:ut().optional(),expired:te(),host:te().optional(),uuid:te(),image:te().optional(),interval_correction:ut(),ip_addr_hash:te(),ip_addr_list:Or(te()),name:te().optional(),next_interval:ut(),os:te().optional(),path:te().optional(),pid:ut().optional(),ping:te(),ping_min_interval:ut(),ping_max_interval:ut(),ping_min_count:ut(),rights:te().optional(),schema:te(),srv_schema:te().optional(),srv_host:te().optional(),srv_port:ut().optional(),status:ut(),transport_format:ut().optional(),updated:te(),user_:te().optional(),version:te()}),m9e=et({items:Or(p9e).nullable(),next_page:Fh}),no=et({creator_uuid:te(),uuid:te(),locker_uuid:te(),name:te(),owner_uuid:te(),rights:G1.optional(),status:ut(),tag:te(),token_uuid:te(),type:ut()}),g9e=et({items:Or(no),tokens:Or(te())}),v9e=et({created:te(),id:te(),line:te(),line_index:ut(),status:ut(),token_uuid:te(),uuid:te()}),y9e=et({console:no,items:Or(v9e),next_page:Fh}),x9e=et({console:no,command_uuid:te()}),b9e=et({command:te(),created:te(),id:te(),owner_uuid:te(),status:ut(),token_uuid:te(),updated:te(),uuid:te()}),w9e=et({console:no,items:Or(b9e),next_page:Fh}),Rg=et({admin:we().optional(),created:te(),creator_uuid:te().optional(),name:te(),project_uuid:te(),project_name:te().optional(),rights:HS.optional(),settings:et({}).optional(),editor_rights:HS.optional(),console_editor_rights:G1.optional(),console_rights:G1.optional(),system:we().optional(),type:ut().optional(),updated:te(),uuid:te()}),Nte=Or(Rg),ML=l9e(()=>et({childs:Or(ML).nullable(),created:te(),dir:te(),name:te(),empty:we().optional(),loaded:te().optional(),is_dir:we(),size:te(),updated:te(),id:te().optional(),uuid:te().optional()}));et({changed_uuid:te(),created:te(),data_uuid:te(),from_agent:we(),id:te(),name:te(),owner_uuid:te(),parent_id:te(),right_id:te(),right_uuid:te(),shadow_name:te(),size:te(),type:ut(),updated:te(),virtual_uuid:te()});const C9e=et({action:ut(),created:te(),creator_uuid:te(),id:te(),path1:te(),path2:te(),status:ut(),updated:te(),virtual_event_uuid:te()}),S9e=et({items:Or(C9e).nullable(),next_page:Fh}),_9e=et({agent:et({can_create_agent_with_agent_uuid:we().optional(),can_login_with_agent_uuid:we().optional(),can_login_with_device_uuid:we().optional()}).optional(),client:et({can_use_proxy:we().optional(),check_version:we().optional(),create_expiration:te().optional(),create_expiration_type:ut().optional(),login_expiration:te().optional(),login_expiration_type:ut().optional(),login_interval:ut().optional(),login_interval_by_ip_addr:ut().optional(),max_by_ip:ut().optional(),max_by_key:ut().optional(),transport:et({can_change_format:we().optional(),format:ut().optional()}).optional(),type:ut().optional()}).optional(),debug:we().optional(),device:et({max_by_ip:ut().optional(),max_by_key:ut().optional()}).optional(),plugin:et({consoles:et({input_interval:ut().optional()}).optional()}).optional(),stream:et({ping_max_interval:ut().optional(),ping_min_interval:ut().optional()}).optional(),system:et({interval_correction:ut().optional()}).optional(),token:et({command_per_round:ut().optional(),command_round:ut().optional(),expiration:te().optional(),expiration_type:ut().optional(),max_by_agent:ut().optional(),max_by_ip:ut().optional(),max_by_key:ut().optional(),next_interval:ut().optional(),ping_max_interval:ut().optional(),ping_min_count:ut().optional(),ping_min_interval:ut().optional()}).optional()}),Py=et({created:te(),creator_uuid:te(),name:te(),project_name:te(),project_uuid:te(),settings:_9e.optional(),updated:te(),uuid:te(),value:te()}),j9e=Or(Py),Dy=et({created:te(),creator_uuid:te(),name:te(),project_name:te(),project_uuid:te(),updated:te(),uuid:te(),value:te()}),E9e=Or(Dy),QC=et({created:te(),creator_uuid:te(),name:te(),project_name:te(),project_uuid:te(),updated:te(),uuid:te(),value:te()}),$9e=Or(QC),JC=et({created:te(),creator_uuid:te(),name:te(),project_name:te(),project_uuid:te(),pub_key:te(),priv_key:te().optional(),updated:te(),uuid:te(),value:te()}),R9e=Or(JC),ZH=et({holidays:Pk(Or(ut())).optional(),makeup_days:Pk(Or(ut())).optional(),work:et({days:et({monday:we(),tuesday:we(),wednesday:we(),thursday:we(),friday:we(),saturday:we(),sunday:we()}),time:et({start:et({hour:ut(),minute:ut()}),end:et({hour:ut(),minute:ut()})})})}),Vy=et({active:we(),agent_uuid:te(),created:te(),creator_uuid:te(),encrypt:we().optional(),host:te().optional(),port:ut(),mode:ut(),note:te().optional(),payload_uuid:te(),rhost:te().optional(),rport:ut().optional(),srv_port:ut().optional(),updated:te(),uuid:te()}),O9e=et({items:Or(Vy).nullable(),next_page:Fh}),T9e=et({app_version:te().nullish(),expire_date:te().nullish(),instance_count:ut().nullish(),issued_date:te().nullish(),issuer_company_name:te(),license_type:ut().nullish(),product_name:te().nullish(),serial_number:te().nullish(),subject_company_name:te().nullish(),version_number:ut().nullish()});class A9e{id;name;description;creatorId;createdDate=null;updatedDate=null;settings;editorRights;constructor(t){Object.assign(this,t)}}class k9e{id;architecture;createdDate=null;lastCommandDate=null;lastIpHash;lastIpList=[];lastLoginDate=null;lastPingDate=null;name="";os;osShortName;projectIds;shortNote="";updatedDate=null;tags;constructor(t){Object.assign(this,t)}}class N9e{id;name;projectName;projectId;creatorId;createdDate=null;updatedDate=null;settings;isDefault;constructor(t){Object.assign(this,t)}}class L9e{id;createdDate=null;updatedDate=null;login;name;settings;rights;consoleEditorRights;consoleRights;debug;constructor(t){Object.assign(this,t)}}class M9e{agentId;architecture;cipherId;cipherKey;clientKeyId;commandPerRound;commandRound;count;createdDate=null;workingDirectory;dataUpdatedDate=null;debug;deviceId;expirationDate=null;expirationType;expiredDate=null;host;id;image;intervalCorrection;ipHash;ipList;name;nextInterval;os;path;pid;pingDate=null;pingMinInterval;pingMaxInterval;pingMinCount;rights;schema;serverSchema;serverHost;serverPort;status;transportFormat;updatedDate=null;userName;version;constructor(t){Object.assign(this,t)}}class I9e{creatorId;id;lockerId=null;name;ownerId;rights;status;tag;tokenId=null;type=Ho.PUBLIC;constructor(t){Object.assign(this,t)}}class P9e{createdDate=null;id;line;lineIndex;status;tokenId=null;commandId;constructor(t){Object.assign(this,t)}}class Lte{command;createdDate=null;ownerId;status;tokenId=null;updatedDate=null;id;constructor(t){Object.assign(this,t)}}class D9e{admin;close;delete;list;lock;open;pin;read;unlock;write;constructor(t){Object.assign(this,t)}}class V9e{agentBlock;agentConsoleAdmin;agentConsoleClose;agentConsoleDelete;agentConsoleList;agentConsoleLock;agentConsoleNew;agentConsoleOpen;agentConsolePin;agentConsoleRead;agentConsoleUnlock;agentConsoleWrite;agentCreate;agentDelete;agentGetFull;agentLfsFileCreate;agentLfsFileGet;agentLfsFolderCreate;agentLfsFolderList;agentLfsItemDelete;agentLfsItemGetInfo;agentLfsItemMove;agentLfsItemRename;agentLfsReset;agentNoteGet;agentNoteSet;agentRfsActionStatusList;agentRfsFileCreate;agentRfsFileGet;agentRfsFolderCreate;agentRfsFolderList;agentRfsItemCopy;agentRfsItemDelete;agentRfsItemMove;agentRfsItemRename;agentRfsReset;agentUnblock;agentUpdate;agentGroupAgentAdd;agentGroupAgentDelete;agentGroupClientKeyAdd;agentGroupClientKeyDelete;agentGroupClientKeyList;agentGroupCreate;agentGroupDelete;agentGroupGetFull;agentGroupList;agentGroupListByProject;agentGroupUpdate;agentGroupUserGroupAdd;agentGroupUserGroupDelete;agentGroupUserGroupList;clientKeyCreate;clientKeyDelete;clientKeyGetFull;clientKeyList;clientKeyListAll;clientKeyUpdate;clientVersionCreate;clientVersionDelete;clientVersionUpdate;clientVersionGetFull;clientVersionList;clientVersionListAll;clientHandshakeCreate;clientHandshakeDelete;clientHandshakeUpdate;clientHandshakeGetFull;clientHandshakeList;clientHandshakeListAll;clientSchemaCreate;clientSchemaDelete;clientSchemaUpdate;clientSchemaGetFull;clientSchemaList;clientSchemaListAll;projectCreate;projectDelete;projectGetFull;projectUpdate;projectList;projectListFull;rightCreate;rightDelete;rightUpdate;rightGetFull;rightList;userCreate;userDelete;userGetFull;userList;userListAll;userListByProject;userUpdate;userGroupCreate;userGroupDelete;userGroupGetFull;userGroupList;userGroupListByProject;userGroupRightAdd;userGroupRightDelete;userGroupUpdate;userGroupUserAdd;userGroupUserDelete;constructor(t){Object.assign(this,t)}}class B9e{isAdmin;createdDate=null;creatorId;name;projectId;projectName;rights;consoleEditorRights;consoleRights;settings;editorRights;isSystem;type;updatedDate=null;id;constructor(t){Object.assign(this,t)}}class F9e{childs=null;createdDate=null;directory;name;isEmpty;loadedDate=null;size;isDirectory;updatedDate=null;id;constructor(t){Object.assign(this,t)}}class U9e{action;createdDate=null;creatorId;id;path1;path2;status;updatedDate=null;virtualEventId;constructor(t){Object.assign(this,t)}}class G9e{agent;client;debug;device;plugin;stream;system;token;constructor(t){Object.assign(this,t)}}class z9e{createdDate=null;creatorId;name;projectName;projectId;settings;updatedDate=null;id;value;constructor(t){Object.assign(this,t)}}class H9e{createdDate=null;creatorId;name;projectName;projectId;updatedDate=null;id;value;constructor(t){Object.assign(this,t)}}class q9e{createdDate=null;creatorId;name;projectName;projectId;updatedDate=null;id;value;constructor(t){Object.assign(this,t)}}class K9e{createdDate=null;creatorId;name;projectName;projectId;publicKey;privateKey;updatedDate=null;id;value;constructor(t){Object.assign(this,t)}}class Y9e{color;createdDate=null;name;position;updatedDate=null;id;constructor(t){Object.assign(this,t)}}class Z9e{holidays;makeupDays;work;constructor(t){Object.assign(this,t)}}class X9e{active;agentId;createdDate=null;creatorId;encrypt;host;port;mode;note;payloadId=null;remoteHost;remotePort;serverPort;updatedDate=null;id;constructor(t){Object.assign(this,t)}}class W9e{appVersion;expireDate;instanceСount;issuedDate;issuerCompanyName;licenseType;serialNumber;subjectCompanyName;versionNumber;productName;constructor(t){Object.assign(this,t)}}const qS=e=>new V9e({agentBlock:e["agent.block"],agentConsoleAdmin:e["agent.console.admin"],agentConsoleClose:e["agent.console.close"],agentConsoleDelete:e["agent.console.delete"],agentConsoleList:e["agent.console.list"],agentConsoleLock:e["agent.console.lock"],agentConsoleNew:e["agent.console.new"],agentConsoleOpen:e["agent.console.open"],agentConsolePin:e["agent.console.pin"],agentConsoleRead:e["agent.console.read"],agentConsoleUnlock:e["agent.console.unlock"],agentConsoleWrite:e["agent.console.write"],agentCreate:e["agent.create"],agentDelete:e["agent.delete"],agentGetFull:e["agent.get_full"],agentLfsFileCreate:e["agent.lfs.file.create"],agentLfsFileGet:e["agent.lfs.file.get"],agentLfsFolderCreate:e["agent.lfs.folder.create"],agentLfsFolderList:e["agent.lfs.folder.list"],agentLfsItemDelete:e["agent.lfs.item.delete"],agentLfsItemGetInfo:e["agent.lfs.item.get_info"],agentLfsItemMove:e["agent.lfs.item.move"],agentLfsItemRename:e["agent.lfs.item.rename"],agentLfsReset:e["agent.lfs.reset"],agentNoteGet:e["agent.note.get"],agentNoteSet:e["agent.note.set"],agentRfsActionStatusList:e["agent.rfs.action_status.list"],agentRfsFileCreate:e["agent.rfs.file.create"],agentRfsFileGet:e["agent.rfs.file.get"],agentRfsFolderCreate:e["agent.rfs.folder.create"],agentRfsFolderList:e["agent.rfs.folder.list"],agentRfsItemCopy:e["agent.rfs.item.copy"],agentRfsItemDelete:e["agent.rfs.item.delete"],agentRfsItemMove:e["agent.rfs.item.move"],agentRfsItemRename:e["agent.rfs.item.rename"],agentRfsReset:e["agent.rfs.reset"],agentUnblock:e["agent.unblock"],agentUpdate:e["agent.update"],agentGroupAgentAdd:e["agent_group.agent.add"],agentGroupAgentDelete:e["agent_group.agent.delete"],agentGroupClientKeyAdd:e["agent_group.client_key.add"],agentGroupClientKeyDelete:e["agent_group.client_key.delete"],agentGroupClientKeyList:e["agent_group.client_key.list"],agentGroupCreate:e["agent_group.create"],agentGroupDelete:e["agent_group.delete"],agentGroupGetFull:e["agent_group.get_full"],agentGroupList:e["agent_group.list"],agentGroupListByProject:e["agent_group.list_by_project"],agentGroupUpdate:e["agent_group.update"],agentGroupUserGroupAdd:e["agent_group.user_group.add"],agentGroupUserGroupDelete:e["agent_group.user_group.delete"],agentGroupUserGroupList:e["agent_group.user_group.list"],clientKeyCreate:e["client.key.create"],clientKeyDelete:e["client.key.delete"],clientKeyGetFull:e["client.key.get_full"],clientKeyList:e["client.key.list"],clientKeyUpdate:e["client.key.update"],clientKeyListAll:e["client.key.list_all"],clientVersionCreate:e["client.version.create"],clientVersionDelete:e["client.version.delete"],clientVersionUpdate:e["client.version.update"],clientVersionGetFull:e["client.version.get_full"],clientVersionList:e["client.version.list"],clientVersionListAll:e["client.version.list_all"],clientHandshakeCreate:e["client.handshake.create"],clientHandshakeDelete:e["client.handshake.delete"],clientHandshakeUpdate:e["client.handshake.update"],clientHandshakeGetFull:e["client.handshake.get_full"],clientHandshakeList:e["client.handshake.list"],clientHandshakeListAll:e["client.handshake.list_all"],clientSchemaCreate:e["client.schema.create"],clientSchemaDelete:e["client.schema.delete"],clientSchemaUpdate:e["client.schema.update"],clientSchemaGetFull:e["client.schema.get_full"],clientSchemaList:e["client.schema.list"],clientSchemaListAll:e["client.schema.list_all"],projectCreate:e["project.create"],projectDelete:e["project.delete"],projectGetFull:e["project.get_full"],projectList:e["project.list"],projectListFull:e["project.list_full"],projectUpdate:e["project.update"],rightCreate:e["right.create"],rightDelete:e["right.delete"],rightUpdate:e["right.update"],rightGetFull:e["right.get_full"],rightList:e["right.list"],userCreate:e["user.create"],userDelete:e["user.delete"],userGetFull:e["user.get_full"],userList:e["user.list"],userListAll:e["user.list_all"],userUpdate:e["user.update"],userGroupCreate:e["user_group.create"],userGroupDelete:e["user_group.delete"],userGroupGetFull:e["user_group.get_full"],userGroupList:e["user_group.list"],userGroupListByProject:e["user_group.list_by_project"],userGroupRightAdd:e["user_group.right.add"],userGroupRightDelete:e["user_group.right.delete"],userGroupUpdate:e["user_group.update"],userGroupUserAdd:e["user_group.user.add"],userGroupUserDelete:e["user_group.user.delete"]}),Q9e=e=>({"agent.block":e.agentBlock,"agent.console.admin":e.agentConsoleAdmin,"agent.console.close":e.agentConsoleClose,"agent.console.delete":e.agentConsoleDelete,"agent.console.list":e.agentConsoleList,"agent.console.lock":e.agentConsoleLock,"agent.console.new":e.agentConsoleNew,"agent.console.open":e.agentConsoleOpen,"agent.console.pin":e.agentConsolePin,"agent.console.read":e.agentConsoleRead,"agent.console.unlock":e.agentConsoleUnlock,"agent.console.write":e.agentConsoleWrite,"agent.create":e.agentCreate,"agent.delete":e.agentDelete,"agent.get_full":e.agentGetFull,"agent.lfs.file.create":e.agentLfsFileCreate,"agent.lfs.file.get":e.agentLfsFileGet,"agent.lfs.folder.create":e.agentLfsFolderCreate,"agent.lfs.folder.list":e.agentLfsFolderList,"agent.lfs.item.delete":e.agentLfsItemDelete,"agent.lfs.item.get_info":e.agentLfsItemGetInfo,"agent.lfs.item.move":e.agentLfsItemMove,"agent.lfs.item.rename":e.agentLfsItemRename,"agent.lfs.reset":e.agentLfsReset,"agent.note.get":e.agentNoteGet,"agent.note.set":e.agentNoteSet,"agent.rfs.action_status.list":e.agentRfsActionStatusList,"agent.rfs.file.create":e.agentRfsFileCreate,"agent.rfs.file.get":e.agentRfsFileGet,"agent.rfs.folder.create":e.agentRfsFolderCreate,"agent.rfs.folder.list":e.agentRfsFolderList,"agent.rfs.item.copy":e.agentRfsItemCopy,"agent.rfs.item.delete":e.agentRfsItemDelete,"agent.rfs.item.move":e.agentRfsItemMove,"agent.rfs.item.rename":e.agentRfsItemRename,"agent.rfs.reset":e.agentRfsReset,"agent.unblock":e.agentUnblock,"agent.update":e.agentUpdate,"agent_group.agent.add":e.agentGroupAgentAdd,"agent_group.agent.delete":e.agentGroupAgentDelete,"agent_group.client_key.add":e.agentGroupClientKeyAdd,"agent_group.client_key.delete":e.agentGroupClientKeyDelete,"agent_group.client_key.list":e.agentGroupClientKeyList,"agent_group.create":e.agentGroupCreate,"agent_group.delete":e.agentGroupDelete,"agent_group.get_full":e.agentGroupGetFull,"agent_group.list":e.agentGroupList,"agent_group.list_by_project":e.agentGroupListByProject,"agent_group.update":e.agentGroupUpdate,"agent_group.user_group.add":e.agentGroupUserGroupAdd,"agent_group.user_group.delete":e.agentGroupUserGroupDelete,"agent_group.user_group.list":e.agentGroupUserGroupList,"client.key.create":e.clientKeyCreate,"client.key.delete":e.clientKeyDelete,"client.key.get_full":e.clientKeyGetFull,"client.key.list":e.clientKeyList,"client.key.update":e.clientKeyUpdate,"client.key.list_all":e.clientKeyListAll,"client.version.create":e.clientVersionCreate,"client.version.delete":e.clientVersionDelete,"client.version.update":e.clientVersionUpdate,"client.version.get_full":e.clientVersionGetFull,"client.version.list":e.clientVersionList,"client.version.list_all":e.clientVersionListAll,"client.handshake.create":e.clientHandshakeCreate,"client.handshake.delete":e.clientHandshakeDelete,"client.handshake.update":e.clientHandshakeUpdate,"client.handshake.get_full":e.clientHandshakeGetFull,"client.handshake.list":e.clientHandshakeList,"client.handshake.list_all":e.clientHandshakeListAll,"client.schema.create":e.clientSchemaCreate,"client.schema.delete":e.clientSchemaDelete,"client.schema.update":e.clientSchemaUpdate,"client.schema.get_full":e.clientSchemaGetFull,"client.schema.list":e.clientSchemaList,"client.schema.list_all":e.clientSchemaListAll,"project.create":e.projectCreate,"project.delete":e.projectDelete,"project.get_full":e.projectGetFull,"project.list":e.projectList,"project.list_full":e.projectListFull,"project.update":e.projectUpdate,"right.create":e.rightCreate,"right.delete":e.rightDelete,"right.update":e.rightUpdate,"right.get_full":e.rightGetFull,"right.list":e.rightList,"user.create":e.userCreate,"user.delete":e.userDelete,"user.get_full":e.userGetFull,"user.list":e.userList,"user.list_all":e.userListAll,"user.list_by_project":e.userListByProject,"user.update":e.userUpdate,"user_group.create":e.userGroupCreate,"user_group.delete":e.userGroupDelete,"user_group.get_full":e.userGroupGetFull,"user_group.list":e.userGroupList,"user_group.list_by_project":e.userGroupListByProject,"user_group.right.add":e.userGroupRightAdd,"user_group.right.delete":e.userGroupRightDelete,"user_group.update":e.userGroupUpdate,"user_group.user.add":e.userGroupUserAdd,"user_group.user.delete":e.userGroupUserDelete}),eS=e=>new A9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,name:e.name,description:e.description,settings:e.settings,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,editorRights:e.editor_rights?qS(e.editor_rights):void 0}),J9e=e=>new en(e.map(eS),"id"),tS=e=>new Y9e({color:e.color,createdDate:e.created&&e.created!=="0"?bn(e.created):null,id:e.uuid,name:e.name,position:e.position,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),wg=e=>new en(e.map(tS),"id"),IL=e=>new k9e({id:e.uuid,architecture:e.arch||"",createdDate:e.created&&e.created!=="0"?bn(e.created):null,lastCommandDate:e.last_command&&e.last_command!=="0"?bn(e.last_command):null,lastIpHash:e.last_ip_addr_hash,lastIpList:e.last_ip_addr_list,lastLoginDate:e.last_login&&e.last_login!=="0"?bn(e.last_login):null,lastPingDate:e.last_ping&&e.last_ping!=="0"?bn(e.last_ping):null,name:e.name||"",os:e.os||"",osShortName:e.os_short_name,projectIds:e.project_uuids,shortNote:e.short_note||"",updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,tags:e.tags?wg(e.tags):new en([],"id")}),eLe=e=>{const t=e.items?.map(s=>IL(s))||[],n=e.next_page,r=new en(t,"id");return new Ia({data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},nS=e=>new N9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,name:e.name,projectName:e.project_name||"",projectId:e.project_uuid,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,settings:e.settings,isDefault:e.is_default}),tLe=e=>new en(e.map(nS),"id"),z1=e=>new D9e({admin:e.admin,close:e.close,delete:e.delete,list:e.list,lock:e.lock,open:e.open,pin:e.pin,read:e.read,unlock:e.unlock,write:e.write}),f_=e=>({admin:e.admin,close:e.close,delete:e.delete,list:e.list,lock:e.lock,open:e.open,pin:e.pin,read:e.read,unlock:e.unlock,write:e.write}),xd=e=>new L9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,id:e.uuid,name:e.name,login:e.login,rights:e.rights?Object.entries(e.rights).reduce((t,[n,r])=>({...t,[n]:qS(r)}),{}):void 0,consoleEditorRights:e.console_editor_rights?z1(e.console_editor_rights):void 0,consoleRights:e.console_rights?z1(e.console_rights):void 0,settings:e.settings,debug:e.debug,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),nLe=e=>new en(e.map(t=>xd(t)),"id"),rLe=e=>{const t=e.items?.map(s=>xd(s))||[],n=e.next_page,r=new en(t,"id");return new Ia({data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},sLe=e=>new M9e({agentId:e.agent_uuid,architecture:e.arch,cipherId:e.cipher_id,cipherKey:e.cipher_key,clientKeyId:e.client_key_uuid,commandPerRound:e.command_per_round,commandRound:e.command_round,count:e.count,createdDate:e.created&&e.created!=="0"?bn(e.created):null,workingDirectory:e.cwd,dataUpdatedDate:e.data_updated&&e.data_updated!==0?new Date(e.data_updated):null,debug:e.debug,deviceId:e.device_uuid,expirationDate:e.expiration&&e.expiration!=="0"?bn(e.expiration):null,expirationType:e.expiration_type,expiredDate:e.expired&&e.expired!=="0"?bn(e.expired):null,host:e.host,id:e.uuid,image:e.image,intervalCorrection:e.interval_correction,ipHash:e.ip_addr_hash,ipList:e.ip_addr_list,name:e.name,nextInterval:e.next_interval,os:e.os,path:e.path,pid:e.pid,pingDate:e.ping&&e.ping!=="0"?bn(e.ping):null,pingMinInterval:e.ping_min_interval,pingMaxInterval:e.ping_max_interval,pingMinCount:e.ping_min_count,rights:e.rights,schema:e.schema,serverSchema:e.srv_schema,serverHost:e.srv_host,serverPort:e.srv_port?`${e.srv_port}`:void 0,status:e.status,transportFormat:e.transport_format,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,userName:e.user_,version:e.version}),aLe=e=>{const t=e.items?.map(s=>sLe(s))||[],n=e.next_page,r=new en(t,"id");return new Ia({data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},ro=e=>new I9e({creatorId:e.creator_uuid,id:e.uuid,lockerId:F1(e.locker_uuid),name:e.name,ownerId:e.owner_uuid,rights:e.rights?z1(e.rights):void 0,status:e.status,tag:e.tag,tokenId:F1(e.token_uuid),type:e.type});class iLe{items;tokens;constructor(t){Object.assign(this,t)}}class Vk extends Ia{console;constructor(t){super(t),Object.assign(this,t)}}class oLe{console;commandId;constructor(t){Object.assign(this,t)}}class lLe extends Ia{console;constructor(t){super(t),Object.assign(this,t)}}const uLe=e=>new iLe({items:new en(e.items.map(ro),"id"),tokens:e.tokens}),cLe=e=>new P9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,id:e.id,line:e.line,lineIndex:e.line_index,status:e.status,tokenId:F1(e.token_uuid),commandId:e.uuid}),dLe=e=>{const t=e.items.map(cLe)||[],n=e.next_page,r=new en(t,"id");return new Vk({console:ro(e.console),data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},fLe=e=>new oLe({console:ro(e.console),commandId:e.command_uuid}),hLe=e=>new Lte({command:e.command,createdDate:e.created&&e.created!=="0"?bn(e.created):null,ownerId:e.owner_uuid,status:e.status,tokenId:F1(e.token_uuid),updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,id:e.uuid}),pLe=e=>{const t=e.items.map(hLe)||[],n=e.next_page,r=new en(t,"id");return new lLe({console:ro(e.console),data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},Og=e=>new B9e({isAdmin:e.admin,createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,name:e.name,projectId:e.project_uuid,projectName:e.project_name,rights:e.rights?qS(e.rights):void 0,consoleEditorRights:e.console_editor_rights?z1(e.console_editor_rights):void 0,consoleRights:e.console_rights?z1(e.console_rights):void 0,settings:e.settings,editorRights:e.editor_rights?qS(e.editor_rights):void 0,isSystem:e.system,type:e.type,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,id:e.uuid}),Mte=e=>new en(e.map(Og),"id"),PL=e=>new F9e({childs:e.childs!==null?new en(e.childs.sort(Tke).map(t=>PL(t)),"id"):null,createdDate:e.created&&e.created!=="0"?bn(e.created):null,directory:e.dir,isDirectory:e.is_dir,name:e.name,isEmpty:e.empty,loadedDate:e.loaded&&e.loaded!=="0"?bn(e.loaded):null,size:Number(e.size),updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,id:e.id||e.uuid}),mLe=e=>new U9e({action:e.action,createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.id,path1:e.path1,path2:e.path2,status:e.status,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,virtualEventId:e.virtual_event_uuid}),gLe=e=>{const t=e.items?.map(s=>mLe(s))||[],n=e.next_page,r=new en(t,"id");return new Ia({data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},vLe=e=>new G9e({agent:e.agent?{canCreateAgentWithAgentId:e.agent.can_create_agent_with_agent_uuid,canLoginWithAgentId:e.agent.can_login_with_agent_uuid,canLoginWithDeviceId:e.agent.can_login_with_device_uuid}:void 0,client:e.client?{canUseProxy:e.client.can_use_proxy,checkVersion:e.client.check_version,createExpiration:e.client.create_expiration?Number(e.client.create_expiration):0,createExpirationType:e.client.create_expiration_type,loginExpiration:e.client.login_expiration?Number(e.client.login_expiration):0,loginExpirationType:e.client.login_expiration_type,loginInterval:e.client.login_interval,loginIntervalByIp:e.client.login_interval_by_ip_addr,maxByIp:e.client.max_by_ip,maxByKey:e.client.max_by_key,transport:{canChangeFormat:e.client?.transport?.can_change_format,format:e.client?.transport?.format},type:e.client.type}:void 0,debug:e.debug,device:e.device?{maxByIp:e.device.max_by_ip,maxByKey:e.device.max_by_key}:void 0,plugin:e.plugin?{consoles:{inputInterval:e.plugin?.consoles?.input_interval}}:void 0,stream:e.stream?{pingMaxInterval:e.stream.ping_max_interval,pingMinInterval:e.stream.ping_min_interval}:void 0,system:e.system?{intervalCorrection:e.system.interval_correction}:void 0,token:e.token?{commandPerRound:e.token.command_per_round,commandRound:e.token.command_round,expiration:e.token.expiration?Number(e.token.expiration):0,expirationType:e.token.expiration_type,maxByAgent:e.token.max_by_agent,maxByIp:e.token.max_by_ip,maxByKey:e.token.max_by_key,nextInterval:e.token.next_interval,pingMaxInterval:e.token.ping_max_interval,pingMinCount:e.token.ping_min_count,pingMinInterval:e.token.ping_min_interval}:void 0}),DL=e=>e?{agent:{can_create_agent_with_agent_uuid:e.agent.canCreateAgentWithAgentId,can_login_with_agent_uuid:e.agent.canLoginWithAgentId,can_login_with_device_uuid:e.agent.canLoginWithDeviceId},client:{can_use_proxy:e.client.canUseProxy,check_version:e.client.checkVersion,create_expiration:`${e.client.createExpiration}`,create_expiration_type:e.client.createExpirationType,login_expiration:`${e.client.loginExpiration}`,login_expiration_type:e.client.loginExpirationType,login_interval:e.client.loginInterval,login_interval_by_ip_addr:e.client.loginIntervalByIp,max_by_ip:e.client.maxByIp,max_by_key:e.client.maxByKey,transport:{can_change_format:e.client?.transport?.canChangeFormat||!1,format:e.client?.transport?.format||dv.NONE},type:e.client.type},debug:e.debug,device:{max_by_ip:e.device.maxByIp,max_by_key:e.device.maxByKey},plugin:{consoles:{input_interval:e.plugin.consoles?.inputInterval}},stream:{ping_max_interval:e.stream.pingMaxInterval,ping_min_interval:e.stream.pingMinInterval},system:{interval_correction:e.system.intervalCorrection},token:{command_per_round:e.token.commandPerRound,command_round:e.token.commandRound,expiration:`${e.token.expiration}`,expiration_type:e.token.expirationType,max_by_agent:e.token.maxByAgent,max_by_ip:e.token.maxByIp,max_by_key:e.token.maxByKey,next_interval:e.token.nextInterval,ping_max_interval:e.token.pingMaxInterval,ping_min_count:e.token.pingMinCount,ping_min_interval:e.token.pingMinInterval}}:{},By=e=>new z9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,value:e.value,name:e.name,settings:e.settings?vLe(e.settings):void 0,projectName:e.project_name,projectId:e.project_uuid,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),yLe=e=>new en(e.map(By),"id"),Fy=e=>new H9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,value:e.value,name:e.name,projectName:e.project_name,projectId:e.project_uuid,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),xLe=e=>new en(e.map(Fy),"id"),rS=e=>new q9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,value:e.value,name:e.name,projectName:e.project_name,projectId:e.project_uuid,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),bLe=e=>new en(e.map(rS),"id"),sS=e=>new K9e({createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,id:e.uuid,value:e.value,name:e.name,projectName:e.project_name,projectId:e.project_uuid,publicKey:e.pub_key,privateKey:e.priv_key,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null}),wLe=e=>new en(e.map(sS),"id"),XH=e=>new Z9e({holidays:e.holidays,makeupDays:e.makeup_days,work:{days:{monday:e.work.days.monday,tuesday:e.work.days.tuesday,wednesday:e.work.days.wednesday,thursday:e.work.days.thursday,friday:e.work.days.friday,saturday:e.work.days.saturday,sunday:e.work.days.sunday},time:{start:{hour:e.work.time.start.hour,minute:e.work.time.start.minute},end:{hour:e.work.time.end.hour,minute:e.work.time.end.minute}}}}),CLe=e=>({holidays:e.holidays,makeup_days:e.makeupDays,work:e.work}),Uy=e=>new X9e({active:e.active,agentId:e.agent_uuid,createdDate:e.created&&e.created!=="0"?bn(e.created):null,creatorId:e.creator_uuid,encrypt:e.encrypt,host:e.host,port:e.port,mode:e.mode,note:e.note,payloadId:F1(e.payload_uuid),remoteHost:e.rhost,remotePort:e.rport,serverPort:e.srv_port,updatedDate:e.updated&&e.updated!=="0"?bn(e.updated):null,id:e.uuid}),SLe=e=>{const t=e.items?.map(s=>Uy(s))||[],n=e.next_page,r=new en(t,"id");return new Ia({data:r,limit:n.limit,offset:n.offset,hasNextPage:n.exist,hasPreviousPage:n.offset>=n.limit})},_Le=e=>new W9e({appVersion:e.app_version??"",expireDate:e.expire_date?new Date(e.expire_date):null,instanceСount:e.instance_count??0,issuedDate:e.issued_date?new Date(e.issued_date):null,issuerCompanyName:e.issuer_company_name??"",licenseType:e.license_type??0,serialNumber:e.serial_number??"",subjectCompanyName:e.subject_company_name??"",versionNumber:e.version_number??0,productName:e.product_name??""});class VL extends Ct{async create(t){try{const n=new A8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=WC.parse(r),a=nS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать группу агентов"),this.result}}async delete(t){try{const n=new k8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить группу агентов"),this.result}}async getById(t){try{const n=new N8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=WC.parse(r),a=nS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные группы агентов"),this.result}}async update(t){try{const n=new L8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=WC.parse(r),a=nS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные группы агентов"),this.result}}}class Ud extends Ct{async addClientKey(t){try{const n=new M8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить клиентские ключи"),this.result}}async deleteClientKey(t){try{const n=new I8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить клиентские ключи"),this.result}}async addUserGroup(t){try{const n=new P8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить пользовательские группы"),this.result}}async deleteUserGroup(t){try{const n=new D8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить пользовательские группы"),this.result}}async addAgent(t){try{const n=new V8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить агентов"),this.result}}async deleteAgent(t){try{const n=new B8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить агентов"),this.result}}}class jLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new Nke({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=c9e.parse(s),i=eLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список агентов")),this.result}}}class ac extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new T8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(tLe(d9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список групп агентов")),this.result}}}class ELe extends Ct{async add(t){try{const n=new SNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(wg(bg.parse(r))),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить тег"),this.result}}async delete(t){try{const n=new _Ne({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(wg(bg.parse(r))),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить тег"),this.result}}async getList(t){try{const n=new jNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(wg(bg.parse(r))),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить список тегов"),this.result}}async setList(t){try{const n=new ENe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(wg(bg.parse(r))),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить список тегов"),this.result}}}class $Le extends Ct{async invoke(t){try{const n=new Mke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=LL.parse(r),a=IL(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные агента"),this.result}}}class RLe extends Ct{async invoke(t){try{const n=new Ike({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=LL.parse(r),a=IL(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные агента"),this.result}}}class Ite extends Ct{async getSchedule(t){try{const n=new $Ne({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=ZH.parse(r),a=XH(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить рабочий график агента"),this.result}}async setSchedule(t){try{const n=new RNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=ZH.parse(r),a=XH(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить рабочий график агента"),this.result}}}class OLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new Pke({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=m9e.parse(s),i=aLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список токенов агента")),this.result}}}class xx extends Ct{async create(t){try{const n=new g8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Py.parse(r),a=By(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать клиентский ключ"),this.result}}async import(t,n){try{const r=new b8e({meta:t.toRequest(),data:n}),{data:s}=await Ne.request(r.toBinary()),a=Py.parse(s),i=By(a);return this.result=Ae(i),this.result}catch(r){const s=r?.message,a=s?`. Ошибка: ${s}`:"";return this.result=ke(`Не удалось импортировать клиентский ключ${a}`),this.result}}async delete(t){try{const n=new v8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить клиентский ключ"),this.result}}async getById(t){try{const n=new $te({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Py.parse(r),a=By(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные клиентского ключа"),this.result}}async update(t){try{const n=new x8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Py.parse(r),a=By(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные клиентского ключа"),this.result}}}class BL extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new y8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(yLe(j9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список клиентских ключей")),this.result}}}class TLe extends Ct{async invoke(t){try{const n=new $te({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary(),{isFile:!0});return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось выполнить экспорт клиентского ключа"),this.result}}}class ALe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new Z8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(xLe(E9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список схем")),this.result}}}class h_ extends Ct{async create(t){try{const n=new K8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Dy.parse(r),a=Fy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать схему клиента"),this.result}}async import(t,n){try{const r=new W8e({meta:t.toRequest(),data:n}),{data:s}=await Ne.request(r.toBinary()),a=Dy.parse(s),i=Fy(a);return this.result=Ae(i),this.result}catch(r){const s=r?.message,a=s?`. Ошибка: ${s}`:"";return this.result=ke(`Не удалось импортировать схему клиента${a}`),this.result}}async delete(t){try{const n=new Y8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить схему клиента"),this.result}}async getById(t){try{const n=new Rte({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Dy.parse(r),a=Fy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные схемы клиента"),this.result}}async update(t){try{const n=new X8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Dy.parse(r),a=Fy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные схемы клиента"),this.result}}}class kLe extends Ct{async invoke(t){try{const n=new Rte({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary(),{isFile:!0});return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось выполнить экспорт схемы клиента"),this.result}}}class NLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new tNe({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(bLe($9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список версий")),this.result}}}class FL extends Ct{async create(t){try{const n=new Q8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=QC.parse(r),a=rS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать версию клиента"),this.result}}async delete(t){try{const n=new J8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить версию клиента"),this.result}}async getById(t){try{const n=new eNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=QC.parse(r),a=rS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные версии клиента"),this.result}}async update(t){try{const n=new nNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=QC.parse(r),a=rS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные версии клиента"),this.result}}}class UL extends Ct{async create(t){try{const n=new rNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=JC.parse(r),a=sS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать рукопожатие клиента"),this.result}}async delete(t){try{const n=new sNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить рукопожатие клиента"),this.result}}async getById(t){try{const n=new aNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=JC.parse(r),a=sS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные рукопожатия клиента"),this.result}}async update(t){try{const n=new oNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=JC.parse(r),a=sS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные рукопожатия клиента"),this.result}}}class LLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new iNe({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(wLe(R9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список рукопожатий")),this.result}}}class GL extends Ct{async create(t){try{const n=new Wke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=ZC.parse(r),a=eS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать проект"),this.result}}async delete(t){try{const n=new Qke({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить проект"),this.result}}async getById(t){try{const n=new Jke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=ZC.parse(r),a=eS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные проекта"),this.result}}async update(t){try{const n=new t8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=ZC.parse(r),a=eS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные проекта"),this.result}}}class Pte extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new e8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(J9e(u9e.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список проектов")),this.result}}}class bx extends Ct{async getCurrent(){try{const t=new F8e({}),{data:n}=await Ne.request(t.toBinary()),r=yd.parse(n),s=xd(r);return this.result=Ae(s),this.result}catch(t){console.warn(t),this.result=ke("Не удалось получить данные текущего пользователя")}}async create(t){try{const n=new U8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=yd.parse(r),a=xd(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать пользователя"),this.result}}async delete(t){try{const n=new G8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить пользователя"),this.result}}async getById(t){try{const n=new z8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=yd.parse(r),a=xd(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные пользователя"),this.result}}async update(t){try{const n=new q8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=yd.parse(r),a=xd(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные пользователя"),this.result}}}class p_ extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new H8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=f9e.parse(s),i=rLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список пользователей")),this.result}}}class m_ extends Ct{async create(t){try{const n=new n8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Rg.parse(r),a=Og(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать пользовательскую группу"),this.result}}async delete(t){try{const n=new r8e({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить пользовательскую группу"),this.result}}async getById(t){try{const n=new s8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Rg.parse(r),a=Og(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные пользовательской группы"),this.result}}async update(t){try{const n=new i8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Rg.parse(r),a=Og(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные пользовательской группы"),this.result}}}class fv extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new a8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(Mte(Nte.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список пользовательских групп")),this.result}}}class zL extends Ct{async addUser(t){try{const n=new o8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke(`Не удалось добавить пользовател${t.userIds?.length?"ей":"я"} в группу`),this.result}}async deleteUser(t){try{const n=new l8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить пользователя из группы"),this.result}}}class Dte extends Ct{async invoke(t,n,r){try{const s=new w8e({meta:t.toRequest(),data:r,destination:{groups:[],items:[{agentId:n}]}}),{data:a}=await Ne.request(s.toBinary());return this.result=Ae(a),this.result}catch(s){return console.warn(s),this.result=ke(`Не удалось ${r?"загрузить":"создать"} файл`),this.result}}}class MLe extends Ct{async invoke(t,n){try{const r=new C8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]}}),{data:s}=await Ne.request(r.toBinary());return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke("Не удалось создать папку"),this.result}}}class ILe extends Ct{async invoke(t,n){try{const r=new S8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]}}),{data:s}=await Ne.request(r.toBinary());return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke("Не удалось выполнить удаление"),this.result}}}class Vte extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new R8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});if(s===null)return this.result=Ae(null),this.result;const a=ML.parse(s),i=PL(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получение содержимое папки")),this.result}}}class PLe extends Ct{async invoke(t,n){try{const r=this.getAbortController("invoke"),s=new E8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]}}),{data:a}=await Ne.request(s.toBinary(),{signal:r.signal});return this.deleteAbortController("invoke"),this.result=Ae(a),this.result}catch(r){return Vs(r)||(console.warn(r),this.result=ke("Не удалось отправить команду на получение содержимого папки")),this.result}}}class DLe extends Ct{async invoke(t,n){try{const r=new $8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]}}),{data:s}=await Ne.request(r.toBinary());return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke("Переименование не удалось"),this.result}}}class VLe extends Ct{async invoke(t,n,r){try{const s=new _8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]},dataMaxSize:r}),{data:a}=await Ne.request(s.toBinary());return this.result=Ae(a),this.result}catch(s){return console.warn(s),this.result=ke("Не удалось отправить команду на сохранение файла в файловое пространство"),this.result}}}class BLe extends Ct{async invoke(t){try{const n=new j8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=S9e.parse(r),a=gLe(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получение список действий для агента"),this.result}}}class FLe extends Ct{async invoke(t,n){try{const r=new O8e({meta:t.toRequest(),destination:{groups:[],items:[{agentId:n}]}}),{data:s}=await Ne.request(r.toBinary());return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke("Перемещение не удалось"),this.result}}}class ULe extends Ct{async invoke(t,n){try{const r=new u8e({meta:t.toRequest(),data:n}),{data:s}=await Ne.request(r.toBinary());return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke(`Не удалось ${n?"загрузить":"создать"} файл`),this.result}}}class GLe extends Ct{async invoke(t,n){try{const r=new f8e({meta:t.toRequest(),dataMaxSize:n}),{data:s}=await Ne.request(r.toBinary(),{isFile:!0});return this.result=Ae(s),this.result}catch(r){return console.warn(r),this.result=ke("Не удалось получить файл"),this.result}}}class zLe extends Ct{async invoke(t){try{const n=new d8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать папку"),this.result}}}class HLe extends Ct{async invoke(t){try{const n=new c8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось выполнить удаление"),this.result}}}class Bte extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new h8e({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=ML.parse(s),i=PL(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить содержимое папки")),this.result}}}class qLe extends Ct{async invoke(t){try{const n=new p8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Переименование не удалось"),this.result}}}class KLe extends Ct{async invoke(t){try{const n=new m8e({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary());return this.result=Ae(r),this.result}catch(n){return console.warn(n),this.result=ke("Перемещение не удалось"),this.result}}}class hv extends Ct{async close(t){try{const n=new Dke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось закрыть консоль"),this.result}}async delete(t){try{const n=new Vke({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить консоль"),this.result}}async create(t){try{const n=new Bke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать консоль"),this.result}}async getById(t){try{const n=new Fke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить объект консоли"),this.result}}async lock(t){try{const n=new Gke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось заблокировать консоль"),this.result}}async open(t){try{const n=new zke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось закрыть консоль"),this.result}}async unlock(t){try{const n=new Hke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось снять блокировку консоли"),this.result}}async pinToken(t){try{const n=new Kke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось установить сессию для консоли"),this.result}}async setType(t){try{const n=new Xke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=no.parse(r),a=ro(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось изменить тип консоли"),this.result}}}class YLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new Uke({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=g9e.parse(s),i=uLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список консолей")),this.result}}}class ZLe extends Ct{async invoke(t){try{const n=new qke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=y9e.parse(r),a=dLe(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные консоли"),this.result}}}class XLe extends Ct{async invoke(t){try{const n=new Yke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=x9e.parse(r),a=fLe(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось отправить команду"),this.result}}}class WLe extends Ct{async invoke(t){try{const n=new Zke({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=w9e.parse(r),a=pLe(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить список команд"),this.result}}}class HL extends Ct{async delete(t){try{const n=new uNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить пользователя из списка"),this.result}}async add(t){try{const n=new lNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить пользователя"),this.result}}async getById(t){try{const n=new cNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=yd.parse(r),a=xd(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить объект пользователя"),this.result}}async update(t){try{const n=new fNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=yd.parse(r),a=xd(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить права пользователя"),this.result}}}class QLe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new dNe({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=h9e.parse(s),i=nLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список пользователей")),this.result}}}class qL extends Ct{async delete(t){try{const n=new pNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить группу пользователей из списка"),this.result}}async add(t){try{const n=new hNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить группу пользователей"),this.result}}async getById(t){try{const n=new mNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Rg.parse(r),a=Og(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить объект группы пользователей"),this.result}}async update(t){try{const n=new vNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Rg.parse(r),a=Og(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить права группы пользователей"),this.result}}}class JLe extends Ct{async invoke(t){try{const n=new gNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Nte.parse(r),a=Mte(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить список групп пользователей"),this.result}}}class Fte extends Ct{async create(t){try{const n=new yNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=XC.parse(r),a=tS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось создать тег"),this.result}}async delete(t){try{const n=new xNe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось удалить тег"),this.result}}async getById(t){try{const n=new bNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=XC.parse(r),a=tS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные тега"),this.result}}async update(t){try{const n=new CNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=XC.parse(r),a=tS(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные тега"),this.result}}}class Ute extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new wNe({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal});return this.deleteAbortController("invoke"),this.result=Ae(wg(bg.parse(s))),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список тегов")),this.result}}}class KL extends Ct{async addOpener(t){try{const n=new NNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Vy.parse(r),a=Uy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить порт"),this.result}}async addListener(t){try{const n=new kNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Vy.parse(r),a=Uy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось добавить порт"),this.result}}async close(t){try{const n=new ONe({meta:t.toRequest()});return await Ne.request(n.toBinary()),this.result=Ae({}),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось закрыть порт"),this.result}}async getById(t){try{const n=new TNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Vy.parse(r),a=Uy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось получить данные порта"),this.result}}async update(t){try{const n=new LNe({meta:t.toRequest()}),{data:r}=await Ne.request(n.toBinary()),s=Vy.parse(r),a=Uy(s);return this.result=Ae(a),this.result}catch(n){return console.warn(n),this.result=ke("Не удалось обновить данные порта"),this.result}}}class eMe extends Ct{async invoke(t){try{const n=this.getAbortController("invoke"),r=new ANe({meta:t.toRequest()}),{data:s}=await Ne.request(r.toBinary(),{signal:n.signal}),a=O9e.parse(s),i=SLe(a);return this.deleteAbortController("invoke"),this.result=Ae(i),this.result}catch(n){return Vs(n)||(console.warn(n),this.result=ke("Не удалось получить список портов")),this.result}}}class tMe extends Ct{async getById(){try{const t=new MNe({meta:{}}),{data:n}=await Ne.request(t.toBinary()),r=T9e.parse(n),s=_Le(r);return this.result=Ae(s),this.result}catch(t){return console.warn(t),this.result=ke("Не удалось получить информацию о лицензии"),this.result}}}const nMe=({children:e})=>{const[t,n]=y.useState(null),[r,s]=y.useState(!1),[a,i]=y.useState(!1),[l,u]=y.useState(()=>{const w=Rke(og.authData);return!!(w?JSON.parse(atob(w)):null)?.token}),f=async()=>{s(!0),i(!1),await M6.getCurrent(),M6.right(n),M6.left(()=>{n(null),u(!1)}),i(!0),s(!1)},h=(w,C)=>{n(_=>{if(!_)return _;const{rights:E}=_;return{..._,rights:{...E,[w]:C}}})},g=w=>{n(C=>C&&{...w,rights:C.rights})},v=y.useMemo(()=>({user:t,isLoading:r,isAuthenticated:l,loadUser:f,setAuthState:C=>{u(C),C?f():n(null)},completed:a,updateRights:h,updateUserInfo:g}),[r,l,a,t]);return y.useEffect(()=>{l&&!a&&f()},[l,a]),d.jsx(_te.Provider,{value:v,children:e})},M6=new bx;var I6,WH;function rMe(){return WH||(WH=1,I6={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),I6}var sMe=rMe();const aMe=PK(sMe);var iMe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function QH(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(aMe[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(iMe),a=null;(a=s.exec(e))!==null;)if(a[0].trim())if(a[1]){var i=a[1].trim(),l=[i,""];i.indexOf("=")>-1&&(l=i.split("=")),t.attrs[l[0]]=l[1],s.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var oMe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,lMe=/^\s*$/,uMe=Object.create(null);function Gte(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?(function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""})(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Gte,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var cMe={parse:function(e,t){t||(t={}),t.components||(t.components=uMe);var n,r=[],s=[],a=-1,i=!1;if(e.indexOf("<")!==0){var l=e.indexOf("<");r.push({type:"text",content:l===-1?e:e.substring(0,l)})}return e.replace(oMe,function(u,f){if(i){if(u!=="</"+n.name+">")return;i=!1}var h,g=u.charAt(1)!=="/",v=u.startsWith("<!--"),w=f+u.length,C=e.charAt(w);if(v){var _=QH(u);return a<0?(r.push(_),r):((h=s[a]).children.push(_),r)}if(g&&(a++,(n=QH(u)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!C||C==="<"||n.children.push({type:"text",content:e.slice(w,e.indexOf("<",w))}),a===0&&r.push(n),(h=s[a-1])&&h.children.push(n),s[a]=n),(!g||n.voidElement)&&(a>-1&&(n.voidElement||n.name===u.slice(2,-1))&&(a--,n=a===-1?r:s[a]),!i&&C!=="<"&&C)){h=a===-1?r:s[a].children;var E=e.indexOf("<",w),$=e.slice(w,E===-1?void 0:E);lMe.test($)&&($=" "),(E>-1&&a+h.length>=0||$!==" ")&&h.push({type:"text",content:$})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+Gte("",n)},"")}};const aS=(e,t,n,r)=>{const s=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Ai(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},JH={},H1=(e,t,n,r)=>{Ai(n)&&JH[n]||(Ai(n)&&(JH[n]=new Date),aS(e,t,n,r))},zte=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Bk=(e,t,n)=>{e.loadNamespaces(t,zte(e,n))},eq=(e,t,n,r)=>{if(Ai(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Bk(e,n,r);n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,zte(e,r))},dMe=(e,t,n={})=>!t.languages||!t.languages.length?(H1(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),fMe=e=>e.displayName||e.name||(Ai(e)&&e.length>0?e:"Unknown"),Ai=e=>typeof e=="string",bd=e=>typeof e=="object"&&e!==null,hMe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pMe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},mMe=e=>pMe[e],gMe=e=>e.replace(hMe,mMe);let Fk={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:gMe};const vMe=(e={})=>{Fk={...Fk,...e}},Hte=()=>Fk;let qte;const yMe=e=>{qte=e},YL=()=>qte,P6=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},D6=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Cg(t):t},xMe=e=>Array.isArray(e)&&e.every(y.isValidElement),Cg=e=>Array.isArray(e)?e:[e],bMe=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},Kte=(e,t,n,r)=>{if(!e)return"";let s="";const a=Cg(e),i=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((l,u)=>{if(Ai(l)){s+=`${l}`;return}if(y.isValidElement(l)){const{props:f,type:h}=l,g=Object.keys(f).length,v=i.indexOf(h)>-1,w=f.children;if(!w&&v&&!g){s+=`<${h}/>`;return}if(!w&&(!v||g)||f.i18nIsDynamicList){s+=`<${u}></${u}>`;return}if(v&&g===1&&Ai(w)){s+=`<${h}>${w}</${h}>`;return}const C=Kte(w,t,n,r);s+=`<${u}>${C}</${u}>`;return}if(l===null){aS(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:r});return}if(bd(l)){const{format:f,...h}=l,g=Object.keys(h);if(g.length===1){const v=f?`${g[0]}, ${f}`:g[0];s+=`{{${v}}}`;return}aS(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:r,child:l});return}aS(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:r,child:l})}),s},wMe=(e,t,n,r,s,a,i)=>{if(n==="")return[];const l=s.transKeepBasicHtmlNodesFor||[],u=n&&new RegExp(l.map($=>`<${$}`).join("|")).test(n);if(!e&&!t&&!u&&!i)return[n];const f=t??{},h=$=>{Cg($).forEach(N=>{Ai(N)||(P6(N)?h(D6(N)):bd(N)&&!y.isValidElement(N)&&Object.assign(f,N))})};h(e);const g=cMe.parse(`<0>${n}</0>`),v={...f,...a},w=($,O,N)=>{const M=D6($),L=_(M,O.children,N);return xMe(M)&&L.length===0||$.props?.i18nIsDynamicList?M:L},C=($,O,N,M,L)=>{$.dummy?($.children=O,N.push(y.cloneElement($,{key:M},L?void 0:O))):N.push(...y.Children.map([$],k=>{const T={...k.props};return delete T.i18nIsDynamicList,y.createElement(k.type,{...T,key:M,ref:k.props.ref??k.ref},L?null:O)}))},_=($,O,N)=>{const M=Cg($);return Cg(O).reduce((k,T,P)=>{const V=T.children?.[0]?.content&&r.services.interpolator.interpolate(T.children[0].content,v,r.language);if(T.type==="tag"){let q=M[parseInt(T.name,10)];!q&&t&&(q=t[T.name]),N.length===1&&!q&&(q=N[0][T.name]),q||(q={});const K=Object.keys(T.attrs).length!==0?bMe({props:T.attrs},q):q,re=y.isValidElement(K),ee=re&&P6(T,!0)&&!T.voidElement,ue=u&&bd(K)&&K.dummy&&!re,he=bd(t)&&Object.hasOwnProperty.call(t,T.name);if(Ai(K)){const X=r.services.interpolator.interpolate(K,v,r.language);k.push(X)}else if(P6(K)||ee){const X=w(K,T,N);C(K,X,k,P)}else if(ue){const X=_(M,T.children,N);C(K,X,k,P)}else if(Number.isNaN(parseFloat(T.name)))if(he){const X=w(K,T,N);C(K,X,k,P,T.voidElement)}else if(s.transSupportBasicHtmlNodes&&l.indexOf(T.name)>-1)if(T.voidElement)k.push(y.createElement(T.name,{key:`${T.name}-${P}`}));else{const X=_(M,T.children,N);k.push(y.createElement(T.name,{key:`${T.name}-${P}`},X))}else if(T.voidElement)k.push(`<${T.name} />`);else{const X=_(M,T.children,N);k.push(`<${T.name}>${X}</${T.name}>`)}else if(bd(K)&&!re){const X=T.children[0]?V:null;X&&k.push(X)}else C(K,V,k,P,T.children.length!==1||!V)}else if(T.type==="text"){const q=s.transWrapTextNodes,K=i?s.unescape(r.services.interpolator.interpolate(T.content,v,r.language)):r.services.interpolator.interpolate(T.content,v,r.language);q?k.push(y.createElement(q,{key:`${T.name}-${P}`},K)):k.push(K)}return k},[])},E=_([{dummy:!0,children:e||[]}],g,Cg(e||[]));return D6(E[0])},Yte=(e,t,n)=>{const r=e.key||t,s=y.cloneElement(e,{key:r});if(!s.props||!s.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return s;function a(){return y.createElement(y.Fragment,null,s)}return y.createElement(a,{key:r})},CMe=(e,t)=>e.map((n,r)=>Yte(n,r,t)),SMe=(e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:Yte(e[r],r,t)})}),n},_Me=(e,t,n,r)=>e?Array.isArray(e)?CMe(e,t):bd(e)?SMe(e,t):(H1(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null,jMe=e=>!bd(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,n)=>t&&Number.isNaN(Number.parseFloat(n)),!0);function EMe({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:a={},values:i,defaults:l,components:u,ns:f,i18n:h,t:g,shouldUnescape:v,...w}){const C=h||YL();if(!C)return H1(C,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),e;const _=g||C.t.bind(C)||(ue=>ue),E={...Hte(),...C.options?.react};let $=f||_.ns||C.options?.defaultNS;$=Ai($)?[$]:$||["translation"];const O=Kte(e,E,C,r),N=l||O||E.transEmptyNodeValue||r,{hashTransKey:M}=E,L=r||(M?M(O||N):O||N);C.options?.interpolation?.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...C.options.interpolation.defaultVariables}:{...C.options.interpolation.defaultVariables});const k=i||t!==void 0&&!C.options?.interpolation?.alwaysFormat||!e?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},T={...a,context:s||a.context,count:t,...i,...k,defaultValue:N,ns:$},P=L?_(L,T):N,V=_Me(u,P,C,r);let q=V||e,K=null;jMe(V)&&(K=V,q=e);const re=wMe(q,K,P,C,E,T,v),ee=n??E.defaultTransParent;return ee?y.createElement(ee,w,re):re}const $Me={type:"3rdParty",init(e){vMe(e.options.react),yMe(e)}},Zte=y.createContext();class RMe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function tq({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:a={},values:i,defaults:l,components:u,ns:f,i18n:h,t:g,shouldUnescape:v,...w}){const{i18n:C,defaultNS:_}=y.useContext(Zte)||{},E=h||C||YL(),$=g||E?.t.bind(E);return EMe({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:a,values:i,defaults:l,components:u,ns:f||$?.ns||_||E?.options?.defaultNS,i18n:E,t:g,shouldUnescape:v,...w})}const OMe=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},Xte=(e,t,n,r)=>e.getFixedT(t,n,r),TMe=(e,t,n,r)=>y.useCallback(Xte(e,t,n,r),[e,t,n,r]),H=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:s}=y.useContext(Zte)||{},a=n||r||YL();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new RMe),!a){H1(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const M=(k,T)=>Ai(T)?T:bd(T)&&Ai(T.defaultValue)?T.defaultValue:Array.isArray(k)?k[k.length-1]:k,L=[M,{},!1];return L.t=M,L.i18n={},L.ready=!1,L}a.options.react?.wait&&H1(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...Hte(),...a.options.react,...t},{useSuspense:l,keyPrefix:u}=i;let f=s||a.options?.defaultNS;f=Ai(f)?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces?.(f);const h=(a.isInitialized||a.initializedStoreOnce)&&f.every(M=>dMe(M,a,i)),g=TMe(a,t.lng||null,i.nsMode==="fallback"?f:f[0],u),v=()=>g,w=()=>Xte(a,t.lng||null,i.nsMode==="fallback"?f:f[0],u),[C,_]=y.useState(v);let E=f.join();t.lng&&(E=`${t.lng}${E}`);const $=OMe(E),O=y.useRef(!0);y.useEffect(()=>{const{bindI18n:M,bindI18nStore:L}=i;O.current=!0,!h&&!l&&(t.lng?eq(a,t.lng,f,()=>{O.current&&_(w)}):Bk(a,f,()=>{O.current&&_(w)})),h&&$&&$!==E&&O.current&&_(w);const k=()=>{O.current&&_(w)};return M&&a?.on(M,k),L&&a?.store.on(L,k),()=>{O.current=!1,a&&M&&M?.split(" ").forEach(T=>a.off(T,k)),L&&a&&L.split(" ").forEach(T=>a.store.off(T,k))}},[a,E]),y.useEffect(()=>{O.current&&h&&_(v)},[a,u,h]);const N=[C,a,h];if(N.t=C,N.i18n=a,N.ready=h,h||!h&&!l)return N;throw new Promise(M=>{t.lng?eq(a,t.lng,f,()=>M()):Bk(a,f,()=>M())})},AMe=(e,t={})=>function(r){function s({forwardedRef:i,...l}){const[u,f,h]=H(e,{...l,keyPrefix:t.keyPrefix}),g={...l,t:u,i18n:f,tReady:h};return t.withRef&&i?g.ref=i:!t.withRef&&i&&(g.forwardedRef=i),y.createElement(r,g)}s.displayName=`withI18nextTranslation(${fMe(r)})`,s.WrappedComponent=r;const a=(i,l)=>y.createElement(s,Object.assign({},i,{forwardedRef:l}));return t.withRef?y.forwardRef(a):s},Uh=()=>{const{t:e}=H(),t=y.useContext(_te);if(t===null)throw new Error(e("errors.context",{name:"CurrentUser",defaultValue:"Используется вне контекста CurrentUser"}));return t};function Wte(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Wte(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fn(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wte(e))&&(r&&(r+=" "),r+=t);return r}const wt=({message:e,className:t})=>{const{t:n}=H();return d.jsxs(W,{className:Fn("justify-center self-center",t),children:[e||n("loading","Загрузка"),"..."]})},nq=({header:e,tabs:t,children:n})=>{const r=Ds(),{isAuthenticated:s,completed:a}=Uh();return d.jsxs("div",{className:"bg-bg h-full flex flex-1 flex-col w-full",children:[e,a&&t,d.jsxs(y.Suspense,{fallback:d.jsx(wt,{className:"py-1.5 px-3 self-center"}),children:[!s&&r.pathname!==st.login&&d.jsx(t8,{to:st.login}),!s||s&&a?n||d.jsx(QK,{}):d.jsx(wt,{className:"py-1.5 px-3 self-center"})]})]})},Tg=()=>d.jsx("div",{className:"w-full h-0.5 bg-panel"}),kMe=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{t(r.result)},r.onerror=s=>{n(s)},r.readAsArrayBuffer(e)}),NMe=e=>{const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let n=0;for(;e>=1024&&n<t.length-1;)e/=1024,n++;return`${e.toFixed(n===0?0:1)} ${t[n]}`},ZL=(e,t)=>{const n=new Blob([e],{type:"application/octet-stream"}),r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(r)};function LMe(e,t){const n=new URLSearchParams;return t&&Object.entries(t).forEach(([r,s])=>{s!=null&&n.append(r,String(s))}),{pathname:e,search:n.toString()?`?${n.toString()}`:""}}const wx=(e,t)=>e.reduce((n,r)=>{const s=r[t],a=n.get(s)||[];return n.set(s,[...a,r]),n},new Map);var ir=(e=>(e.allowSystem="allowSystem",e.allowProjectSettings="allowProjectSettings",e.allowUserGroupSettings="allowUserGroupSettings",e.allowAgentGroupSettings="allowAgentGroupSettings",e.allowClientKeySettings="allowClientKeySettings",e.allowClientVersionSettings="allowClientVersionSettings",e.allowClientSchemaSettings="allowClientSchemaSettings",e.allowClientHandshakeSettings="allowClientHandshakeSettings",e.allowUserSettings="allowUserSettings",e.allowAddUserToUserGroup="allowAddUserToUserGroup",e.allowAddUser="allowAddUser",e.allowUpdateUser="allowUpdateUser",e.allowDeleteUser="allowDeleteUser",e.allowUserList="allowUserList",e.allowAddProject="allowAddProject",e.allowUpdateProject="allowUpdateProject",e.allowDeleteProject="allowDeleteProject",e.allowProjectList="allowProjectList",e))(ir||{});const Qte=(e,t)=>t?e.reduce((n,r)=>t[r]?{...n,[r]:t[r]}:n,{}):{},Vo=(e,t,n)=>r=>{let s=r;return t&&!Array.isArray(t)?!!s&&e[n?"every":"some"](a=>s?.[t]?.[a]):(t&&Array.isArray(t)&&(s=Qte(t,r)),!!s&&!!Object.values(s).some(a=>e[n?"every":"some"](i=>a[i])))},Om=e=>t=>!!t&&!!Object.values(t).some(n=>n[e]),MMe={allowSystem:e=>!!e&&!!Object.keys(e).length,allowAddUserToUserGroup:(e,t,n)=>{let r=e;return n&&!Array.isArray(n)?r?.[n]?.userGroupUserAdd||!1:(n&&Array.isArray(n)&&(r=Qte(n,e)),!!r&&!!Object.values(r).some(s=>s.userGroupUserAdd))},allowAddUser:Om("userCreate"),allowUpdateUser:Om("userUpdate"),allowDeleteUser:Om("userDelete"),allowUserList:Vo(["userList","userListAll"]),allowAddProject:Om("projectCreate"),allowUpdateProject:Om("projectUpdate"),allowDeleteProject:Om("projectDelete"),allowProjectList:Vo(["projectList","projectListFull"]),allowProjectSettings:Vo(yke),allowUserGroupSettings:Vo(Cte),allowAgentGroupSettings:Vo(vte),allowClientKeySettings:Vo(yte),allowClientVersionSettings:Vo(xte),allowClientSchemaSettings:Vo(wte),allowClientHandshakeSettings:Vo(bte),allowUserSettings:Vo(xke)},IMe=(e,t,n)=>!n||Array.isArray(n)||!e||!t?!1:e[n]?.[t]||!1,PMe=e=>MMe[e]||IMe;function DMe(e){if(e.length===0)return null;const t=Math.floor(Math.random()*e.length);return e[t]}const V6=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Jte=(e,t)=>{if(!V6(e)||!V6(t))return e||t;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=t[r],a=r,i=e[a];V6(s)?n[a]=Jte(i,s):s!==void 0&&(n[a]=s)}return n},rn=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),KS=e=>e<10?`0${e}`:`${e}`,rq=({hour:e,minute:t})=>`${KS(e)}:${KS(t)}`,ic=({children:e,link:t,dropdown:n,dropdownSide:r="bottom",dropdownAlign:s="end",className:a,searchParams:i,actions:l,...u})=>{const[f,h]=y.useState(!1),g=y.useMemo(()=>t?LMe(t,i):null,[t,i]);return d.jsxs("div",{...u,className:Fn("flex items-center justify-between gap-2.5","w-full h-11 pr-4 overflow-x-hidden border-2 border-secondary",{"hover:brightness-150 hover:bg-panel":g},a),children:[g?d.jsx(Ni,{to:g,className:"flex flex-1 pl-4 h-full items-center overflow-x-hidden gap-2.5",children:e}):d.jsx("div",{className:"flex flex-1 pl-4 h-full items-center overflow-x-hidden gap-2.5",children:e}),!!l&&d.jsx("div",{className:"flex gap-2.5 items-center",children:l}),!!n?.length&&f&&d.jsx("div",{className:"flex items-center justify-center h-6 w-6",children:d.jsx(ho,{size:"small"})}),!!n?.length&&!f&&d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,children:d.jsx(Fe,{variant:"ghost",onlyIcon:!0,children:d.jsx(v2,{})})}),d.jsx(sn.Portal,{children:d.jsx(sn.Content,{className:"min-w-[100px]! flex flex-col z-99",side:r,align:s,children:(typeof n=="function"?n({setIsLoading:h}):n).map((v,w)=>d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:v},w))})})]})]})},Cx=(e,t)=>{const n=y.useRef(null),r=y.useRef(!1);y.useEffect(()=>{if(r.current=!1,!t||t<0){console.warn("Интервал не может быть пустым или отрицательным");return}const s=async()=>{if(!r.current){try{await e()}catch(a){console.error("Ошибка в polling:",a)}r.current||(n.current=window.setTimeout(s,t*1e3))}};return n.current=window.setTimeout(s,t*1e3),()=>{r.current=!0,n.current!==null&&(clearTimeout(n.current),n.current=null)}},[e,t])},ene=({threshold:e=10}={})=>{const t=y.useRef(null);return{scrollRef:t,scrollToBottom:()=>{setTimeout(()=>{t.current&&(t.current.scrollTop=t.current?.scrollHeight)},1)},scrollToTop:()=>{setTimeout(()=>{t.current&&(t.current.scrollTop=0)},1)},updateBottomScrollPosition:()=>{if(!t.current)return;const{scrollTop:a,scrollHeight:i,clientHeight:l}=t.current;i-a<=l+e&&setTimeout(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},1)}}},It=e=>{const{user:t}=Uh(),n=y.useCallback(({permissionKey:r,projectId:s,rightKeys:a,every:i})=>a&&!a.length?!0:a?.length?Vo(a,s,i)(t?.rights):r?PMe(r)(t?.rights,r,s):!1,[t?.rights]);return{allowed:n(e),checkPermission:n}},Yt=e=>typeof e=="string",wy=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},sq=e=>e==null?"":""+e,VMe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},BMe=/###/g,aq=e=>e&&e.indexOf("###")>-1?e.replace(BMe,"."):e,iq=e=>!e||Yt(e),a1=(e,t,n)=>{const r=Yt(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(iq(e))return{};const a=aq(r[s]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++s}return iq(e)?{}:{obj:e,k:aq(r[s])}},oq=(e,t,n)=>{const{obj:r,k:s}=a1(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),l=a1(e,i,Object);for(;l.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),l=a1(e,i,Object),l?.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=n},FMe=(e,t,n,r)=>{const{obj:s,k:a}=a1(e,t,Object);s[a]=s[a]||[],s[a].push(n)},YS=(e,t)=>{const{obj:n,k:r}=a1(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},UMe=(e,t,n)=>{const r=YS(e,n);return r!==void 0?r:YS(t,n)},tne=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Yt(e[r])||e[r]instanceof String||Yt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):tne(e[r],t[r],n):e[r]=t[r]);return e},Tm=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var GMe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const zMe=e=>Yt(e)?e.replace(/[&<>"'\/]/g,t=>GMe[t]):e;class HMe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const qMe=[" ",",","?","!",";"],KMe=new HMe(20),YMe=(e,t,n)=>{t=t||"",n=n||"";const r=qMe.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=KMe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(e);if(!a){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(a=!0)}return a},Uk=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let s=e;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let u=a;u<r.length;++u)if(u!==a&&(l+=n),l+=r[u],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&u<r.length-1)continue;a+=u-a+1;break}s=i}return s},q1=e=>e?.replace("_","-"),ZMe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ZS{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||ZMe,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(Yt(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ZS(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ZS(this.logger,t)}}var Bl=new ZS;class g_{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[t,...n])})}}class lq extends g_{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,s={}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):Yt(r)&&a?l.push(...r.split(a)):l.push(r)));const u=YS(this.data,l);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),u||!i||!Yt(r)?u:Uk(this.data?.[t]?.[n],r,a)}addResource(t,n,r,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),oq(this.data,l,s),a.silent||this.emit("added",t,n,r,s)}addResources(t,n,r,s={silent:!1}){for(const a in r)(Yt(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,a,i={silent:!1,skipCopy:!1}){let l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let u=YS(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?tne(u,r,a):u={...u,...r},oq(this.data,l,u),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var nne={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(a=>{t=this.processors[a]?.process(t,n,r,s)??t}),t}};const rne=Symbol("i18next/PATH_KEY");function XMe(){const e=[],t=Object.create(null);let n;return t.get=(r,s)=>(n?.revoke?.(),s===rne?e:(e.push(s),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function WMe(e,t){const{[rne]:n}=e(XMe());return n.join(t?.keySeparator??".")}const uq={},cq=e=>!Yt(e)&&typeof e!="boolean"&&typeof e!="number";class XS extends g_{constructor(t,n={}){super(),VMe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Bl.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};return t==null?!1:this.resolve(t,r)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!YMe(t,r,s);if(i&&!l){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Yt(a)?[a]:a};const f=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(f[0])>-1)&&(a=f.shift()),t=f.join(s)}return{key:t,namespaces:Yt(a)?[a]:a}}translate(t,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=WMe(t,s)),Array.isArray(t)||(t=[String(t)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:l,namespaces:u}=this.extractFromKey(t[t.length-1],s),f=u[u.length-1];let h=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;h===void 0&&(h=":");const g=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g?.toLowerCase()==="cimode")return v?a?{res:`${f}${h}${l}`,usedKey:l,exactUsedKey:l,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:`${f}${h}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:l;const w=this.resolve(t,s);let C=w?.res;const _=w?.usedKey||l,E=w?.exactUsedKey||l,$=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,M=s.count!==void 0&&!Yt(s.count),L=XS.hasDefaultValue(s),k=M?this.pluralResolver.getSuffix(g,s.count,s):"",T=s.ordinal&&M?this.pluralResolver.getSuffix(g,s.count,{ordinal:!1}):"",P=M&&!s.ordinal&&s.count===0,V=P&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${k}`]||s[`defaultValue${T}`]||s.defaultValue;let q=C;N&&!C&&L&&(q=V);const K=cq(q),re=Object.prototype.toString.apply(q);if(N&&q&&K&&$.indexOf(re)<0&&!(Yt(O)&&Array.isArray(q))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ee=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,q,{...s,ns:u}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(w.res=ee,w.usedParams=this.getUsedParamsDetails(s),w):ee}if(i){const ee=Array.isArray(q),ue=ee?[]:{},he=ee?E:_;for(const X in q)if(Object.prototype.hasOwnProperty.call(q,X)){const pe=`${he}${i}${X}`;L&&!C?ue[X]=this.translate(pe,{...s,defaultValue:cq(V)?V[X]:void 0,joinArrays:!1,ns:u}):ue[X]=this.translate(pe,{...s,joinArrays:!1,ns:u}),ue[X]===pe&&(ue[X]=q[X])}C=ue}}else if(N&&Yt(O)&&Array.isArray(C))C=C.join(O),C&&(C=this.extendTranslation(C,t,s,r));else{let ee=!1,ue=!1;!this.isValidLookup(C)&&L&&(ee=!0,C=V),this.isValidLookup(C)||(ue=!0,C=l);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:C,pe=L&&V!==C&&this.options.updateMissing;if(ue||ee||pe){if(this.logger.log(pe?"updateKey":"missingKey",g,f,l,pe?V:C),i){const se=this.resolve(l,{...s,keySeparator:!1});se&&se.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let xe=[];const be=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&be&&be[0])for(let se=0;se<be.length;se++)xe.push(be[se]);else this.options.saveMissingTo==="all"?xe=this.languageUtils.toResolveHierarchy(s.lng||this.language):xe.push(s.lng||this.language);const Y=(se,Oe,de)=>{const _e=L&&de!==C?de:X;this.options.missingKeyHandler?this.options.missingKeyHandler(se,f,Oe,_e,pe,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(se,f,Oe,_e,pe,s),this.emit("missingKey",se,f,Oe,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?xe.forEach(se=>{const Oe=this.pluralResolver.getSuffixes(se,s);P&&s[`defaultValue${this.options.pluralSeparator}zero`]&&Oe.indexOf(`${this.options.pluralSeparator}zero`)<0&&Oe.push(`${this.options.pluralSeparator}zero`),Oe.forEach(de=>{Y([se],l+de,s[`defaultValue${de}`]||V)})}):Y(xe,l,V))}C=this.extendTranslation(C,t,s,w,r),ue&&C===l&&this.options.appendNamespaceToMissingKey&&(C=`${f}${h}${l}`),(ue||ee)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}${h}${l}`:l,ee?C:void 0,s))}return a?(w.res=C,w.usedParams=this.getUsedParamsDetails(s),w):C}extendTranslation(t,n,r,s,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Yt(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const g=t.match(this.interpolator.nestingRegexp);f=g&&g.length}let h=r.replace&&!Yt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||s.usedLng,r),u){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;f<v&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...g)=>a?.[0]===g[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):this.translate(...g,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,l=Yt(i)?[i]:i;return t!=null&&l?.length&&r.applyPostProcessor!==!1&&(t=nne.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,s,a,i,l;return Yt(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(u,n),h=f.key;s=h;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const v=n.count!==void 0&&!Yt(n.count),w=v&&!n.ordinal&&n.count===0,C=n.context!==void 0&&(Yt(n.context)||typeof n.context=="number")&&n.context!=="",_=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(E=>{this.isValidLookup(r)||(l=E,!uq[`${_[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(l)&&(uq[`${_[0]}-${E}`]=!0,this.logger.warn(`key "${s}" for languages "${_.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach($=>{if(this.isValidLookup(r))return;i=$;const O=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,h,$,E,n);else{let M;v&&(M=this.pluralResolver.getSuffix($,n.count,n));const L=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(n.ordinal&&M.indexOf(k)===0&&O.push(h+M.replace(k,this.options.pluralSeparator)),O.push(h+M),w&&O.push(h+L)),C){const T=`${h}${this.options.contextSeparator||"_"}${n.context}`;O.push(T),v&&(n.ordinal&&M.indexOf(k)===0&&O.push(T+M.replace(k,this.options.pluralSeparator)),O.push(T+M),w&&O.push(T+L))}}let N;for(;N=O.pop();)this.isValidLookup(r)||(a=N,r=this.getResource($,E,N,n))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Yt(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of n)delete s[a]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class dq{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Bl.create("languageUtils")}getScriptPartFromCode(t){if(t=q1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=q1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Yt(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Yt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return Yt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Yt(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const fq={zero:0,one:1,two:2,few:3,many:4,other:5},hq={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class QMe{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Bl.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=q1(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),hq;if(!t.match(/-|_/))return hq;const u=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(u,n)}return this.pluralRulesCache[a]=i,i}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>fq[s]-fq[a]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,n,r={}){const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const pq=(e,t,n,r=".",s=!0)=>{let a=UMe(e,t,n);return!a&&s&&Yt(n)&&(a=Uk(e,n,r),a===void 0&&(a=Uk(t,n,r))),a},B6=e=>e.replace(/\$/g,"$$$$");class JMe{constructor(t={}){this.logger=Bl.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:u,formatSeparator:f,unescapeSuffix:h,unescapePrefix:g,nestingPrefix:v,nestingPrefixEscaped:w,nestingSuffix:C,nestingSuffixEscaped:_,nestingOptionsSeparator:E,maxReplaces:$,alwaysFormat:O}=t.interpolation;this.escape=n!==void 0?n:zMe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Tm(a):i||"{{",this.suffix=l?Tm(l):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=v?Tm(v):w||Tm("$t("),this.nestingSuffix=C?Tm(C):_||Tm(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=$||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let a,i,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=w=>{if(w.indexOf(this.formatSeparator)<0){const $=pq(n,u,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format($,void 0,r,{...s,...n,interpolationkey:w}):$}const C=w.split(this.formatSeparator),_=C.shift().trim(),E=C.join(this.formatSeparator).trim();return this.format(pq(n,u,_,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,{...s,...n,interpolationkey:_})};this.resetRegExp();const h=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>B6(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?B6(this.escape(w)):B6(w)}].forEach(w=>{for(l=0;a=w.regex.exec(t);){const C=a[1].trim();if(i=f(C),i===void 0)if(typeof h=="function"){const E=h(t,a,s);i=Yt(E)?E:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))i="";else if(g){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${t}`),i="";else!Yt(i)&&!this.useRawValueToEscape&&(i=sq(i));const _=w.safeValue(i);if(t=t.replace(a[0],_),g?(w.regex.lastIndex+=i.length,w.regex.lastIndex-=a[0].length):w.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let s,a,i;const l=(u,f)=>{const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const g=u.split(new RegExp(`${h}[ ]*{`));let v=`{${g[1]}`;u=g[0],v=this.interpolate(v,i);const w=v.match(/'/g),C=v.match(/"/g);((w?.length??0)%2===0&&!C||C.length%2!==0)&&(v=v.replace(/'/g,'"'));try{i=JSON.parse(v),f&&(i={...f,...i})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,_),`${u}${h}${v}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,u};for(;s=this.nestingRegexp.exec(t);){let u=[];i={...r},i=i.replace&&!Yt(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const f=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(f!==-1&&(u=s[1].slice(f).split(this.formatSeparator).map(h=>h.trim()).filter(Boolean),s[1]=s[1].slice(0,f)),a=n(l.call(this,s[1].trim(),i),i),a&&s[0]===t&&!Yt(a))return a;Yt(a)||(a=sq(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((h,g)=>this.format(h,g,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}const e7e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...u]=i.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),h=l.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:t,formatOptions:n}},mq=e=>{const t={};return(n,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let l=t[i];return l||(l=e(q1(r),s),t[i]=l),l(n)}},t7e=e=>(t,n,r)=>e(q1(n),r)(t);class n7e{constructor(t={}){this.logger=Bl.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?mq:t7e;this.formats={number:r((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return l=>i.format(l)}),currency:r((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return l=>i.format(l)}),datetime:r((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return l=>i.format(l)}),relativetime:r((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return l=>i.format(l,a.range||"day")}),list:r((s,a)=>{const i=new Intl.ListFormat(s,{...a});return l=>i.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=mq(n)}format(t,n,r,s={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,u)=>{const{formatName:f,formatOptions:h}=e7e(u);if(this.formats[f]){let g=l;try{const v=s?.formatParams?.[s.interpolationkey]||{},w=v.locale||v.lng||s.locale||s.lng||r;g=this.formats[f](l,w,{...h,...s,...v})}catch(v){this.logger.warn(v)}return g}else this.logger.warn(`there was no format function for ${f}`);return l},t)}}const r7e=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class s7e extends g_{constructor(t,n,r,s={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Bl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,s.backend,s)}queueLoad(t,n,r,s){const a={},i={},l={},u={};return t.forEach(f=>{let h=!0;n.forEach(g=>{const v=`${f}|${g}`;!r.reload&&this.store.hasResourceBundle(f,g)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?i[v]===void 0&&(i[v]=!0):(this.state[v]=1,h=!1,i[v]===void 0&&(i[v]=!0),a[v]===void 0&&(a[v]=!0),u[g]===void 0&&(u[g]=!0)))}),h||(l[f]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const s=t.split("|"),a=s[0],i=s[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(u=>{FMe(u.loaded,[a],i),r7e(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{l[f]||(l[f]={});const h=u.loaded[f];h.length&&h.forEach(g=>{l[f][g]===void 0&&(l[f][g]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,s=0,a=this.retryTimeout,i){if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const l=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&h&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,a*2,i)},a);return}i(f,h)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const f=u(t,n);f&&typeof f.then=="function"?f.then(h=>l(null,h)).catch(l):l(null,f)}catch(f){l(f)}return}return u(t,n,l)}prepareLoading(t,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Yt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Yt(n)&&(n=[n]);const a=this.queueLoad(t,n,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,a,i={},l=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...i,isUpdate:a},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(t,n,r,s,u):h=f(t,n,r,s),h&&typeof h.then=="function"?h.then(g=>l(null,g)).catch(l):l(null,h)}catch(h){l(h)}else f(t,n,r,s,l,u)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const gq=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Yt(e[1])&&(t.defaultValue=e[1]),Yt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),vq=e=>(Yt(e.ns)&&(e.ns=[e.ns]),Yt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Yt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),xC=()=>{},a7e=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class K1 extends g_{constructor(t={},n){if(super(),this.options=vq(t),this.services={},this.logger=Bl,this.modules={external:[]},a7e(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Yt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=gq();this.options={...r,...this.options,...vq(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Bl.init(s(this.modules.logger),this.options):Bl.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=n7e;const h=new dq(this.options);this.store=new lq(this.options.resources,this.options);const g=this.services;g.logger=Bl,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new QMe(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),f&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(g.formatter=s(f),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new JMe(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new s7e(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.languageDetector&&(g.languageDetector=s(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=s(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new XS(this.services,this.options),this.translator.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,n||(n=xC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=(...h)=>this.store[f](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...h)=>(this.store[f](...h),this)});const l=wy(),u=()=>{const f=(h,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(g),n(h,g)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(t,n=xC){let r=n;const s=Yt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(f=>{f!=="cimode"&&a.indexOf(f)<0&&a.push(f)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>i(u)),this.options.preload?.forEach?.(l=>i(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=wy();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=xC),this.services.backendConnector.reload(t,n,a=>{s.resolve(),r(a)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&nne.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=wy();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?this.isLanguageChangingTo===t&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...f)=>this.t(...f)),n&&n(l,(...f)=>this.t(...f))},i=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=Yt(l)?l:l&&l[0],f=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Yt(l)?[l]:l);f&&(this.language||s(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,h=>{a(h,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),r}getFixedT(t,n,r){const s=(a,i,...l)=>{let u;typeof i!="object"?u=this.options.overloadTranslationOptionHandler([a,i].concat(l)):u={...i},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||s.keyPrefix);const f=this.options.keySeparator||".";let h;return u.keyPrefix&&Array.isArray(a)?h=a.map(g=>`${u.keyPrefix}${f}${g}`):h=u.keyPrefix?`${u.keyPrefix}${f}${a}`:a,this.t(h,u)};return Yt(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,u)=>{const f=this.services.backendConnector.state[`${l}|${u}`];return f===-1||f===0||f===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(a,t)))}loadNamespaces(t,n){const r=wy();return this.options.ns?(Yt(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=wy();Yt(t)&&(t=[t]);const s=this.options.preload||[],a=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const a=s.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new dq(gq());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){return new K1(t,n)}cloneInstance(t={},n=xC){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},a=new K1(s);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((u,f)=>(u[f]={...this.store.data[f]},u[f]=Object.keys(u[f]).reduce((h,g)=>(h[g]={...u[f][g]},h),u[f]),u),{});a.store=new lq(l,s),a.services.resourceStore=a.store}return a.translator=new XS(a.services,s),a.translator.on("*",(l,...u)=>{a.emit(l,...u)}),a.init(s,n),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ps=K1.createInstance();Ps.createInstance=K1.createInstance;Ps.createInstance;Ps.dir;Ps.init;Ps.loadResources;Ps.reloadResources;Ps.use;Ps.changeLanguage;Ps.getFixedT;Ps.t;Ps.exists;Ps.setDefaultNamespace;Ps.hasLoadedNamespace;Ps.loadNamespaces;Ps.loadLanguages;const i7e=async e=>{switch(e){case"ru":default:return{translation:await zOe(()=>import("./index-DvunBVFK.js"),[])}}},o7e=(async()=>{const e=await i7e("ru");return await Ps.use($Me).init({lng:"ru",fallbackLng:"ru",resources:{ru:e.translation},ns:["translation"],defaultNS:"translation",interpolation:{escapeValue:!1},load:"languageOnly",debug:!1}),Ps})(),Bs=()=>{const{t:e}=H();return y.useMemo(()=>({required:e("errors.required","Поле обязательно для заполнения"),number:e("errors.positiveNumber","Значение должно быть целым положительным числом"),portMaxValue:e("errors.maxValue",{maxValue:Ok,defaultValue:`Максимальное значение ${Ok}`}),portMinValue:e("errors.minValue",{minValue:1,defaultValue:"Минимамльное значение 1"})}),[e])},sne=()=>{const{t:e}=H();return y.useMemo(()=>[{path:st.projects,title:rn(e("entities.projects.nominative","Проекты")),permissionKey:ir.allowProjectSettings},{path:st.users,title:rn(e("entities.users.nominative","Пользователи")),permissionKey:ir.allowUserSettings}],[e])},ane=()=>{const{t:e}=H();return y.useMemo(()=>({monday:e("weekDays.monday","Пн"),tuesday:e("weekDays.tuesday","Вт"),wednesday:e("weekDays.wednesday","Ср"),thursday:e("weekDays.thursday","Чт"),friday:e("weekDays.friday","Пт"),saturday:e("weekDays.saturday","Сб"),sunday:e("weekDays.sunday","Вс")}),[e])},l7e=({tableName:e,columnsConfig:t,tableColumns:n})=>{const[r,s]=y.useState({}),[a,i]=y.useState([]),l=y.useCallback(f=>{const h=t.find(v=>v.id===f);if(h?.label)return h.label;const g=n.find(v=>yq(v)===f);return g&&g&&g.header&&typeof g.header=="string"?g.header:f},[t,n]),u=y.useCallback(f=>{const h=new Set(t.filter(w=>f[w.id]!==!1).map(w=>w.id)),g=new Set(t.filter(w=>w.isFunctional).map(w=>w.id)),v=n.filter(w=>{const C=yq(w);return C&&(h.has(C)||g.has(C))});s(f),i(v);try{localStorage.setItem(e,JSON.stringify(f))}catch(w){console.warn(w)}},[t,n,e]);return y.useEffect(()=>{const f=localStorage.getItem(e);let h={};if(f)try{h=JSON.parse(f)}catch(v){console.warn(v)}const g={};t.forEach(v=>{if(v.isFunctional||v.isAlwaysVisible){g[v.id]=!0;return}g[v.id]=h[v.id]??v.visible!==!1}),u(g)},[e,t,u]),{getColumnLabel:l,onChangeVisibility:u,visibilityState:r,visibleColumns:a}},yq=e=>{if("id"in e)return e.id;if("accessorKey"in e&&e.accessorKey)return String(e.accessorKey)};function u7e(e,{permissionKey:t,fallback:n,rightKeys:r}){const s=a=>{const{allowed:i}=It({permissionKey:t,projectId:a.projectId,rightKeys:r});return i?d.jsx(e,{...a}):n||null};return s.displayName=`${e.displayName}WithPermissions`,s}const Rt=u7e,c7e=()=>{const{t:e}=H(),n=Ds().pathname,r=y.useMemo(()=>n===st.monitor||n.includes(st.agents)?st.monitor:n.includes(st.settings)||n.includes(st.currentUser)?st.settings:n,[n]);return d.jsxs(su,{className:"mt-0.5 [&_li]:last:flex-1 h-8 bg-panel shrink-0",tab:r,children:[d.jsx(Ni,{to:st.monitor,children:d.jsx(Yn,{className:"min-w-[120px]",label:e("monitor","Монитор"),tab:st.monitor,isFirst:!0})}),d.jsx(Ni,{to:st.settings,children:d.jsx(Yn,{label:e("settings","Настройки"),tab:st.settings})})]})},d7e=Rt(c7e,{permissionKey:ir.allowSystem}),Ql=({children:e,className:t,wrapperClassName:n})=>d.jsx("div",{className:Fn("flex flex-1 flex-col w-full overflow-auto mr-2.5",t),children:d.jsx("div",{className:Fn("flex w-full max-w-[1540px] self-center p-4 gap-2.5 box-border",n),children:e})});Ql.Menu=({children:e,className:t})=>d.jsx("div",{className:Fn("flex flex-col gap-4 w-[300px]",t),children:e});Ql.Container=({children:e,className:t})=>d.jsx("div",{className:Fn("flex flex-col gap-4 flex-1 max-w-full min-w-[900px] overflow-visible",t),children:e});const f7e=({path:e,title:t,permissionKey:n})=>{const{allowed:r}=It({permissionKey:n});return r?d.jsx(Ni,{to:`/${st.settings}/${e}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:t,tab:e,variant:"ghost"})}):null},h7e=()=>{const t=Ds().pathname,n=sne(),r=y.useMemo(()=>{for(const s of n)if(t.includes(s.path))return s.path;return""},[t,n]);return d.jsx(su,{tab:r,className:"!gap-4.5 overflow-hidden",children:n.map(s=>d.jsx(f7e,{...s}))})},oc=({actions:e,isLoading:t,title:n,defaultUrl:r,className:s,...a})=>{const i=kh(),l=()=>{window.history.length>1?i(-1):i(r||"/")};return d.jsxs("div",{className:Fn("flex flex-1 justify-between items-center gap-4 h-8 max-h-8",s),...a,children:[d.jsxs("div",{className:"flex gap-2.5 items-center",children:[d.jsx(Fe,{onClick:l,variant:"link",onlyIcon:!0,children:d.jsx("div",{className:"rotate-90",children:d.jsx(ec,{})})}),t?d.jsx(ho,{size:"small"}):d.jsx(W.Heading3,{className:"first-letter:uppercase",children:n})]}),d.jsx("div",{className:"flex gap-2.5 items-center",children:e})]})},bt=({label:e,value:t,copyable:n,className:r,labelClassName:s,...a})=>d.jsxs("div",{...a,className:Fn("flex flex-1 gap-2.5 overflow-x-hidden",r),children:[d.jsx(W,{color:"placeholder",variant:"strong",className:Fn("whitespace-nowrap first-letter:uppercase",s),children:e}),typeof t=="string"||typeof t=="number"?d.jsx(W,{copyable:n,className:"overflow-hidden overflow-ellipsis text-nowrap",title:`${t}`,children:t}):t]}),mo=({onChange:e,placeholder:t,timeout:n=500,initialValue:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(r||""),u=y.useCallback(Oke((h,g)=>{e?.(h,g)},n),[n,e]),f=h=>{l(h.target.value),u(h.target.value,h)};return d.jsx(X2,{placeholder:t??a("searchPlaceholder","Поиск"),value:i,onChange:f,autoComplete:"off",...s})},lc=({title:e="Доступ запрещен",message:t})=>{const{t:n}=H();return d.jsxs("div",{className:"flex flex-col flex-1 justify-center items-center gap-4",children:[d.jsx(W.Heading4,{children:e}),t||d.jsxs(d.Fragment,{children:[d.jsx(W,{children:n("noRights.pageView","У вас нет прав для просмотра данной страницы.")}),d.jsx(W,{children:n("noRights.pageAccessRequest","Для получения доступа, пожалуйста, обратитесь к администратору системы.")})]})]})},p7e={default:"bg-bg text-text ",success:"bg-primary text-text",info:"bg-panel text-text",secondary:"bg-secondary text-text"},m7e={default:"px-2",small:"px-[5px]"},pv=({onClose:e,label:t,color:n="default",className:r,size:s="default",customBackground:a,onClick:i,style:l,...u})=>d.jsxs("div",{className:Fn("inline-flex gap-2.5 items-center min-h-[22px] rounded-xs",{"cursor-pointer hover:brightness-120 active:brightness-90":!!i,[p7e[n]]:!a,"text-text":a},m7e[s],r),style:a?{...l||{},backgroundColor:a}:l,onClick:i,...u,children:[typeof t=="string"?d.jsx(W,{className:"whitespace-nowrap",children:t}):t,!!e&&d.jsx(Fe,{onlyIcon:!0,variant:"ghost",onClick:e,children:d.jsx(IZ,{width:"12",height:"12"})})]}),g7e=({menu:e,topMenu:t})=>d.jsxs(Ql,{wrapperClassName:Fn({"!max-w-[1240px]":!e}),children:[!!e&&d.jsx(Ql.Menu,{children:e}),d.jsxs(Ql.Container,{children:[t,d.jsx(QK,{})]})]}),au=({isLoading:e,...t})=>{const{t:n}=H();return d.jsx(Fe,{...t,children:e?`${n("adding","Добавление")}...`:n("add","Добавить")})},Nt=({variant:e="text",type:t="reset",...n})=>{const{t:r}=H();return d.jsx(Fe,{variant:e,type:t,...n,children:r("cancel","Отменить")})},us=({isLoading:e,type:t="submit",...n})=>{const{t:r}=H();return d.jsx(Fe,{type:t,...n,children:e?`${r("saving","Сохранение")}...`:r("save","Сохранить")})},uc=({isLoading:e,type:t="submit",...n})=>{const{t:r}=H();return d.jsx(Fe,{type:t,...n,children:e?`${r("creation","Создание")}...`:r("create","Создать")})},Fs=({isLoading:e,...t})=>{const{t:n}=H();return d.jsx(Fe,{...t,children:e?`${n("deleting","Удаление")}...`:n("delete","Удалить")})},v7e=({onChangeVisibility:e,columnsConfig:t,getColumnLabel:n,visibilityState:r,className:s,buttonClassName:a})=>{const{t:i}=H(),[l,u]=y.useState(!1),[f,h]=y.useState(r||{});y.useEffect(()=>{h(r)},[r]);const g=C=>{h(_=>({..._,[C]:!_[C]}))},v=()=>{e(f),u(!1)},w=()=>{h(r||{}),u(!1)};return d.jsxs("div",{className:Fn("inline-flex",s),children:[d.jsx(Fe,{variant:"secondary",className:a,onClick:()=>u(!0),onlyIcon:!0,children:d.jsx(D8,{})}),d.jsxs(Ms,{isOpen:l,onClose:w,children:[d.jsx(Ms.Header,{children:i("modal.title.columnsSettings","Настройки колонок")}),d.jsx(Ms.Body,{className:"flex-1",children:t.filter(C=>!C.isFunctional).map(C=>d.jsxs("div",{className:Fn("flex items-center justify-between gap-2.5","w-full h-10 px-4 overflow-x-hidden border-2 border-secondary-light"),children:[d.jsx(W,{className:"overflow-x-hidden overflow-ellipsis text-nowrap",children:n(C.id)}),!C.isAlwaysVisible&&d.jsx(Fe,{onClick:()=>g(C.id),variant:"ghost",onlyIcon:!0,children:f[C.id]?d.jsx(Yfe,{}):d.jsx(Zfe,{})})]},C.id))}),d.jsxs(Ms.Footer,{children:[d.jsx(Fe,{variant:"text",onClick:w,children:i("cancel","Отменить")}),d.jsx(Fe,{onClick:v,children:i("apply","Применить")})]})]})]})},y7e=({children:e,searchKey:t=vt.search,filters:n,isLoading:r})=>{const{t:s}=H(),[a,i]=br(),l=a.get(t)||"",u=y.useCallback(g=>{g?.trim()?a.set(t,g):a.delete(t),i(a)},[t,a,i]),f=y.useCallback((g,v,w)=>()=>{const C=a.getAll(g);a.delete(g),w?.length&&w.forEach(E=>a.delete(E));const _=C?.filter(E=>E!==v);_?.length&&_.forEach(E=>a.append(g,E)),i(a)},[a,i]),h=y.useMemo(()=>n.reduce((g,v)=>{const w=a.getAll(v.paramsKey);if(!w?.length)return g;const C=w.map(_=>{const E=v.resolver?.(_)||_;return{value:_,paramsKey:v.paramsKey,label:v.label?`${v.label}: ${E}`:E,dependentParams:v.dependentParams}});return[...g,...C]},[]),[n,a]);return d.jsxs("div",{className:"flex flex-col w-full gap-[7px] max-w-full overflow-hidden",children:[d.jsxs("div",{className:"flex flex-1 gap-2.5",children:[d.jsx(mo,{initialValue:l,onChange:u,wrapperClassName:"w-[479px] min-w-[200px]"}),e]}),!!h.length&&d.jsxs("div",{className:"flex gap-1.5 flex-wrap",children:[d.jsxs(W,{children:[s("modal.title.filters","Фильтры"),":"]}),!r&&h.map(g=>d.jsx(pv,{size:"small",onClose:f(g.paramsKey,g.value,g.dependentParams),label:g.label,color:"secondary"},`${g.paramsKey}_${g.value}`)),r&&d.jsx(ho,{size:"small"})]})]})},ine=({pageableList:e,loadAgents:t,isLoading:n,columns:r,...s})=>{const{t:a}=H(),{intersector:i}=Fd(()=>{e?.hasNextPage&&!n&&t(e.offset)});return y.useEffect(()=>{t()},[t]),d.jsxs(d.Fragment,{children:[!!e?.data?.length&&d.jsx(pL,{rowKey:"id",data:e.data.values,columns:r,enableRowSelection:!0,getRowId:l=>l.id,resizerOnHeaderOnly:!0,wrapperClassName:"contents",...s}),e!==null&&!e.data?.length&&!n&&d.jsx(W,{className:"p-3 flex justify-center",children:a("noData.listMessage",{entity:a("entities.agents.genitive"),defaultValue:"Список агентов пуст"})}),n&&d.jsx(wt,{className:"p-3 flex"}),i]})};$L(ine,vke);const one=y.createContext(null),Gh=()=>{const{t:e}=H(),t=y.useContext(one);if(t===null)throw new Error(e("errors.context",{name:"Agent",defaultValue:"Используется вне контекста Agent"}));return t},x7e=({onOpenTags:e,showActions:t=!0})=>{const{t:n}=H(),r=s=>{switch(s){case"windows":return d.jsx(Xfe,{width:"18",height:"18"});case"linux":return d.jsx(Wfe,{width:"18",height:"18"});case"android":return d.jsx(Qfe,{width:"18",height:"18"});case"ios":case"macos":return d.jsx(Jfe,{width:"18",height:"18"});default:return null}};return y.useMemo(()=>{const s=[{id:oa.select,header:({table:a})=>d.jsx(si,{checked:a.getIsAllRowsSelected(),onChange:(i,l)=>a.getToggleAllRowsSelectedHandler()(l)}),cell:({row:a})=>d.jsx("div",{className:"flex items-center",children:d.jsx(si,{checked:a.getIsSelected(),onChange:(i,l)=>a.getToggleSelectedHandler()(l),disabled:!a.getCanSelect()})}),size:55,maxSize:55},{id:oa.name,accessorFn:({name:a,osShortName:i,os:l})=>({name:a,osShortName:i,os:l}),header:n("fields.title","Название"),cell:({row:a,cell:i})=>{const{name:l,osShortName:u,os:f}=i.getValue();return d.jsx("div",{className:"flex gap-2.5 items-center max-w-full overflow-hidden",children:d.jsxs(Ni,{to:`${st.agents}/${a.original.id}`,target:"_blank",className:"contents",children:[d.jsx("div",{className:"inline-flex shrink-0",title:f,children:r(u)}),d.jsx(W,{variant:"strong",className:"overflow-ellipsis overflow-hidden hover:underline",title:l,children:l})]})})},meta:{thLabelClassName:"!justify-start"}},{accessorKey:oa.id,header:n("fields.id","ID"),meta:{thLabelClassName:"!justify-start"}},{accessorKey:oa.lastIpList,header:n("fields.ip","IP"),cell:({cell:a,row:i})=>a.getValue().map(u=>d.jsx(W,{variant:"strong",className:"max-w-full overflow-hidden overflow-ellipsis",children:u},`${i.original.id}_${u}`)),meta:{thLabelClassName:"!justify-start"}},{accessorKey:oa.lastPingDate,header:n("fields.ping","Пинг"),cell:({cell:a})=>{const i=a.getValue();return d.jsx(W,{className:"text-center overflow-hidden overflow-ellipsis",variant:"strong",children:i?.toLocaleString("ru-RU")||""})}},{accessorKey:oa.tags,header:rn(n("entities.tags.nominative","Теги")),minSize:180,size:180,maxSize:300,cell:({cell:a,row:i})=>{const l=a.getValue();return l?.length?d.jsx("div",{className:"flex flex-1 w-full h-full min-h-[22px] gap-2.5 flex-wrap cursor-pointer items-center py-1 px-4",onClick:()=>e?.(i.original),children:l.map(u=>d.jsx(pv,{label:u.name,customBackground:u.color,size:"small"},`${i.original.id}_${u.name}`))}):d.jsx("div",{className:"absolute left-0 top-0 right-0 bottom-0",children:d.jsx("div",{className:"flex flex-1 h-full w-full items-center py-1 px-4 hover:[&_button]:visible",children:d.jsxs(Fe,{variant:"secondary",className:"!font-normal !py-0 !px-[5px] !h-[22px] invisible",onClick:()=>e?.(i.original),children:[d.jsx(Ma,{width:"12",height:"12"}),n("modal.title.addEntity",{entity:n("entities.tags.nominative"),defaultValue:"Добавить теги"})]})})})},meta:{thLabelClassName:"!justify-start",tdClassName:"!p-0 relative"}},{accessorKey:oa.os,header:n("fields.os","ОС"),cell:({cell:a})=>{const i=a.getValue();return d.jsx(W,{className:"text-center overflow-hidden overflow-ellipsis",variant:"strong",children:i})}},{accessorKey:oa.architecture,header:n("fields.architecture","Архитектура"),cell:({cell:a})=>{const i=a.getValue();return d.jsx(W,{className:"text-center",variant:"strong",children:i})}}];return t?s:s.slice(1)},[n,e,t])},b7e=()=>y.useMemo(()=>[{id:oa.select,isFunctional:!0},{id:oa.name,isAlwaysVisible:!0},{id:oa.id,visible:!0},{id:oa.lastIpList,isAlwaysVisible:!0},{id:oa.lastPingDate,visible:!0},{id:oa.tags,visible:!0},{id:oa.os,visible:!0},{id:oa.architecture,visible:!0}],[]);class w7e{kind;filter;offset;limit=20;reverse;raw;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw,offset:this.offset,limit:this.limit};return this.filter&&(t.filter={project_uuids:this.filter.projectIds||[],user_group_uuids:this.filter.userGroupIds||[],agent_group_uuids:this.filter.agentGroupIds||[],tag_uuids:this.filter.tagIds||[],search:this.filter.search||""}),t}get currentKind(){return this.kind?this.kind:this.filter?.projectIds?.length&&this.filter?.agentGroupIds?.length?uh.BY_PROJECTS_AND_AGENT_GROUPS:this.filter?.projectIds?.length&&this.filter?.userGroupIds?.length?uh.BY_PROJECTS_AND_USER_GROUPS:this.filter?.projectIds?.length?uh.BY_PROJECTS:this.filter?.agentGroupIds?.length?uh.BY_AGENT_GROUPS:this.filter?.userGroupIds?.length?uh.BY_USER_GROUPS:uh.ALL}}class C7e{id;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id,raw:this.raw}}}class S7e{id;name;shortNote;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id,name:this.name,note:this.shortNote}}}class _7e{kind;filter;offset;limit=20;reverse;raw;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw,offset:this.offset,limit:this.limit};return this.filter&&(t.filter={project_uuids:this.filter.projectIds||[],user_group_uuids:this.filter.userGroupIds||[],agent_group_uuids:this.filter.agentGroupIds||[],agent_uuid:this.filter.agentId||"",search:this.filter.search||""}),t}get currentKind(){return this.kind?this.kind:this.filter?.projectIds?.length&&this.filter?.userGroupIds?.length?ld.BY_PROJECTS_AND_USER_GROUPS:this.filter?.projectIds?.length&&this.filter?.agentGroupIds?.length?ld.BY_PROJECTS_AND_AGENT_GROUPS:this.filter?.projectIds?.length?ld.BY_PROJECTS:this.filter?.userGroupIds?.length?ld.BY_USER_GROUPS:this.filter?.agentGroupIds?.length?ld.BY_AGENT_GROUPS:this.filter?.agentId?ld.BY_AGENT:ld.ALL}}class XL{agentId;consoleId;consoleTag;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class j7e{agentId;tokenId=null;name;consoleTag;consoleType=Ho.PUBLIC;environment;workingDirectory;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,console_type:this.consoleType||Ho.PUBLIC};return this.consoleTag&&(t.console_tag=this.consoleTag),this.tokenId&&(t.token_uuid=this.tokenId),this.name&&(t.console_name=this.name),this.environment&&(t.env=this.environment),this.workingDirectory&&(t.cwd=this.workingDirectory),t}}class E7e{agentId;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId}}}class xq{agentId;consoleId;consoleTag;lastLineId;offset;limit=20;reverse;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId};return this.offset&&(t.offset=this.offset),this.limit&&(t.limit=this.limit),this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),this.lastLineId&&(t.last_id=this.lastLineId),this.reverse&&(t.reverse=this.reverse),t}}class $7e{agentId;consoleId;consoleTag;tokenId;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,token_uuid:this.tokenId};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class R7e{agentId;consoleId;consoleTag;tokenId;commandId;command;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,command:this.command};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),this.tokenId&&(t.token_uuid=this.tokenId),this.commandId&&(t.command_uuid=this.commandId),t}}class O7e{agentId;consoleId;consoleTag;lastLineId;offset;limit=20;reverse;owner;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,offset:this.offset,limit:this.limit};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),this.lastLineId&&(t.last_id=this.lastLineId),this.reverse&&(t.reverse=this.reverse),this.owner&&(t.reverse=this.owner),t}}class T7e{agentId;consoleId;consoleTag;consoleType;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,console_type:this.consoleType};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class A7e{projectId;name;value;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,value:this.value,name:this.name};return this.settings&&(t.settings=DL(this.settings)),this.value&&(t.value=this.value),t}}class k7e{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class WL{id;value;projectId;name;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),this.name&&this.projectId&&(t.name=this.name,t.project_uuid=this.projectId),this.raw!==void 0&&(t.raw=this.raw),t}}class QL{kind;filter;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw};return this.filter&&(t.filter={},this.currentKind===ig.BY_PROJECT&&this.filter?.projectId&&(t.filter.project_uuid=this.filter?.projectId),this.currentKind===ig.BY_AGENT_GROUPS&&this.filter?.agentGroupIds?.length&&(t.filter.agent_group_uuids=this.filter?.agentGroupIds),this.filter?.exclude?.agentGroupIds?.length&&(t.filter.exclude={agent_group_uuids:this.filter?.exclude.agentGroupIds}),this.filter?.search&&(t.filter.search=this.filter.search)),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId?ig.BY_PROJECT:this.filter?.agentGroupIds?.length?ig.BY_AGENT_GROUPS:ig.ALL}}class lne{id;value;name;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.value&&(t.value=this.value),this.name&&(t.name=this.name),this.settings&&(t.settings=DL(this.settings)),t}}class N7e{projectId;name;value;settings;uuid;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,value:this.value,name:this.name};return this.settings&&(t.settings=DL(this.settings)),this.value&&(t.value=this.value),t}}class L7e{id;name;description;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={name:this.name};return this.id&&(t.uuid=this.id),this.description&&(t.description=this.description),this.settings&&(t.settings=this.settings),t}}class M7e{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class I7e{id;name;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.name&&(t.name=this.name),this.raw&&(t.raw=this.raw),t}}class une{kind=s1.ALL;filter;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw};return this.filter?.agentId&&(t.filter={agent_uuid:this.filter?.agentId}),t}get currentKind(){return this.kind?this.kind:this.filter?.agentId?s1.BY_AGENT:s1.ALL}}class P7e{id;name;description;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id,name:this.name};return this.description&&(t.description=this.description),this.settings&&(t.settings=this.settings),t}}class D7e{projectId;id;type=$h.DEFAULT;name;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,name:this.name,type:this.type||$h.DEFAULT};return this.id&&(t.uuid=this.id),this.settings&&(t.settings=this.settings),t}}class V7e{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class B7e{id;projectId;name;raw=!0;withEditorRights=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id,raw:this.raw,edit:this.withEditorRights};return this.projectId&&(t.project_uuid=this.projectId),this.name&&(t.group_name=this.name),t}}class mv{kind;filter;raw;admin;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw??!0,admin:this.admin??!0};return this.filter&&(t.filter=this.filter.exclude?{exclude:{}}:{},this.filter.projectId&&(t.filter.project_uuid=this.filter.projectId),this.filter.userId&&(t.filter.user_uuid=this.filter.userId),this.filter.agentId&&(t.filter.agent_uuid=this.filter.agentId),this.filter.admin!==void 0&&(t.filter.admin=this.filter.admin),this.filter.agentGroupIds&&(t.filter.agent_group_uuids=this.filter.agentGroupIds),this.filter.exclude?.agentGroupIds&&t.filter.exclude&&(t.filter.exclude.agent_group_uuids=this.filter.exclude.agentGroupIds),this.filter.exclude?.userGroupIds&&t.filter.exclude&&(t.filter.exclude.user_group_uuids=this.filter.exclude.userGroupIds),this.filter.exclude?.userId&&t.filter.exclude&&(t.filter.exclude.user_uuid=this.filter.exclude.userId),this.filter.exclude?.admin!==void 0&&(t.filter.exclude.admin=this.filter.exclude.admin),this.filter.exclude?.agentGroupIds?.length&&(t.filter.exclude.agent_group_uuids=this.filter.exclude.agentGroupIds),this.filter.search&&(t.filter.search=this.filter.search)),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId&&this.filter?.userId?ch.BY_PROJECT_AND_USER:this.filter?.projectId?ch.BY_PROJECT:this.filter?.userId?ch.BY_USER:this.filter?.agentId?ch.BY_AGENT:this.filter?.agentGroupIds?.length?ch.BY_AGENT_GROUPS:ch.ALL}}class cne{id;name;rights;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.name&&(t.name=this.name),this.rights&&(t.rights=Q9e(this.rights)),this.settings&&(t.settings=this.settings),t}}class dne{groupIds;userIds;constructor(t){Object.assign(this,t)}toRequest(){return{group_uuid_list:this.groupIds,user_uuid_list:this.userIds}}}class F7e{groupId;userId;constructor(t){Object.assign(this,t)}toRequest(){return{group_uuid:this.groupId,user_uuid:this.userId}}}class fne{path;constructor(t){Object.assign(this,t)}toRequest(){return{path:this.path}}}class U7e{path;saveTo;constructor(t){Object.assign(this,t)}toRequest(){return{path:this.path,save_to:{is_dir:this.saveTo.isDirectory||!1,path:this.saveTo.path,rewrite:this.saveTo.rewrite||!0}}}}class G7e{kind;filter;agentId;offset;limit=20;reverse;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,agent_uuid:this.agentId,offset:this.offset};return this.limit&&(t.limit=this.limit),this.reverse!==void 0&&(t.reverse=this.reverse),this.filter&&(t.filter={},this.filter.actions?.length&&(t.filter.actions=this.filter.actions),this.filter.statuses?.length&&(t.filter.statuses=this.filter.statuses),this.filter.actions&&(t.filter.search=this.filter.search)),t}get currentKind(){return this.kind?this.kind:this.filter?.actions?.length&&this.filter?.statuses?.length?My.BY_ACTION_AND_STATUS:this.filter?.actions?.length?My.BY_ACTION:this.filter?.statuses?.length?My.BY_STATUS:My.ALL}}class z7e{path;deep;full;ifEmpty;expandPath;constructor(t){Object.assign(this,t)}toRequest(){const t={path:this.path};return this.deep&&(t.deep=this.deep),this.full&&(t.full=this.full),this.ifEmpty&&(t.if_emtpy=this.ifEmpty),this.expandPath&&(t.expand_path=this.expandPath),t}}class H7e{fromPath;toPath;constructor(t){Object.assign(this,t)}toRequest(){return{from_path:this.fromPath,to_path:this.toPath}}}class hne{agentId;path;deep=0;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId,path:this.path,deep:this.deep}}}class pne{path;localPath;constructor(t){Object.assign(this,t)}toRequest(){const t={path:this.path};return this.localPath&&(t.local_path=this.localPath),t}}class q7e{fromPath;toPath;constructor(t){Object.assign(this,t)}toRequest(){return{from_path:this.fromPath,to_path:this.toPath}}}class K7e{agentId;path;recreate=!0;createDirectory=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,path:this.path};return this.recreate&&(t.recreate=this.recreate),this.createDirectory&&(t.dir_create=this.createDirectory),t}}class Y7e{agentId;path;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId,path:this.path}}}class Z7e{agentId;path;id;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,path:this.path};return this.id&&(t.uuid=this.id),t}}class X7e{agentId;path;id;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,path:this.path};return this.id&&(t.uuid=this.id),t}}class mne{agentId;path;id;deep=0;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,path:this.path};return this.id&&(t.uuid=this.id),this.deep&&(t.deep=this.deep),t}}class W7e{agentId;fromPath;toPath;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId,from_path:this.fromPath,to_path:this.toPath}}}class Q7e{agentId;fromPath;toPath;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId,from_path:this.fromPath,to_path:this.toPath}}}class cc{kind;filter;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw};return this.filter&&(t.filter={},this.currentKind===Ts.BY_PROJECT_AND_USER_GROUPS&&(t.filter.project_uuid=this.filter.projectId,t.filter.user_group_uuids=this.filter.userGroupIds||[]),this.currentKind===Ts.BY_PROJECT_AND_CLIENT_KEY&&(t.filter.project_uuid=this.filter.projectId,t.filter.client_key_uuid=this.filter.clientKeyId||null),this.currentKind===Ts.BY_PROJECT_AND_AGENTS&&(t.filter.project_uuid=this.filter.projectId,t.filter.agent_uuids=this.filter.agentIds||[]),this.currentKind===Ts.BY_PROJECT&&(t.filter.project_uuid=this.filter.projectId),this.currentKind===Ts.BY_USER_GROUPS&&(t.filter.user_group_uuids=this.filter.userGroupIds||[]),this.currentKind===Ts.BY_CLIENT_KEY&&(t.filter.client_key_uuid=this.filter.clientKeyId||null),this.currentKind===Ts.BY_AGENTS&&(t.filter.agent_uuids=this.filter.agentIds||[]),this.filter.exclude&&(t.filter.exclude={},this.filter.exclude.userGroupIds&&(t.filter.exclude.user_group_uuids=this.filter.exclude.userGroupIds||[]),this.filter.exclude.clientKeyIds&&(t.filter.exclude.client_key_uuids=this.filter.exclude.clientKeyIds||[])),this.filter.search&&(t.filter.search=this.filter.search)),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId&&this.filter?.userGroupIds?.length?Ts.BY_PROJECT_AND_USER_GROUPS:this.filter?.projectId&&this.filter?.clientKeyId?Ts.BY_PROJECT_AND_CLIENT_KEY:this.filter?.projectId&&this.filter?.agentIds?.length?Ts.BY_PROJECT_AND_AGENTS:this.filter?.projectId?Ts.BY_PROJECT:this.filter?.userGroupIds?.length?Ts.BY_USER_GROUPS:this.filter?.clientKeyId?Ts.BY_CLIENT_KEY:this.filter?.agentIds?.length?Ts.BY_AGENTS:Ts.ALL}}class J7e{projectId;id;name;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,name:this.name};return this.id&&(t.group_uuid=this.id),this.settings&&(t.settings=this.settings),t}}class eIe{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class tIe{id;projectId;name;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id,raw:this.raw};return this.projectId&&(t.project_uuid=this.projectId),this.name&&(t.group_name=this.name),t}}class nIe{id;name;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.name&&(t.name=this.name),this.settings&&(t.settings=this.settings),t}}class gne{ids;clientKeyIds;constructor(t){Object.assign(this,t)}toRequest(){return{group_uuid_list:this.ids,key_uuid_list:this.clientKeyIds}}}class rIe{ids;clientKeyIds;constructor(t){Object.assign(this,t)}toRequest(){return{group_uuid_list:this.ids,key_uuid_list:this.clientKeyIds}}}class vne{ids;userGroupIds;constructor(t){Object.assign(this,t)}toRequest(){return{agent_group_uuid_list:this.ids,user_group_uuid_list:this.userGroupIds}}}class sIe{ids;userGroupIds;constructor(t){Object.assign(this,t)}toRequest(){return{agent_group_uuid_list:this.ids,user_group_uuid_list:this.userGroupIds}}}class yne{ids;agentIds;constructor(t){Object.assign(this,t)}toRequest(){return{group_uuid_list:this.ids,agent_uuid_list:this.agentIds}}}class aIe{name;login;password;settings;constructor(t){Object.assign(this,t)}toRequest(){const t={name:this.name,login:this.login,passw:this.password};return this.settings&&(t.settings=this.settings),t}}class iIe{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class oIe{id;login;token;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.login&&(t.login=this.login),this.token&&(t.token=this.token),t}}class v_{kind;filter;offset;limit=20;reverse;raw;admin=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,raw:this.raw,admin:this.admin,offset:this.offset,limit:this.limit};return this.filter&&(t.filter={},this.currentKind===Ll.BY_PROJECT_AND_USER_GROUPS&&(t.filter={project_uuid:this.filter.projectId,user_group_uuids:this.filter.userGroupIds||[]}),this.currentKind===Ll.BY_PROJECT&&(t.filter={project_uuid:this.filter.projectId}),this.currentKind===Ll.BY_AGENT&&(t.filter={agent_uuid:this.filter.agentId}),this.currentKind===Ll.BY_USER_GROUPS&&(t.filter={user_group_uuids:this.filter.userGroupIds||[]}),this.filter.exclude&&(t.filter.exclude={},this.filter.exclude.userGroupIds&&(t.filter.exclude.user_group_uuids=this.filter.exclude.userGroupIds),this.filter.exclude.userIds&&(t.filter.exclude.user_uuids=this.filter.exclude.userIds)),this.filter.search&&(t.filter.search=this.filter.search)),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId&&this.filter?.userGroupIds?.length?Ll.BY_PROJECT_AND_USER_GROUPS:this.filter?.projectId?Ll.BY_PROJECT:this.filter?.agentId?Ll.BY_AGENT:this.filter?.userGroupIds?.length?Ll.BY_USER_GROUPS:Ll.ALL}}class lIe{id;name;login;password;settings;confirmPassword;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.name&&(t.name=this.name),this.login&&(t.login=this.login),this.password&&(t.passw=PS(this.password)),this.confirmPassword&&(t.confirm_passw=PS(this.confirmPassword)),this.settings&&(t.settings=this.settings),t}}class uIe{projectId;value;name;id;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,name:this.name};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),t}}class cIe{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class xne{kind="raw";id;value;projectId;name;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.kind};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),this.name&&this.projectId&&(t.name=this.name,t.project_uuid=this.projectId),t}}class dIe{kind;filter;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind};return this.currentKind===qC.BY_PROJECT&&this.filter?.projectId&&(t.filter={project_uuid:this.filter?.projectId}),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId?qC.BY_PROJECT:qC.ALL}}class fIe{id;value;name;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.value&&(t.value=this.value),this.name&&(t.name=this.name),t}}class hIe{projectId;value;name;id;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.projectId&&(t.project_uuid=this.projectId),this.name&&(t.name=this.name),this.value&&(t.value=this.value),t}}class pIe{projectId;value;name;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,name:this.name};return this.value&&(t.value=this.value),t}}class mIe{id;constructor(t){Object.assign(this,t)}toRequest(){return{uuid:this.id}}}class gIe{id;value;projectId;name;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),this.name&&this.projectId&&(t.name=this.name,t.project_uuid=this.projectId),t}}class vIe{kind;filter;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind};return this.currentKind===KC.BY_PROJECT&&this.filter?.projectId&&(t.filter={project_uuid:this.filter?.projectId}),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId?KC.BY_PROJECT:KC.ALL}}class yIe{id;value;name;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.value&&(t.value=this.value),this.name&&(t.name=this.name),t}}class xIe{projectId;value;name;privateKey;constructor(t){Object.assign(this,t)}toRequest(){const t={project_uuid:this.projectId,name:this.name};return this.value&&(t.value=this.value),this.privateKey&&(t.priv_key=this.privateKey),t}}class bIe{id;value;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),t}}class wIe{id;value;projectId;name;raw=!0;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.value&&(t.value=this.value),this.name&&this.projectId&&(t.name=this.name,t.project_uuid=this.projectId),this.raw!==void 0&&(t.raw=this.raw),t}}class CIe{kind;filter;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind};return this.currentKind===YC.BY_PROJECT&&this.filter?.projectId&&(t.filter={project_uuid:this.filter?.projectId}),t}get currentKind(){return this.kind?this.kind:this.filter?.projectId?YC.BY_PROJECT:YC.ALL}}class SIe{id;value;name;privateKey;constructor(t){Object.assign(this,t)}toRequest(){const t={uuid:this.id};return this.value&&(t.value=this.value),this.name&&(t.name=this.name),this.privateKey&&(t.priv_key=this.privateKey),t}}class _Ie{agentId;consoleId;consoleTag;userIds;rights;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_uuid_list:this.userIds,rights:f_(this.rights)};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class jIe{agentId;consoleId;consoleTag;userIds;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_uuid_list:this.userIds};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class EIe{agentId;consoleId;consoleTag;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class $Ie{agentId;consoleId;consoleTag;userId;rights;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_uuid:this.userId,rights:f_(this.rights)};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class RIe{agentId;consoleId;consoleTag;userGroupIds;rights;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_group_uuid_list:this.userGroupIds,rights:f_(this.rights)};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class OIe{agentId;consoleId;consoleTag;userGroupIds;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_group_uuid_list:this.userGroupIds};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class TIe{agentId;consoleId;consoleTag;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class AIe{agentId;consoleId;consoleTag;userGroupId;rights;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,user_group_uuid:this.userGroupId,rights:f_(this.rights)};return this.consoleId&&(t.console_uuid=this.consoleId),this.consoleTag&&(t.console_tag=this.consoleTag),t}}class kIe{id;name;color;constructor(t){Object.assign(this,t)}toRequest(){const t={name:this.name,color:this.color};return this.id&&(t.uuid=this.id),t}}class NIe{idList;nameList;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.idList&&(t.uuid_list=this.idList),this.nameList&&(t.name_list=this.nameList),t}}class bne{filter;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.filter&&(t.filter={},this.filter.search&&(t.filter.search=this.filter.search)),t}}class LIe{id;oldName;name;color;constructor(t){Object.assign(this,t)}toRequest(){const t={};return this.id&&(t.uuid=this.id),this.oldName&&(t.old_name=this.oldName),this.name&&(t.name=this.name),this.color&&(t.color=this.color),t}}class MIe{agentId;idList;nameList;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId};return this.idList&&(t.uuid_list=this.idList),this.nameList&&(t.name_list=this.nameList),t}}class IIe{agentId;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId}}}class PIe{agentId;schedule;constructor(t){Object.assign(this,t)}toRequest(){return{agent_uuid:this.agentId,schedule:CLe(this.schedule)}}}class DIe{portIds;constructor(t){Object.assign(this,t)}toRequest(){return{port_uuids:this.portIds}}}class VIe{kind;filter;offset;limit=20;reverse;constructor(t){Object.assign(this,t)}toRequest(){const t={kind:this.currentKind,offset:this.offset,limit:this.limit};return this.filter&&(t.filter={},this.filter?.agentId&&(t.filter.agent_uuid=this.filter.agentId)),t}get currentKind(){return this.kind?this.kind:this.filter?.agentId?Tk.BY_AGENT:Tk.ALL}}class BIe{agentId;host;port;remoteHost;remotePort;note;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,port:this.port};return this.host&&(t.host=this.host),this.remoteHost&&(t.rhost=this.remoteHost),this.remotePort&&(t.rport=this.remotePort),this.note&&(t.note=this.note),t}}class FIe{agentId;host;port;remoteHost;remotePort;encrypt;serverPort;note;constructor(t){Object.assign(this,t)}toRequest(){const t={agent_uuid:this.agentId,port:this.port,rhost:this.remoteHost,rport:this.remotePort};return this.host&&(t.host=this.host),this.encrypt&&(t.encrypt=this.encrypt),this.serverPort&&(t.srv_port=this.serverPort),this.note&&(t.note=this.note),t}}class UIe{portId;note;constructor(t){Object.assign(this,t)}toRequest(){return{port_uuid:this.portId,note:this.note}}}const GIe=e=>{const[t,n]=y.useState(null),[r,s]=y.useState(!1);return{loadAgents:y.useCallback(async(i=0)=>{s(!0),await F6.invoke(new w7e({filter:e,offset:i})),F6.right(l=>n(u=>i===0?l:u!==null?new Ia({...l,data:u.data.concat(l.data)}):null)),F6.left(l=>{je.error(l),n(null)}),s(!1)},[e]),pageableList:t,isLoading:r}},F6=new jLe,zIe=({...e})=>d.jsx(cv,{valueProperty:"id",labelProperty:"name",multiple:!0,...e}),HIe="AgentGroup",qIe=()=>{const{t:e}=H();return y.useMemo(()=>[{accessorKey:"projectName",header:rn(e("entities.project.nominative","Проект"))},{accessorKey:"name",header:rn(e("entities.group.nominative","Группа"))},{accessorKey:"projectId",header:e("entityId",{entity:e("entities.project.genitive"),defaultValue:"ID проекта"})},{accessorKey:"id",header:e("entityId",{entity:e("entities.group.genitive"),defaultValue:"ID группы"})}],[e])},KIe=e=>{const[t,n]=y.useState(null),[r,s]=y.useState(!1),a=y.useCallback(async i=>{const l=i||e;if(!l?.projectId)return;s(!0);const u=new cc({filter:l});await U6.invoke(u),U6.right(n),U6.left(je.error),s(!1)},[JSON.stringify(e)]);return y.useEffect(()=>{a()},[a]),{agentGroupList:t,isLoading:r,loadAgentGroups:a}},U6=new ac,wne=({filter:e,...t})=>{const n=qIe(),[r,s]=y.useState(null),[a,i]=y.useState(!1);return y.useEffect(()=>{const l=new cc({kind:Ts.BY_AGENTS,filter:e});i(!0);const u=()=>{G6.right(s),G6.left(()=>s(null)),i(!1)};G6.invoke(l).then(u)},[e]),d.jsxs(d.Fragment,{children:[d.jsx(pL,{rowKey:"id",data:r?.values||[],columns:n,resizerOnHeaderOnly:!0,wrapperClassName:"contents",...t}),a&&d.jsx(wt,{className:"p-3 flex"})]})},G6=new ac;$L(wne,HIe);const JL=({agentGroup:e,...t})=>d.jsx(ic,{...t,link:`/${st.settings}/${st.agentGroups}/${e.id}`,children:d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",title:e.name,children:e.name})}),YIe=({tabs:e,className:t,direction:n="vertical",variant:r="squareGhost",...s})=>d.jsx(su,{className:Fn("w-[378px]",t),direction:n,variant:r,...s,children:e.map(a=>d.jsx(Yn,{className:"justify-start",tab:a.id,label:a.id},a.id))}),ZIe=({id:e,ipList:t,pingDate:n,count:r,name:s,host:a,userName:i,os:l,architecture:u,pid:f,rights:h,image:g,path:v,workingDirectory:w,serverSchema:C,serverHost:_,serverPort:E,pingMinInterval:$,pingMaxInterval:O,commandRound:N,commandPerRound:M,version:L,schema:k,createdDate:T})=>{const{t:P}=H(),V=P("emptyValue","Н/Д");return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2.5 items-start",children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-1/2 overflow-x-hidden",children:[d.jsx(bt,{label:"ID",value:e,copyable:!0,labelClassName:"min-w-[103px]"}),d.jsx(bt,{label:P("fields.agentName","Имя агента"),value:s||V,copyable:!!s,labelClassName:"min-w-[103px]"}),d.jsx(bt,{label:P("fields.ip","IP-адрес(а)"),value:d.jsx("div",{className:"flex flex-1 overflow-x-hidden",children:d.jsx("div",{className:"flex flex-col items-start gap-1 w-full overflow-x-hidden",children:t.map(q=>d.jsx(W,{className:"max-w-full overflow-hidden overflow-ellipsis text-nowrap",copyable:!0,title:q,children:q},q))})}),copyable:!0,labelClassName:"min-w-[103px]"}),d.jsx(bt,{label:P("fields.createDate","Дата создания"),value:T?.toLocaleString("ru-RU")||V,copyable:!!T,labelClassName:"min-w-[103px]"}),d.jsx(bt,{label:P("fields.ping","Пинг"),value:n?.toLocaleString("ru-RU")||V,copyable:!!n,labelClassName:"min-w-[103px]"}),d.jsx(bt,{label:P("fields.pingCount","Пинг (счетчик)"),value:r||"0",labelClassName:"min-w-[103px]"})]}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-1/2 overflow-x-hidden",children:[d.jsx(bt,{label:P("fields.os","ОС"),value:l||V,copyable:!!l,labelClassName:"min-w-[98px]"}),d.jsx(bt,{label:P("fields.architecture","Архитектура"),value:u||V,copyable:!!u,labelClassName:"min-w-[98px]"}),d.jsx(bt,{label:P("fields.host","Хост"),value:a||V,copyable:!!a,labelClassName:"min-w-[98px]"}),d.jsx(bt,{label:P("fields.user","Пользователь"),value:i||V,copyable:!!i,labelClassName:"min-w-[98px]"}),d.jsx(bt,{label:P("fields.rights","Права"),value:h,labelClassName:"min-w-[98px]"})]})]}),d.jsx(Tg,{}),d.jsxs("div",{className:"flex flex-col gap-2.5 overflow-x-hidden",children:[d.jsx(bt,{label:P("fields.executableFile","Исполняемый файл"),value:g||V,copyable:!!g,labelClassName:"min-w-[176px]"}),d.jsx(bt,{label:P("fields.pid","Идентификатор процесса"),value:f||V,copyable:!!f,labelClassName:"min-w-[176px]"}),d.jsx(bt,{label:P("fields.installDirectory","Директория установки"),value:v||V,copyable:!!v,labelClassName:"min-w-[176px]"}),d.jsx(bt,{label:P("fields.workDirectory","Рабочая директория"),value:w||V,copyable:!!w,labelClassName:"min-w-[176px]"})]}),d.jsx(Tg,{}),d.jsxs("div",{className:"flex gap-2.5 items-start",children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-1/2 overflow-x-hidden",children:[d.jsx(bt,{label:P("fields.serverSchema","Схема сервера"),value:C||V,copyable:!!C,labelClassName:"min-w-[112px]"}),d.jsx(bt,{label:P("fields.serverHost","Хост сервера"),value:_||V,copyable:!!_,labelClassName:"min-w-[112px]"}),d.jsx(bt,{label:P("fields.serverPort","Порт сервера"),value:E||V,copyable:!!E,labelClassName:"min-w-[112px]"})]}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-1/2 overflow-x-hidden",children:[d.jsx(bt,{label:P("fields.agentVersion","Версия агента"),value:L||V,copyable:!!L,labelClassName:"min-w-[98px]"}),d.jsx(bt,{label:P("fields.agentSchema","Схема агента"),value:k||V,copyable:!!k,labelClassName:"min-w-[98px]"})]})]}),d.jsx(Tg,{}),d.jsxs("div",{className:"flex flex-col gap-2.5 overflow-x-hidden",children:[d.jsx(bt,{label:P("fields.pingMinInterval","Минимальный интервал между командами ping (в секундах)"),value:$||"0",copyable:!!$,labelClassName:"min-w-[420px]"}),d.jsx(bt,{label:P("fields.pingMaxInterval","Максимальный интервал между командами ping (в секундах)"),value:O||"0",copyable:!!O,labelClassName:"min-w-[420px]"}),d.jsx(bt,{label:P("fields.commandRound",'Длительность "раунда" (в секундах)'),value:N||"0",copyable:!!N,labelClassName:"min-w-[420px]"}),d.jsx(bt,{label:P("fields.commandPerRound",'Количество команд за "раунд"'),value:M||"0",copyable:!!M,labelClassName:"min-w-[420px]"})]})]})},Cne=({options:e,value:t,...n})=>d.jsx(cv,{options:e,value:e?.length?t:void 0,valueProperty:"id",labelProperty:"name",...n}),XIe=({project:e,...t})=>d.jsx(ic,{...t,link:`/${st.settings}/${st.projects}/${e.id}`,children:d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",title:e.name,children:e.name})}),Sne=()=>{const[e,t]=y.useState(null),[n,r]=y.useState(!1),s=y.useCallback(async()=>{r(!0);const a=new une({});await z6.invoke(a),z6.right(t),z6.left(je.error),r(!1)},[]);return y.useEffect(()=>{s()},[s]),{projectList:e,isLoading:n,loadProjects:s}},z6=new Pte,WIe=({agentId:e,consoleId:t,tokenId:n,onChange:r,...s})=>{const[a,i]=y.useState(""),[l,u]=y.useState(null),[f,h]=y.useState(-1),g=y.useRef(null);y.useEffect(()=>{const E=new O7e({consoleId:t,agentId:e,offset:0,limit:100,reverse:!0}),$=()=>{q6.right(({data:O})=>u(O)),q6.left(je.error)};q6.invoke(E).then($)},[e,t]),y.useEffect(()=>{i("")},[t]);const v=()=>{const E=g.current?.value||"",$=g.current?.selectionStart||0;return E.substring(0,$).split(`
`).length-1},w=async()=>{const E=new R7e({agentId:e,consoleId:t,command:a});n&&(E.tokenId=n),await H6.invoke(E),H6.right(({commandId:$})=>{const O=new Lte({command:a,id:$}),N=l?.length?l.unshift(O):new en([O],"id");u(N),h(-1)}),H6.left(je.error)},C=E=>{const $=v(),O=a.split(`
`);if(E.key==="ArrowUp"&&$===0&&l?.length){if(E.preventDefault(),!l?.length)return;const N=Math.min(f+1,l.length-1);h(N),i(l.entities[l.ids[N]].command)}if(E.key==="ArrowDown"&&$===O.length-1&&l?.length){if(E.preventDefault(),!l?.length||f===-1)return;const N=f-1;h(N),i(f<=0?"":l.entities[l.ids[N]]?.command)}if(E.key==="Enter"&&E.shiftKey){E.preventDefault();const N=g.current?.selectionStart||0,M=g.current?.selectionEnd||0,L=a.substring(0,N)+`
`+a.substring(M);i(L),setTimeout(()=>{g.current&&(g.current.selectionStart=g.current.selectionEnd=N+1)},0)}if(E.key==="Enter"&&!E.shiftKey){if(E.preventDefault(),!a.trim())return;w(),i("")}},_=E=>{i(E.target.value),r?.(E)};return d.jsxs("div",{className:"w-full relative",children:[d.jsx(ete,{wrapperClassName:"w-full bg-secondary",inputClassName:"!bg-secondary !pl-[35px] font-['Ubuntu_Mono',_monospace]",ref:g,onChange:_,onKeyDown:C,placeholder:"",value:a,rows:1,maxRows:5,autoExpand:!0,...s}),d.jsx("div",{className:"absolute left-4 top-[3px] text-primary",children:">"})]})},H6=new XLe,q6=new WLe,QIe=({agentId:e,consoleId:t,interval:n})=>{const[r,s]=y.useState(null),[a,i]=y.useState(!1),{scrollRef:l,updateBottomScrollPosition:u,scrollToBottom:f}=ene();y.useEffect(()=>{i(!0),s(null);const g=new xq({consoleId:t,agentId:e,offset:0,limit:1e3,reverse:!0}),v=()=>{Cy.right(w=>{const C=new en(w.data.values.reverse(),"id");s({...w,data:C})}),Cy.left(je.error),i(!1),f()};Cy.invoke(g).then(v)},[e,t]);const h=y.useCallback(async()=>{const g=r?.data.ids[r?.data.length-1],v=new xq({consoleId:t,agentId:e,lastLineId:g||void 0,limit:0,reverse:!0});await Cy.invoke(v),Cy.right(w=>{const C=new en(w.data.values.reverse(),"id");s(_=>_?new Vk({..._,data:_.data.concat(C)}):new Vk({...w,data:C})),u()})},[e,t,r,u]);return Cx(h,n),d.jsxs("div",{className:"flex flex-col flex-1 w-full items-start px-4 py-1 overflow-hidden overflow-y-auto",ref:l,children:[a&&d.jsx(wt,{className:"py-1.5 px-3 justify-self-center"}),!a&&!!r&&r.data.map(g=>d.jsx(W,{className:"whitespace-pre-wrap",mono:!0,children:g.line},g.id))]})},Cy=new ZLe,JIe=({status:e,consoleId:t,name:n,active:r,dropdown:s=[],postfix:a,onClick:i,type:l})=>{const{t:u}=H(),f=()=>{i?.(t)},h=l===Ho.PRIVATE?u("privateConsole","Приватная консоль"):u("publicConsole","Публичная консоль");return d.jsxs("div",{className:Fn("flex max-w-full h-[34px] px-4 items-center cursor-pointer",{"bg-panel":r}),"data-row":!0,children:[d.jsx("div",{className:Fn("w-2 h-2 rounded mr-2.5",{"bg-primary":e!==Vg.CLOSED,"bg-secondary-light":e===Vg.CLOSED}),onClick:f}),d.jsx("div",{className:"flex flex-1 mr-2.5 overflow-x-hidden",onClick:f,children:d.jsxs(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",title:`${h}: ${n}`,children:[l===Ho.PRIVATE?`${u("privateConsolePrefix","[П]")} `:"",n]})}),d.jsx("div",{className:"flex gap-2.5 mr-2.5",children:a}),!!s?.length&&d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,children:d.jsx(Fe,{variant:"ghost",onlyIcon:!0,children:d.jsx(v2,{})})}),d.jsx(sn.Portal,{children:d.jsx(sn.Content,{className:"min-w-[100px]! flex flex-col",side:"bottom",align:"end",children:s.map((g,v)=>d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:g},`${n}-${v}`))})})]})]})},y_=({userGroup:e,hasLink:t=!0,...n})=>d.jsx(ic,{...n,link:t?`/${st.settings}/${st.userGroups}/${e.id}`:void 0,children:d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",title:e.name,children:e.name})}),_ne=({title:e,headerPostfix:t,className:n,bodyPrefix:r,nodes:s,path:a,emptyMessage:i,...l})=>{const{scrollRef:u,scrollToTop:f}=ene();return y.useEffect(()=>{f()},[JSON.stringify(Array.from(s?.keys()||[]))]),d.jsxs(Gu,{className:Fn("flex flex-col h-full",n),children:[d.jsx(Gu.Header,{children:d.jsxs("div",{className:"w-full flex justify-between items-center gap-2.5",children:[d.jsx(W,{className:"cursor-pointer",size:"xl",variant:"strong",children:e}),t||null]})}),d.jsx(Gu.Body,{className:"flex-1 overflow-hidden",children:d.jsxs("div",{className:"flex flex-col h-full gap-2.5 overflow-hidden",children:[r,d.jsx("div",{className:"flex flex-col flex-1 overflow-y-auto",ref:u,children:s?.size?d.jsx(HOe,{...l,nodes:s,path:a}):i})]})})]})},eM=({user:e,hasLink:t=!0,...n})=>d.jsxs(ic,{...n,link:t?`/${st.settings}/${st.users}/${e.id}`:void 0,children:[d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap min-w-[250px]",variant:"strong",title:e.name,children:e.name}),d.jsx("div",{className:"w-[1px] h-4 bg-panel"}),d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",variant:"strong",title:e.login,children:e.login})]}),jne=({clientKey:e,...t})=>d.jsxs(ic,{...t,link:`/${st.settings}/${st.clientKeys}/${e.id}`,children:[d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap min-w-[250px]",variant:"strong",title:e.name,children:e.name}),d.jsx("div",{className:"w-[1px] h-4 bg-panel"}),d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",variant:"strong",title:e.value,children:e.value})]}),ePe=({clientSchema:e,...t})=>d.jsxs(ic,{...t,link:`/${st.settings}/${st.clientSchemas}/${e.id}`,children:[d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap min-w-[250px]",variant:"strong",title:e.name,children:e.name}),d.jsx("div",{className:"w-[1px] h-4 bg-panel"}),d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",variant:"strong",title:e.value,children:e.value})]}),tPe=({clientVersion:e,...t})=>d.jsxs(ic,{...t,link:`/${st.settings}/${st.clientVersions}/${e.id}`,children:[d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap min-w-[250px]",variant:"strong",title:e.name,children:e.name}),d.jsx("div",{className:"w-[1px] h-4 bg-panel"}),d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",variant:"strong",title:e.value,children:e.value})]}),nPe=({clientHandshake:e,...t})=>d.jsxs(ic,{...t,link:`/${st.settings}/${st.clientHandshakes}/${e.id}`,children:[d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap min-w-[250px]",variant:"strong",title:e.name,children:e.name}),d.jsx("div",{className:"w-[1px] h-4 bg-panel"}),d.jsx(W,{className:"overflow-hidden overflow-ellipsis text-nowrap",variant:"strong",title:e.value,children:e.value})]});var Sx=e=>e.type==="checkbox",mh=e=>e instanceof Date,Ta=e=>e==null;const Ene=e=>typeof e=="object";var es=e=>!Ta(e)&&!Array.isArray(e)&&Ene(e)&&!mh(e),$ne=e=>es(e)&&e.target?Sx(e.target)?e.target.checked:e.target.value:e,rPe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Rne=(e,t)=>e.has(rPe(t)),sPe=e=>{const t=e.constructor&&e.constructor.prototype;return es(t)&&t.hasOwnProperty("isPrototypeOf")},tM=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function As(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(tM&&(e instanceof Blob||r))&&(n||es(e)))if(t=n?[]:{},!n&&!sPe(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=As(e[s]));else return e;return t}var x_=e=>/^\w*$/.test(e),Jr=e=>e===void 0,nM=e=>Array.isArray(e)?e.filter(Boolean):[],rM=e=>nM(e.replace(/["|']|\]/g,"").split(/\.|\[/)),it=(e,t,n)=>{if(!t||!es(e))return n;const r=(x_(t)?[t]:rM(t)).reduce((s,a)=>Ta(s)?s:s[a],e);return Jr(r)||r===e?Jr(e[t])?n:e[t]:r},_i=e=>typeof e=="boolean",cr=(e,t,n)=>{let r=-1;const s=x_(t)?[t]:rM(t),a=s.length,i=a-1;for(;++r<a;){const l=s[r];let u=n;if(r!==i){const f=e[l];u=es(f)||Array.isArray(f)?f:isNaN(+s[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const WS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Uo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Iu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},sM=U.createContext(null);sM.displayName="HookFormContext";const dc=()=>U.useContext(sM),wr=e=>{const{children:t,...n}=e;return U.createElement(sM.Provider,{value:n},t)};var One=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(s,a,{get:()=>{const i=a;return t._proxyFormState[i]!==Uo.all&&(t._proxyFormState[i]=!r||Uo.all),n&&(n[i]=!0),e[i]}});return s};const aM=typeof window<"u"?y.useLayoutEffect:y.useEffect;function aPe(e){const t=dc(),{control:n=t.control,disabled:r,name:s,exact:a}=e||{},[i,l]=U.useState(n._formState),u=U.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return aM(()=>n._subscribe({name:s,formState:u.current,exact:a,callback:f=>{!r&&l({...n._formState,...f})}}),[s,r,a]),U.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),U.useMemo(()=>One(i,n,u.current,!1),[i,n])}var Fl=e=>typeof e=="string",Tne=(e,t,n,r,s)=>Fl(e)?(r&&t.watch.add(e),it(n,e,s)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),it(n,a))):(r&&(t.watchAll=!0),n);function _x(e){const t=dc(),{control:n=t.control,name:r,defaultValue:s,disabled:a,exact:i}=e||{},l=U.useRef(s),[u,f]=U.useState(n._getWatch(r,l.current));return aM(()=>n._subscribe({name:r,formState:{values:!0},exact:i,callback:h=>!a&&f(Tne(r,n._names,h.values||n._formValues,!1,l.current))}),[r,n,a,i]),U.useEffect(()=>n._removeUnmounted()),u}function iPe(e){const t=dc(),{name:n,disabled:r,control:s=t.control,shouldUnregister:a}=e,i=Rne(s._names.array,n),l=_x({control:s,name:n,defaultValue:it(s._formValues,n,it(s._defaultValues,n,e.defaultValue)),exact:!0}),u=aPe({control:s,name:n,exact:!0}),f=U.useRef(e),h=U.useRef(s.register(n,{...e.rules,value:l,..._i(e.disabled)?{disabled:e.disabled}:{}})),g=U.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!it(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!it(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!it(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!it(u.validatingFields,n)},error:{enumerable:!0,get:()=>it(u.errors,n)}}),[u,n]),v=U.useCallback(E=>h.current.onChange({target:{value:$ne(E),name:n},type:WS.CHANGE}),[n]),w=U.useCallback(()=>h.current.onBlur({target:{value:it(s._formValues,n),name:n},type:WS.BLUR}),[n,s._formValues]),C=U.useCallback(E=>{const $=it(s._fields,n);$&&E&&($._f.ref={focus:()=>E.focus&&E.focus(),select:()=>E.select&&E.select(),setCustomValidity:O=>E.setCustomValidity(O),reportValidity:()=>E.reportValidity()})},[s._fields,n]),_=U.useMemo(()=>({name:n,value:l,..._i(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:v,onBlur:w,ref:C}),[n,r,u.disabled,v,w,C,l]);return U.useEffect(()=>{const E=s._options.shouldUnregister||a;s.register(n,{...f.current.rules,..._i(f.current.disabled)?{disabled:f.current.disabled}:{}});const $=(O,N)=>{const M=it(s._fields,O);M&&M._f&&(M._f.mount=N)};if($(n,!0),E){const O=As(it(s._options.defaultValues,n));cr(s._defaultValues,n,O),Jr(it(s._formValues,n))&&cr(s._formValues,n,O)}return!i&&s.register(n),()=>{(i?E&&!s._state.action:E)?s.unregister(n):$(n,!1)}},[n,s,i,a]),U.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),U.useMemo(()=>({field:_,formState:u,fieldState:g}),[_,u,g])}const jx=e=>e.render(iPe(e));var oPe=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},i1=e=>Array.isArray(e)?e:[e],bq=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(n=>n!==t)}}),unsubscribe:()=>{e=[]}}},Gk=e=>Ta(e)||!Ene(e);function fd(e,t){if(Gk(e)||Gk(t))return e===t;if(mh(e)&&mh(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const a=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(mh(a)&&mh(i)||es(a)&&es(i)||Array.isArray(a)&&Array.isArray(i)?!fd(a,i):a!==i)return!1}}return!0}var ti=e=>es(e)&&!Object.keys(e).length,iM=e=>e.type==="file",Go=e=>typeof e=="function",QS=e=>{if(!tM)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ane=e=>e.type==="select-multiple",oM=e=>e.type==="radio",lPe=e=>oM(e)||Sx(e),K6=e=>QS(e)&&e.isConnected;function uPe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Jr(e)?r++:e[t[r++]];return e}function cPe(e){for(const t in e)if(e.hasOwnProperty(t)&&!Jr(e[t]))return!1;return!0}function fs(e,t){const n=Array.isArray(t)?t:x_(t)?[t]:rM(t),r=n.length===1?e:uPe(e,n),s=n.length-1,a=n[s];return r&&delete r[a],s!==0&&(es(r)&&ti(r)||Array.isArray(r)&&cPe(r))&&fs(e,n.slice(0,-1)),e}var kne=e=>{for(const t in e)if(Go(e[t]))return!0;return!1};function JS(e,t={}){const n=Array.isArray(e);if(es(e)||n)for(const r in e)Array.isArray(e[r])||es(e[r])&&!kne(e[r])?(t[r]=Array.isArray(e[r])?[]:{},JS(e[r],t[r])):Ta(e[r])||(t[r]=!0);return t}function Nne(e,t,n){const r=Array.isArray(e);if(es(e)||r)for(const s in e)Array.isArray(e[s])||es(e[s])&&!kne(e[s])?Jr(t)||Gk(n[s])?n[s]=Array.isArray(e[s])?JS(e[s],[]):{...JS(e[s])}:Nne(e[s],Ta(t)?{}:t[s],n[s]):n[s]=!fd(e[s],t[s]);return n}var Sy=(e,t)=>Nne(e,t,JS(t));const wq={value:!1,isValid:!1},Cq={value:!0,isValid:!0};var Lne=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Jr(e[0].attributes.value)?Jr(e[0].value)||e[0].value===""?Cq:{value:e[0].value,isValid:!0}:Cq:wq}return wq},Mne=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Jr(e)?e:t?e===""?NaN:e&&+e:n&&Fl(e)?new Date(e):r?r(e):e;const Sq={isValid:!1,value:null};var Ine=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Sq):Sq;function _q(e){const t=e.ref;return iM(t)?t.files:oM(t)?Ine(e.refs).value:Ane(t)?[...t.selectedOptions].map(({value:n})=>n):Sx(t)?Lne(e.refs).value:Mne(Jr(t.value)?e.ref.value:t.value,e)}var dPe=(e,t,n,r)=>{const s={};for(const a of e){const i=it(t,a);i&&cr(s,a,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},e2=e=>e instanceof RegExp,_y=e=>Jr(e)?e:e2(e)?e.source:es(e)?e2(e.value)?e.value.source:e.value:e,jq=e=>({isOnSubmit:!e||e===Uo.onSubmit,isOnBlur:e===Uo.onBlur,isOnChange:e===Uo.onChange,isOnAll:e===Uo.all,isOnTouch:e===Uo.onTouched});const Eq="AsyncFunction";var fPe=e=>!!e&&!!e.validate&&!!(Go(e.validate)&&e.validate.constructor.name===Eq||es(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Eq)),hPe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),$q=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const o1=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const a=it(e,s);if(a){const{_f:i,...l}=a;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r||i.ref&&t(i.ref,i.name)&&!r)return!0;if(o1(l,t))break}else if(es(l)&&o1(l,t))break}}};function Rq(e,t,n){const r=it(e,n);if(r||x_(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const a=s.join("."),i=it(t,a),l=it(e,a);if(i&&!Array.isArray(i)&&n!==a)return{name:n};if(l&&l.type)return{name:a,error:l};if(l&&l.root&&l.root.type)return{name:`${a}.root`,error:l.root};s.pop()}return{name:n}}var pPe=(e,t,n,r)=>{n(e);const{name:s,...a}=e;return ti(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(i=>t[i]===(!r||Uo.all))},mPe=(e,t,n)=>!e||!t||e===t||i1(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),gPe=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,vPe=(e,t)=>!nM(it(e,t)).length&&fs(e,t),yPe=(e,t,n)=>{const r=i1(it(e,n));return cr(r,"root",t[n]),cr(e,n,r),e},iS=e=>Fl(e);function Oq(e,t,n="validate"){if(iS(e)||Array.isArray(e)&&e.every(iS)||_i(e)&&!e)return{type:n,message:iS(e)?e:"",ref:t}}var Am=e=>es(e)&&!e2(e)?e:{value:e,message:""},Tq=async(e,t,n,r,s,a)=>{const{ref:i,refs:l,required:u,maxLength:f,minLength:h,min:g,max:v,pattern:w,validate:C,name:_,valueAsNumber:E,mount:$}=e._f,O=it(n,_);if(!$||t.has(_))return{};const N=l?l[0]:i,M=re=>{s&&N.reportValidity&&(N.setCustomValidity(_i(re)?"":re||""),N.reportValidity())},L={},k=oM(i),T=Sx(i),P=k||T,V=(E||iM(i))&&Jr(i.value)&&Jr(O)||QS(i)&&i.value===""||O===""||Array.isArray(O)&&!O.length,q=oPe.bind(null,_,r,L),K=(re,ee,ue,he=Iu.maxLength,X=Iu.minLength)=>{const pe=re?ee:ue;L[_]={type:re?he:X,message:pe,ref:i,...q(re?he:X,pe)}};if(a?!Array.isArray(O)||!O.length:u&&(!P&&(V||Ta(O))||_i(O)&&!O||T&&!Lne(l).isValid||k&&!Ine(l).isValid)){const{value:re,message:ee}=iS(u)?{value:!!u,message:u}:Am(u);if(re&&(L[_]={type:Iu.required,message:ee,ref:N,...q(Iu.required,ee)},!r))return M(ee),L}if(!V&&(!Ta(g)||!Ta(v))){let re,ee;const ue=Am(v),he=Am(g);if(!Ta(O)&&!isNaN(O)){const X=i.valueAsNumber||O&&+O;Ta(ue.value)||(re=X>ue.value),Ta(he.value)||(ee=X<he.value)}else{const X=i.valueAsDate||new Date(O),pe=Y=>new Date(new Date().toDateString()+" "+Y),xe=i.type=="time",be=i.type=="week";Fl(ue.value)&&O&&(re=xe?pe(O)>pe(ue.value):be?O>ue.value:X>new Date(ue.value)),Fl(he.value)&&O&&(ee=xe?pe(O)<pe(he.value):be?O<he.value:X<new Date(he.value))}if((re||ee)&&(K(!!re,ue.message,he.message,Iu.max,Iu.min),!r))return M(L[_].message),L}if((f||h)&&!V&&(Fl(O)||a&&Array.isArray(O))){const re=Am(f),ee=Am(h),ue=!Ta(re.value)&&O.length>+re.value,he=!Ta(ee.value)&&O.length<+ee.value;if((ue||he)&&(K(ue,re.message,ee.message),!r))return M(L[_].message),L}if(w&&!V&&Fl(O)){const{value:re,message:ee}=Am(w);if(e2(re)&&!O.match(re)&&(L[_]={type:Iu.pattern,message:ee,ref:i,...q(Iu.pattern,ee)},!r))return M(ee),L}if(C){if(Go(C)){const re=await C(O,n),ee=Oq(re,N);if(ee&&(L[_]={...ee,...q(Iu.validate,ee.message)},!r))return M(ee.message),L}else if(es(C)){let re={};for(const ee in C){if(!ti(re)&&!r)break;const ue=Oq(await C[ee](O,n),N,ee);ue&&(re={...ue,...q(ee,ue.message)},M(ue.message),r&&(L[_]=re))}if(!ti(re)&&(L[_]={ref:N,...re},!r))return L}}return M(!0),L};const xPe={mode:Uo.onSubmit,reValidateMode:Uo.onChange,shouldFocusError:!0};function bPe(e={}){let t={...xPe,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Go(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let s=es(t.defaultValues)||es(t.values)?As(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:As(s),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let g={...h};const v={array:bq(),state:bq()},w=t.criteriaMode===Uo.all,C=Z=>oe=>{clearTimeout(f),f=setTimeout(Z,oe)},_=async Z=>{if(!t.disabled&&(h.isValid||g.isValid||Z)){const oe=t.resolver?ti((await T()).errors):await V(r,!0);oe!==n.isValid&&v.state.next({isValid:oe})}},E=(Z,oe)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((Z||Array.from(l.mount)).forEach(me=>{me&&(oe?cr(n.validatingFields,me,oe):fs(n.validatingFields,me))}),v.state.next({validatingFields:n.validatingFields,isValidating:!ti(n.validatingFields)}))},$=(Z,oe=[],me,He,ze=!0,Ke=!0)=>{if(He&&me&&!t.disabled){if(i.action=!0,Ke&&Array.isArray(it(r,Z))){const at=me(it(r,Z),He.argA,He.argB);ze&&cr(r,Z,at)}if(Ke&&Array.isArray(it(n.errors,Z))){const at=me(it(n.errors,Z),He.argA,He.argB);ze&&cr(n.errors,Z,at),vPe(n.errors,Z)}if((h.touchedFields||g.touchedFields)&&Ke&&Array.isArray(it(n.touchedFields,Z))){const at=me(it(n.touchedFields,Z),He.argA,He.argB);ze&&cr(n.touchedFields,Z,at)}(h.dirtyFields||g.dirtyFields)&&(n.dirtyFields=Sy(s,a)),v.state.next({name:Z,isDirty:K(Z,oe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else cr(a,Z,oe)},O=(Z,oe)=>{cr(n.errors,Z,oe),v.state.next({errors:n.errors})},N=Z=>{n.errors=Z,v.state.next({errors:n.errors,isValid:!1})},M=(Z,oe,me,He)=>{const ze=it(r,Z);if(ze){const Ke=it(a,Z,Jr(me)?it(s,Z):me);Jr(Ke)||He&&He.defaultChecked||oe?cr(a,Z,oe?Ke:_q(ze._f)):ue(Z,Ke),i.mount&&_()}},L=(Z,oe,me,He,ze)=>{let Ke=!1,at=!1;const Dt={name:Z};if(!t.disabled){if(!me||He){(h.isDirty||g.isDirty)&&(at=n.isDirty,n.isDirty=Dt.isDirty=K(),Ke=at!==Dt.isDirty);const ht=fd(it(s,Z),oe);at=!!it(n.dirtyFields,Z),ht?fs(n.dirtyFields,Z):cr(n.dirtyFields,Z,!0),Dt.dirtyFields=n.dirtyFields,Ke=Ke||(h.dirtyFields||g.dirtyFields)&&at!==!ht}if(me){const ht=it(n.touchedFields,Z);ht||(cr(n.touchedFields,Z,me),Dt.touchedFields=n.touchedFields,Ke=Ke||(h.touchedFields||g.touchedFields)&&ht!==me)}Ke&&ze&&v.state.next(Dt)}return Ke?Dt:{}},k=(Z,oe,me,He)=>{const ze=it(n.errors,Z),Ke=(h.isValid||g.isValid)&&_i(oe)&&n.isValid!==oe;if(t.delayError&&me?(u=C(()=>O(Z,me)),u(t.delayError)):(clearTimeout(f),u=null,me?cr(n.errors,Z,me):fs(n.errors,Z)),(me?!fd(ze,me):ze)||!ti(He)||Ke){const at={...He,...Ke&&_i(oe)?{isValid:oe}:{},errors:n.errors,name:Z};n={...n,...at},v.state.next(at)}},T=async Z=>{E(Z,!0);const oe=await t.resolver(a,t.context,dPe(Z||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return E(Z),oe},P=async Z=>{const{errors:oe}=await T(Z);if(Z)for(const me of Z){const He=it(oe,me);He?cr(n.errors,me,He):fs(n.errors,me)}else n.errors=oe;return oe},V=async(Z,oe,me={valid:!0})=>{for(const He in Z){const ze=Z[He];if(ze){const{_f:Ke,...at}=ze;if(Ke){const Dt=l.array.has(Ke.name),ht=ze._f&&fPe(ze._f);ht&&h.validatingFields&&E([He],!0);const Jt=await Tq(ze,l.disabled,a,w,t.shouldUseNativeValidation&&!oe,Dt);if(ht&&h.validatingFields&&E([He]),Jt[Ke.name]&&(me.valid=!1,oe))break;!oe&&(it(Jt,Ke.name)?Dt?yPe(n.errors,Jt,Ke.name):cr(n.errors,Ke.name,Jt[Ke.name]):fs(n.errors,Ke.name))}!ti(at)&&await V(at,oe,me)}}return me.valid},q=()=>{for(const Z of l.unMount){const oe=it(r,Z);oe&&(oe._f.refs?oe._f.refs.every(me=>!K6(me)):!K6(oe._f.ref))&&Ye(Z)}l.unMount=new Set},K=(Z,oe)=>!t.disabled&&(Z&&oe&&cr(a,Z,oe),!fd(Y(),s)),re=(Z,oe,me)=>Tne(Z,l,{...i.mount?a:Jr(oe)?s:Fl(Z)?{[Z]:oe}:oe},me,oe),ee=Z=>nM(it(i.mount?a:s,Z,t.shouldUnregister?it(s,Z,[]):[])),ue=(Z,oe,me={})=>{const He=it(r,Z);let ze=oe;if(He){const Ke=He._f;Ke&&(!Ke.disabled&&cr(a,Z,Mne(oe,Ke)),ze=QS(Ke.ref)&&Ta(oe)?"":oe,Ane(Ke.ref)?[...Ke.ref.options].forEach(at=>at.selected=ze.includes(at.value)):Ke.refs?Sx(Ke.ref)?Ke.refs.forEach(at=>{(!at.defaultChecked||!at.disabled)&&(Array.isArray(ze)?at.checked=!!ze.find(Dt=>Dt===at.value):at.checked=ze===at.value||!!ze)}):Ke.refs.forEach(at=>at.checked=at.value===ze):iM(Ke.ref)?Ke.ref.value="":(Ke.ref.value=ze,Ke.ref.type||v.state.next({name:Z,values:As(a)})))}(me.shouldDirty||me.shouldTouch)&&L(Z,ze,me.shouldTouch,me.shouldDirty,!0),me.shouldValidate&&be(Z)},he=(Z,oe,me)=>{for(const He in oe){if(!oe.hasOwnProperty(He))return;const ze=oe[He],Ke=Z+"."+He,at=it(r,Ke);(l.array.has(Z)||es(ze)||at&&!at._f)&&!mh(ze)?he(Ke,ze,me):ue(Ke,ze,me)}},X=(Z,oe,me={})=>{const He=it(r,Z),ze=l.array.has(Z),Ke=As(oe);cr(a,Z,Ke),ze?(v.array.next({name:Z,values:As(a)}),(h.isDirty||h.dirtyFields||g.isDirty||g.dirtyFields)&&me.shouldDirty&&v.state.next({name:Z,dirtyFields:Sy(s,a),isDirty:K(Z,Ke)})):He&&!He._f&&!Ta(Ke)?he(Z,Ke,me):ue(Z,Ke,me),$q(Z,l)&&v.state.next({...n}),v.state.next({name:i.mount?Z:void 0,values:As(a)})},pe=async Z=>{i.mount=!0;const oe=Z.target;let me=oe.name,He=!0;const ze=it(r,me),Ke=ht=>{He=Number.isNaN(ht)||mh(ht)&&isNaN(ht.getTime())||fd(ht,it(a,me,ht))},at=jq(t.mode),Dt=jq(t.reValidateMode);if(ze){let ht,Jt;const jn=oe.type?_q(ze._f):$ne(Z),dr=Z.type===WS.BLUR||Z.type===WS.FOCUS_OUT,fa=!hPe(ze._f)&&!t.resolver&&!it(n.errors,me)&&!ze._f.deps||gPe(dr,it(n.touchedFields,me),n.isSubmitted,Dt,at),cs=$q(me,l,dr);cr(a,me,jn),dr?(ze._f.onBlur&&ze._f.onBlur(Z),u&&u(0)):ze._f.onChange&&ze._f.onChange(Z);const er=L(me,jn,dr),Zn=!ti(er)||cs;if(!dr&&v.state.next({name:me,type:Z.type,values:As(a)}),fa)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?dr&&_():dr||_()),Zn&&v.state.next({name:me,...cs?{}:er});if(!dr&&cs&&v.state.next({...n}),t.resolver){const{errors:Nn}=await T([me]);if(Ke(jn),He){const ha=Rq(n.errors,r,me),ps=Rq(Nn,r,ha.name||me);ht=ps.error,me=ps.name,Jt=ti(Nn)}}else E([me],!0),ht=(await Tq(ze,l.disabled,a,w,t.shouldUseNativeValidation))[me],E([me]),Ke(jn),He&&(ht?Jt=!1:(h.isValid||g.isValid)&&(Jt=await V(r,!0)));He&&(ze._f.deps&&be(ze._f.deps),k(me,Jt,ht,er))}},xe=(Z,oe)=>{if(it(n.errors,oe)&&Z.focus)return Z.focus(),1},be=async(Z,oe={})=>{let me,He;const ze=i1(Z);if(t.resolver){const Ke=await P(Jr(Z)?Z:ze);me=ti(Ke),He=Z?!ze.some(at=>it(Ke,at)):me}else Z?(He=(await Promise.all(ze.map(async Ke=>{const at=it(r,Ke);return await V(at&&at._f?{[Ke]:at}:at)}))).every(Boolean),!(!He&&!n.isValid)&&_()):He=me=await V(r);return v.state.next({...!Fl(Z)||(h.isValid||g.isValid)&&me!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:me}:{},errors:n.errors}),oe.shouldFocus&&!He&&o1(r,xe,Z?ze:l.mount),He},Y=Z=>{const oe={...i.mount?a:s};return Jr(Z)?oe:Fl(Z)?it(oe,Z):Z.map(me=>it(oe,me))},se=(Z,oe)=>({invalid:!!it((oe||n).errors,Z),isDirty:!!it((oe||n).dirtyFields,Z),error:it((oe||n).errors,Z),isValidating:!!it(n.validatingFields,Z),isTouched:!!it((oe||n).touchedFields,Z)}),Oe=Z=>{Z&&i1(Z).forEach(oe=>fs(n.errors,oe)),v.state.next({errors:Z?n.errors:{}})},de=(Z,oe,me)=>{const He=(it(r,Z,{_f:{}})._f||{}).ref,ze=it(n.errors,Z)||{},{ref:Ke,message:at,type:Dt,...ht}=ze;cr(n.errors,Z,{...ht,...oe,ref:He}),v.state.next({name:Z,errors:n.errors,isValid:!1}),me&&me.shouldFocus&&He&&He.focus&&He.focus()},_e=(Z,oe)=>Go(Z)?v.state.subscribe({next:me=>Z(re(void 0,oe),me)}):re(Z,oe,!0),Le=Z=>v.state.subscribe({next:oe=>{mPe(Z.name,oe.name,Z.exact)&&pPe(oe,Z.formState||h,Ge,Z.reRenderRoot)&&Z.callback({values:{...a},...n,...oe})}}).unsubscribe,Re=Z=>(i.mount=!0,g={...g,...Z.formState},Le({...Z,formState:g})),Ye=(Z,oe={})=>{for(const me of Z?i1(Z):l.mount)l.mount.delete(me),l.array.delete(me),oe.keepValue||(fs(r,me),fs(a,me)),!oe.keepError&&fs(n.errors,me),!oe.keepDirty&&fs(n.dirtyFields,me),!oe.keepTouched&&fs(n.touchedFields,me),!oe.keepIsValidating&&fs(n.validatingFields,me),!t.shouldUnregister&&!oe.keepDefaultValue&&fs(s,me);v.state.next({values:As(a)}),v.state.next({...n,...oe.keepDirty?{isDirty:K()}:{}}),!oe.keepIsValid&&_()},Xe=({disabled:Z,name:oe})=>{(_i(Z)&&i.mount||Z||l.disabled.has(oe))&&(Z?l.disabled.add(oe):l.disabled.delete(oe))},Je=(Z,oe={})=>{let me=it(r,Z);const He=_i(oe.disabled)||_i(t.disabled);return cr(r,Z,{...me||{},_f:{...me&&me._f?me._f:{ref:{name:Z}},name:Z,mount:!0,...oe}}),l.mount.add(Z),me?Xe({disabled:_i(oe.disabled)?oe.disabled:t.disabled,name:Z}):M(Z,!0,oe.value),{...He?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:_y(oe.min),max:_y(oe.max),minLength:_y(oe.minLength),maxLength:_y(oe.maxLength),pattern:_y(oe.pattern)}:{},name:Z,onChange:pe,onBlur:pe,ref:ze=>{if(ze){Je(Z,oe),me=it(r,Z);const Ke=Jr(ze.value)&&ze.querySelectorAll&&ze.querySelectorAll("input,select,textarea")[0]||ze,at=lPe(Ke),Dt=me._f.refs||[];if(at?Dt.find(ht=>ht===Ke):Ke===me._f.ref)return;cr(r,Z,{_f:{...me._f,...at?{refs:[...Dt.filter(K6),Ke,...Array.isArray(it(s,Z))?[{}]:[]],ref:{type:Ke.type,name:Z}}:{ref:Ke}}}),M(Z,!1,void 0,Ke)}else me=it(r,Z,{}),me._f&&(me._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(Rne(l.array,Z)&&i.action)&&l.unMount.add(Z)}}},Ot=()=>t.shouldFocusError&&o1(r,xe,l.mount),tn=Z=>{_i(Z)&&(v.state.next({disabled:Z}),o1(r,(oe,me)=>{const He=it(r,me);He&&(oe.disabled=He._f.disabled||Z,Array.isArray(He._f.refs)&&He._f.refs.forEach(ze=>{ze.disabled=He._f.disabled||Z}))},0,!1))},an=(Z,oe)=>async me=>{let He;me&&(me.preventDefault&&me.preventDefault(),me.persist&&me.persist());let ze=As(a);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Ke,values:at}=await T();n.errors=Ke,ze=at}else await V(r);if(l.disabled.size)for(const Ke of l.disabled)cr(ze,Ke,void 0);if(fs(n.errors,"root"),ti(n.errors)){v.state.next({errors:{}});try{await Z(ze,me)}catch(Ke){He=Ke}}else oe&&await oe({...n.errors},me),Ot(),setTimeout(Ot);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ti(n.errors)&&!He,submitCount:n.submitCount+1,errors:n.errors}),He)throw He},Pt=(Z,oe={})=>{it(r,Z)&&(Jr(oe.defaultValue)?X(Z,As(it(s,Z))):(X(Z,oe.defaultValue),cr(s,Z,As(oe.defaultValue))),oe.keepTouched||fs(n.touchedFields,Z),oe.keepDirty||(fs(n.dirtyFields,Z),n.isDirty=oe.defaultValue?K(Z,As(it(s,Z))):K()),oe.keepError||(fs(n.errors,Z),h.isValid&&_()),v.state.next({...n}))},Wt=(Z,oe={})=>{const me=Z?As(Z):s,He=As(me),ze=ti(Z),Ke=ze?s:He;if(oe.keepDefaultValues||(s=me),!oe.keepValues){if(oe.keepDirtyValues){const at=new Set([...l.mount,...Object.keys(Sy(s,a))]);for(const Dt of Array.from(at))it(n.dirtyFields,Dt)?cr(Ke,Dt,it(a,Dt)):X(Dt,it(Ke,Dt))}else{if(tM&&Jr(Z))for(const at of l.mount){const Dt=it(r,at);if(Dt&&Dt._f){const ht=Array.isArray(Dt._f.refs)?Dt._f.refs[0]:Dt._f.ref;if(QS(ht)){const Jt=ht.closest("form");if(Jt){Jt.reset();break}}}}for(const at of l.mount)X(at,it(Ke,at))}a=As(Ke),v.array.next({values:{...Ke}}),v.state.next({values:{...Ke}})}l={mount:oe.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!h.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues,i.watch=!!t.shouldUnregister,v.state.next({submitCount:oe.keepSubmitCount?n.submitCount:0,isDirty:ze?!1:oe.keepDirty?n.isDirty:!!(oe.keepDefaultValues&&!fd(Z,s)),isSubmitted:oe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ze?{}:oe.keepDirtyValues?oe.keepDefaultValues&&a?Sy(s,a):n.dirtyFields:oe.keepDefaultValues&&Z?Sy(s,Z):oe.keepDirty?n.dirtyFields:{},touchedFields:oe.keepTouched?n.touchedFields:{},errors:oe.keepErrors?n.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Lt=(Z,oe)=>Wt(Go(Z)?Z(a):Z,oe),Ln=(Z,oe={})=>{const me=it(r,Z),He=me&&me._f;if(He){const ze=He.refs?He.refs[0]:He.ref;ze.focus&&(ze.focus(),oe.shouldSelect&&Go(ze.select)&&ze.select())}},Ge=Z=>{n={...n,...Z}},dt={control:{register:Je,unregister:Ye,getFieldState:se,handleSubmit:an,setError:de,_subscribe:Le,_runSchema:T,_focusError:Ot,_getWatch:re,_getDirty:K,_setValid:_,_setFieldArray:$,_setDisabledField:Xe,_setErrors:N,_getFieldArray:ee,_reset:Wt,_resetDefaultValues:()=>Go(t.defaultValues)&&t.defaultValues().then(Z=>{Lt(Z,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:q,_disableForm:tn,_subjects:v,_proxyFormState:h,get _fields(){return r},get _formValues(){return a},get _state(){return i},set _state(Z){i=Z},get _defaultValues(){return s},get _names(){return l},set _names(Z){l=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:Re,trigger:be,register:Je,handleSubmit:an,watch:_e,setValue:X,getValues:Y,reset:Lt,resetField:Pt,clearErrors:Oe,unregister:Ye,setError:de,setFocus:Ln,getFieldState:se};return{...dt,formControl:dt}}function Cr(e={}){const t=U.useRef(void 0),n=U.useRef(void 0),[r,s]=U.useState({isDirty:!1,isValidating:!1,isLoading:Go(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Go(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Go(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=bPe(e);t.current={...l,formState:r}}const a=t.current.control;return a._options=e,aM(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>s({...a._formState}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),a._formState.isReady=!0,i},[a]),U.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),U.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),U.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),U.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),U.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==r.isDirty&&a._subjects.state.next({isDirty:i})}},[a,r.isDirty]),U.useEffect(()=>{e.values&&!fd(e.values,n.current)?(a._reset(e.values,a._options.resetOptions),n.current=e.values,s(i=>({...i}))):a._resetDefaultValues()},[a,e.values]),U.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=One(r,a),t.current}const Ue=({showError:e=!0,wrapperClassName:t,...n})=>{const{control:r}=dc();return d.jsx(jx,{control:r,name:n.name,defaultValue:!1,render:({field:s,fieldState:a})=>{const i=(l,u)=>{s.onChange(l,u)};return d.jsxs("div",{className:We("flex flex-col gap-1",t),children:[d.jsx(si,{...s,...n,onChange:i,checked:s.value}),a.error&&e?d.jsx(W,{color:"red",children:a.error.message}):null]})}})},pt=({onChange:e,...t})=>{const{control:n}=dc();return d.jsx(jx,{control:n,name:t.name??"",render:({field:r,fieldState:s})=>d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(X2,{...r,...t,onChange:a=>{r.onChange(a),e?.(a)}}),s.error?d.jsx(W,{color:"red",children:s.error.message}):null]})})},ao=({multiple:e,name:t,onBlur:n,onChange:r,...s})=>{const{control:a,trigger:i,setValue:l,getValues:u}=dc();return d.jsx(jx,{control:a,name:t,render:({fieldState:f})=>{const h=v=>{t&&i(t),n?.(v)},g=(v,w)=>{t&&l(t,v),r?.(v,w)};return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(cv,{...s,value:u(t),name:t,multiple:e,onBlur:h,onChange:g}),f.error?d.jsx(W,{color:"red",children:f.error.message}):null]})}})},b_=e=>{const{control:t}=dc();return d.jsx(jx,{control:t,name:e.name??"",render:({field:n,fieldState:r})=>d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(ete,{...n,...e}),r.error?d.jsx(W,{color:"red",children:r.error.message}):null]})})},Pne=({rights:e})=>{const{t}=H(),{setValue:n,control:r}=dc(),s=_x({name:"write",control:r});return y.useEffect(()=>{s&&n("read",!0)},[s,n]),d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"admin",label:t("consoleRights.admin","Права администратора консоли"),disabled:e?.admin===void 0}),d.jsx(Ue,{name:"open",label:t("consoleRights.open","Открытие консоли агента"),disabled:e?.open===void 0}),d.jsx(Ue,{name:"close",label:t("consoleRights.close","Закрытие консоли агента"),disabled:e?.close===void 0}),d.jsx(Ue,{name:"delete",label:t("consoleRights.delete","Удаление консоли агента"),disabled:e?.delete===void 0}),d.jsx(Ue,{name:"lock",label:t("consoleRights.lock",'Установка "Lock" на консоль агента'),disabled:e?.lock===void 0}),d.jsx(Ue,{name:"unlock",label:t("consoleRights.unlock",'Снятие чужого "Lock" с консоли агента'),disabled:e?.unlock===void 0}),d.jsx(Ue,{name:"read",label:t("consoleRights.read","Получение информации о консоли (чтение вывода, базовой информации и т.д.)"),disabled:e?.read===void 0||s}),d.jsx(Ue,{name:"write",label:t("consoleRights.write","Ввод команд в консоль агента"),disabled:e?.write===void 0}),d.jsx(Ue,{name:"pin",label:t("consoleRights.pin","Прикрепление консоли агента к сессии"),disabled:e?.pin===void 0})]})},wPe=({schedule:e})=>{const{t}=H(),n=ane(),r=rq(e.time.start),s=rq(e.time.end);return d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"flex gap-1",children:Ste.map(a=>d.jsx(pv,{label:n[a],color:e.days[a]?"success":"info"},a))}),d.jsx(bt,{label:t("workHours","Рабочие часы"),value:`${r} - ${s} (UTC)`})]})},CPe=()=>{const{t:e}=H();return y.useMemo(()=>[{accessorKey:"mode",header:e("fields.mode","Режим"),cell:({cell:n})=>{const r=n.getValue();return d.jsx(W,{variant:"strong",children:r===Bu.OPEN?e("isOpen","Открыто"):e("listen","Прослушивание")})}},{accessorKey:"active",header:e("isActive","Активен"),cell:({cell:n})=>{const r=n.getValue();return d.jsx(W,{variant:"strong",children:r?e("yes","Да"):e("no","Нет")})}},{accessorKey:"host",header:e("fields.host","Хост")},{accessorKey:"port",header:rn(e("entities.port.nominative","Порт"))},{accessorKey:"remoteHost",header:e("fields.remoteHost","Удаленный хост")},{accessorKey:"remotePort",header:e("fields.remotePort","Удаленный порт")},{accessorKey:"serverPort",header:e("fields.serverPort","Порт сервера")},{accessorKey:"note",header:e("fields.note","Примечание"),cell:({cell:n})=>{const r=n.getValue();return d.jsx(W,{variant:"strong",className:"overflow-x-hidden overflow-ellipsis whitespace-nowrap",title:r,children:r})}}],[e])},SPe="Port",Dne=({...e})=>{const t=CPe();return d.jsx("div",{className:"contents [&_>_div]:contents",children:d.jsx(pL,{rowKey:"id",columns:t,className:"w-full",resizerOnHeaderOnly:!0,wrapperClassName:"contents",...e})})};$L(Dne,SPe);const _Pe=e=>d.jsx("div",{...e.innerProps,className:Fn(e.getClassNames("option",e),"!cursor-pointer"),style:{...e.getStyles("option",e)},children:d.jsx(pv,{label:e.children,customBackground:e.data.color,size:"small"})}),Vne=({styles:e,...t})=>{const n=y.useMemo(()=>({Option:_Pe}),[]);return d.jsx(cv,{valueProperty:"id",labelProperty:"name",components:n,multiple:!0,styles:{...e||{},multiValue:(r,{data:s})=>({backgroundColor:s.color}),multiValueRemove:(r,{data:s})=>({backgroundColor:s.color,":hover":{backgroundColor:s.color,opacity:"0.8"}})},...t})},jPe=e=>{const[t,n]=y.useState(null),[r,s]=y.useState(!1),a=y.useCallback(async()=>{s(!0);const i=new bne({filter:e});await Y6.invoke(i),Y6.right(n),Y6.left(je.error),s(!1)},[JSON.stringify(e)]);return y.useEffect(()=>{a()},[a]),{loadTags:a,isLoading:r,tagList:t,setTagList:n}},Y6=new Ute,Bne=y.createContext(null),Fne=()=>{const{t:e}=H(),t=y.useContext(Bne);if(t===null)throw new Error(e("errors.context",{name:"TagEditor",defaultValue:"Используется вне контекста TagEditor"}));return t},EPe=({onClick:e,...t})=>{const{setIsOpen:n}=Fne(),r=s=>{n(!0),e?.(s)};return d.jsx(Fe,{onClick:r,variant:"secondary",onlyIcon:!0,...t,children:d.jsx(PZ,{})})},$Pe=({projectList:e,agentGroupList:t,tagList:n,isLoadingProjectList:r,isLoadingAgentGroupList:s,isLoadingTagList:a,filter:i,loadAgentGroups:l,...u})=>{const{t:f}=H(),[h,g]=br(),{isOpen:v,setIsOpen:w}=Fne(),[C,_]=y.useState({});y.useEffect(()=>{C?.projectId&&l?.({projectId:C?.projectId})},[l,C?.projectId]);const E=y.useCallback(M=>L=>{_(k=>{const T={...k,[M]:L};return M==="projectId"?{...T,agentGroupIds:[]}:T})},[]),$=y.useCallback(()=>{_({projectId:i?.projectIds?.[0],agentGroupIds:i?.agentGroupIds??[],tagIds:i?.tagIds??[]})},[JSON.stringify(i)]);y.useEffect(()=>{$()},[$]);const O=()=>{h.delete(vt.projectIds),h.delete(vt.agentGroupIds),h.delete(vt.tagIds),C.projectId&&h.set(vt.projectIds,C.projectId),C.agentGroupIds?.length&&C.agentGroupIds.forEach(M=>{h.append(vt.agentGroupIds,M)}),C.tagIds?.length&&C.tagIds.forEach(M=>{h.append(vt.tagIds,M)}),g(h),w(!1)},N=()=>{w(!1),$()};return d.jsxs(Ms,{isOpen:v,onClose:N,...u,children:[d.jsx(Ms.Header,{children:f("modal.title.filters","Фильтры")}),d.jsxs(Ms.Body,{className:"flex-1",children:[d.jsx(Cne,{label:rn(f("entities.project.nominative","Проект")),value:C.projectId,options:e?.length?e?.values:[],onChange:E("projectId"),styles:ca,isLoading:r}),d.jsx(zIe,{label:rn(f("entities.groups.nominative","Группы")),value:C.agentGroupIds,options:t?.length?t?.values:[],onChange:E("agentGroupIds"),styles:ca,isLoading:s,isDisabled:!C.projectId}),d.jsx(Vne,{label:rn(f("entities.tags.nominative","Теги")),value:C.tagIds,options:n?.length?n?.values:[],onChange:E("tagIds"),styles:ca,isLoading:a})]}),d.jsxs(Ms.Footer,{children:[d.jsx(Fe,{variant:"text",onClick:N,children:f("cancel","Отменить")}),d.jsx(Fe,{onClick:O,children:f("apply","Применить")})]})]})},Aq={Drawer:$Pe,Button:EPe},RPe=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(Bne.Provider,{value:r,children:e})},OPe=({isOpen:e,onClose:t,onSave:n,agent:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),u=y.useMemo(()=>({...r}),[r]),f=Cr({defaultValues:u});y.useEffect(()=>{f.reset(u)},[u,f]);const h=async v=>{l(!0);const w=new S7e({id:v.id,name:v.name,shortNote:v.shortNote});await Z6.invoke(w),Z6.right(n),Z6.left(je.error),l(!1),t?.()},g=v=>{f.reset(u),t?.(v)};return d.jsx(wr,{...f,children:d.jsx("form",{onSubmit:f.handleSubmit(h),children:d.jsxs(ne,{isOpen:e,onClose:g,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.edit","Редактирование")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:a("fields.title","Название"),placeholder:a("placeholders.inputEntity",{defaultValue:"Введите название",entity:a("fields.title","Название").toLowerCase()}),name:"name",inputClassName:"w-full"}),d.jsx(b_,{label:a("fields.description","Описание"),placeholder:a("placeholders.inputText","Введите текст"),name:"shortNote",inputClassName:"w-full"})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:g}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},Z6=new RLe,Une=y.createContext(null),Gne=()=>{const{t:e}=H(),t=y.useContext(Une);if(t===null)throw new Error(e("errors.context",{name:"UpdateAgentSchedule",defaultValue:"Используется вне контекста UpdateAgentSchedule"}));return t},TPe=({onClick:e,schedule:t,...n})=>{const{setSchedule:r}=Gne(),s=a=>{r(t),e?.(a)};return d.jsx(Fe,{onClick:s,variant:"text",onlyIcon:!0,...n,children:d.jsx(F8,{})})},X6={days:{monday:!1,tuesday:!1,wednesday:!1,thursday:!1,friday:!1,saturday:!1,sunday:!1},time:{start:{hour:9,minute:0},end:{hour:18,minute:0}}},APe=et({days:et({monday:we(),tuesday:we(),wednesday:we(),thursday:we(),friday:we(),saturday:we(),sunday:we()}),time:et({start:et({hour:ut(),minute:ut()}),end:et({hour:ut(),minute:ut()})})});var kPe=e=>e instanceof Date,zne=e=>e==null;const NPe=e=>typeof e=="object";var Hne=e=>!zne(e)&&!Array.isArray(e)&&NPe(e)&&!kPe(e),qne=e=>/^\w*$/.test(e),kq=e=>e===void 0,LPe=e=>Array.isArray(e)?e.filter(Boolean):[],Kne=e=>LPe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),zk=(e,t,n)=>{if(!t||!Hne(e))return n;const r=(qne(t)?[t]:Kne(t)).reduce((s,a)=>zne(s)?s:s[a],e);return kq(r)||r===e?kq(e[t])?n:e[t]:r},W6=(e,t,n)=>{let r=-1;const s=qne(t)?[t]:Kne(t),a=s.length,i=a-1;for(;++r<a;){const l=s[r];let u=n;if(r!==i){const f=e[l];u=Hne(f)||Array.isArray(f)?f:isNaN(+s[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const MPe=U.createContext(null);MPe.displayName="HookFormContext";typeof window<"u"?U.useLayoutEffect:U.useEffect;var Yne=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{};const Nq=(e,t,n)=>{if(e&&"reportValidity"in e){const r=zk(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Hk=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Nq(r.ref,n,e):r&&r.refs&&r.refs.forEach(s=>Nq(s,n,e))}},Lq=(e,t)=>{t.shouldUseNativeValidation&&Hk(e,t);const n={};for(const r in e){const s=zk(t.fields,r),a=Object.assign(e[r]||{},{ref:s&&s.ref});if(IPe(t.names||Object.keys(e),r)){const i=Object.assign({},zk(n,r));W6(i,"root",a),W6(n,r,i)}else W6(n,r,a)}return n},IPe=(e,t)=>{const n=Mq(t);return e.some(r=>Mq(r).match(`^${n}\\.\\d+`))};function Mq(e){return e.replace(/\]|\[/g,"")}function Zne(e,t,n){function r(l,u){var f;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(f=l._zod).traits??(f.traits=new Set),l._zod.traits.add(e),t(l,u);for(const h in i.prototype)h in l||Object.defineProperty(l,h,{value:i.prototype[h].bind(l)});l._zod.constr=i,l._zod.def=u}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function i(l){var u;const f=n?.Parent?new a:this;r(f,l),(u=f._zod).deferred??(u.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class PPe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const DPe={};function Xne(e){return DPe}function VPe(e,t){return typeof t=="bigint"?t.toString():t}const Wne=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function bC(e){return typeof e=="string"?e:e?.message}function Qne(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=bC(e.inst?._zod.def?.error?.(e))??bC(t?.error?.(e))??bC(n.customError?.(e))??bC(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}const Jne=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,VPe,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},BPe=Zne("$ZodError",Jne),ere=Zne("$ZodError",Jne,{Parent:Error}),FPe=e=>(t,n,r,s)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new PPe;if(i.issues.length){const l=new(s?.Err??e)(i.issues.map(u=>Qne(u,a,Xne())));throw Wne(l,s?.callee),l}return i.value},UPe=FPe(ere),GPe=e=>async(t,n,r,s)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(s?.Err??e)(i.issues.map(u=>Qne(u,a,Xne())));throw Wne(l,s?.callee),l}return i.value},zPe=GPe(ere);function Iq(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function HPe(e,t){for(var n={};e.length;){var r=e[0],s=r.code,a=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[i]={message:l.message,type:l.code}}else n[i]={message:a,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(h){return h.errors.forEach(function(g){return e.push(g)})}),t){var u=n[i].types,f=u&&u[r.code];n[i]=Yne(i,t,n,s,f?[].concat(f,r.message):r.message)}e.shift()}return n}function qPe(e,t){for(var n={};e.length;){var r=e[0],s=r.code,a=r.message,i=r.path.join(".");if(!n[i])if(r.code==="invalid_union"&&r.errors.length>0){var l=r.errors[0][0];n[i]={message:l.message,type:l.code}}else n[i]={message:a,type:s};if(r.code==="invalid_union"&&r.errors.forEach(function(h){return h.forEach(function(g){return e.push(g)})}),t){var u=n[i].types,f=u&&u[r.code];n[i]=Yne(i,t,n,s,f?[].concat(f,r.message):r.message)}e.shift()}return n}function hs(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,s,a){try{return Promise.resolve(Iq(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return a.shouldUseNativeValidation&&Hk({},a),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(l){return Array.isArray(l?.issues)})(i))return{values:{},errors:Lq(HPe(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,s,a){try{return Promise.resolve(Iq(function(){return Promise.resolve((n.mode==="sync"?UPe:zPe)(e,r,t)).then(function(i){return a.shouldUseNativeValidation&&Hk({},a),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(l){return l instanceof BPe})(i))return{values:{},errors:Lq(qPe(i.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const KPe=({name:e,control:t,label:n})=>d.jsx(jx,{name:e,control:t,render:({field:{onChange:r,value:s}})=>d.jsx(pv,{label:n,color:s?"success":"default",onClick:()=>r(!s)})}),Pq=Array(24).fill(null).map((e,t)=>({id:t,name:KS(t)})),Q6=5,Dq=Array(60/Q6).fill(null).map((e,t)=>({id:t*Q6,name:KS(t*Q6)})),YPe=({onSuccess:e,onClose:t,agentId:n,...r})=>{const{t:s}=H(),a=ane(),[i,l]=y.useState(!1),{schedule:u,setSchedule:f}=Gne(),h=y.useMemo(()=>u?.work?{days:{...u.work.days},time:{start:{...u.work.time.start},end:{...u.work.time.end}}}:X6,[u]),g=Cr({resolver:hs(APe),defaultValues:h,mode:"onBlur"});y.useEffect(()=>{g.reset(h)},[h,g]);const v=async C=>{if(!u||!n)return;l(!0);const _=new PIe({agentId:n,schedule:{...u,work:C}});await J6.setSchedule(_),J6.right(E=>{e?.(E)}),J6.left(je.error),g.reset(X6),l(!1),f(null)},w=C=>{f(null),g.reset(X6),t?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:!!u,onClose:w,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("workSchedule","Рабочий график")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsxs("div",{className:"flex flex-col gap-0.5",children:[d.jsx(W,{variant:"strong",children:s("workDays","Рабочие дни")}),d.jsx("div",{className:"flex gap-1",children:Ste.map(C=>d.jsx(KPe,{name:`days.${C}`,label:a[C],control:g.control}))})]}),d.jsxs("div",{className:"flex flex-col gap-0.5",children:[d.jsxs(W,{variant:"strong",children:[s("workTime","Рабочее время")," (UTC)"]}),d.jsxs("div",{className:"flex flex-1 gap-2.5 items-end [&>*]:w-1/4",children:[d.jsx(ao,{label:s("start","Начало"),name:"time.start.hour",labelProperty:"name",valueProperty:"id",options:Pq,dropdownClassName:"!z-[101]",styles:ca,required:!0}),d.jsx(ao,{name:"time.start.minute",labelProperty:"name",valueProperty:"id",options:Dq,dropdownClassName:"!z-[101]",styles:ca,required:!0}),d.jsx(ao,{label:s("end","Конец"),name:"time.end.hour",labelProperty:"name",valueProperty:"id",options:Pq,dropdownClassName:"!z-[101]",styles:ca,required:!0}),d.jsx(ao,{name:"time.end.minute",labelProperty:"name",valueProperty:"id",options:Dq,dropdownClassName:"!z-[101]",styles:ca,required:!0})]})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:w}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},J6=new Ite,Vq={Modal:YPe,Button:TPe},ZPe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({schedule:t,setSchedule:n}),[t]);return d.jsx(Une.Provider,{value:r,children:e})},tre=y.createContext(null),nre=()=>{const{t:e}=H(),t=y.useContext(tre);if(t===null)throw new Error(e("errors.context",{name:"CreateConsole",defaultValue:"Используется вне контекста CreateConsole"}));return t},XPe=({onClick:e,...t})=>{const{t:n}=H(),{setIsOpen:r}=nre(),s=a=>{r(!0),e?.(a)};return d.jsx(Fe,{onClick:s,variant:"secondary",...t,children:n("modal.title.newConsole","Новая консоль")})},WPe=Rt(XPe,{rightKeys:["agentConsoleNew"]}),eO={name:"",tag:"",tokenId:""},QPe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>et({name:te({required_error:t.required}).nonempty(t.required).max(120,e("errors.maxCharNumber",{maxValue:120,defaultValue:"Максимум 120 символов"})),tag:te().max(120,e("errors.maxCharNumber",{maxValue:120,defaultValue:"Максимум 120 символов"})).optional(),tokenId:te().optional()}),[e,t])},JPe=({agentId:e,onSuccess:t,onClose:n,tokenOptions:r,...s})=>{const{t:a}=H(),i=QPe(),[l,u]=y.useState(!1),{isOpen:f,setIsOpen:h}=nre(),g=Cr({resolver:hs(i),defaultValues:eO,mode:"onBlur"}),v=async C=>{u(!0);const _=new j7e({agentId:e,name:C.name,consoleTag:C.tag,tokenId:C.tokenId});await tO.create(_),tO.right(E=>{t?.(E)}),tO.left(je.error),g.reset(eO),u(!1),h(!1)},w=C=>{h(!1),g.reset(eO),n?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:f,onClose:w,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.newConsole","Новая консоль")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:a("fields.title","Название"),placeholder:a("placeholders.inputEntity",{defaultValue:"Введите название",entity:a("fields.title","Название").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:rn(a("entities.tag.nominative","Тег")),placeholder:a("placeholders.inputEntity",{defaultValue:"Введите тег",entity:a("entities.tag.nominative","тег")}),name:"tag",inputClassName:"w-full",autoComplete:"off"}),d.jsx(ao,{labelProperty:"id",valueProperty:"id",placeholder:a("placeholders.selectToken","Выбрать токен"),label:a("fields.session","Сессия"),styles:ca,dropdownClassName:"!z-[101]",name:"tokenId",options:r})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:w}),d.jsx(us,{isLoading:l,disabled:l})]})]})})})},tO=new hv,Bq={Modal:JPe,Button:WPe},eDe=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(tre.Provider,{value:r,children:e})},rre=y.createContext(null),sre=()=>{const{t:e}=H(),t=y.useContext(rre);if(t===null)throw new Error(e("errors.context",{name:"DeleteConsole",defaultValue:"Используется вне контекста DeleteConsole"}));return t},tDe=({consoleId:e,onClick:t,...n})=>{const{t:r}=H(),{setConsoleId:s}=sre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},nDe=({agentId:e,onSuccess:t,onClose:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),{consoleId:l,setConsoleId:u}=sre(),[f,h]=br(),g=async()=>{if(i(!0),l!==null){const w=new XL({agentId:e,consoleId:l});await nO.delete(w),nO.right(()=>{f.delete(vt.consoleId),h(f),t(l)}),nO.left(je.error)}i(!1),u(null)},v=()=>{u(null),n?.()};return d.jsxs(ne,{isOpen:!!l,onClose:v,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.deleteEntity",{defaultValue:"Удаление консоли",entity:s("entities.console.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:s("modal.deleteMessage.console","Вы собираетесь удалить консоль. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этой консолью.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:v}),d.jsx(Fs,{isLoading:a,disabled:a,onClick:g})]})]})},nO=new hv,Fq={Modal:nDe,Button:tDe},rDe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({consoleId:t,setConsoleId:n}),[t]);return d.jsx(rre.Provider,{value:r,children:e})},sDe=({agentId:e,status:t,consoleId:n,onClick:r,onSuccess:s,rights:a,...i})=>{const{t:l}=H(),[u,f]=br(),h=!!a?.open,g=!!a?.close,v=async w=>{const C=t!==Vg.CLOSED;if(C&&!g||!C&&!h)return je.warn(C?l("errors.closeRights","У вас нет прав на закрытие консоли"):l("errors.openRights","У вас нет прав на открытие консоли"));const _=new XL({agentId:e,consoleId:n});C?await wC.close(_):await wC.open(_),wC.right(E=>{E.tokenId&&(u.set(vt.tokenId,E.tokenId),f(u)),s?.(E)}),wC.left(je.error),r?.(w)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:v,...i,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:t===Vg.CLOSED?l("open","Открыть"):l("close","Закрыть")})})},wC=new hv,are=y.createContext(null),ire=()=>{const{t:e}=H(),t=y.useContext(are);if(t===null)throw new Error(e("errors.context",{name:"PinTokenToConsole",defaultValue:"Используется вне контекста PinTokenToConsole"}));return t},aDe=({console:e,onClick:t,...n})=>{const{t:r}=H(),{setConsole:s}=ire(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:r("fields.session","Сессия")})})},iDe=({agentId:e,tokenOptions:t,onClose:n,onSuccess:r,...s})=>{const{t:a}=H(),{console:i,setConsole:l}=ire(),[u,f]=br(),[h,g]=y.useState(!1),v={tokenId:i?.tokenId||""},w=Cr({defaultValues:v}),C=async E=>{if(!i)return;g(!0);const $=new $7e({agentId:e,consoleId:i.id,tokenId:E.tokenId});await rO.pinToken($),rO.right(O=>{O.tokenId&&(u.set(vt.tokenId,O.tokenId),f(u)),r?.(O)}),rO.left(je.error),w.reset(v),g(!1),l(null)},_=()=>{l(null),w.reset(v),n?.()};return d.jsx(wr,{...w,children:d.jsx("form",{onSubmit:w.handleSubmit(C),children:d.jsxs(ne,{isOpen:!!i,onClose:_,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.pinSession","Прикрепить сессию")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(ao,{labelProperty:"id",valueProperty:"id",placeholder:a("placeholders.selectToken","Выбрать токен"),label:a("fields.session","Сессия"),styles:ca,dropdownClassName:"!z-[101]",name:"tokenId",options:t,required:!0,clearable:!0})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:h,onClick:_}),d.jsx(us,{isLoading:h,disabled:h})]})]})})})},rO=new hv,Uq={Modal:iDe,Button:aDe},oDe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({console:t,setConsole:n}),[t]);return d.jsx(are.Provider,{value:r,children:e})},lDe=({onChange:e,...t})=>{const{t:n}=H(),[r,s]=br(),a=r.get(vt.tokenId),i=(l,u)=>{l?r.set(vt.tokenId,l):r.delete(vt.tokenId),s(r),e?.(l,u)};return d.jsx(cv,{label:n("fields.session","Сессия"),value:a||void 0,onChange:i,valueProperty:"id",labelProperty:"name",clearable:!0,...t})},uDe=({agentId:e,consoleId:t,lockerId:n,onClick:r,onSuccess:s,rights:a,...i})=>{const{t:l}=H(),[u,f]=y.useState(!1),[h,g]=br(),v=!!a?.lock,w=!!a?.unlock,C=async _=>{if(n&&!w||!n&&!v)return je.warn(n?l("errors.unlockRights","У вас нет прав на снятие блокировки консоли"):l("errors.lockRights","У вас нет прав на блокировку консоли"));f(!0);const E=new XL({agentId:e,consoleId:t});n?await CC.unlock(E):await CC.lock(E),CC.right($=>{$.tokenId&&(h.set(vt.tokenId,$.tokenId),g(h)),s?.($)}),CC.left(je.error),f(!1),r?.(_)};return u?d.jsx(ho,{size:"small"}):d.jsx(Fe,{onlyIcon:!0,variant:"ghost",className:Fn({"!text-primary":n}),title:n?l("unlock","Разблокировать"):l("lock","Заблокировать"),onClick:C,...i,children:n?d.jsx(Vfe,{}):d.jsx(Bfe,{})})},CC=new hv,ore="5",cDe=()=>{const{t:e}=H();return y.useMemo(()=>[{id:"1",name:e("consoleInterval",{count:1,defaultValue:"1 секунда"})},{id:"3",name:e("consoleInterval",{count:3,defaultValue:"3 секунды"})},{id:ore,name:e("consoleInterval",{count:5,defaultValue:"5 секунд"})},{id:"8",name:e("consoleInterval",{count:8,defaultValue:"8 секунд"})},{id:"10",name:e("consoleInterval",{count:10,defaultValue:"10 секунд"})},{id:"15",name:e("consoleInterval",{count:15,defaultValue:"15 секунд"})}],[e])},dDe=({onChange:e,searchParams:t,setSearchParams:n,...r})=>{const{t:s}=H(),a=cDe(),i=t.get(vt.interval),l=(u,f)=>{t.set(vt.interval,u),n(t),e?.(u,f)};return y.useEffect(()=>{i===null&&(t.set(vt.interval,ore),n(t))},[t]),d.jsx(cv,{className:"bg-panel rounded-xs",label:s("refreshRate","Частота обновления"),valueProperty:"id",labelProperty:"name",value:i||void 0,options:a,onChange:l,...r})},lre=y.createContext(null),lM=()=>{const{t:e}=H(),t=y.useContext(lre);if(t===null)throw new Error(e("errors.context",{name:"UpsertProject",defaultValue:"Используется вне контекста UpsertProject"}));return t},ure=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,project:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(lre.Provider,{value:i,children:e})},fDe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{onOpen:s}=lM(),a=i=>{s(null),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,size:t,variant:"dashed",...n,children:[d.jsx(Ma,{})," ",r("modal.title.addEntity",{defaultValue:"Добавить проект",entity:r("entities.project.accusative")})]})},hDe=Rt(fDe,{permissionKey:ir.allowAddProject}),pDe=({onClick:e,project:t,variant:n="secondary",label:r,...s})=>{const{t:a}=H(),{onOpen:i}=lM(),l=u=>{i(t),e?.(u)};return d.jsx(Fe,{onClick:l,variant:n,...s,children:r||a("rename","Переименовать")})},mDe=Rt(pDe,{permissionKey:ir.allowUpdateProject}),sO={name:""},gDe=()=>{const e=Bs(),{t}=H();return y.useMemo(()=>et({name:te({required_error:e.required}).nonempty(e.required).max(120,t("errors.maxCharNumber",{maxValue:120,defaultValue:"Максимум {{maxValue}} символов"}))}),[t,e])},vDe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),s=gDe(),[a,i]=y.useState(!1),{isOpen:l,setIsOpen:u,project:f}=lM(),{updateRights:h}=Uh(),g=y.useMemo(()=>f?.id?{name:f.name}:sO,[f]),v=Cr({resolver:hs(s),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(i(!0),f?.id){const E=new P7e({id:f.id,name:_.name});await km.update(E),km.right($=>e?.($)),km.left(je.error)}else{const E=new L7e({name:_.name});await km.create(E),km.right($=>{$.editorRights&&h($.id,$.editorRights),e?.($)}),km.left(je.error)}v.reset(sO),i(!1),u(!1)},C=_=>{u(!1),v.reset(sO),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:l,onClose:C,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:f?.id?r("modal.title.renameProject","Переименовать проект"):r("modal.title.newProject","Новый проект")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(pt,{label:r("fields.title","Название"),placeholder:r("placeholders.inputEntity",{defaultValue:"Введите название",entity:r("fields.title","Название").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:C}),f?.id?d.jsx(us,{isLoading:a,disabled:a}):d.jsx(uc,{isLoading:a,disabled:a})]})]})})})},km=new GL,l1={Modal:vDe,AddButton:hDe,EditButton:mDe},cre=y.createContext(null),dre=()=>{const{t:e}=H(),t=y.useContext(cre);if(t===null)throw new Error(e("errors.context",{name:"DeleteProject",defaultValue:"Используется вне контекста DeleteProject"}));return t},yDe=({projectId:e,onClick:t,...n})=>{const{t:r}=H(),{setProjectId:s}=dre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},xDe=Rt(yDe,{permissionKey:ir.allowDeleteProject}),bDe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{projectId:i,setProjectId:l}=dre(),u=async()=>{if(a(!0),i!==null){const h=new M7e({id:i});await aO.delete(h),aO.right(()=>{e(i)}),aO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление проекта",entity:r("entities.project.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.project","Вы собираетесь удалить проект. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этим проектом.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},aO=new GL,Gq={Modal:bDe,Button:xDe},wDe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({projectId:t,setProjectId:n}),[t]);return d.jsx(cre.Provider,{value:r,children:e})},fre=y.createContext(null),uM=()=>{const{t:e}=H(),t=y.useContext(fre);if(t===null)throw new Error(e("errors.context",{name:"AddUserGroupToAgentGroup",defaultValue:"Используется вне контекста AddUserGroupToAgentGroup"}));return t},hre=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(fre.Provider,{value:r,children:e})},CDe=({userGroupId:e,onSuccess:t,onClose:n,projectId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{isOpen:v,setIsOpen:w}=uM(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async()=>{if(!e||!r)return;l(!0);const T=new cc({filter:{projectId:r,exclude:{userGroupIds:[e]},search:E}});await iO.invoke(T),iO.right(g),iO.left(je.error),l(!1)},[e,r,E]);y.useEffect(()=>{v&&O()},[O,v]);const N=async()=>{e&&(f(!0),await oO.addUserGroup(new vne({userGroupIds:[e],ids:Array.from(C.values())})),oO.right(()=>t?.()),oO.left(je.error),_(new Set),$(""),f(!1),w(!1))},M=T=>{_(new Set),$(""),w(!1),n?.(T)},L=y.useCallback(T=>{g(null),$(T)},[]),k=T=>P=>{_(V=>(P?V.add(T):V.delete(T),new Set(V.values())))};return d.jsxs(ne,{isOpen:v,onClose:M,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addToEntity",{entity:a("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[h?.isEmpty&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),h.map(T=>d.jsx(si,{label:T.name,checked:C.has(T.id),onChange:k(T.id)})),i&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:N})]})]})},iO=new ac,oO=new Ud,SDe=({onClick:e,label:t,size:n="large",...r})=>{const{t:s}=H(),{setIsOpen:a}=uM(),i=l=>{a(!0),e?.(l)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:i,variant:"dashed",size:n,...r,children:[d.jsx(Ma,{})," ",t||s("modal.title.addEntity",{entity:s("entities.userGroup.accusative"),defaultValue:"Добавить группу пользователей"})]})},_De=Rt(SDe,{permissionKey:"agentGroupUserGroupAdd"}),jDe=({agentGroupId:e,onSuccess:t,onClose:n,projectId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{isOpen:v,setIsOpen:w}=uM(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async()=>{if(!e||!r)return;l(!0);const T=new mv({filter:{projectId:r,exclude:{agentGroupIds:[e]},search:E}});await lO.invoke(T),lO.right(g),lO.left(je.error),l(!1)},[e,r,E]);y.useEffect(()=>{v&&O()},[O,v]);const N=async()=>{e&&(f(!0),await uO.addUserGroup(new vne({userGroupIds:Array.from(C.values()),ids:[e]})),uO.right(()=>t?.()),uO.left(je.error),_(new Set),$(""),f(!1),w(!1))},M=T=>{_(new Set),$(""),w(!1),n?.(T)},L=y.useCallback(T=>{g(null),$(T)},[]),k=T=>P=>{_(V=>(P?V.add(T):V.delete(T),new Set(V.values())))};return d.jsxs(ne,{isOpen:v,onClose:M,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addEntity",{entity:a("entities.userGroup.accusative"),defaultValue:"Добавить группу пользователей"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[h?.isEmpty&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),h.map(T=>d.jsx(si,{label:T.name,checked:C.has(T.id),onChange:k(T.id)})),i&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:N})]})]})},lO=new fv,uO=new Ud,t2={UserGroupListModal:jDe,AgentGroupListModal:CDe,Button:_De},pre=y.createContext(null),cM=()=>{const{t:e}=H(),t=y.useContext(pre);if(t===null)throw new Error(e("errors.context",{name:"UpsertUserGroup",defaultValue:"Используется вне контекста UpsertUserGroup"}));return t},mre=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,userGroup:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(pre.Provider,{value:i,children:e})},EDe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{onOpen:s}=cM(),a=i=>{s(null),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,size:t,variant:"dashed",...n,children:[d.jsx(Ma,{})," ",r("modal.title.addEntity",{defaultValue:"Добавить группу",entity:r("entities.group.accusative")})]})},$De=Rt(EDe,{permissionKey:"userGroupCreate"}),RDe=({onClick:e,userGroup:t,variant:n="secondary",label:r,...s})=>{const{t:a}=H(),{onOpen:i}=cM(),l=u=>{i(t),e?.(u)};return d.jsx(Fe,{onClick:l,variant:n,...s,children:r||a("edit","Редактировать")})},ODe=Rt(RDe,{permissionKey:"userGroupUpdate"}),cO={name:""},TDe=()=>{const e=Bs(),{t}=H();return y.useMemo(()=>et({name:te({required_error:e.required}).nonempty(e.required).max(120,t("errors.maxCharNumber",{maxValue:120,defaultValue:"Максимум {{maxValue}} символов"}))}),[t,e])},ADe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=TDe(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,userGroup:h}=cM(),g=y.useMemo(()=>h?.id?{name:h.name}:cO,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new cne({id:h.id,name:_.name});await Nm.update(E),Nm.right($=>e?.($)),Nm.left(je.error)}else{const E=new D7e({name:_.name,projectId:n});await Nm.create(E),Nm.right($=>e?.($)),Nm.left(je.error)}v.reset(cO),l(!1),f(!1)}},C=_=>{f(!1),v.reset(cO),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editEntity",{defaultValue:"Редактирование группы пользователей",entity:s("entities.userGroup.genitive")}):s("modal.title.newUserGroup","Новая группа пользователей")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(pt,{label:s("fields.title","Название"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название",entity:s("fields.title","Название").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Nm=new m_,u1={Modal:ADe,AddButton:$De,EditButton:ODe},gre=y.createContext(null),vre=()=>{const{t:e}=H(),t=y.useContext(gre);if(t===null)throw new Error(e("errors.context",{name:"DeleteUserGroup",defaultValue:"Используется вне контекста DeleteUserGroup"}));return t},kDe=({userGroupId:e,onClick:t,...n})=>{const{t:r}=H(),{setUserGroupId:s}=vre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},NDe=Rt(kDe,{permissionKey:"userGroupDelete"}),LDe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{userGroupId:i,setUserGroupId:l}=vre(),u=async()=>{if(a(!0),i!==null){const h=new V7e({id:i});await dO.delete(h),dO.right(()=>{e(i)}),dO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление группы пользователей",entity:r("entities.userGroup.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.userGroup","Вы собираетесь удалить группу пользователей. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этой группой.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},dO=new m_,zq={Modal:LDe,Button:NDe},MDe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({userGroupId:t,setUserGroupId:n}),[t]);return d.jsx(gre.Provider,{value:r,children:e})},yre=y.createContext(null),xre=()=>{const{t:e}=H(),t=y.useContext(yre);if(t===null)throw new Error(e("errors.context",{name:"DeleteUserGroupFromAgentGroup",defaultValue:"Используется вне контекста DeleteUserGroupFromAgentGroup"}));return t},IDe=({userGroupId:e,agentGroupId:t,onClick:n,...r})=>{const{t:s}=H(),{setState:a}=xre(),i=l=>{a({userGroupId:e,agentGroupId:t}),n?.(l)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:i,...r,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",color:"danger-red",children:s("deleteFromGroup","Удалить из группы")})})},PDe=Rt(IDe,{permissionKey:"agentGroupUserGroupDelete"}),DDe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{state:i,setState:l}=xre(),u=async()=>{if(!i?.agentGroupId||!i?.userGroupId)return;a(!0);const h=new sIe({ids:[i.agentGroupId],userGroupIds:[i.userGroupId]});await fO.deleteUserGroup(h),fO.right(()=>{e()}),fO.left(je.error),a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteUserGroup","Удаление группы пользователей из группы агентов")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.userGroupFromAgentGroup","Вы собираетесь удалить группу пользователей из группы агентов. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},fO=new Ud,n2={Modal:DDe,Button:PDe},bre=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(yre.Provider,{value:r,children:e})},wre=({agentId:e,onClick:t,onSuccess:n,path:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),u=async f=>{l(!0),await hO.invoke(new z7e({path:r,full:!0}),e),hO.left(je.error),hO.right(()=>{je.info(a("info.folderCache",{defaultValue:"Агенту отправлена команда на обновление кэша. Путь: {{cache}}",path:r})),n(r,null)}),l(!1),t?.(f)};return i?d.jsx(ho,{size:"small"}):d.jsx(Fe,{onlyIcon:!0,variant:"ghost",title:a("updateCache","Обновить кэш"),onClick:u,...s,children:d.jsx(Ffe,{})})},hO=new PLe,Cre=y.createContext(null),Sre=()=>{const{t:e}=H(),t=y.useContext(Cre);if(t===null)throw new Error(e("errors.context",{name:"RenameFsItem",defaultValue:"Используется вне контекста RenameFsItem"}));return t},VDe=({fromPath:e,modalTitle:t,onClick:n,projectId:r,fileSystemType:s,...a})=>{const{t:i}=H(),{setState:l}=Sre(),u=y.useMemo(()=>s==="agent"?["agentRfsItemRename"]:["agentLfsItemRename"],[s]),{allowed:f}=It({projectId:r,rightKeys:u}),h=g=>{l({fromPath:e,title:t}),n?.(g)};return f?d.jsx(Fe,{className:"w-full",variant:"text",onClick:h,...a,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:i("rename","Переименовать")})}):null},pO={folderPath:"",name:""},BDe=()=>{const e=Bs();return y.useMemo(()=>et({folderPath:te(),name:te({required_error:e.required}).nonempty(e.required)}),[e])},FDe=({agentId:e,onSuccess:t,onClose:n,fileSystemType:r,...s})=>{const{t:a}=H(),i=BDe(),[l,u]=y.useState(!1),{state:f,setState:h}=Sre(),g=y.useMemo(()=>{if(!f?.fromPath)return pO;const _=f.fromPath.split(Ti),E=_[_.length-1],O=_.slice(0,-1).join(Ti);return{name:E,folderPath:O||"/"}},[f?.fromPath]),v=Cr({resolver:hs(i),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(!f?.fromPath)return;u(!0);const E=`${_.folderPath}${Ti}${_.name}`;r==="center"?(await mO.invoke(new W7e({agentId:e,fromPath:f.fromPath,toPath:E})),mO.right(()=>{t?.(_.folderPath)}),mO.left(je.error)):(await gO.invoke(new H7e({fromPath:f.fromPath,toPath:E}),e),gO.right(()=>{je.info(a("info.agentRenameFsItem",{defaultValue:"Агенту отправлена команда на переименование. Путь: {{path}}",path:`${f.fromPath} -> ${E}`})),t?.(_.folderPath)}),gO.left(je.error)),v.reset(pO),u(!1),h(null)},C=_=>{h(null),v.reset(pO),n?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:!!f,onClose:C,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:f?.title||a("renaming","Переименование")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:a("fields.folder","Папка"),name:"folderPath",inputClassName:"w-full",autoComplete:"off",disabled:!0}),d.jsx(pt,{label:a("fields.title","Название"),placeholder:a("placeholders.inputEntity",{defaultValue:"Введите название",entity:a("fields.title","Название").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:C}),d.jsx(Fe,{type:"submit",disabled:l,children:l?`${a("renaming","Переименование")}...`:a("rename","Переименовать")})]})]})})})},mO=new qLe,gO=new DLe,dM={Modal:FDe,Button:VDe},_re=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Cre.Provider,{value:r,children:e})},jre=y.createContext(null),Ere=()=>{const{t:e}=H(),t=y.useContext(jre);if(t===null)throw new Error(e("errors.context",{name:"MoveFsItem",defaultValue:"Используется вне контекста MoveFsItem"}));return t},UDe=({fromPath:e,modalTitle:t,onClick:n,projectId:r,fileSystemType:s,...a})=>{const{t:i}=H(),{setState:l}=Ere(),u=y.useMemo(()=>s==="agent"?["agentRfsItemMove"]:["agentLfsItemMove"],[s]),{allowed:f}=It({projectId:r,rightKeys:u}),h=g=>{l({fromPath:e,title:t}),n?.(g)};return f?d.jsx(Fe,{className:"w-full",variant:"text",onClick:h,...a,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:i("move","Переместить")})}):null},vO={fromPath:"",toPath:""},GDe=()=>{const e=Bs();return y.useMemo(()=>et({fromPath:te(),toPath:te({required_error:e.required}).nonempty(e.required)}),[e])},zDe=({agentId:e,onSuccess:t,onClose:n,fileSystemType:r,...s})=>{const{t:a}=H(),i=GDe(),[l,u]=y.useState(!1),{state:f,setState:h}=Ere(),g=y.useMemo(()=>f?.fromPath?{fromPath:f.fromPath,toPath:f.fromPath}:vO,[f?.fromPath]),v=Cr({resolver:hs(i),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g]);const w=async _=>{if(!f?.fromPath)return;u(!0);const{toPath:E}=_,$=E.split(Ti).slice(0,-1).join(Ti)||"/";r==="center"?(await yO.invoke(new Q7e({agentId:e,fromPath:f.fromPath,toPath:E})),yO.right(()=>{t?.($)}),yO.left(je.error)):(await xO.invoke(new q7e({fromPath:f.fromPath,toPath:E}),e),xO.right(()=>{je.info(a("info.agentMoveFile",{defaultValue:"Агенту отправлена команда на перемещение. Путь: {{path}}",path:`${f.fromPath} -> ${E}`})),t?.($)}),xO.left(je.error)),v.reset(vO),u(!1),h(null)},C=_=>{h(null),v.reset(vO),n?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:!!f,onClose:C,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:f?.title||a("modal.title.move","Перемещение")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:a("from","Из"),name:"fromPath",inputClassName:"w-full",autoComplete:"off",disabled:!0}),d.jsx(pt,{label:a("to","в"),name:"toPath",inputClassName:"w-full",autoComplete:"off",required:!0})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:C}),d.jsx(Fe,{type:"submit",disabled:l,children:l?`${a("moving","Перемещение")}...`:a("move","Переместить")})]})]})})})},yO=new KLe,xO=new FLe,fM={Modal:zDe,Button:UDe},$re=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(jre.Provider,{value:r,children:e})},Rre=y.createContext(null),Ore=()=>{const{t:e}=H(),t=y.useContext(Rre);if(t===null)throw new Error(e("errors.context",{name:"DeleteFsItem",defaultValue:"Используется вне контекста DeleteFsItem"}));return t},HDe=({path:e,modalTitle:t,itemIsDirectory:n,onClick:r,projectId:s,fileSystemType:a,...i})=>{const{t:l}=H(),{setState:u}=Ore(),f=y.useMemo(()=>a==="agent"?["agentRfsItemDelete"]:["agentLfsItemDelete"],[a]),{allowed:h}=It({projectId:s,rightKeys:f}),g=v=>{u({path:e,isDirectory:n,title:t}),r?.(v)};return h?d.jsx(Fe,{className:"w-full",variant:"text",onClick:g,...i,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:l("delete","Удалить")})}):null},qDe=({agentId:e,fileSystemType:t,onSuccess:n,onClose:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),{state:u,setState:f}=Ore(),h=async()=>{if(l(!0),!u)return;const v=u.path.split(Ti).slice(0,-1).join(Ti)||"/";t==="center"?(await bO.invoke(new Z7e({agentId:e,path:u.path})),bO.right(()=>{n?.(v)}),bO.left(je.error)):(await wO.invoke(new fne({path:u.path}),e),wO.right(()=>{je.info(a("info.deleteFsItem",{defaultValue:"Агенту отправлена команда на удаление. Путь: {{path}}",path:u.path})),n?.(v)}),wO.left(je.error)),l(!1),f(null)},g=()=>{f(null),r?.()};return d.jsxs(ne,{isOpen:!!u,onClose:g,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:u?.title||a("deleting","Удаление")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:u?.isDirectory?a("modal.deleteMessage.folder",{defaultValue:'Вы собираетесь удалить папку "{{path}}". Это действие необратимо и приведёт к безвозвратному удалению ее содержимого.',path:u?.path||""}):a("modal.deleteMessage.file",{defaultValue:'Вы собираетесь удалить файл "{{path}}". Это действие необратимо и приведёт к безвозвратному удалению файла.',path:u?.path||""})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:g}),d.jsx(Fs,{isLoading:i,disabled:i,onClick:h})]})]})},bO=new HLe,wO=new ILe,hM={Modal:qDe,Button:HDe},Tre=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Rre.Provider,{value:r,children:e})},Are=y.createContext(null),kre=()=>{const{t:e}=H(),t=y.useContext(Are);if(t===null)throw new Error(e("errors.context",{name:"CreateFsFolder",defaultValue:"Используется вне контекста CreateFsFolder"}));return t},KDe=({folderPath:e,onClick:t,projectId:n,fileSystemType:r,...s})=>{const{t:a}=H(),{setFolderPath:i}=kre(),l=y.useMemo(()=>r==="agent"?["agentRfsFolderCreate"]:["agentLfsFolderCreate"],[r]),{allowed:u}=It({projectId:n,rightKeys:l}),f=h=>{i(e),t?.(h)};return u?d.jsx(Fe,{className:"w-full",variant:"text",onClick:f,...s,children:d.jsx(W,{className:"w-full text-right text-nowrap",variant:"strong",children:a("createFolder","Создать папку")})}):null},CO={folderPath:"/",name:""},YDe=()=>{const e=Bs();return y.useMemo(()=>et({folderPath:te(),name:te({required_error:e.required}).nonempty(e.required)}),[e])},ZDe=({agentId:e,onSuccess:t,onClose:n,fileSystemType:r,...s})=>{const{t:a}=H(),i=YDe(),[l,u]=y.useState(!1),{folderPath:f,setFolderPath:h}=kre(),g=y.useMemo(()=>f?{name:"",folderPath:f}:CO,[f]),v=Cr({resolver:hs(i),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g]);const w=async _=>{if(!f)return;u(!0);const E=`${_.folderPath}${Ti}${_.name}`.replace("//","/");r==="center"?(await SO.invoke(new Y7e({agentId:e,path:E})),SO.right(()=>{t?.(_.folderPath)}),SO.left(je.error)):(await _O.invoke(new fne({path:E}),e),_O.right(()=>{je.info(a("info.agentCreateFolder",{defaultValue:"Агенту отправлена команда на создание папки. Путь: {{path}}",path:E})),t?.(_.folderPath)}),_O.left(je.error)),v.reset(CO),u(!1),h(null)},C=_=>{h(null),v.reset(CO),n?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:!!f,onClose:C,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.createFolder","Создание папки")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:a("fields.folderPath","Путь к папке"),name:"folderPath",inputClassName:"w-full",autoComplete:"off",disabled:!0}),d.jsx(pt,{label:a("fields.folderName","Название папки"),placeholder:a("placeholders.inputEntity",{defaultValue:"Введите название папки",entity:a("fields.folderName","Название папки").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:C}),d.jsx(uc,{isLoading:l,disabled:l})]})]})})})},SO=new zLe,_O=new MLe,pM={Modal:ZDe,Button:KDe},Nre=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({folderPath:t,setFolderPath:n}),[t]);return d.jsx(Are.Provider,{value:r,children:e})},Lre=y.createContext(null),Mre=()=>{const{t:e}=H(),t=y.useContext(Lre);if(t===null)throw new Error(e("errors.context",{name:"CreateFsFile",defaultValue:"Используется вне контекста CreateFsFile"}));return t},XDe=({folderPath:e,onClick:t,projectId:n,fileSystemType:r,...s})=>{const{t:a}=H(),{onOpenFileDialog:i}=Mre(),l=y.useMemo(()=>r==="agent"?["agentRfsFileCreate"]:["agentLfsFileCreate"],[r]),{allowed:u}=It({projectId:n,rightKeys:l}),f=h=>{i(e),t?.(h)};return u?d.jsx(Fe,{className:"w-full",variant:"text",onClick:f,...s,children:d.jsx(W,{className:"w-full text-right text-nowrap",variant:"strong",children:a("uploadFile","Загрузить файл")})}):null},WDe=({agentId:e,fileSystemType:t,onSuccess:n,className:r,...s})=>{const{t:a}=H(),{folderPath:i,setIsLoading:l,setDialogOpenner:u,setFolderPath:f}=Mre(),h=y.useRef(null);y.useEffect(()=>{u(()=>()=>{h.current?.click()})},[u]);const g=async v=>{const w=v.target.files?.[0];if(!w||!i)return;let C=null;try{C=await kMe(w)}catch(E){console.warn(E),je.error(a("errors.readFile","Ошибка при чтении файла."))}if(!C)return;const _=`${i}${Ti}${w.name}`.replace("//","/");t==="center"?(await jO.invoke(new K7e({agentId:e,path:_}),C),jO.right(()=>{n?.(i)}),jO.left(je.error)):(await EO.invoke(new pne({path:_}),e,C),EO.right(()=>{je.info(a("info.agentUploadFile",{defaultValue:"Агенту отправлена команда на загрузку файла. Путь: {{path}}",path:_})),n?.(i)}),EO.left(je.error)),h.current&&(h.current.value=""),l(!1),f(null)};return d.jsx("input",{type:"file",ref:h,className:Fn("invisible",r),style:{display:"none"},onChange:g,...s})},jO=new ULe,EO=new Dte,mM={Input:WDe,Button:XDe},Ire=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),[a,i]=y.useState(null),l=y.useCallback(f=>{t||(s(f),a?.())},[t,a]),u=y.useMemo(()=>({isLoading:t,folderPath:r,onOpenFileDialog:l,setDialogOpenner:i,setIsLoading:n,setFolderPath:s}),[t,r,l]);return d.jsx(Lre.Provider,{value:u,children:e})},Hq=({agentId:e,direction:t,fromPath:n,toPath:r,fileSize:s,onSuccess:a,onClick:i,disabled:l,...u})=>{const{t:f}=H(),[h,g]=y.useState(!1),v=async w=>{!n||!r||(g(!0),t==="right"?(await $O.invoke(new U7e({path:n,saveTo:{path:r}}),e,s),$O.right(()=>{je.info(f("info.agentSendFileToCenter",{defaultValue:"Агенту отправлена команда на выгрузку файла в облако. Путь: {{path}}",path:`${n} -> ${r}`})),a?.(r)}),$O.left(je.error)):(await RO.invoke(new pne({path:r,localPath:n}),e),RO.right(()=>{je.info(f("info.agentGetFileFromCenter",{defaultValue:"Агенту отправлена команда на загрузку файла из облака. Путь: {{path}}",path:`${n} -> ${r}`})),a?.(r)}),RO.left(je.error)),g(!1),i?.(w))};return h?d.jsx(ho,{}):d.jsx(Fe,{onlyIcon:!0,variant:"link",onClick:v,disabled:l,...u,children:d.jsx("div",{className:Fn({"-rotate-90":t==="right","rotate-90":t==="left","text-secondary":l}),children:d.jsx(ec,{})})})},$O=new VLe,RO=new Dte,QDe=({agentId:e,path:t,fileName:n,fileSize:r,...s})=>{const[a,i]=y.useState(!1),l=async()=>{if(!t||!n)return;i(!0);const u=await JDe.invoke(new X7e({agentId:e,path:t}),r),f=Rk(u);cte(u)?ZL(f,n):je.error(f),i(!1)};return a?d.jsx(ho,{size:"small"}):d.jsx(Fe,{className:"text-text",onClick:l,onlyIcon:!0,variant:"link",...s,children:d.jsx(Gfe,{})})},JDe=new GLe,eVe=Rt(QDe,{rightKeys:["agentLfsFileGet"]}),Pre=y.createContext(null),Dre=()=>{const{t:e}=H(),t=y.useContext(Pre);if(t===null)throw new Error(e("errors.context",{name:"DeleteAgentGroup",defaultValue:"Используется вне контекста DeleteAgentGroup"}));return t},tVe=({agentGroupId:e,onClick:t,...n})=>{const{t:r}=H(),{setAgentGroupId:s}=Dre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},nVe=Rt(tVe,{permissionKey:"agentGroupDelete"}),rVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{agentGroupId:i,setAgentGroupId:l}=Dre(),u=async()=>{if(a(!0),i!==null){const h=new eIe({id:i});await OO.delete(h),OO.right(()=>{e(i)}),OO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление группы агентов",entity:r("entities.agentGroup.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.agentGroup","Вы собираетесь удалить группу агентов. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этой группой.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},OO=new VL,qq={Modal:rVe,Button:nVe},sVe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({agentGroupId:t,setAgentGroupId:n}),[t]);return d.jsx(Pre.Provider,{value:r,children:e})},Vre=y.createContext(null),gM=()=>{const{t:e}=H(),t=y.useContext(Vre);if(t===null)throw new Error(e("errors.context",{name:"UpsertAgentGroup",defaultValue:"Используется вне контекста UpsertAgentGroup"}));return t},Bre=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,agentGroup:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(Vre.Provider,{value:i,children:e})},aVe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{onOpen:s}=gM(),a=i=>{s(null),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,variant:"dashed",size:t,...n,children:[d.jsx(Ma,{})," ",r("modal.title.addEntity",{defaultValue:"Добавить группу",entity:r("entities.group.accusative")})]})},iVe=Rt(aVe,{permissionKey:"agentGroupCreate"}),oVe=({onClick:e,agentGroup:t,variant:n="secondary",...r})=>{const{t:s}=H(),{onOpen:a}=gM(),i=l=>{a(t),e?.(l)};return d.jsx(Fe,{onClick:i,variant:n,...r,children:s("edit","Редактировать")})},lVe=Rt(oVe,{permissionKey:"agentGroupUpdate"}),TO={name:""},uVe=()=>{const e=Bs(),{t}=H();return y.useMemo(()=>et({name:te({required_error:e.required}).nonempty(e.required).max(512,t("errors.maxCharNumber",{maxValue:512,defaultValue:"Максимум {{maxValue}} символов"}))}),[t,e])},cVe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=uVe(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,agentGroup:h}=gM(),g=y.useMemo(()=>h?.id?{name:h.name}:TO,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new nIe({id:h.id,name:_.name});await Lm.update(E),Lm.right($=>e?.($)),Lm.left(je.error)}else{const E=new J7e({name:_.name,projectId:n});await Lm.create(E),Lm.right($=>e?.($)),Lm.left(je.error)}v.reset(TO),l(!1),f(!1)}},C=_=>{f(!1),v.reset(TO),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editEntity",{defaultValue:"Редактирование группы агентов",entity:s("entities.agentGroup.genitive")}):s("modal.title.newAgentGroup","Новая группа агентов")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(pt,{label:s("fields.title","Название"),placeholder:s("placeholders.inputGroupName","Введите название группы"),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Lm=new VL,c1={Modal:cVe,AddButton:iVe,EditButton:lVe},gv=({onChange:e,...t})=>{const{t:n}=H(),[r,s]=br(),a=r.get(vt.projectId),{projectList:i,isLoading:l}=Sne();y.useEffect(()=>{if(!i)return;let f=a;(!a||!i.entities[a])&&(f=i.ids[0]),r.set(vt.projectId,f),s(r)},[a,i]);const u=(f,h)=>{r.set(vt.projectId,f),s(r),e?.(f,h)};return d.jsx("div",{className:"w-[200px]",children:d.jsx(Cne,{label:rn(n("entities.project.nominative","Проект")),options:i?.length?i?.values:[],value:a||"",onChange:u,isLoading:l,...t})})},Fre=y.createContext(null),Ure=()=>{const{t:e}=H(),t=y.useContext(Fre);if(t===null)throw new Error(e("errors.context",{name:"CreateUser",defaultValue:"Используется вне контекста CreateUser"}));return t},dVe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{setIsOpen:s}=Ure(),a=i=>{s(!0),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,size:t,variant:"dashed",...n,children:[d.jsx(Ma,{})," ",r("modal.title.addEntity",{defaultValue:"Добавить пользователя",entity:r("entities.user.accusative")})]})},fVe=Rt(dVe,{permissionKey:ir.allowAddUser}),AO={name:"",login:"",password:"",confirmPassword:""},hVe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),login:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),password:te({required_error:t.required}).nonempty(t.required).max(64,n(64)),confirmPassword:te({required_error:t.required}).nonempty(t.required).max(64,n(64))}).refine(r=>r.password===r.confirmPassword,{message:e("errors.passwordsDoNotMatch","Пароли не совпадают"),path:["confirmPassword"]})},[t,e])},pVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),s=hVe(),[a,i]=y.useState(!1),{isOpen:l,setIsOpen:u}=Ure(),f=Cr({resolver:hs(s),defaultValues:AO,mode:"onBlur"}),h=async v=>{i(!0);const w=new aIe({name:v.name,login:v.login,password:PS(v.password)});await kO.create(w),kO.right(C=>{e?.(C)}),kO.left(je.error),f.reset(AO),i(!1),u(!1)},g=v=>{u(!1),f.reset(AO),t?.(v)};return d.jsx(wr,{...f,children:d.jsx("form",{onSubmit:f.handleSubmit(h),children:d.jsxs(ne,{isOpen:l,onClose:g,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.newUser","Новый пользователь")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:r("fields.name","Имя"),placeholder:r("placeholders.inputUserName","Введите имя пользователя"),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:r("fields.login","Логин"),placeholder:r("placeholders.inputUserLogin","Введите логин пользователя"),name:"login",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:r("fields.password","Пароль"),placeholder:r("placeholders.inputUserPassword","Введите пароль пользователя"),name:"password",inputClassName:"w-full",autoComplete:"off",type:"password",required:!0}),d.jsx(pt,{label:r("fields.confirmPassword","Подтверждение пароля"),placeholder:r("placeholders.confirmUserPassword","Подтвердите пароль пользователя"),name:"confirmPassword",inputClassName:"w-full",autoComplete:"off",type:"password",required:!0})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:g}),d.jsx(uc,{isLoading:a,disabled:a})]})]})})})},kO=new bx,Kq={Modal:pVe,Button:fVe},mVe=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(Fre.Provider,{value:r,children:e})},Gre=y.createContext(null),zre=()=>{const{t:e}=H(),t=y.useContext(Gre);if(t===null)throw new Error(e("errors.context",{name:"UpdateUser",defaultValue:"Используется вне контекста UpdateUser"}));return t},Hre=({onClick:e,user:t,variant:n="secondary",label:r,...s})=>{const{t:a}=H(),{setUser:i,setIsCurrentUser:l}=zre(),{user:u}=Uh(),f=h=>{i(t),l(u.id===t?.id),e?.(h)};return d.jsx(Fe,{onClick:f,variant:n,...s,children:r||a("edit","Редактировать")})},gVe=Rt(Hre,{permissionKey:ir.allowUpdateUser}),NO={name:"",login:"",password:"",confirmPassword:"",oldPassword:"",showOldPassword:!1},vVe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),login:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),password:te().max(64,n(64)).optional(),confirmPassword:te().max(64,n(64)).optional(),oldPassword:te().max(64,n(64)).optional(),showOldPassword:we()}).superRefine((r,s)=>{const{password:a,confirmPassword:i,oldPassword:l,showOldPassword:u}=r;return a!==i&&s.addIssue({code:Ze.custom,message:e("errors.passwordsDoNotMatch","Пароли не совпадают"),path:["confirmPassword"]}),u&&!l&&s.addIssue({code:Ze.custom,message:e("errors.currentPassWordRequired","Текущий пароль обязателен при изменении своих учетных данных"),path:["oldPassword"]}),!0})},[t,e])},yVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),s=vVe(),[a,i]=y.useState(!1),{user:l,setUser:u,isCurrentUser:f,setIsCurrentUser:h}=zre(),g=y.useMemo(()=>l?{name:l.name,login:l.login,password:"",confirmPassword:"",oldPassword:"",showOldPassword:f}:NO,[l,f]),v=Cr({resolver:hs(s),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=_x({name:"password",control:v.control}),C=async E=>{if(!l?.id)return;i(!0);const $=new lIe(f?{id:l.id,name:E.name,login:E.login,password:E.password||"",confirmPassword:E.oldPassword}:{id:l.id,name:E.name,login:E.login,password:E.password||""});await LO.update($),LO.right(O=>{e?.(O)}),LO.left(je.error),v.reset(NO),i(!1),u(null),h(!1)},_=E=>{u(null),h(!1),v.reset(NO),t?.(E)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(C),children:d.jsxs(ne,{isOpen:!!l,onClose:_,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.editEntity",{defaultValue:"Редактирование пользователя",entity:r("entities.user.accusative")})})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:r("fields.name","Имя"),placeholder:r("placeholders.inputUserName","Введите имя пользователя"),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:r("fields.login","Логин"),placeholder:r("placeholders.inputUserLogin","Введите логин пользователя"),name:"login",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:r("fields.newPassword","Новый пароль"),placeholder:r("placeholders.inputUserNewPassword","Введите новый пароль пользователя"),name:"password",inputClassName:"w-full",autoComplete:"off",type:"password"}),d.jsx(pt,{label:r("fields.confirmNewPassword","Подтверждение нового пароля"),placeholder:r("placeholders.confirmUserNewPassword","Подтвердите новый пароль пользователя"),name:"confirmPassword",inputClassName:"w-full",autoComplete:"off",type:"password",required:!!w}),f&&d.jsx(pt,{label:r("fields.currentPassword","Текущий пароль"),placeholder:r("placeholders.inputUserCurrentPassword","Введите текущий пароль пользователя"),name:"oldPassword",inputClassName:"w-full",autoComplete:"off",type:"password",required:!0})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:_}),d.jsx(us,{isLoading:a,disabled:a})]})]})})})},LO=new bx,Sd={Modal:yVe,Button:gVe,ButtonInner:Hre},vM=({children:e})=>{const[t,n]=y.useState(null),[r,s]=y.useState(!1),a=y.useMemo(()=>({user:t,setUser:n,isCurrentUser:r,setIsCurrentUser:s}),[t,r]);return d.jsx(Gre.Provider,{value:a,children:e})},qre=y.createContext(null),Kre=()=>{const{t:e}=H(),t=y.useContext(qre);if(t===null)throw new Error(e("errors.context",{name:"DeleteUser",defaultValue:"Используется вне контекста DeleteUser"}));return t},xVe=({userId:e,onClick:t,...n})=>{const{t:r}=H(),{setUserId:s}=Kre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},bVe=Rt(xVe,{permissionKey:ir.allowDeleteUser}),wVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{userId:i,setUserId:l}=Kre(),u=async()=>{if(a(!0),i!==null){const h=new iIe({id:i});await MO.delete(h),MO.right(()=>{e(i)}),MO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление пользователя",entity:r("entities.user.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.user","Вы собираетесь удалить пользователя. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этим пользователем.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},MO=new bx,Yq={Modal:wVe,Button:bVe},CVe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({userId:t,setUserId:n}),[t]);return d.jsx(qre.Provider,{value:r,children:e})},Yre=y.createContext(null),yM=()=>{const{t:e}=H(),t=y.useContext(Yre);if(t===null)throw new Error(e("errors.context",{name:"UpsertClientKey",defaultValue:"Используется вне контекста UpsertClientKey"}));return t},Zre=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,clientKey:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(Yre.Provider,{value:i,children:e})},SVe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{onOpen:s}=yM(),a=i=>{s(null),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,variant:"dashed",size:t,...n,children:[d.jsx(Ma,{})," ",r("addKey","Добавить ключ")]})},_Ve=Rt(SVe,{permissionKey:"clientKeyCreate"}),jVe=({onClick:e,clientKey:t,...n})=>{const{t:r}=H(),{onOpen:s}=yM(),a=i=>{s(t),e?.(i)};return d.jsx(Fe,{onClick:a,variant:"secondary",...n,children:r("edit","Редактировать")})},EVe=Rt(jVe,{permissionKey:"clientKeyUpdate"}),IO={name:"",value:""},$Ve=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional()})},[t,e])},RVe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=$Ve(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,clientKey:h}=yM(),g=y.useMemo(()=>h?.id?{name:h.name,value:h.value}:IO,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new lne({id:h.id,name:_.name,value:_.value});await Mm.update(E),Mm.right($=>e?.($)),Mm.left(je.error)}else{const E=new A7e({projectId:n,name:_.name,value:_.value});await Mm.create(E),Mm.right($=>e?.($)),Mm.left(je.error)}v.reset(IO),l(!1),f(!1)}},C=_=>{f(!1),v.reset(IO),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editKey","Редактирование ключа"):s("modal.title.newKey","Новый ключ")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:s("fields.keyName","Название ключа"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название ключа",entity:s("fields.keyName","Название ключа").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:s("fields.keyValue","Значение ключа"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение ключа",entity:s("fields.keyValue","Значение ключа").toLowerCase()}),name:"value",inputClassName:"w-full",autoComplete:"off"})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Mm=new xx,d1={Modal:RVe,AddButton:_Ve,EditButton:EVe},Xre=y.createContext(null),Wre=()=>{const{t:e}=H(),t=y.useContext(Xre);if(t===null)throw new Error(e("errors.context",{name:"DeleteClientKey",defaultValue:"Используется вне контекста DeleteClientKey"}));return t},OVe=({clientKeyId:e,onClick:t,...n})=>{const{t:r}=H(),{setClientKeyId:s}=Wre(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},TVe=Rt(OVe,{permissionKey:"clientKeyDelete"}),AVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{clientKeyId:i,setClientKeyId:l}=Wre(),u=async()=>{if(a(!0),i!==null){const h=new k7e({id:i});await PO.delete(h),PO.right(()=>{e(i)}),PO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление клиентского ключа",entity:r("entities.clientKey.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.clientKey","Вы собираетесь удалить клиентский ключ. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этим ключом.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},PO=new xx,Zq={Modal:AVe,Button:TVe},kVe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientKeyId:t,setClientKeyId:n}),[t]);return d.jsx(Xre.Provider,{value:r,children:e})},Qre=y.createContext(null),Jre=()=>{const{t:e}=H(),t=y.useContext(Qre);if(t===null)throw new Error(e("errors.context",{name:"ImportClientKey",defaultValue:"Используется вне контекста ImportClientKey"}));return t},NVe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientKey:t,setClientKey:n}),[t]);return d.jsx(Qre.Provider,{value:r,children:e})},LVe=({onClick:e,...t})=>{const{t:n}=H(),[r,s]=y.useState(!1),{setClientKey:a}=Jre(),i=y.useRef(null),l=f=>{i.current?.click(),e?.(f)},u=f=>{const h=f.target.files?.[0];if(!h)return;s(!0);const g=new FileReader;g.onload=v=>{try{const w=JSON.parse(v.target?.result);a(w)}catch(w){console.warn(w),je.error(n("errors.openJsonFile","Не удалось открыть файл. Убедитесь, что файл содержит JSON и попробуйте снова"))}s(!1),i.current.value=""},g.onerror=()=>{je.error(n("errors.readFile","Ошибка при чтении файла.")),i.current.value="",s(!1)},g.readAsText(h)};return d.jsxs("div",{className:"flex w-full",children:[d.jsxs(Fe,{onClick:l,variant:"dashed",className:"w-full",size:"large",isLoading:r,disabled:r,...t,children:[d.jsx(B8,{}),n("importKey","Импортировать ключ")]}),d.jsx("input",{type:"file",ref:i,className:"invisible w-0 h-0",onChange:u,accept:".json"})]})},MVe=Rt(LVe,{permissionKey:"clientKeyCreate"}),Xq={uuid:"",name:"",value:""},IVe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({uuid:te().max(36,n(36)).optional(),name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional()})},[t,e])},PVe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=IVe(),[i,l]=y.useState(!1),{clientKey:u,setClientKey:f}=Jre(),h=y.useMemo(()=>u||Xq,[u]),g=Cr({resolver:hs(a),defaultValues:h,mode:"onBlur"});y.useEffect(()=>{g.reset(h)},[h]);const v=async C=>{if(!n)return;l(!0);const _=DS(u?{...u,...C}:C).buffer,E=new N7e({projectId:n});await DO.import(E,_),DO.right($=>e?.($)),DO.left(je.error),g.reset(Xq),l(!1),f(null)},w=C=>{f(null),t?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:!!u,onClose:w,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.importKey","Импорт ключа")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:s("fields.keyUuid","UUID ключа"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите UUID ключа",entity:s("fields.keyUuid","UUID ключа")}),name:"uuid",inputClassName:"w-full",autoComplete:"off"}),d.jsx(pt,{label:s("fields.keyName","Название ключа"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название ключа",entity:s("fields.keyName","Название ключа").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:s("fields.keyValue","Значение ключа"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение ключа",entity:s("fields.keyValue","Значение ключа").toLowerCase()}),name:"value",inputClassName:"w-full",autoComplete:"off"})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:w}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},DO=new xx,Wq={Modal:PVe,Button:MVe},DVe=({clientKeyId:e,clientKeyName:t,variant:n="secondary",onClick:r,label:s,onChangeLoading:a,...i})=>{const{t:l}=H(),[u,f]=y.useState(!1),h=async g=>{f(!0),a?.(!0),await Qq.invoke(new WL({id:e,raw:!1})),Qq.right(v=>{ZL(v,`${t}.json`)}),r?.(g),f(!1),a?.(!1)};return d.jsx(Fe,{className:"whitespace-nowrap",variant:n,onClick:h,isLoading:u,...i,children:s||l("exportKey","Экспорт ключа")})},Qq=new TLe,ese=Rt(DVe,{permissionKey:"clientKeyGetFull"}),tse=y.createContext(null),xM=()=>{const{t:e}=H(),t=y.useContext(tse);if(t===null)throw new Error(e("errors.context",{name:"AddUserToUserGroup",defaultValue:"Используется вне контекста AddUserToUserGroup"}));return t},nse=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(tse.Provider,{value:r,children:e})},VVe=({onClick:e,size:t="large",label:n,...r})=>{const{t:s}=H(),{setIsOpen:a}=xM(),i=l=>{a(!0),e?.(l)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:i,variant:"dashed",size:t,...r,children:[d.jsx(Ma,{})," ",n||s("modal.title.addEntity",{entity:s("entities.users.accusative"),defaultValue:"Добавить пользователей"})]})},BVe=Rt(VVe,{permissionKey:ir.allowAddUserToUserGroup}),FVe=({userId:e,onSuccess:t,onClose:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),[l,u]=y.useState(!1),[f,h]=y.useState(null),{isOpen:g,setIsOpen:v}=xM(),[w,C]=y.useState(new Set),[_,E]=y.useState(),$=y.useCallback(async()=>{if(!e)return;i(!0);const T=new mv({filter:{exclude:{userId:e,admin:!1},search:_}});await VO.invoke(T),VO.right(P=>h(P?wx(P.values,"projectId"):null)),VO.left(je.error),i(!1)},[e,_]);y.useEffect(()=>{g&&$()},[$,g]);const O=async()=>{e&&(u(!0),await BO.addUser(new dne({userIds:[e],groupIds:Array.from(w.values())})),BO.right(()=>t?.()),BO.left(je.error),C(new Set),E(""),u(!1),v(!1))},N=T=>{C(new Set),E(""),v(!1),n?.(T)},M=y.useCallback(T=>{h(null),E(T)},[]),L=T=>P=>{C(V=>(P?V.add(T):V.delete(T),new Set(V.values())))},k=Array.from(f?.values()||[]);return d.jsxs(ne,{isOpen:g,onClose:N,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.addToEntity",{entity:s("entities.userGroup.accusative"),defaultValue:"Добавить в группу пользователей"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:M})}),a&&f===null&&d.jsx(wt,{}),f!==null&&d.jsxs(d.Fragment,{children:[!f?.size&&d.jsx(W,{className:"self-center",children:s("noData.listMessage",{entity:s("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),k.map((T,P)=>d.jsxs(y.Fragment,{children:[d.jsx(W,{variant:"strong",color:"placeholder",children:T[0].projectName}),T.map(V=>d.jsx(si,{label:V.name,checked:w.has(V.id),onChange:L(V.id)},V.id)),P!==k.length-1&&d.jsx("div",{className:"w-full h-[1px] bg-placeholder"})]},T[0].projectId))]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:N}),d.jsx(au,{isLoading:l,disabled:l||!w.size,onClick:O})]})]})},VO=new fv,BO=new zL,UVe=({userGroupId:e,onSuccess:t,onClose:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),[l,u]=y.useState(!1),[f,h]=y.useState(null),{isOpen:g,setIsOpen:v}=xM(),[w,C]=y.useState(new Set),[_,E]=y.useState(),$=y.useCallback(async(T=0)=>{if(!e)return;i(!0);const P=new v_({filter:{exclude:{userGroupIds:[e]},search:_||""},offset:T});await FO.invoke(P),FO.right(V=>{h(q=>T===0?V:q!==null?new Ia({...V,data:q.data.concat(V.data)}):null)}),FO.left(je.error),i(!1)},[e,_]),{intersector:O}=Fd(async()=>{f?.hasNextPage&&!a&&$(f.offset)});y.useEffect(()=>{g&&$()},[$,g]);const N=async()=>{e&&(u(!0),await UO.addUser(new dne({userIds:Array.from(w.values()),groupIds:[e]})),UO.right(()=>t?.()),UO.left(je.error),C(new Set),E(""),u(!1),v(!1))},M=T=>{C(new Set),E(""),v(!1),n?.(T)},L=y.useCallback(T=>{h(null),E(T)},[]),k=T=>P=>{C(V=>(P?V.add(T):V.delete(T),new Set(V.values())))};return d.jsxs(ne,{isOpen:g,onClose:M,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.addEntity",{entity:s("entities.users.accusative"),defaultValue:"Добавить пользователей"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),a&&f===null&&d.jsx(wt,{}),f!==null&&d.jsxs(d.Fragment,{children:[!f.data?.length&&d.jsx(W,{className:"self-center",children:s("noData.listMessage",{entity:s("entities.users.genitive"),defaultValue:"Список пользователей пуст"})}),f.data.map(T=>d.jsx(si,{label:d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(W,{className:"select-none",variant:"strong",children:T.name}),d.jsx(W,{className:"select-none",variant:"strong",color:"placeholder",children:T.login})]}),checked:w.has(T.id),onChange:k(T.id)},T.id)),a&&d.jsx(wt,{}),O]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:l,onClick:M}),d.jsx(au,{isLoading:l,disabled:l||!w.size,onClick:N})]})]})},FO=new p_,UO=new zL,r2={UserListModal:UVe,UserGroupListModal:FVe,Button:BVe},rse=y.createContext(null),bM=()=>{const{t:e}=H(),t=y.useContext(rse);if(t===null)throw new Error(e("errors.context",{name:"AddClientKeyToAgentGroup",defaultValue:"Используется вне контекста AddClientKeyToAgentGroup"}));return t},sse=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(rse.Provider,{value:r,children:e})},GVe=({clientKeyId:e,onSuccess:t,onClose:n,projectId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{isOpen:v,setIsOpen:w}=bM(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async()=>{if(!e||!r)return;l(!0);const T=new cc({filter:{projectId:r,exclude:{clientKeyIds:[e]},search:E}});await GO.invoke(T),GO.right(g),GO.left(je.error),l(!1)},[e,r,E]);y.useEffect(()=>{v&&O()},[O,v]);const N=async()=>{e&&(f(!0),await zO.addClientKey(new gne({clientKeyIds:[e],ids:Array.from(C.values())})),zO.right(()=>t?.()),zO.left(je.error),_(new Set),$(""),f(!1),w(!1))},M=T=>{_(new Set),$(""),w(!1),n?.(T)},L=y.useCallback(T=>{g(null),$(T)},[]),k=T=>P=>{_(V=>(P?V.add(T):V.delete(T),new Set(V.values())))};return d.jsxs(ne,{isOpen:v,onClose:M,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addToEntity",{entity:a("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[h?.isEmpty&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),h.map(T=>d.jsx(si,{label:T.name,checked:C.has(T.id),onChange:k(T.id)})),i&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:N})]})]})},GO=new ac,zO=new Ud,zVe=({onClick:e,label:t="Добавить клиентский ключ",size:n="large",...r})=>{const{setIsOpen:s}=bM(),a=i=>{s(!0),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,variant:"dashed",size:n,...r,children:[d.jsx(Ma,{})," ",t]})},HVe=Rt(zVe,{permissionKey:"agentGroupClientKeyAdd"}),qVe=({agentGroupId:e,onSuccess:t,onClose:n,projectId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{isOpen:v,setIsOpen:w}=bM(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async()=>{if(!e||!r)return;l(!0);const T=new QL({filter:{projectId:r,exclude:{agentGroupIds:[e]},search:E}});await HO.invoke(T),HO.right(g),HO.left(je.error),l(!1)},[e,r,E]);y.useEffect(()=>{v&&O()},[O,v]);const N=async()=>{e&&(f(!0),await qO.addClientKey(new gne({clientKeyIds:Array.from(C.values()),ids:[e]})),qO.right(()=>t?.()),qO.left(je.error),_(new Set),$(""),f(!1),w(!1))},M=T=>{_(new Set),$(""),w(!1),n?.(T)},L=y.useCallback(T=>{g(null),$(T)},[]),k=T=>P=>{_(V=>(P?V.add(T):V.delete(T),new Set(V.values())))};return d.jsxs(ne,{isOpen:v,onClose:M,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addEntity",{entity:a("entities.clientKey.accusative"),defaultValue:"Добавить клиентский ключ"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[h?.isEmpty&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.clientKeys.genitive"),defaultValue:"Список клиентских ключей пуст"})}),h.map(T=>d.jsx(si,{label:T.name,checked:C.has(T.id),onChange:k(T.id)})),i&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:N})]})]})},HO=new BL,qO=new Ud,s2={ClientKeyListModal:qVe,AgentGroupListModal:GVe,Button:HVe},ase=y.createContext(null),ise=()=>{const{t:e}=H(),t=y.useContext(ase);if(t===null)throw new Error(e("errors.context",{name:"DeleteClientKeyFromAgentGroup",defaultValue:"Используется вне контекста DeleteClientKeyFromAgentGroup"}));return t},KVe=({clientKeyId:e,agentGroupId:t,onClick:n,...r})=>{const{t:s}=H(),{setState:a}=ise(),i=l=>{a({clientKeyId:e,agentGroupId:t}),n?.(l)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:i,...r,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",color:"danger-red",children:s("deleteFromGroup","Удалить из группы")})})},YVe=Rt(KVe,{permissionKey:"agentGroupClientKeyDelete"}),ZVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{state:i,setState:l}=ise(),u=async()=>{if(!i?.agentGroupId||!i?.clientKeyId)return;a(!0);const h=new rIe({ids:[i.agentGroupId],clientKeyIds:[i.clientKeyId]});await KO.deleteClientKey(h),KO.right(()=>{e(i.clientKeyId)}),KO.left(je.error),a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteClientKeyFromAgentGroup","Удаление клиентского ключа из группы агентов")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.clientKeyFromAgentGroup","Вы собираетесь удалить клиентский ключ из группы агентов. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},KO=new Ud,a2={Modal:ZVe,Button:YVe},ose=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(ase.Provider,{value:r,children:e})},lse=y.createContext(null),use=()=>{const{t:e}=H(),t=y.useContext(lse);if(t===null)throw new Error(e("errors.context",{name:"DeleteUserFromUserGroup",defaultValue:"Используется вне контекста DeleteUserFromUserGroup"}));return t},XVe=({userId:e,userGroupId:t,onClick:n,...r})=>{const{t:s}=H(),{setState:a}=use(),i=l=>{a({userId:e,userGroupId:t}),n?.(l)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:i,...r,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",color:"danger-red",children:s("deleteFromGroup","Удалить из группы")})})},WVe=Rt(XVe,{permissionKey:"userGroupUserDelete"}),QVe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{state:i,setState:l}=use(),u=async()=>{if(!i)return;a(!0);const h=new F7e({groupId:i.userGroupId,userId:i.userId});await YO.deleteUser(h),YO.right(()=>{e(i.userId)}),YO.left(je.error),a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteUserFromGroup","Удаление пользователя из группы")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.userFromGroup","Вы собираетесь удалить пользователя из группы. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},YO=new zL,i2={Modal:QVe,Button:WVe},cse=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(lse.Provider,{value:r,children:e})},dse=y.createContext(null),fse=()=>{const{t:e}=H(),t=y.useContext(dse);if(t===null)throw new Error(e("errors.context",{name:"UpdateUserGroupRights",defaultValue:"Используется вне контекста UpdateUserGroupRights"}));return t},JVe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({userGroup:t,setUserGroup:n}),[t]);return d.jsx(dse.Provider,{value:r,children:e})},eBe=({onClick:e,userGroup:t,...n})=>{const{t:r}=H(),{setUserGroup:s}=fse(),a=i=>{s(t),e?.(i)};return d.jsx(Fe,{onClick:a,variant:"text",...n,children:r("modal.title.editRights","Настроить права")})},tBe=Rt(eBe,{permissionKey:"userGroupUserAdd"}),sr={projects:"projects",userGroups:"userGroups",agentGroups:"agentGroups",users:"users",clientKeys:"clientKeys",clientVersions:"clientVersions",clientSchemas:"clientSchemas",clientHandshakes:"clientHandshakes",agents:"agents",rights:"rights",agentConsoles:"agentConsoles",centerFs:"centerFs",agentFs:"agentFs"},nBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"projectCreate",label:t("fields.projectCreate","Создание проекта"),disabled:e?.projectCreate===void 0}),d.jsx(Ue,{name:"projectUpdate",label:t("fields.projectUpdate","Обновление проекта"),disabled:e?.projectUpdate===void 0}),d.jsx(Ue,{name:"projectDelete",label:t("fields.projectDelete","Удаление проекта"),disabled:e?.projectDelete===void 0}),d.jsx(Ue,{name:"projectGetFull",label:t("fields.projectGetFull","Получение информации о проекте и его настройках"),disabled:e?.projectGetFull===void 0}),d.jsx(Ue,{name:"projectList",label:t("fields.projectList","Получение базовой информации о проекте"),disabled:e?.projectList===void 0})]})},rBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"userGroupCreate",label:t("fields.userGroupCreate","Создание группы пользователей"),disabled:e?.userGroupCreate===void 0}),d.jsx(Ue,{name:"userGroupUpdate",label:t("fields.userGroupUpdate","Обновление группы пользователей"),disabled:e?.userGroupUpdate===void 0}),d.jsx(Ue,{name:"userGroupDelete",label:t("fields.userGroupDelete","Удаление группы пользователей"),disabled:e?.userGroupDelete===void 0}),d.jsx(Ue,{name:"userGroupGetFull",label:t("fields.userGroupGetFull","Получение информации о группы пользователей и ее настройках"),disabled:e?.userGroupGetFull===void 0}),d.jsx(Ue,{name:"userGroupList",label:t("fields.userGroupList","Получение списка групп пользователей, к которым у пользователя есть доступ"),disabled:e?.userGroupList===void 0}),d.jsx(Ue,{name:"userGroupListByProject",label:t("fields.userGroupListByProject","Получение списка всех групп пользователей в проекте"),disabled:e?.userGroupListByProject===void 0}),d.jsx(Ue,{name:"userGroupUserAdd",label:t("fields.userGroupUserAdd","Добавление пользователя в группу"),disabled:e?.userGroupUserAdd===void 0}),d.jsx(Ue,{name:"userGroupUserDelete",label:t("fields.userGroupUserDelete","Удаление пользователя из группы"),disabled:e?.userGroupUserDelete===void 0})]})},sBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agentGroupCreate",label:t("fields.agentGroupCreate","Создание группы агентов"),disabled:e?.agentGroupCreate===void 0}),d.jsx(Ue,{name:"agentGroupUpdate",label:t("fields.agentGroupUpdate","Обновление группы агентов"),disabled:e?.agentGroupUpdate===void 0}),d.jsx(Ue,{name:"agentGroupDelete",label:t("fields.agentGroupDelete","Удаление группы агентов"),disabled:e?.agentGroupDelete===void 0}),d.jsx(Ue,{name:"agentGroupGetFull",label:t("fields.agentGroupGetFull","Получение информации о группе агентов и ее настройках"),disabled:e?.agentGroupGetFull===void 0}),d.jsx(Ue,{name:"agentGroupList",label:t("fields.agentGroupList","Получение списка групп агентов, к которым у пользователя есть доступ"),disabled:e?.agentGroupList===void 0}),d.jsx(Ue,{name:"agentGroupListByProject",label:t("fields.agentGroupListByProject","Получение списка всех групп агентов в проекте"),disabled:e?.agentGroupListByProject===void 0}),d.jsx(Ue,{name:"agentGroupAgentAdd",label:t("fields.agentGroupAgentAdd","Добавление агента в группу агентов"),disabled:e?.agentGroupAgentAdd===void 0}),d.jsx(Ue,{name:"agentGroupAgentDelete",label:t("fields.agentGroupAgentDelete","Удаление агента из группы агентов"),disabled:e?.agentGroupAgentDelete===void 0}),d.jsx(Ue,{name:"agentGroupClientKeyAdd",label:t("fields.agentGroupClientKeyAdd","Добавление клиентского ключа в группу агентов"),disabled:e?.agentGroupClientKeyAdd===void 0}),d.jsx(Ue,{name:"agentGroupClientKeyDelete",label:t("fields.agentGroupClientKeyDelete","Удаление клиентского ключа из группы агентов"),disabled:e?.agentGroupClientKeyDelete===void 0}),d.jsx(Ue,{name:"agentGroupUserGroupAdd",label:t("fields.agentGroupUserGroupAdd","Добавление группы пользователей в группу агентов"),disabled:e?.agentGroupUserGroupAdd===void 0}),d.jsx(Ue,{name:"agentGroupUserGroupDelete",label:t("fields.agentGroupUserGroupDelete","Удаление группы пользователей из группы агентов"),disabled:e?.agentGroupUserGroupDelete===void 0})]})},aBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"userCreate",label:t("fields.userCreate","Создание пользователя"),disabled:e?.userCreate===void 0}),d.jsx(Ue,{name:"userUpdate",label:t("fields.userUpdate","Обновление пользователя"),disabled:e?.userUpdate===void 0}),d.jsx(Ue,{name:"userDelete",label:t("fields.userDelete","Удаление пользователя"),disabled:e?.userDelete===void 0}),d.jsx(Ue,{name:"userGetFull",label:t("fields.userGetFull","Получение информации о пользователе и его настройках"),disabled:e?.userGetFull===void 0}),d.jsx(Ue,{name:"userList",label:t("fields.userList","Получение списка пользователей, к которым у пользователя есть доступ"),disabled:e?.userList===void 0}),d.jsx(Ue,{name:"userListAll",label:t("fields.userListAll","Получение списка всех пользователей"),disabled:e?.userListAll===void 0}),d.jsx(Ue,{name:"userListByProject",label:t("fields.userListByProject","Получение списка всех пользователей в проекте"),disabled:e?.userListByProject===void 0})]})},iBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"clientKeyCreate",label:t("fields.clientKeyCreate","Создание ключа клиента"),disabled:e?.clientKeyCreate===void 0}),d.jsx(Ue,{name:"clientKeyUpdate",label:t("fields.clientKeyUpdate","Обновление ключа клиента"),disabled:e?.clientKeyUpdate===void 0}),d.jsx(Ue,{name:"clientKeyDelete",label:t("fields.clientKeyDelete","Удаление ключа клиента"),disabled:e?.clientKeyDelete===void 0}),d.jsx(Ue,{name:"clientKeyGetFull",label:t("fields.clientKeyGetFull","Получение информации о ключе клиента"),disabled:e?.clientKeyGetFull===void 0}),d.jsx(Ue,{name:"clientKeyList",label:t("fields.clientKeyList","Получение списка ключей клиента"),disabled:e?.clientKeyList===void 0}),d.jsx(Ue,{name:"clientKeyListAll",label:t("fields.clientKeyListAll","Получение списка всех ключей клиента"),disabled:e?.clientKeyListAll===void 0})]})},oBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"clientVersionCreate",label:t("fields.clientVersionCreate","Создание версии клиента"),disabled:e?.clientVersionCreate===void 0}),d.jsx(Ue,{name:"clientVersionUpdate",label:t("fields.clientVersionUpdate","Обновление версии клиента"),disabled:e?.clientVersionUpdate===void 0}),d.jsx(Ue,{name:"clientVersionDelete",label:t("fields.clientVersionDelete","Удаление версии клиента"),disabled:e?.clientVersionDelete===void 0}),d.jsx(Ue,{name:"clientVersionGetFull",label:t("fields.clientVersionGetFull","Получение информации о версии клиента"),disabled:e?.clientVersionGetFull===void 0}),d.jsx(Ue,{name:"clientVersionList",label:t("fields.clientVersionList","Получение списка версий клиента"),disabled:e?.clientVersionList===void 0}),d.jsx(Ue,{name:"clientVersionListAll",label:t("fields.clientVersionListAll","Получение списка всех версий клиента"),disabled:e?.clientVersionListAll===void 0})]})},lBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agentCreate",label:t("fields.agentCreate","Создание агента"),disabled:e?.agentCreate===void 0}),d.jsx(Ue,{name:"agentUpdate",label:t("fields.agentUpdate","Обновление агента"),disabled:e?.agentUpdate===void 0}),d.jsx(Ue,{name:"agentDelete",label:t("fields.agentDelete","Удаление агента"),disabled:e?.agentDelete===void 0}),d.jsx(Ue,{name:"agentGetFull",label:t("fields.agentGetFull","Получение полной информации об агенте"),disabled:e?.agentGetFull===void 0}),d.jsx(Ue,{name:"agentBlock",label:t("fields.agentBlock","Блокировка агента"),disabled:e?.agentBlock===void 0}),d.jsx(Ue,{name:"agentUnblock",label:t("fields.agentUnblock","Разблокировка агента"),disabled:e?.agentUnblock===void 0}),d.jsx(Ue,{name:"agentNoteSet",label:t("fields.agentNoteSet","Установка заметки агента"),disabled:e?.agentNoteSet===void 0})]})},uBe=({rights:e})=>{const{t}=H();return d.jsx(Ue,{name:"rightUpdate",label:t("fields.rightUpdate","Обновление права"),disabled:e?.rightUpdate===void 0})},cBe=({rights:e})=>{const{t}=H(),{setValue:n,control:r}=dc(),s=_x({name:"agentConsoleWrite",control:r});return y.useEffect(()=>{s&&n("agentConsoleRead",!0)},[s,n]),d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agentConsoleAdmin",label:t("fields.agentConsoleAdmin","Добавление/удаление пользователей из приватной консоли агента. Изменение типа консоли. Изменение интервала"),disabled:e?.agentConsoleAdmin===void 0}),d.jsx(Ue,{name:"agentConsoleNew",label:t("fields.agentConsoleNew","Создание новой консоли агента"),disabled:e?.agentConsoleNew===void 0}),d.jsx(Ue,{name:"agentConsoleOpen",label:t("fields.agentConsoleOpen","Открытие консоли агента"),disabled:e?.agentConsoleOpen===void 0}),d.jsx(Ue,{name:"agentConsoleClose",label:t("fields.agentConsoleClose","Закрытие консоли агента"),disabled:e?.agentConsoleClose===void 0}),d.jsx(Ue,{name:"agentConsoleDelete",label:t("fields.agentConsoleDelete","Удаление консоли агента"),disabled:e?.agentConsoleDelete===void 0}),d.jsx(Ue,{name:"agentConsoleList",label:t("fields.agentConsoleList","Получение списка доступных консолей агента"),disabled:e?.agentConsoleList===void 0}),d.jsx(Ue,{name:"agentConsoleLock",label:t("fields.agentConsoleLock",'Установка "Lock" на консоль агента'),disabled:e?.agentConsoleLock===void 0}),d.jsx(Ue,{name:"agentConsoleUnlock",label:t("fields.agentConsoleUnlock",'Снятие чужого "Lock" с консоли агента'),disabled:e?.agentConsoleUnlock===void 0}),d.jsx(Ue,{name:"agentConsoleRead",label:t("fields.agentConsoleRead","Получение информации о консоли (чтение вывода, базовой информации и т.д.)"),disabled:e?.agentConsoleRead===void 0||s}),d.jsx(Ue,{name:"agentConsoleWrite",label:t("fields.agentConsoleWrite","Ввод команд в консоль агента"),disabled:e?.agentConsoleWrite===void 0}),d.jsx(Ue,{name:"agentConsolePin",label:t("fields.agentConsolePin","Прикрепление консоли агента к сессии"),disabled:e?.agentConsolePin===void 0})]})},dBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agentLfsFileCreate",label:t("fields.fsFileCreate","Создание файла"),disabled:e?.agentLfsFileCreate===void 0}),d.jsx(Ue,{name:"agentLfsFileGet",label:t("fields.fsFileGet","Получение файла"),disabled:e?.agentLfsFileGet===void 0}),d.jsx(Ue,{name:"agentLfsFolderCreate",label:t("fields.fsFolderCreate","Создание папки"),disabled:e?.agentLfsFolderCreate===void 0}),d.jsx(Ue,{name:"agentLfsFolderList",label:t("fields.fsFolderList","Получение списка папок"),disabled:e?.agentLfsFolderList===void 0}),d.jsx(Ue,{name:"agentLfsItemGetInfo",label:t("fields.fsItemGetInfo","Получение информации об элементе"),disabled:e?.agentLfsItemGetInfo===void 0}),d.jsx(Ue,{name:"agentLfsItemDelete",label:t("fields.fsItemDelete","Удаление элемента"),disabled:e?.agentLfsItemDelete===void 0}),d.jsx(Ue,{name:"agentLfsItemMove",label:t("fields.fsItemMove","Перемещение элемента"),disabled:e?.agentLfsItemMove===void 0}),d.jsx(Ue,{name:"agentLfsItemRename",label:t("fields.fsItemRename","Переименование элемента"),disabled:e?.agentLfsItemRename===void 0}),d.jsx(Ue,{name:"agentLfsReset",label:t("fields.fsReset","Сброс файловой системы агента"),disabled:e?.agentLfsReset===void 0})]})},fBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agentRfsFileCreate",label:t("fields.fsFileCreate","Создание файла"),disabled:e?.agentRfsFileCreate===void 0}),d.jsx(Ue,{name:"agentRfsFileGet",label:t("fields.fsFileGet","Получение файла"),disabled:e?.agentRfsFileGet===void 0}),d.jsx(Ue,{name:"agentRfsFolderCreate",label:t("fields.fsFolderCreate","Создание папки"),disabled:e?.agentRfsFolderCreate===void 0}),d.jsx(Ue,{name:"agentRfsFolderList",label:t("fields.fsFolderList","Получение списка папок"),disabled:e?.agentRfsFolderList===void 0}),d.jsx(Ue,{name:"agentRfsItemCopy",label:t("fields.fsItemCopy","Копирование элемента"),disabled:e?.agentRfsItemCopy===void 0}),d.jsx(Ue,{name:"agentRfsItemDelete",label:t("fields.fsItemDelete","Удаление элемента"),disabled:e?.agentRfsItemDelete===void 0}),d.jsx(Ue,{name:"agentRfsItemMove",label:t("fields.fsItemMove","Перемещение элемента"),disabled:e?.agentRfsItemMove===void 0}),d.jsx(Ue,{name:"agentRfsItemRename",label:t("fields.fsItemRename","Переименование элемента"),disabled:e?.agentRfsItemRename===void 0}),d.jsx(Ue,{name:"agentRfsReset",label:t("fields.fsCacheReset","Сброс кэша отображающего файловую систему на устройстве агента"),disabled:e?.agentRfsReset===void 0}),d.jsx(Ue,{name:"agentRfsActionStatusList",label:t("fields.fsActionStatusList","Получение статуса действия агента"),disabled:e?.agentRfsActionStatusList===void 0})]})},hBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"clientHandshakeCreate",label:t("fields.clientHandshakeCreate","Создание ключа рукопожатия клиента"),disabled:e?.clientHandshakeCreate===void 0}),d.jsx(Ue,{name:"clientHandshakeUpdate",label:t("fields.clientHandshakeUpdate","Обновление ключа рукопожатия клиента"),disabled:e?.clientHandshakeUpdate===void 0}),d.jsx(Ue,{name:"clientHandshakeDelete",label:t("fields.clientHandshakeDelete","Удаление ключа рукопожатия клиента"),disabled:e?.clientHandshakeDelete===void 0}),d.jsx(Ue,{name:"clientHandshakeGetFull",label:t("fields.clientHandshakeGetFull","Получение информации о ключе рукопожатия клиента"),disabled:e?.clientHandshakeGetFull===void 0}),d.jsx(Ue,{name:"clientHandshakeList",label:t("fields.clientHandshakeList","Получение списка ключей рукопожатия клиента"),disabled:e?.clientHandshakeList===void 0}),d.jsx(Ue,{name:"clientHandshakeListAll",label:t("fields.clientHandshakeListAll","Получение списка всех ключей рукопожатия клиента"),disabled:e?.clientHandshakeListAll===void 0})]})},pBe=({rights:e})=>{const{t}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"clientSchemaCreate",label:t("fields.clientSchemaCreate","Создание схемы клиента"),disabled:e?.clientSchemaCreate===void 0}),d.jsx(Ue,{name:"clientSchemaUpdate",label:t("fields.clientSchemaUpdate","Обновление схемы клиента"),disabled:e?.clientSchemaUpdate===void 0}),d.jsx(Ue,{name:"clientSchemaDelete",label:t("fields.clientSchemaDelete","Удаление схемы клиента"),disabled:e?.clientSchemaDelete===void 0}),d.jsx(Ue,{name:"clientSchemaGetFull",label:t("fields.clientSchemaGetFull","Получение информации о схеме клиента"),disabled:e?.clientSchemaGetFull===void 0}),d.jsx(Ue,{name:"clientSchemaList",label:t("fields.clientSchemaList","Получение списка схем клиента"),disabled:e?.clientSchemaList===void 0}),d.jsx(Ue,{name:"clientSchemaListAll",label:t("fields.clientSchemaListAll","Получение списка всех схем клиента"),disabled:e?.clientSchemaListAll===void 0})]})},mBe=({onSuccess:e,onClose:t,className:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),{userGroup:l,setUserGroup:u}=fse(),[f,h]=y.useState(sr.projects),g=y.useMemo(()=>l?.rights?{...l.rights}:{},[l]),v=Cr({defaultValues:g});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async E=>{if(!l)return;i(!0);const $=new cne({id:l.id,name:l.name,rights:E});await ZO.update($),ZO.right(O=>e?.(O)),ZO.left(je.error),v.reset({}),i(!1),u(null),h(sr.projects)},C=E=>{u(null),h(sr.projects),v.reset({}),t?.(E)},_=E=>{h(E)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:!!l,onClose:C,className:Fn("!w-[730px]",n),...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.rightsSettings","Настройка прав")})}),d.jsx(ne.Body,{className:"!overflow-y-visible min-h-[400px]",children:d.jsxs("div",{className:"flex gap-2.5",children:[d.jsxs(su,{tab:f,className:"!gap-2.5 min-w-[256px] max-w-[256px] h-[390px] overflow-y-auto border-r border-r-secondary-saturation",onClick:_,direction:"vertical",children:[d.jsx(Yn,{label:rn(s("entities.projects.nominative","Проекты")),tab:sr.projects,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("entities.userGroups.nominative","Группы пользователей")),tab:sr.userGroups,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("entities.agentGroups.nominative","Группы агентов")),tab:sr.agentGroups,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("entities.users.nominative","Пользователи")),tab:sr.users,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("entities.clientKeys.nominative","Клиентские ключи")),tab:sr.clientKeys,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.clientVesions","Версии клиента")),tab:sr.clientVersions,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.clientHandshakes","Клиентские ключи рукопожатия")),tab:sr.clientHandshakes,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.clientSchemas","Схемы клиента")),tab:sr.clientSchemas,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("entities.agents.nominative","Агенты")),tab:sr.agents,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.rights","Права")),tab:sr.rights,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.agentConsoles","Консоли агента")),tab:sr.agentConsoles,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.centerFs","Файловое облако агента")),tab:sr.centerFs,variant:"ghost",className:bi}),d.jsx(Yn,{label:rn(s("tabs.rights.agentFs","Файлы на устройстве агента")),tab:sr.agentFs,variant:"ghost",className:bi})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[f===sr.projects&&d.jsx(nBe,{rights:l?.rights}),f===sr.userGroups&&d.jsx(rBe,{rights:l?.rights}),f===sr.agentGroups&&d.jsx(sBe,{rights:l?.rights}),f===sr.users&&d.jsx(aBe,{rights:l?.rights}),f===sr.clientKeys&&d.jsx(iBe,{rights:l?.rights}),f===sr.clientVersions&&d.jsx(oBe,{rights:l?.rights}),f===sr.clientHandshakes&&d.jsx(hBe,{rights:l?.rights}),f===sr.clientSchemas&&d.jsx(pBe,{rights:l?.rights}),f===sr.agents&&d.jsx(lBe,{rights:l?.rights}),f===sr.rights&&d.jsx(uBe,{rights:l?.rights}),f===sr.agentConsoles&&d.jsx(cBe,{rights:l?.rights}),f===sr.centerFs&&d.jsx(dBe,{rights:l?.rights}),f===sr.agentFs&&d.jsx(fBe,{rights:l?.rights})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:C}),d.jsx(us,{isLoading:a,disabled:a})]})]})})})},bi="justify-start !h-8 shrink-0 !px-0",ZO=new m_,Jq={Modal:mBe,Button:tBe},hse=y.createContext(null),wM=()=>{const{t:e}=H(),t=y.useContext(hse);if(t===null)throw new Error(e("errors.context",{name:"UpsertClientSchema",defaultValue:"Используется вне контекста UpsertClientSchema"}));return t},pse=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,clientSchema:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(hse.Provider,{value:i,children:e})},gBe=({onClick:e,...t})=>{const{t:n}=H(),{onOpen:r}=wM(),s=a=>{r(null),e?.(a)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:s,variant:"dashed",size:"large",...t,children:[d.jsx(Ma,{})," ",n("addSchema","Добавить схему")]})},vBe=Rt(gBe,{permissionKey:"clientSchemaCreate"}),yBe=({onClick:e,clientSchema:t,variant:n="secondary",...r})=>{const{t:s}=H(),{onOpen:a}=wM(),i=l=>{a(t),e?.(l)};return d.jsx(Fe,{onClick:i,variant:n,...r,children:s("edit","Редактировать")})},xBe=Rt(yBe,{permissionKey:"clientSchemaUpdate"}),eK={name:"",value:""},bBe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional()})},[t,e])},wBe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=bBe(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,clientSchema:h}=wM(),g=y.useMemo(()=>h?.id?{name:h.name,value:h.value}:eK,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new fIe({id:h.id,name:_.name,value:_.value});await Im.update(E),Im.right($=>e?.($)),Im.left(je.error)}else{const E=new uIe({projectId:n,name:_.name,value:_.value});await Im.create(E),Im.right($=>e?.($)),Im.left(je.error)}v.reset(eK),l(!1),f(!1)}},C=_=>{f(!1),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editSchema","Редактирование схемы"):s("modal.title.newSchema","Новая схема")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:s("fields.schemaName","Название схемы"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название схемы",entity:s("fields.schemaName","Название схемы").toLowerCase()}),name:"name",inputClassName:"w-fulls",autoComplete:"off",required:!0}),d.jsx(pt,{label:s("fields.schemaValue","Значение схемы"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение схемы",entity:s("fields.schemaValue","Значение схемы").toLowerCase()}),name:"value",inputClassName:"w-full",autoComplete:"off"})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Im=new h_,f1={Modal:wBe,AddButton:vBe,EditButton:xBe},mse=y.createContext(null),gse=()=>{const{t:e}=H(),t=y.useContext(mse);if(t===null)throw new Error(e("errors.context",{name:"DeleteClientSchema",defaultValue:"Используется вне контекста DeleteClientSchema"}));return t},CBe=({clientSchemaId:e,onClick:t,...n})=>{const{t:r}=H(),{setClientSchemaId:s}=gse(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},SBe=Rt(CBe,{permissionKey:"clientSchemaDelete"}),_Be=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{clientSchemaId:i,setClientSchemaId:l}=gse(),u=async()=>{if(a(!0),i!==null){const h=new cIe({id:i});await XO.delete(h),XO.right(()=>{e(i)}),XO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление схемы клиента",entity:r("entities.clientSchema.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.clientSchema","Вы собираетесь удалить схему клиента. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этой схемой.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},XO=new h_,tK={Modal:_Be,Button:SBe},jBe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientSchemaId:t,setClientSchemaId:n}),[t]);return d.jsx(mse.Provider,{value:r,children:e})},EBe=({clientSchemaId:e,clientSchemaName:t,variant:n="secondary",onClick:r,label:s,onChangeLoading:a,exportType:i="json",className:l,...u})=>{const{t:f}=H(),[h,g]=y.useState(!1),v=async w=>{g(!0),a?.(!0),await nK.invoke(new xne({id:e,kind:i})),nK.right(C=>ZL(C,`${t}.${i==="enums"?"zip":"json"}`)),r?.(w),g(!1),a?.(!1)};return d.jsx(Fe,{className:Fn("whitespace-nowrap",l),variant:n,onClick:v,isLoading:h,...u,children:s||f("exportSchema","Экспорт схемы")})},nK=new kLe,o2=Rt(EBe,{permissionKey:"clientSchemaGetFull"}),vse=y.createContext(null),CM=()=>{const{t:e}=H(),t=y.useContext(vse);if(t===null)throw new Error(e("errors.context",{name:"UpsertClientVersion",defaultValue:"Используется вне контекста UpsertClientVersion"}));return t},yse=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,clientVersion:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(vse.Provider,{value:i,children:e})},$Be=({onClick:e,...t})=>{const{t:n}=H(),{onOpen:r}=CM(),s=a=>{r(null),e?.(a)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:s,variant:"dashed",size:"large",...t,children:[d.jsx(Ma,{})," ",n("addVersion","Добавить версию")]})},RBe=Rt($Be,{permissionKey:"clientVersionCreate"}),OBe=({onClick:e,clientVersion:t,variant:n="secondary",...r})=>{const{t:s}=H(),{onOpen:a}=CM(),i=l=>{a(t),e?.(l)};return d.jsx(Fe,{onClick:i,variant:n,...r,children:s("edit","Редактировать")})},TBe=Rt(OBe,{permissionKey:"clientVersionUpdate"}),rK={name:"",value:""},ABe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional()})},[t,e])},kBe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=ABe(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,clientVersion:h}=CM(),g=y.useMemo(()=>h?.id?{name:h.name,value:h.value}:rK,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new yIe({id:h.id,name:_.name,value:_.value});await Pm.update(E),Pm.right($=>e?.($)),Pm.left(je.error)}else{const E=new pIe({projectId:n,name:_.name,value:_.value});await Pm.create(E),Pm.right($=>e?.($)),Pm.left(je.error)}v.reset(rK),l(!1),f(!1)}},C=_=>{f(!1),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editVersion","Редактирование версии"):s("modal.title.newVersion","Новая версия")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(pt,{label:s("fields.versionName","Название версии"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название версии",entity:s("fields.versionName","Название версии").toLowerCase()}),name:"name",inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",required:!0})}),d.jsx("div",{className:"w-full",children:d.jsx(pt,{label:s("fields.versionValue","Значение версии"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение версии",entity:s("fields.versionValue","Значение версии").toLowerCase()}),name:"value",inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off"})})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Pm=new FL,h1={Modal:kBe,AddButton:RBe,EditButton:TBe},xse=y.createContext(null),bse=()=>{const{t:e}=H(),t=y.useContext(xse);if(t===null)throw new Error(e("errors.context",{name:"DeleteClientVersion",defaultValue:"Используется вне контекста DeleteClientVersion"}));return t},NBe=({clientVersionId:e,onClick:t,...n})=>{const{t:r}=H(),{setClientVersionId:s}=bse(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},LBe=Rt(NBe,{permissionKey:"clientVersionDelete"}),MBe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{clientVersionId:i,setClientVersionId:l}=bse(),u=async()=>{if(a(!0),i!==null){const h=new mIe({id:i});await WO.delete(h),WO.right(()=>{e(i)}),WO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление версии клиента",entity:r("entities.clientVersion.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.clientVersion","Вы собираетесь удалить версию клиента. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этой версией.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},WO=new FL,sK={Modal:MBe,Button:LBe},IBe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientVersionId:t,setClientVersionId:n}),[t]);return d.jsx(xse.Provider,{value:r,children:e})},wse=y.createContext(null),Cse=()=>{const{t:e}=H(),t=y.useContext(wse);if(t===null)throw new Error(e("errors.context",{name:"ImportClientSchema",defaultValue:"Используется вне контекста ImportClientSchema"}));return t},PBe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientSchema:t,setClientSchema:n}),[t]);return d.jsx(wse.Provider,{value:r,children:e})},DBe=({onClick:e,...t})=>{const{t:n}=H(),[r,s]=y.useState(!1),{setClientSchema:a}=Cse(),i=y.useRef(null),l=f=>{i.current?.click(),e?.(f)},u=f=>{const h=f.target.files?.[0];if(!h)return;s(!0);const g=new FileReader;g.onload=v=>{try{const w=JSON.parse(v.target?.result);a(w)}catch(w){console.log(w),je.error(n("errors.openJsonFile","Не удалось открыть файл. Убедитесь, что файл содержит JSON и попробуйте снова"))}s(!1),i.current.value=""},g.onerror=()=>{je.error(n("errors.readFile","Ошибка при чтении файла.")),i.current.value="",s(!1)},g.readAsText(h)};return d.jsxs("div",{className:"flex w-full",children:[d.jsxs(Fe,{onClick:l,variant:"dashed",className:"w-full",size:"large",isLoading:r,disabled:r,...t,children:[d.jsx(B8,{}),n("importSchema","Импортировать схему")]}),d.jsx("input",{type:"file",ref:i,className:"invisible w-0 h-0",onChange:u,accept:".json"})]})},VBe=Rt(DBe,{permissionKey:"clientSchemaCreate"}),aK={uuid:"",name:"",value:""},BBe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({uuid:te().max(36,n(36)).optional(),name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional()})},[t,e])},FBe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=BBe(),[i,l]=y.useState(!1),{clientSchema:u,setClientSchema:f}=Cse(),h=y.useMemo(()=>u||aK,[u]),g=Cr({resolver:hs(a),defaultValues:h,mode:"onBlur"});y.useEffect(()=>{g.reset(h)},[h,g]);const v=async C=>{if(!n)return;l(!0);const _=DS(u?{...u,...C}:C).buffer,E=new hIe({projectId:n});await QO.import(E,_),QO.right($=>e?.($)),QO.left(je.error),g.reset(aK),l(!1),f(null)},w=C=>{f(null),t?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:!!u,onClose:w,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("importSchema","Импорт схемы")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(pt,{label:s("fields.schemaUuid","UUID схемы"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите UUID схемы",entity:s("fields.schemaUuid","UUID схемы")}),name:"uuid",inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off"})}),d.jsx("div",{className:"w-full",children:d.jsx(pt,{label:s("fields.schemaName","Название схемы"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название схемы",entity:s("fields.schemaName","Название схемы").toLowerCase()}),name:"name",inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",required:!0})}),d.jsx("div",{className:"w-full",children:d.jsx(pt,{label:s("fields.schemaValue","Значение схемы"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение схемы",entity:s("fields.schemaValue","Значение схемы").toLowerCase()}),name:"value",inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off"})})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:w}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},QO=new h_,iK={Modal:FBe,Button:VBe},Sse=y.createContext(null),SM=()=>{const{t:e}=H(),t=y.useContext(Sse);if(t===null)throw new Error(e("errors.context",{name:"UpsertClientHandshake",defaultValue:"Используется вне контекста UpsertClientHandshake"}));return t},_se=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),a=y.useCallback(l=>{s(l),n(!0)},[]),i=y.useMemo(()=>({isOpen:t,clientHandshake:r,onOpen:a,setIsOpen:n}),[t,r,a]);return d.jsx(Sse.Provider,{value:i,children:e})},UBe=({onClick:e,...t})=>{const{t:n}=H(),{onOpen:r}=SM(),s=a=>{r(null),e?.(a)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:s,variant:"dashed",size:"large",...t,children:[d.jsx(Ma,{})," ",n("addHandshake","Добавить рукопожатие")]})},GBe=Rt(UBe,{permissionKey:"clientHandshakeCreate"}),zBe=({onClick:e,clientHandshake:t,variant:n="secondary",...r})=>{const{t:s}=H(),{onOpen:a}=SM(),i=l=>{a(t),e?.(l)};return d.jsx(Fe,{onClick:i,variant:n,...r,children:s("edit","Редактировать")})},HBe=Rt(zBe,{permissionKey:"clientHandshakeUpdate"}),oK={name:"",value:"",privateKey:""},qBe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=r=>e("errors.maxCharNumber",{maxValue:r,defaultValue:"Максимум {{maxValue}} символов"});return et({name:te({required_error:t.required}).nonempty(t.required).max(120,n(120)),value:te().max(32,n(32)).optional(),privateKey:te().optional()})},[t,e])},KBe=({onSuccess:e,onClose:t,projectId:n,...r})=>{const{t:s}=H(),a=qBe(),[i,l]=y.useState(!1),{isOpen:u,setIsOpen:f,clientHandshake:h}=SM(),g=y.useMemo(()=>h?.id?{name:h.name,value:h.value,privateKey:""}:oK,[h]),v=Cr({resolver:hs(a),defaultValues:g,mode:"onBlur"});y.useEffect(()=>{v.reset(g)},[g,v]);const w=async _=>{if(n){if(l(!0),h?.id){const E=new SIe({id:h.id,name:_.name,value:_.value,privateKey:_.privateKey});await Dm.update(E),Dm.right($=>e?.($)),Dm.left(je.error)}else{const E=new xIe({projectId:n,name:_.name,value:_.value,privateKey:_.privateKey});await Dm.create(E),Dm.right($=>e?.($)),Dm.left(je.error)}v.reset(oK),l(!1),f(!1)}},C=_=>{f(!1),t?.(_)};return d.jsx(wr,{...v,children:d.jsx("form",{onSubmit:v.handleSubmit(w),children:d.jsxs(ne,{isOpen:u,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:h?.id?s("modal.title.editHandshake","Редактирование рукопожатия"):s("modal.title.newHandshake","Новое рукопожатие")})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(pt,{label:s("fields.handshakeName","Название рукопожатия"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите название рукопожатия",entity:s("fields.handshakeName","Название рукопожатия").toLowerCase()}),name:"name",inputClassName:"w-full",autoComplete:"off",required:!0}),d.jsx(pt,{label:s("fields.handshakeValue","Значение рукопожатия"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите значение рукопожатия",entity:s("fields.handshakeValue","Значение рукопожатия").toLowerCase()}),name:"value",inputClassName:"w-full",autoComplete:"off"}),d.jsx(b_,{label:s("fields.privateKey","Приватный ключ"),placeholder:s("placeholders.inputEntity",{defaultValue:"Введите приватный ключ",entity:s("fields.privateKey","Приватный ключ").toLowerCase()}),name:"privateKey",inputClassName:"w-full",autoComplete:"off",title:s("info.privateKey","приватный RSA-ключ в формате PEM / PKCS#1")})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:C}),h?.id?d.jsx(us,{isLoading:i,disabled:i}):d.jsx(uc,{isLoading:i,disabled:i})]})]})})})},Dm=new UL,p1={Modal:KBe,AddButton:GBe,EditButton:HBe},jse=y.createContext(null),Ese=()=>{const{t:e}=H(),t=y.useContext(jse);if(t===null)throw new Error(e("errors.context",{name:"DeleteClientHandshake",defaultValue:"Используется вне контекста DeleteClientHandshake"}));return t},YBe=({clientHandshakeId:e,onClick:t,...n})=>{const{t:r}=H(),{setClientHandshakeId:s}=Ese(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right",variant:"strong",color:"danger-red",children:r("delete","Удалить")})})},ZBe=Rt(YBe,{permissionKey:"clientHandshakeDelete"}),XBe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{clientHandshakeId:i,setClientHandshakeId:l}=Ese(),u=async()=>{if(a(!0),i!==null){const h=new bIe({id:i});await JO.delete(h),JO.right(()=>{e(i)}),JO.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление рукопожатия клиента",entity:r("entities.clientHandshake.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.clientHandshake","Вы собираетесь удалить рукопожатие клиента. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этим рукопожатием.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},JO=new UL,lK={Modal:XBe,Button:ZBe},WBe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientHandshakeId:t,setClientHandshakeId:n}),[t]);return d.jsx(jse.Provider,{value:r,children:e})},$se=y.createContext(null),Rse=()=>{const{t:e}=H(),t=y.useContext($se);if(t===null)throw new Error(e("errors.context",{name:"AddUserToConsole",defaultValue:"Используется вне контекста AddUserToConsole"}));return t},QBe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({consoleId:t,setConsoleId:n}),[t]);return d.jsx($se.Provider,{value:r,children:e})},JBe=({onClick:e,size:t="large",label:n,consoleId:r,...s})=>{const{t:a}=H(),{setConsoleId:i}=Rse(),l=u=>{i(r),e?.(u)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:l,variant:"dashed",size:t,...s,children:[d.jsx(Ma,{})," ",n||a("modal.title.addEntity",{entity:a("entities.user.accusative"),defaultValue:"Добавить пользователя"})]})},eFe=({agentId:e,userIds:t,onSuccess:n,onClose:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{consoleId:v,setConsoleId:w}=Rse(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async(P=0)=>{if(!v||!e)return;l(!0);const V=new v_({filter:{agentId:e,exclude:{userIds:t||[]},search:E||""},offset:P});await eT.invoke(V),eT.right(q=>{g(K=>P===0?q:K!==null?new Ia({...q,data:K.data.concat(q.data)}):null)}),eT.left(je.error),l(!1)},[e,v,E,t]),{intersector:N}=Fd(async()=>{h?.hasNextPage&&!i&&O(h.offset)});y.useEffect(()=>{v&&O()},[O,v]);const M=async()=>{!v||!e||(f(!0),await tT.add(new _Ie({agentId:e,consoleId:v,userIds:Array.from(C.values()),rights:{}})),tT.right(()=>n?.()),tT.left(je.error),_(new Set),$(""),f(!1),w(null))},L=P=>{_(new Set),$(""),w(null),r?.(P)},k=y.useCallback(P=>{g(null),$(P)},[]),T=P=>V=>{_(q=>(V?q.add(P):q.delete(P),new Set(q.values())))};return d.jsxs(ne,{isOpen:!!v,onClose:L,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addEntity",{entity:a("entities.user.accusative"),defaultValue:"Добавить пользователя"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:k})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[!h.data?.length&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.users.genitive"),defaultValue:"Список пользователей пуст"})}),h.data.map(P=>d.jsx(si,{label:d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(W,{className:"select-none",variant:"strong",children:P.name}),d.jsx(W,{className:"select-none",variant:"strong",color:"placeholder",children:P.login})]}),checked:C.has(P.id),onChange:T(P.id)},P.id)),i&&d.jsx(wt,{}),N]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:L}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:M})]})]})},eT=new p_,tT=new HL,uK={Modal:eFe,Button:JBe},Ose=y.createContext(null),Tse=()=>{const{t:e}=H(),t=y.useContext(Ose);if(t===null)throw new Error(e("errors.context",{name:"DeleteUserFromConsole",defaultValue:"Используется вне контекста DeleteUserFromConsole"}));return t},tFe=({userId:e,consoleId:t,onClick:n,...r})=>{const{t:s}=H(),{setState:a}=Tse(),i=l=>{a({userId:e,consoleId:t}),n?.(l)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:i,...r,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",color:"danger-red",children:s("delete","Удалить")})})},nFe=({onSuccess:e,onClose:t,agentId:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),{state:l,setState:u}=Tse(),f=async()=>{if(!l?.consoleId||!n)return;i(!0);const g=new jIe({agentId:n,consoleId:l.consoleId,userIds:[l.userId]});await nT.delete(g),nT.right(()=>{e(l.userId)}),nT.left(je.error),i(!1),u(null)},h=()=>{u(null),t?.()};return d.jsxs(ne,{isOpen:!!l,onClose:h,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.deleteUseRights","Удаление прав пользователя")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:s("modal.deleteMessage.userConsoleRights","Вы собираетесь удалить права пользователя для текущей консоли. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:h}),d.jsx(Fs,{isLoading:a,disabled:a,onClick:f})]})]})},nT=new HL,cK={Modal:nFe,Button:tFe},rFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Ose.Provider,{value:r,children:e})},Ase=y.createContext(null),kse=()=>{const{t:e}=H(),t=y.useContext(Ase);if(t===null)throw new Error(e("errors.context",{name:"UpdateUserConsoleRights",defaultValue:"Используется вне контекста UpdateUserConsoleRights"}));return t},sFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Ase.Provider,{value:r,children:e})},aFe=({onClick:e,user:t,consoleId:n,...r})=>{const{t:s}=H(),{setState:a}=kse(),i=l=>{a({user:t,consoleId:n}),e?.(l)};return d.jsx(Fe,{onClick:i,onlyIcon:!0,variant:"ghost",title:s("modal.title.rightsSettings","Настройка прав"),...r,children:d.jsx(D8,{})})},iFe=({onSuccess:e,onClose:t,className:n,agentId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),{state:u,setState:f}=kse(),h=y.useMemo(()=>u?.user?.consoleRights?{...u.user.consoleRights}:{},[u]),g=Cr({defaultValues:h});y.useEffect(()=>{g.reset(h)},[h,g]);const v=async C=>{if(!u?.consoleId||!u.user||!r)return;l(!0);const _=new $Ie({agentId:r,consoleId:u.consoleId,userId:u.user.id,rights:C});await rT.update(_),rT.right(E=>e?.(E)),rT.left(je.error),g.reset({}),l(!1),f(null)},w=C=>{f(null),g.reset({}),t?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:!!u,onClose:w,className:Fn("!w-[730px]",n),...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.rightsSettings","Настройка прав")})}),d.jsx(ne.Body,{className:"!overflow-y-visible min-h-[400px]",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(Pne,{rights:u?.user?.consoleRights})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:w}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},rT=new HL,dK={Modal:iFe,Button:aFe},Nse=y.createContext(null),Lse=()=>{const{t:e}=H(),t=y.useContext(Nse);if(t===null)throw new Error(e("errors.context",{name:"AddUserGroupToConsole",defaultValue:"Используется вне контекста AddUserGroupToConsole"}));return t},oFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({consoleId:t,setConsoleId:n}),[t,n]);return d.jsx(Nse.Provider,{value:r,children:e})},lFe=({onClick:e,size:t="large",label:n,consoleId:r,...s})=>{const{t:a}=H(),{setConsoleId:i}=Lse(),l=u=>{i(r),e?.(u)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:l,variant:"dashed",size:t,...s,children:[d.jsx(Ma,{})," ",n||a("modal.title.addEntity",{entity:a("entities.userGroup.accusative"),defaultValue:"Добавить группу пользователей"})]})},uFe=({userGroupIds:e,agentId:t,onSuccess:n,onClose:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{consoleId:v,setConsoleId:w}=Lse(),[C,_]=y.useState(new Set),[E,$]=y.useState(),O=y.useCallback(async()=>{if(!t)return;l(!0);const P=new mv({filter:{agentId:t,exclude:{userGroupIds:e||[]},search:E}});await sT.invoke(P),sT.right(V=>g(V?wx(V.values,"projectId"):null)),sT.left(je.error),l(!1)},[e,t,E]);y.useEffect(()=>{v&&O()},[O,v]);const N=async()=>{!t||!v||(f(!0),await aT.add(new RIe({agentId:t,consoleId:v,userGroupIds:Array.from(C.values()),rights:{}})),aT.right(()=>n?.()),aT.left(je.error),_(new Set),$(""),f(!1),w(null))},M=P=>{_(new Set),$(""),w(null),r?.(P)},L=y.useCallback(P=>{g(null),$(P)},[]),k=P=>V=>{_(q=>(V?q.add(P):q.delete(P),new Set(q.values())))},T=Array.from(h?.values()||[]);return d.jsxs(ne,{isOpen:!!v,onClose:M,...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.addEntity",{entity:a("entities.userGroup.accusative"),defaultValue:"Добавить группу пользователей"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:L})}),i&&h===null&&d.jsx(wt,{}),h!==null&&d.jsxs(d.Fragment,{children:[!h?.size&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),T.map((P,V)=>d.jsxs(y.Fragment,{children:[d.jsx(W,{variant:"strong",color:"placeholder",children:P[0].projectName}),P.map(q=>d.jsx(si,{label:q.name,checked:C.has(q.id),onChange:k(q.id)},q.id)),V!==T.length-1&&d.jsx("div",{className:"w-full h-[1px] bg-placeholder"})]},P[0].projectId))]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(au,{isLoading:u,disabled:u||!C.size,onClick:N})]})]})},sT=new fv,aT=new qL,fK={Modal:uFe,Button:lFe},Mse=y.createContext(null),Ise=()=>{const{t:e}=H(),t=y.useContext(Mse);if(t===null)throw new Error(e("errors.context",{name:"DeleteUserGroupFromConsole",defaultValue:"Используется вне контекста DeleteUserGroupFromConsole"}));return t},cFe=({userGroupId:e,consoleId:t,onClick:n,...r})=>{const{t:s}=H(),{setState:a}=Ise(),i=l=>{a({userGroupId:e,consoleId:t}),n?.(l)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:i,...r,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",color:"danger-red",children:s("delete","Удалить")})})},dFe=({onSuccess:e,onClose:t,agentId:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),{state:l,setState:u}=Ise(),f=async()=>{if(!l||!l.consoleId||!n)return;i(!0);const g=new OIe({agentId:n,consoleId:l.consoleId,userGroupIds:[l.userGroupId]});await iT.delete(g),iT.right(()=>{e(l.userGroupId)}),iT.left(je.error),i(!1),u(null)},h=()=>{u(null),t?.()};return d.jsxs(ne,{isOpen:!!l,onClose:h,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.deleteUserGroupRights","Удаление прав группы пользователей")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:s("modal.deleteMessage.userGroupConsoleRights","Вы собираетесь удалить права группы пользователей для текущей консоли. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:h}),d.jsx(Fs,{isLoading:a,disabled:a,onClick:f})]})]})},iT=new qL,hK={Modal:dFe,Button:cFe},fFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Mse.Provider,{value:r,children:e})},Pse=y.createContext(null),Dse=()=>{const{t:e}=H(),t=y.useContext(Pse);if(t===null)throw new Error(e("errors.context",{name:"UpdateUserGroupConsoleRights",defaultValue:"Используется вне контекста UpdateUserGroupConsoleRights"}));return t},hFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({state:t,setState:n}),[t]);return d.jsx(Pse.Provider,{value:r,children:e})},pFe=({onClick:e,userGroup:t,consoleId:n,...r})=>{const{t:s}=H(),{setState:a}=Dse(),i=l=>{a({userGroup:t,consoleId:n}),e?.(l)};return d.jsx(Fe,{onClick:i,onlyIcon:!0,variant:"ghost",title:s("modal.title.rightsSettings","Настройка прав"),...r,children:d.jsx(D8,{})})},mFe=({onSuccess:e,onClose:t,className:n,agentId:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(!1),{state:u,setState:f}=Dse(),h=y.useMemo(()=>u?.userGroup?.consoleRights?{...u.userGroup.consoleRights}:{},[u]),g=Cr({defaultValues:h});y.useEffect(()=>{g.reset(h)},[h,g]);const v=async C=>{if(!u?.consoleId||!u.userGroup||!r)return;l(!0);const _=new AIe({agentId:r,consoleId:u.consoleId,userGroupId:u.userGroup.id,rights:C});await oT.update(_),oT.right(E=>e?.(E)),oT.left(je.error),g.reset({}),l(!1),f(null)},w=C=>{f(null),g.reset({}),t?.(C)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(v),children:d.jsxs(ne,{isOpen:!!u,onClose:w,className:Fn("!w-[730px]",n),...s,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:a("modal.title.rightsSettings","Настройка прав")})}),d.jsx(ne.Body,{className:"!overflow-y-visible min-h-[400px]",children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(Pne,{rights:u?.userGroup?.consoleRights})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:w}),d.jsx(us,{isLoading:i,disabled:i})]})]})})})},oT=new qL,pK={Modal:mFe,Button:pFe},Vse=y.createContext(null),Bse=()=>{const{t:e}=H(),t=y.useContext(Vse);if(t===null)throw new Error(e("errors.context",{name:"AddPort",defaultValue:"Используется вне контекста AddPort"}));return t},gFe=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(Vse.Provider,{value:r,children:e})},vFe=({onClick:e,...t})=>{const{t:n}=H(),{setIsOpen:r}=Bse(),s=a=>{r(!0),e?.(a)};return d.jsx(Fe,{onClick:s,variant:"outlined",...t,children:n("modal.title.addEntity",{entity:n("entities.port.nominative"),defaultValue:"Добавить порт"})})},lT={mode:null,host:"",port:void 0,remoteHost:"",remotePort:void 0,serverPort:void 0,encrypt:!1,note:""},yFe=()=>{const{t:e}=H(),t=Bs();return y.useMemo(()=>{const n=Dk.number({message:t.number}).int(t.number).positive(t.number).min(1,t.portMinValue).max(Ok,t.portMaxValue).optional();return et({mode:Dk.number({required_error:t.required}).nullable(),host:te().optional(),port:n,remoteHost:te().optional(),remotePort:n,serverPort:n,encrypt:we().optional(),note:te().max(512,e("errors.maxCharNumber",{maxValue:512,defaultValue:"Максимум 512 символов"})).optional()}).superRefine((r,s)=>{const{mode:a,port:i,remotePort:l,remoteHost:u}=r;return a||s.addIssue({code:Ze.custom,message:t.required,path:["mode"]}),i||s.addIssue({code:Ze.custom,message:t.required,path:["port"]}),a===Bu.OPEN&&((!u||!u.trim())&&s.addIssue({code:Ze.custom,message:t.required,path:["remoteHost"]}),l||s.addIssue({code:Ze.custom,message:t.required,path:["remotePort"]})),!0})},[e,t])},xFe=()=>{const{t:e}=H();return y.useMemo(()=>[{id:Bu.OPEN,name:e("isOpen","Открыто")},{id:Bu.LISTEN,name:e("listen","Прослушивание")}],[e])},bFe=({onSuccess:e,onClose:t,agentId:n,...r})=>{const{t:s}=H(),[a,i]=y.useState(!1),{isOpen:l,setIsOpen:u}=Bse(),f=yFe(),h=xFe(),g=Cr({resolver:hs(f),defaultValues:lT,mode:"onBlur"}),v=_x({name:"mode",control:g.control});y.useEffect(()=>{v&&g.clearErrors()},[v,g]);const w=async _=>{if(n){if(i(!0),_.mode===Bu.OPEN){const{port:E,remoteHost:$,remotePort:O,...N}=_,M=new FIe({agentId:n,port:E,remoteHost:$,remotePort:O,...N});await Vm.addOpener(M),Vm.right(L=>e?.(L)),Vm.left(je.error)}else{const{port:E,...$}=_,O=new BIe({agentId:n,port:E,...$});await Vm.addListener(O),Vm.right(N=>e?.(N)),Vm.left(je.error)}g.reset(lT),i(!1),u(!1)}},C=_=>{u(!1),g.reset(lT),t?.(_)};return d.jsx(wr,{...g,children:d.jsx("form",{onSubmit:g.handleSubmit(w),children:d.jsxs(ne,{isOpen:l,onClose:C,...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.addEntity",{entity:s("entities.port.nominative"),defaultValue:"Добавить порт"})})}),d.jsx(ne.Body,{children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(ao,{label:s("fields.mode","Режим"),placeholder:s("placeholders.selectMode","Выбрать режим"),name:"mode",labelProperty:"name",valueProperty:"id",options:h,dropdownClassName:"!z-[101]",styles:ca,required:!0}),d.jsx(pt,{label:s("fields.host","Хост"),placeholder:s("placeholders.inputEntity",{entity:s("fields.host","Хост").toLowerCase(),defaultValue:"Введите хост"}),name:"host",inputClassName:"w-full",autoComplete:"off"}),d.jsx(pt,{label:s("entities.port.nominative","Порт"),placeholder:s("placeholders.inputEntity",{entity:s("entities.port.nominative","Порт").toLowerCase(),defaultValue:"Введите порт"}),name:"port",inputClassName:"w-full",autoComplete:"off",maxLength:5,required:!0}),d.jsx(pt,{label:s("fields.remoteHost","Удаленный хост"),placeholder:s("placeholders.inputEntity",{entity:s("fields.remoteHost","Удаленный хост").toLowerCase(),defaultValue:"Введите удаленный хост"}),name:"remoteHost",inputClassName:"w-full",autoComplete:"off",required:v===Bu.OPEN}),d.jsx(pt,{label:s("fields.remotePort","Удаленный порт"),placeholder:s("placeholders.inputEntity",{entity:s("fields.remotePort","Удаленный порт").toLowerCase(),defaultValue:"Введите удаленный порт"}),name:"remotePort",inputClassName:"w-full",autoComplete:"off",required:v===Bu.OPEN}),v===Bu.OPEN&&d.jsxs(d.Fragment,{children:[d.jsx(pt,{label:s("fields.serverPort","Порт сервера"),placeholder:s("placeholders.inputEntity",{entity:s("fields.serverPort","Порт сервера").toLowerCase(),defaultValue:"Введите порт сервера"}),name:"serverPort",inputClassName:"w-full",autoComplete:"off"}),d.jsx(Ue,{name:"encrypt",label:s("fields.encrypt","Шифрование")})]}),d.jsx(b_,{label:s("fields.note","Примечание"),placeholder:s("placeholders.inputEntity",{entity:s("fields.note","Примечание").toLowerCase(),defaultValue:"Введите примечание"}),name:"note"})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:C}),d.jsx(au,{isLoading:a,type:"submit",disabled:a})]})]})})})},Vm=new KL,mK={Modal:bFe,Button:vFe},Fse=y.createContext(null),Use=()=>{const{t:e}=H(),t=y.useContext(Fse);if(t===null)throw new Error(e("errors.context",{name:"ClosePort",defaultValue:"Используется вне контекста ClosePort"}));return t},wFe=({portId:e,onClick:t,...n})=>{const{t:r}=H(),{setPortId:s}=Use(),a=i=>{e&&(s(e),t?.(i))};return d.jsx(Fe,{className:"w-full",variant:"ghost",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right whitespace-nowraps",variant:"strong",color:"danger-red",children:r("closePort","Закрыть порт")})})},CFe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{portId:i,setPortId:l}=Use(),u=async()=>{if(a(!0),i!==null){const h=new DIe({portIds:[i]});await uT.close(h),uT.right(()=>{e(i)}),uT.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.closePort","Закрытие порта")})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.closePort","Вы собираетесь закрыть порт. Это действие необратимо и приведёт к безвозвратному удалению всех данных, связанных с этим портом.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fe,{disabled:s,onClick:u,children:s?"Удаление...":"Удалить"})]})]})},uT=new KL,gK={Modal:CFe,Button:wFe},SFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({portId:t,setPortId:n}),[t]);return d.jsx(Fse.Provider,{value:r,children:e})},Gse=y.createContext(null),zse=()=>{const{t:e}=H(),t=y.useContext(Gse);if(t===null)throw new Error(e("errors.context",{name:"UpdatePort",defaultValue:"Используется вне контекста UpdatePort"}));return t},_Fe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({port:t,setPort:n}),[t]);return d.jsx(Gse.Provider,{value:r,children:e})},jFe=({onClick:e,port:t,...n})=>{const{t:r}=H(),{setPort:s}=zse(),a=i=>{t&&(s(t),e?.(i))};return d.jsx(Fe,{onClick:a,className:"!justify-end",variant:"ghost",...n,children:r("edit","Редактировать")})},cT={note:""},EFe=()=>{const{t:e}=H();return y.useMemo(()=>et({note:te().max(512,e("errors.maxCharNumber",{maxValue:512,defaultValue:"Максимум {{maxValue}} символов"})).optional()}),[e])},$Fe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),s=EFe(),[a,i]=y.useState(!1),{port:l,setPort:u}=zse(),f=y.useMemo(()=>l?{note:l.note||""}:cT,[l]),h=Cr({resolver:hs(s),defaultValues:f,mode:"onBlur"});y.useEffect(()=>{l&&h.reset(f)},[f,l,h]);const g=async w=>{if(!l)return;i(!0);const C=new UIe({portId:l.id,note:w.note||""});await dT.update(C),dT.right(_=>e?.(_)),dT.left(je.error),h.reset(cT),i(!1),u(null)},v=w=>{u(null),h.reset(cT),t?.(w)};return d.jsx(wr,{...h,children:d.jsx("form",{onSubmit:h.handleSubmit(g),children:d.jsxs(ne,{isOpen:!!l,onClose:v,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.addEntity",{defaultValue:"Добавить порт",entity:r("entities.port.nominative")})})}),d.jsx(ne.Body,{children:d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(b_,{label:r("fields.note","Примечание"),placeholder:r("placeholders.inputEntity",{defaultValue:"Введите примечание",entity:r("fields.note","Примечание").toLowerCase()}),name:"note"})})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:a,onClick:v}),d.jsx(us,{isLoading:a,type:"submit",disabled:a})]})]})})})},dT=new KL,vK={Modal:$Fe,Button:jFe},RFe=({onSuccess:e,onClose:t,tagPostfix:n,agent:r,setAgent:s,tagList:a,isLoadingTagList:i,...l})=>{const{t:u}=H(),[f,h]=y.useState(!1),[g,v]=y.useState([]);y.useEffect(()=>{r?.tags&&v(r.tags.ids)},[r?.tags]);const w=async E=>{E.preventDefault(),r?.id&&(h(!0),await fT.setList(new MIe({agentId:r.id,idList:g||[]})),fT.right(()=>e?.()),fT.left(je.error),v([]),h(!1),s(null))},C=E=>{v([]),s(null),t?.(E)},_=E=>{v(E)};return d.jsx("form",{onSubmit:w,children:d.jsxs(ne,{isOpen:!!r,onClose:C,...l,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:u("modal.title.tagsSettings","Настройка тегов")})}),d.jsx(ne.Body,{className:"!overflow-y-visible",children:d.jsxs("div",{className:"flex gap-2.5",children:[d.jsx("div",{className:"flex flex-1 [&>*]:w-full",children:d.jsx(Vne,{value:g,onChange:_,styles:ca,options:a?.length?a.values:[],isLoading:i})}),n]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:f,onClick:C}),d.jsx(us,{isLoading:f,disabled:f})]})]})})},fT=new ELe,Hse=y.createContext(null),qse=()=>{const{t:e}=H(),t=y.useContext(Hse);if(t===null)throw new Error(e("errors.context",{name:"UpsertTag",defaultValue:"Используется вне контекста UpsertTag"}));return t},Kse=["#5E5ECE","#8B7D6B","#4A7BAA","#A569BD","#CD6B5A","#CD4E50","#D5A351","#5D7C61","#625572","#647C8A"],hT=()=>({color:DMe(Kse),name:""}),OFe=({children:e})=>{const[t,n]=y.useState(!1),[r,s]=y.useState(null),[a,i]=y.useState(!1),l=y.useCallback(h=>{s(h),n(!0)},[]),u=y.useCallback(()=>{n(!1),s(null)},[]),f=y.useMemo(()=>({isEditing:t,tagId:r,onEdit:l,onCancel:u,isLoading:a,setIsLoading:i}),[t,r,l,u,a]);return d.jsx(Hse.Provider,{value:f,children:e})},TFe=({onClick:e,size:t="large",...n})=>{const{t:r}=H(),{onEdit:s}=qse(),a=i=>{s(null),e?.(i)};return d.jsxs(Fe,{className:"w-full justify-center",onClick:a,size:t,variant:"dashed",...n,children:[d.jsx(Ma,{})," ",r("modal.title.addEntity",{defaultValue:"Добавить тег",entity:r("entities.tag.accusative")})]})},AFe=({tag:e,postfix:t,onSuccess:n,isCreation:r,...s})=>{const{t:a}=H(),[i,l]=y.useState(Object.assign({},hT(),e||{})),{tagId:u,isEditing:f,onCancel:h,onEdit:g,isLoading:v,setIsLoading:w}=qse(),C=(!e||!!e&&e.id===u)&&f,_=M=>l(L=>({...L,name:M.target.value})),E=M=>l(L=>({...L,color:M})),$=y.useCallback(async()=>{if(!(i.name||"").trim())return je.error(a("errors.tagNameRequired","Необходимо ввести имя тега"));w(!0),i.id?(await jy.update(new LIe({id:i.id,name:i.name,color:i.color})),jy.right(M=>{l({...M}),n?.(M)})):(await jy.create(new kIe({name:i.name,color:i.color})),jy.right(M=>{l({...hT()}),n?.(M)})),jy.left(je.error),h(),w(!1)},[i,h,n,w,a]),O=y.useCallback(()=>{l(Object.assign({},hT(),e||{})),h()},[h,e]),N=y.useMemo(()=>d.jsx("div",{className:"flex gap-2.5 items-center",children:C?d.jsxs(d.Fragment,{children:[d.jsx(Fe,{variant:"ghost",className:"!text-primary",onlyIcon:!0,onClick:$,isLoading:v,title:a("save","Сохранить"),children:d.jsx(Ife,{})}),d.jsx(Fe,{variant:"ghost",onlyIcon:!0,onClick:O,disabled:v,title:a("cancel","Отмена"),children:d.jsx(IZ,{})})]}):d.jsxs(d.Fragment,{children:[d.jsx(Fe,{variant:"ghost",onlyIcon:!0,onClick:()=>g(e?.id||null),disabled:v,title:a("edit","Редактировать"),children:d.jsx(F8,{})}),t]})}),[C,$,v,a,O,t,g,e?.id]);return r&&(u||!f)?null:d.jsx(ic,{...s,actions:N,className:"!border-secondary-light",children:C?d.jsxs(d.Fragment,{children:[d.jsx(X2,{value:i.name,onChange:_,placeholder:a("placeholders.inputTagName","Введите название тега"),inputClassName:"!h-6 !px-1.5 !py-[1px] w-[180px]"}),d.jsx(X2e.Circle,{color:i.color,onChange:E,colors:Kse,className:"!border-0 !p-0 overflow-hidden",dropdownClassName:"!overflow-hidden",size:"small",portal:!0})]}):d.jsx(pv,{label:e?.name,customBackground:e?.color})})},jy=new Fte,pT={Row:AFe,Button:TFe},Yse=y.createContext(null),Zse=()=>{const{t:e}=H(),t=y.useContext(Yse);if(t===null)throw new Error(e("errors.context",{name:"AddAgentToAgentGroup",defaultValue:"Используется вне контекста AddAgentToAgentGroup"}));return t},kFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({agentIds:t,setAgentIds:n}),[t]);return d.jsx(Yse.Provider,{value:r,children:e})},NFe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),[i,l]=y.useState(!1),[u,f]=y.useState(null),{agentIds:h,setAgentIds:g}=Zse(),[v,w]=y.useState(new Set),[C,_]=y.useState(),E=y.useCallback(async()=>{if(!h?.length)return;a(!0);const k=new cc({filter:{search:C}});await mT.invoke(k),mT.right(T=>{f(T?wx(T.values,"projectId"):null)}),mT.left(je.error),a(!1)},[h,C]);y.useEffect(()=>{h?.length&&E()},[E,h]);const $=async()=>{if(!h?.length)return;l(!0);const k=new yne({ids:Array.from(v.values()),agentIds:h});await LFe.addAgent(k),e?.(),w(new Set),_(""),l(!1),g(null)},O=k=>{w(new Set),_(""),g(null),t?.(k)},N=y.useCallback(k=>{f(null),_(k)},[]),M=k=>T=>{w(P=>(T?P.add(k):P.delete(k),new Set(P.values())))},L=Array.from(u?.values()||[]);return d.jsxs(ne,{isOpen:!!h?.length,onClose:O,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.addToEntity",{entity:r("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"})})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:N})}),s&&u===null&&d.jsx(wt,{}),u!==null&&d.jsxs(d.Fragment,{children:[!u?.size&&d.jsx(W,{className:"self-center",children:r("noData.listMessage",{entity:r("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),L.map((k,T)=>d.jsxs(y.Fragment,{children:[d.jsxs(W,{variant:"strong",color:"placeholder",children:[rn(r("entities.project.nominative","Проект")),": ",k[0].projectName]}),k.map(P=>d.jsx(si,{label:P.name,checked:v.has(P.id),onChange:M(P.id)},P.id)),T!==L.length-1&&d.jsx("div",{className:"w-full h-[1px] bg-placeholder"})]},k[0].projectId)),s&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:O}),d.jsx(au,{isLoading:i,disabled:i||!v.size,onClick:$})]})]})},LFe=new Ud,mT=new ac,MFe=({onClick:e,agentIds:t,...n})=>{const{t:r}=H(),{setAgentIds:s}=Zse(),a=i=>{s(t),e?.(i)};return d.jsx(Fe,{className:"text-nowrap",variant:"secondary",onClick:a,...n,children:r("modal.title.addToEntity",{entity:r("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"})})},IFe=Rt(MFe,{rightKeys:["agentGroupAgentAdd"]}),yK={Modal:NFe,Button:IFe},Xse=y.createContext(null),Wse=()=>{const{t:e}=H(),t=y.useContext(Xse);if(t===null)throw new Error(e("errors.context",{name:"DeleteAgentFromAgentGroup",defaultValue:"Используется вне контекста DeleteAgentFromAgentGroup"}));return t},PFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({agentIds:t,setAgentIds:n}),[t]);return d.jsx(Xse.Provider,{value:r,children:e})},DFe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),[i,l]=y.useState(!1),[u,f]=y.useState(null),{agentIds:h,setAgentIds:g}=Wse(),[v,w]=y.useState(new Set),[C,_]=y.useState(),E=y.useCallback(async()=>{if(!h?.length)return;a(!0);const k=new cc({filter:{agentIds:h,search:C}});await gT.invoke(k),gT.right(T=>{f(T?wx(T.values,"projectId"):null)}),gT.left(je.error),a(!1)},[h,C]);y.useEffect(()=>{h?.length&&E()},[E,h]);const $=async()=>{if(!h?.length)return;l(!0);const k=new yne({ids:Array.from(v.values()),agentIds:h});await VFe.deleteAgent(k),e?.(),w(new Set),_(""),l(!1),g(null)},O=k=>{w(new Set),_(""),g(null),t?.(k)},N=y.useCallback(k=>{f(null),_(k)},[]),M=k=>T=>{w(P=>(T?P.add(k):P.delete(k),new Set(P.values())))},L=Array.from(u?.values()||[]);return d.jsxs(ne,{isOpen:!!h?.length,onClose:O,...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteAgentFromAgentGroup","Удаление агента из группы агентов")})}),d.jsx(ne.Body,{className:"h-[300px]",children:d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx("div",{className:"w-full",children:d.jsx(mo,{inputClassName:"w-full border-1 border-secondary-saturation rounded-xs",autoComplete:"off",onChange:N})}),s&&u===null&&d.jsx(wt,{}),u!==null&&d.jsxs(d.Fragment,{children:[!u?.size&&d.jsx(W,{className:"self-center",children:r("noData.listMessage",{entity:r("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),L.map((k,T)=>d.jsxs(y.Fragment,{children:[d.jsxs(W,{variant:"strong",color:"placeholder",children:[rn(r("entities.project.nominative","Проект")),": ",k[0].projectName]}),k.map(P=>d.jsx(si,{label:P.name,checked:v.has(P.id),onChange:M(P.id)},P.id)),T!==L.length-1&&d.jsx("div",{className:"w-full h-[1px] bg-placeholder"})]},k[0].projectId)),s&&d.jsx(wt,{})]})]})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:i,onClick:O}),d.jsx(Fs,{isLoading:i,disabled:i||!v.size,onClick:$})]})]})},VFe=new Ud,gT=new ac,BFe=({onClick:e,agentIds:t,...n})=>{const{t:r}=H(),{setAgentIds:s}=Wse(),a=i=>{s(t),e?.(i)};return d.jsx(Fe,{className:"text-nowrap",variant:"secondary",onClick:a,...n,children:r("modal.title.deleteFromAgentGroup","Удалить из группы агентов")})},FFe=Rt(BFe,{rightKeys:["agentGroupAgentDelete"]}),xK={Modal:DFe,Button:FFe},UFe=({agentId:e,projectId:t})=>{const n=Ds(),r=kh(),{t:s}=H(),[a,i]=br(),[l,u]=y.useState(null),[f,h]=y.useState(!1),{allowed:g}=It({rightKeys:["agentConsoleRead"],projectId:t}),v=a.get(vt.search),w=y.useMemo(()=>{const M=a.get(vt.tokenId);if(l===null||l.data?.isEmpty)return null;const L=l.data.entities[l.data.ids[0]];return M&&l.data.entities[M]||L},[l,a]),C=y.useMemo(()=>{let M={agentId:e};return v&&(M={...M,search:v}),M},[v,e]),_=y.useCallback(async(M=0)=>{M===0&&u(null),h(!0),await vT.invoke(new _7e({filter:C,offset:M,raw:!1})),vT.right(L=>u(k=>M===0?L:k!==null?new Ia({...L,data:k.data.concat(L.data)}):null)),vT.left(je.error),h(!1)},[C]),{intersector:E}=Fd(async()=>{l?.hasNextPage&&!f&&_(l.offset)});y.useEffect(()=>{_(0)},[_]);const $=y.useCallback(M=>{M?a.set(vt.search,M):a.delete(vt.search),i(a)},[a,i]),O=y.useCallback(M=>{a.set(vt.tokenId,M),i(a)},[a,i]),N=()=>{if(!w?.id)return;const M=`${vt.tab}=${Du.console}&${vt.tokenId}=${w?.id}`;r(`${n.pathname}?${M}`)};return d.jsxs("div",{className:"flex gap-10 w-full max-h-full",children:[d.jsxs("div",{className:"flex flex-col flex-1 gap-2.5 max-w-[378px] max-h-full",children:[d.jsx(mo,{onChange:$,initialValue:v||""}),d.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden overflow-y-auto",children:[l?.data?.isEmpty&&!f&&d.jsx(W,{className:"self-center",children:s("noData.listMessage",{entity:s("entities.sessions.genitive"),defaultValue:"Список сессий пуст"})}),l!==null&&!l?.data?.isEmpty&&!!w&&d.jsx(YIe,{tabs:l.data,tab:w.id,onClick:O}),f&&d.jsx(wt,{}),E]})]}),d.jsx("div",{className:"flex flex-1 overflow-x-hidden",children:d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[!!w&&g&&d.jsx(Fe,{onClick:N,variant:"secondary",className:"w-fit",children:s("openInConsole","Открыть в консоли")}),!!w&&d.jsx(ZIe,{...w})]})})]})},vT=new OLe,GFe=({agentId:e})=>{const{t}=H(),[n,r]=y.useState(null),[s,a]=y.useState(!0);return y.useEffect(()=>{a(!0);const i=()=>{yT.right(r),yT.left(je.error),a(!1)};yT.getSchedule(new IIe({agentId:e})).then(i)},[e]),d.jsx(ZPe,{children:d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsxs("div",{className:"flex gap-2.5 items-center",children:[d.jsx(W,{variant:"strong",children:t("workSchedule","Рабочий график")}),!!n&&d.jsx(Vq.Button,{schedule:n})]}),s&&d.jsx(wt,{}),!s&&!n?.work&&d.jsx(W,{className:"self-center",children:t("noData.workSchedule","Рабочий график не задан")}),!s&&!!n?.work&&d.jsx(wPe,{schedule:n?.work})]}),d.jsx(Vq.Modal,{onSuccess:r,agentId:e})]})})},yT=new Ite,zFe=()=>{const{t:e}=H();return y.useMemo(()=>[{key:"name",label:e("fields.title","Название")},{key:"id",label:e("fields.id","ID")},{key:"shortNote",label:e("fields.description","Описание")},{key:"os",label:e("fields.operatingSystem","Операционная система")},{key:"architecture",label:e("fields.architecture","Архитектура")},{key:"lastIpList",label:e("fields.ip","IP-адрес(а)")},{key:"lastPingDate",label:e("fields.ping","Пинг"),formatter:n=>n?.toLocaleString("ru-RU")},{key:"createdDate",label:e("fields.registrationDate","Дата регистрации"),formatter:n=>n?.toLocaleString("ru-RU")}],[e])},HFe=()=>{const{t:e}=H(),{agent:t,setAgent:n}=Gh(),r=zFe(),[s,a]=y.useState(!1),{allowed:i}=It({rightKeys:["agentUpdate"],projectId:t?.projectIds}),l=y.useMemo(()=>({agentIds:[t.id]}),[t]),u=e("emptyValue","Н/Д");return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsxs("div",{className:"flex flex-1 justify-between gap-4",children:[d.jsx(W.Heading3,{children:e("tabs.agent.information","Информация")}),i&&d.jsx(Fe,{variant:"outlined",onClick:()=>a(!0),children:e("change","Изменить")})]}),d.jsx("div",{className:"flex flex-col gap-2.5",children:r.map(f=>d.jsxs("div",{className:"flex gap-4",children:[d.jsx(W,{className:"min-w-[172px]",color:"placeholder",children:f.label}),!!t?.[f.key]&&Array.isArray(t?.[f.key])&&d.jsx("div",{className:"flex flex-col items-start gap-1",children:t[f.key].map(h=>d.jsx(W,{className:"inline-flex",copyable:!!h,children:f.formatter?f.formatter(h||u):h||u},f.key))}),!Array.isArray(t?.[f.key])&&d.jsx(W,{className:"inline-flex",copyable:!!t?.[f.key],children:f.formatter?f.formatter(t?.[f.key]||u):t?.[f.key]||u})]}))}),d.jsx(Tg,{}),d.jsx(GFe,{agentId:t.id}),d.jsx(Tg,{}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(W,{variant:"strong",className:"first-letter:uppercase",children:e("entities.groups.nominative","Группы")}),d.jsx(wne,{filter:l})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(W,{variant:"strong",className:"first-letter:uppercase",children:e("entities.sessions.nominative","Сессии")}),d.jsx(UFe,{agentId:t.id,projectId:t?.projectIds})]}),!!t&&d.jsx(OPe,{isOpen:s,onClose:()=>a(!1),agent:t,onSave:n})]})})},Qse=y.createContext(null),Jse=()=>{const{t:e}=H(),t=y.useContext(Qse);if(t===null)throw new Error(e("errors.context",{name:"PrivateConsoleSettings",defaultValue:"Используется вне контекста PrivateConsoleSettings"}));return t},qFe=({consoleId:e,onClick:t,...n})=>{const{t:r}=H(),{setConsoleId:s}=Jse(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:a,...n,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",children:r("settings","Настройки")})})},Ey={users:"users",userGroups:"userGroups"},KFe=({agentId:e,consoleId:t})=>{const{t:n}=H(),[r,s]=y.useState(!0),[a,i]=y.useState(null),l=y.useCallback(()=>{if(!e||!t){s(!1);return}const h=new EIe({agentId:e,consoleId:t});s(!0);const g=()=>{xT.right(i),xT.left(je.error),s(!1)};xT.invoke(h).then(g)},[e,t]);y.useEffect(()=>{l()},[l]);const u=()=>{l()},f=()=>{l()};return d.jsx(QBe,{children:d.jsx(rFe,{children:d.jsxs(sFe,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[r&&a===null&&d.jsx(wt,{}),a!==null&&d.jsxs(d.Fragment,{children:[d.jsx(uK.Button,{consoleId:t||null}),!a.length&&d.jsx(W,{className:"self-center",children:n("noData.listMessage",{entity:n("entities.users.genitive"),defaultValue:"Список пользователей пуст"})}),a.map((h,g)=>d.jsx(eM,{user:h,dropdownSide:g===a.length-1?"top":"bottom",className:"border-secondary-light",hasLink:!1,actions:d.jsx(dK.Button,{user:h,consoleId:t||null}),dropdown:[d.jsx(cK.Button,{userId:h.id,consoleId:t||null})]},h.id))]})]}),d.jsx(uK.Modal,{onSuccess:u,agentId:e,userIds:a?.ids}),d.jsx(cK.Modal,{onSuccess:f,agentId:e}),d.jsx(dK.Modal,{agentId:e,onSuccess:u})]})})})},xT=new QLe,YFe=({agentId:e,consoleId:t})=>{const{t:n}=H(),[r,s]=y.useState(!0),[a,i]=y.useState(null),l=y.useCallback(()=>{if(!e||!t){s(!1);return}const h=new TIe({agentId:e,consoleId:t});s(!0);const g=()=>{bT.right(i),bT.left(je.error),s(!1)};bT.invoke(h).then(g)},[e,t]);y.useEffect(()=>{l()},[l]);const u=()=>{l()},f=()=>{l()};return d.jsx(oFe,{children:d.jsx(fFe,{children:d.jsxs(hFe,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[r&&a===null&&d.jsx(wt,{}),a!==null&&d.jsxs(d.Fragment,{children:[d.jsx(fK.Button,{consoleId:t||null}),!a.length&&d.jsx(W,{className:"self-center",children:n("noData.listMessage",{entity:n("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),a.map((h,g)=>d.jsx(y_,{userGroup:h,dropdownSide:g===a.length-1?"top":"bottom",className:"border-secondary-light",hasLink:!1,actions:d.jsx(pK.Button,{userGroup:h,consoleId:t||null}),dropdown:[d.jsx(hK.Button,{userGroupId:h.id,consoleId:t||null})]},h.id))]})]}),d.jsx(fK.Modal,{onSuccess:u,agentId:e,userGroupIds:a?.ids}),d.jsx(hK.Modal,{onSuccess:f,agentId:e}),d.jsx(pK.Modal,{agentId:e,onSuccess:u})]})})})},bT=new JLe,ZFe=({agentId:e,...t})=>{const{t:n}=H(),{consoleId:r,setConsoleId:s}=Jse(),[a,i]=y.useState(Ey.users),l=()=>{s(null)};return d.jsxs(Ms,{isOpen:!!r,onClose:l,...t,children:[d.jsx(Ms.Header,{children:"Настройки"}),d.jsxs(Ms.Body,{children:[d.jsxs(su,{tab:a,onClick:i,className:"!gap-4 py-1",children:[d.jsx(Yn,{label:n("entities.users.nominative","Пользователи"),tab:Ey.users,variant:"ghost"}),d.jsx(Yn,{label:n("entities.userGroups.nominative","Группы пользователей"),tab:Ey.userGroups,variant:"ghost"})]}),a===Ey.users&&d.jsx(KFe,{agentId:e,consoleId:r}),a===Ey.userGroups&&d.jsx(YFe,{agentId:e,consoleId:r})]})]})},bK={Drawer:ZFe,Button:qFe},XFe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({consoleId:t,setConsoleId:n}),[t]);return d.jsx(Qse.Provider,{value:r,children:e})},WFe=({agentId:e,type:t,consoleId:n,onClick:r,onSuccess:s,...a})=>{const{t:i}=H(),[l,u]=br(),f=async h=>{const g=new T7e({agentId:e,consoleId:n,consoleType:t===Ho.PRIVATE?Ho.PUBLIC:Ho.PRIVATE});await wT.setType(g),wT.right(v=>{v.tokenId&&(l.set(vt.tokenId,v.tokenId),u(l)),s?.(v)}),wT.left(je.error),r?.(h)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:f,...a,children:d.jsx(W,{className:"w-full text-right whitespace-nowrap",variant:"strong",children:t===Ho.PRIVATE?i("createPublicConsole","Сделать публичной"):i("createPrivateConsole","Сделать приватной")})})},wT=new hv,QFe=({list:e,agentId:t,tokenOptions:n,onPinToken:r,onDeleteConsole:s,onToggleConsoleLock:a,onToggleConsoleOpen:i,onToggleConsoleType:l})=>{const[u,f]=br(),h=w=>{e.isEmpty||u.set(vt.consoleId,e.ids[0]),f(u),s(w)},g=w=>{u.set(vt.consoleId,w),f(u)},v=w=>{const C=[d.jsx(sDe,{agentId:t,consoleId:w.id,status:w.status,onSuccess:i,rights:w.rights})];return w.type===Ho.PRIVATE&&w.rights?.admin&&C.push(d.jsx(bK.Button,{consoleId:w.id})),w.rights?.admin&&C.push(d.jsx(WFe,{agentId:t,consoleId:w.id,type:w.type,onSuccess:l})),w.rights?.pin&&C.push(d.jsx(Uq.Button,{console:w})),w.rights?.delete&&C.push(d.jsx(Fq.Button,{consoleId:w.id})),C};return d.jsx(oDe,{children:d.jsx(rDe,{children:d.jsxs(XFe,{children:[d.jsx("div",{className:"flex flex-col flex-1 max-w-full",children:e.map(w=>{const C=u.get(vt.consoleId)===w.id,_=["delete","close","open","pin","admin"].some(E=>w.rights?.[E]);return y.createElement(JIe,{...w,key:w.id,consoleId:w.id,active:C,onClick:g,postfix:[w.status!==Vg.CLOSED&&(!!w.rights?.lock||!!w.rights?.unlock)&&d.jsx(uDe,{consoleId:w.id,agentId:t,lockerId:w.lockerId,onSuccess:a,rights:w.rights})],dropdown:_?v(w):void 0})})}),d.jsx(Uq.Modal,{agentId:t,tokenOptions:n,onSuccess:r}),d.jsx(Fq.Modal,{agentId:t,onSuccess:h}),d.jsx(bK.Drawer,{agentId:t})]})})})},w_=y.createContext(null);w_.displayName="PanelGroupContext";const Ur={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_M=10,bh=y.useLayoutEffect,wK=Zk.useId,JFe=typeof wK=="function"?wK:()=>null;let eUe=0;function jM(e=null){const t=JFe(),n=y.useRef(e||t||null);return n.current===null&&(n.current=""+eUe++),e??n.current}function eae({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:a,id:i,maxSize:l,minSize:u,onCollapse:f,onExpand:h,onResize:g,order:v,style:w,tagName:C="div",..._}){const E=y.useContext(w_);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:$,expandPanel:O,getPanelSize:N,getPanelStyle:M,groupId:L,isPanelCollapsed:k,reevaluatePanelConstraints:T,registerPanel:P,resizePanel:V,unregisterPanel:q}=E,K=jM(i),re=y.useRef({callbacks:{onCollapse:f,onExpand:h,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:l,minSize:u},id:K,idIsFromProps:i!==void 0,order:v});y.useRef({didLogMissingDefaultSizeWarning:!1}),bh(()=>{const{callbacks:ue,constraints:he}=re.current,X={...he};re.current.id=K,re.current.idIsFromProps=i!==void 0,re.current.order=v,ue.onCollapse=f,ue.onExpand=h,ue.onResize=g,he.collapsedSize=n,he.collapsible=r,he.defaultSize=s,he.maxSize=l,he.minSize=u,(X.collapsedSize!==he.collapsedSize||X.collapsible!==he.collapsible||X.maxSize!==he.maxSize||X.minSize!==he.minSize)&&T(re.current,X)}),bh(()=>{const ue=re.current;return P(ue),()=>{q(ue)}},[v,K,P,q]),y.useImperativeHandle(a,()=>({collapse:()=>{$(re.current)},expand:ue=>{O(re.current,ue)},getId(){return K},getSize(){return N(re.current)},isCollapsed(){return k(re.current)},isExpanded(){return!k(re.current)},resize:ue=>{V(re.current,ue)}}),[$,O,N,k,K,V]);const ee=M(re.current,s);return y.createElement(C,{..._,children:e,className:t,id:K,style:{...ee,...w},[Ur.groupId]:L,[Ur.panel]:"",[Ur.panelCollapsible]:r||void 0,[Ur.panelId]:K,[Ur.panelSize]:parseFloat(""+ee.flexGrow).toFixed(1)})}const Y1=y.forwardRef((e,t)=>y.createElement(eae,{...e,forwardedRef:t}));eae.displayName="Panel";Y1.displayName="forwardRef(Panel)";let qk=null,oS=-1,hd=null;function tUe(e,t,n){const r=(t&aae)!==0,s=(t&iae)!==0,a=(t&oae)!==0,i=(t&lae)!==0;if(t){if(r)return a?"se-resize":i?"ne-resize":"e-resize";if(s)return a?"sw-resize":i?"nw-resize":"w-resize";if(a)return"s-resize";if(i)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function nUe(){hd!==null&&(document.head.removeChild(hd),qk=null,hd=null,oS=-1)}function CT(e,t,n){var r,s;const a=tUe(e,t);if(qk!==a){if(qk=a,hd===null&&(hd=document.createElement("style"),document.head.appendChild(hd)),oS>=0){var i;(i=hd.sheet)===null||i===void 0||i.removeRule(oS)}oS=(r=(s=hd.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${a} !important;}`))!==null&&r!==void 0?r:-1}}function tae(e){return e.type==="keydown"}function nae(e){return e.type.startsWith("pointer")}function rae(e){return e.type.startsWith("mouse")}function C_(e){if(nae(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(rae(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function rUe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function sUe(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function aUe(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:_K(e),b:_K(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;fn(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:SK(CK(n.a)),b:SK(CK(n.b))};if(s.a===s.b){const a=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let l=a.length;for(;l--;){const u=a[l];if(u===i.a)return 1;if(u===i.b)return-1}}return Math.sign(s.a-s.b)}const iUe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function oUe(e){var t;const n=getComputedStyle((t=sae(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function lUe(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||oUe(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||iUe.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function CK(e){let t=e.length;for(;t--;){const n=e[t];if(fn(n,"Missing node"),lUe(n))return n}return null}function SK(e){return e&&Number(getComputedStyle(e).zIndex)||0}function _K(e){const t=[];for(;e;)t.push(e),e=sae(e);return t}function sae(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const aae=1,iae=2,oae=4,lae=8,uUe=rUe()==="coarse";let Ko=[],Ag=!1,pd=new Map,S_=new Map;const Z1=new Set;function cUe(e,t,n,r,s){var a;const{ownerDocument:i}=t,l={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:s},u=(a=pd.get(i))!==null&&a!==void 0?a:0;return pd.set(i,u+1),Z1.add(l),l2(),function(){var h;S_.delete(e),Z1.delete(l);const g=(h=pd.get(i))!==null&&h!==void 0?h:1;if(pd.set(i,g-1),l2(),g===1&&pd.delete(i),Ko.includes(l)){const v=Ko.indexOf(l);v>=0&&Ko.splice(v,1),__(),s("up",!0,null)}}}function dUe(e){const{target:t}=e,{x:n,y:r}=C_(e);Ag=!0,EM({target:t,x:n,y:r}),l2(),Ko.length>0&&(u2("down",e),__(),e.preventDefault(),uae(t)||e.stopImmediatePropagation())}function ST(e){const{x:t,y:n}=C_(e);if(Ag&&e.buttons===0&&(Ag=!1,u2("up",e)),!Ag){const{target:r}=e;EM({target:r,x:t,y:n})}u2("move",e),__(),Ko.length>0&&e.preventDefault()}function _T(e){const{target:t}=e,{x:n,y:r}=C_(e);S_.clear(),Ag=!1,Ko.length>0&&(e.preventDefault(),uae(t)||e.stopImmediatePropagation()),u2("up",e),EM({target:t,x:n,y:r}),__(),l2()}function uae(e){let t=e;for(;t;){if(t.hasAttribute(Ur.resizeHandle))return!0;t=t.parentElement}return!1}function EM({target:e,x:t,y:n}){Ko.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Z1.forEach(s=>{const{element:a,hitAreaMargins:i}=s,l=a.getBoundingClientRect(),{bottom:u,left:f,right:h,top:g}=l,v=uUe?i.coarse:i.fine;if(t>=f-v&&t<=h+v&&n>=g-v&&n<=u+v){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&aUe(r,a)>0){let C=r,_=!1;for(;C&&!C.contains(a);){if(sUe(C.getBoundingClientRect(),l)){_=!0;break}C=C.parentElement}if(_)return}Ko.push(s)}})}function jT(e,t){S_.set(e,t)}function __(){let e=!1,t=!1;Ko.forEach(r=>{const{direction:s}=r;s==="horizontal"?e=!0:t=!0});let n=0;S_.forEach(r=>{n|=r}),e&&t?CT("intersection",n):e?CT("horizontal",n):t?CT("vertical",n):nUe()}let ET;function l2(){var e;(e=ET)===null||e===void 0||e.abort(),ET=new AbortController;const t={capture:!0,signal:ET.signal};Z1.size&&(Ag?(Ko.length>0&&pd.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("contextmenu",_T,t),s.addEventListener("pointerleave",ST,t),s.addEventListener("pointermove",ST,t))}),pd.forEach((n,r)=>{const{body:s}=r;s.addEventListener("pointerup",_T,t),s.addEventListener("pointercancel",_T,t)})):pd.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("pointerdown",dUe,t),s.addEventListener("pointermove",ST,t))}))}function u2(e,t){Z1.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ko.includes(n);r(e,s,t)})}function fUe(){const[e,t]=y.useState(0);return y.useCallback(()=>t(n=>n+1),[])}function fn(e,t){if(!e)throw console.error(t),Error(t)}function Ah(e,t,n=_M){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Pu(e,t,n=_M){return Ah(e,t,n)===0}function Si(e,t,n){return Ah(e,t,n)===0}function hUe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const s=e[r],a=t[r];if(!Si(s,a,n))return!1}return!0}function Sg({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];fn(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:a,maxSize:i=100,minSize:l=0}=r;if(Ah(n,l)<0)if(a){const u=(s+l)/2;Ah(n,u)<0?n=s:n=l}else n=l;return n=Math.min(i,n),n=parseFloat(n.toFixed(_M)),n}function Gy({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:a}){if(Si(e,0))return t;const i=[...t],[l,u]=r;fn(l!=null,"Invalid first pivot index"),fn(u!=null,"Invalid second pivot index");let f=0;if(a==="keyboard"){{const g=e<0?u:l,v=n[g];fn(v,`Panel constraints not found for index ${g}`);const{collapsedSize:w=0,collapsible:C,minSize:_=0}=v;if(C){const E=t[g];if(fn(E!=null,`Previous layout not found for panel index ${g}`),Si(E,w)){const $=_-E;Ah($,Math.abs(e))>0&&(e=e<0?0-$:$)}}}{const g=e<0?l:u,v=n[g];fn(v,`No panel constraints found for index ${g}`);const{collapsedSize:w=0,collapsible:C,minSize:_=0}=v;if(C){const E=t[g];if(fn(E!=null,`Previous layout not found for panel index ${g}`),Si(E,_)){const $=E-w;Ah($,Math.abs(e))>0&&(e=e<0?0-$:$)}}}}{const g=e<0?1:-1;let v=e<0?u:l,w=0;for(;;){const _=t[v];fn(_!=null,`Previous layout not found for panel index ${v}`);const $=Sg({panelConstraints:n,panelIndex:v,size:100})-_;if(w+=$,v+=g,v<0||v>=n.length)break}const C=Math.min(Math.abs(e),Math.abs(w));e=e<0?0-C:C}{let v=e<0?l:u;for(;v>=0&&v<n.length;){const w=Math.abs(e)-Math.abs(f),C=t[v];fn(C!=null,`Previous layout not found for panel index ${v}`);const _=C-w,E=Sg({panelConstraints:n,panelIndex:v,size:_});if(!Si(C,E)&&(f+=C-E,i[v]=E,f.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(hUe(s,i))return s;{const g=e<0?u:l,v=t[g];fn(v!=null,`Previous layout not found for panel index ${g}`);const w=v+f,C=Sg({panelConstraints:n,panelIndex:g,size:w});if(i[g]=C,!Si(C,w)){let _=w-C,$=e<0?u:l;for(;$>=0&&$<n.length;){const O=i[$];fn(O!=null,`Previous layout not found for panel index ${$}`);const N=O+_,M=Sg({panelConstraints:n,panelIndex:$,size:N});if(Si(O,M)||(_-=M-O,i[$]=M),Si(_,0))break;e>0?$--:$++}}}const h=i.reduce((g,v)=>v+g,0);return Si(h,100)?i:s}function pUe({layout:e,panelsArray:t,pivotIndices:n}){let r=0,s=100,a=0,i=0;const l=n[0];fn(l!=null,"No pivot index found"),t.forEach((g,v)=>{const{constraints:w}=g,{maxSize:C=100,minSize:_=0}=w;v===l?(r=_,s=C):(a+=_,i+=C)});const u=Math.min(s,100-a),f=Math.max(r,100-i),h=e[l];return{valueMax:u,valueMin:f,valueNow:h}}function X1(e,t=document){return Array.from(t.querySelectorAll(`[${Ur.resizeHandleId}][data-panel-group-id="${e}"]`))}function cae(e,t,n=document){const s=X1(e,n).findIndex(a=>a.getAttribute(Ur.resizeHandleId)===t);return s??null}function dae(e,t,n){const r=cae(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function mUe(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function fae(e,t=document){if(mUe(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function j_(e,t=document){const n=t.querySelector(`[${Ur.resizeHandleId}="${e}"]`);return n||null}function gUe(e,t,n,r=document){var s,a,i,l;const u=j_(t,r),f=X1(e,r),h=u?f.indexOf(u):-1,g=(s=(a=n[h])===null||a===void 0?void 0:a.id)!==null&&s!==void 0?s:null,v=(i=(l=n[h+1])===null||l===void 0?void 0:l.id)!==null&&i!==void 0?i:null;return[g,v]}function vUe({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:s,panelGroupElement:a,setLayout:i}){y.useRef({didWarnAboutMissingResizeHandle:!1}),bh(()=>{if(!a)return;const l=X1(n,a);for(let u=0;u<s.length-1;u++){const{valueMax:f,valueMin:h,valueNow:g}=pUe({layout:r,panelsArray:s,pivotIndices:[u,u+1]}),v=l[u];if(v!=null){const w=s[u];fn(w,`No panel data found for index "${u}"`),v.setAttribute("aria-controls",w.id),v.setAttribute("aria-valuemax",""+Math.round(f)),v.setAttribute("aria-valuemin",""+Math.round(h)),v.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{l.forEach((u,f)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,s,a]),y.useEffect(()=>{if(!a)return;const l=t.current;fn(l,"Eager values not found");const{panelDataArray:u}=l,f=fae(n,a);fn(f!=null,`No group found for id "${n}"`);const h=X1(n,a);fn(h,`No resize handles found for group id "${n}"`);const g=h.map(v=>{const w=v.getAttribute(Ur.resizeHandleId);fn(w,"Resize handle element has no handle id attribute");const[C,_]=gUe(n,w,u,a);if(C==null||_==null)return()=>{};const E=$=>{if(!$.defaultPrevented)switch($.key){case"Enter":{$.preventDefault();const O=u.findIndex(N=>N.id===C);if(O>=0){const N=u[O];fn(N,`No panel data found for index ${O}`);const M=r[O],{collapsedSize:L=0,collapsible:k,minSize:T=0}=N.constraints;if(M!=null&&k){const P=Gy({delta:Si(M,L)?T-L:L-M,initialLayout:r,panelConstraints:u.map(V=>V.constraints),pivotIndices:dae(n,w,a),prevLayout:r,trigger:"keyboard"});r!==P&&i(P)}}break}}};return v.addEventListener("keydown",E),()=>{v.removeEventListener("keydown",E)}});return()=>{g.forEach(v=>v())}},[a,e,t,n,r,s,i])}function jK(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function hae(e,t){const n=e==="horizontal",{x:r,y:s}=C_(t);return n?r:s}function yUe(e,t,n,r,s){const a=n==="horizontal",i=j_(t,s);fn(i,`No resize handle element found for id "${t}"`);const l=i.getAttribute(Ur.groupId);fn(l,"Resize handle element has no group id attribute");let{initialCursorPosition:u}=r;const f=hae(n,e),h=fae(l,s);fn(h,`No group element found for id "${l}"`);const g=h.getBoundingClientRect(),v=a?g.width:g.height;return(f-u)/v*100}function xUe(e,t,n,r,s,a){if(tae(e)){const i=n==="horizontal";let l=0;e.shiftKey?l=100:s!=null?l=s:l=10;let u=0;switch(e.key){case"ArrowDown":u=i?0:l;break;case"ArrowLeft":u=i?-l:0;break;case"ArrowRight":u=i?l:0;break;case"ArrowUp":u=i?0:-l;break;case"End":u=100;break;case"Home":u=-100;break}return u}else return r==null?0:yUe(e,t,n,r,a)}function bUe({panelDataArray:e}){const t=Array(e.length),n=e.map(a=>a.constraints);let r=0,s=100;for(let a=0;a<e.length;a++){const i=n[a];fn(i,`Panel constraints not found for index ${a}`);const{defaultSize:l}=i;l!=null&&(r++,t[a]=l,s-=l)}for(let a=0;a<e.length;a++){const i=n[a];fn(i,`Panel constraints not found for index ${a}`);const{defaultSize:l}=i;if(l!=null)continue;const u=e.length-r,f=s/u;r++,t[a]=f,s-=f}return t}function Bm(e,t,n){t.forEach((r,s)=>{const a=e[s];fn(a,`Panel data not found for index ${s}`);const{callbacks:i,constraints:l,id:u}=a,{collapsedSize:f=0,collapsible:h}=l,g=n[u];if(g==null||r!==g){n[u]=r;const{onCollapse:v,onExpand:w,onResize:C}=i;C&&C(r,g),h&&(v||w)&&(w&&(g==null||Pu(g,f))&&!Pu(r,f)&&w(),v&&(g==null||!Pu(g,f))&&Pu(r,f)&&v())}})}function SC(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function wUe({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:s,precision:a=3}){const i=n[s];let l;return i==null?l=e!=null?e.toPrecision(a):"1":r.length===1?l="1":l=i.toPrecision(a),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function CUe(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function EK(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function pae(e){return`react-resizable-panels:${e}`}function mae(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:s,order:a}=t;return s?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function gae(e,t){try{const n=pae(e),r=t.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function SUe(e,t,n){var r,s;const a=(r=gae(e,n))!==null&&r!==void 0?r:{},i=mae(t);return(s=a[i])!==null&&s!==void 0?s:null}function _Ue(e,t,n,r,s){var a;const i=pae(e),l=mae(t),u=(a=gae(e,s))!==null&&a!==void 0?a:{};u[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(i,JSON.stringify(u))}catch(f){console.error(f)}}function $K({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((a,i)=>a+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!Si(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const i=n[a];fn(i!=null,`No layout data found for index ${a}`);const l=100/r*i;n[a]=l}let s=0;for(let a=0;a<t.length;a++){const i=n[a];fn(i!=null,`No layout data found for index ${a}`);const l=Sg({panelConstraints:t,panelIndex:a,size:i});i!=l&&(s+=i-l,n[a]=l)}if(!Si(s,0))for(let a=0;a<t.length;a++){const i=n[a];fn(i!=null,`No layout data found for index ${a}`);const l=i+s,u=Sg({panelConstraints:t,panelIndex:a,size:l});if(i!==u&&(s-=u-i,n[a]=u,Si(s,0)))break}return n}const jUe=100,zy={getItem:e=>(EK(zy),zy.getItem(e)),setItem:(e,t)=>{EK(zy),zy.setItem(e,t)}},RK={};function vae({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:s,id:a=null,onLayout:i=null,keyboardResizeBy:l=null,storage:u=zy,style:f,tagName:h="div",...g}){const v=jM(a),w=y.useRef(null),[C,_]=y.useState(null),[E,$]=y.useState([]),O=fUe(),N=y.useRef({}),M=y.useRef(new Map),L=y.useRef(0),k=y.useRef({autoSaveId:e,direction:r,dragState:C,id:v,keyboardResizeBy:l,onLayout:i,storage:u}),T=y.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});y.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),y.useImperativeHandle(s,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:de}=T.current;return de},setLayout:de=>{const{onLayout:_e}=k.current,{layout:Le,panelDataArray:Re}=T.current,Ye=$K({layout:de,panelConstraints:Re.map(Xe=>Xe.constraints)});jK(Le,Ye)||($(Ye),T.current.layout=Ye,_e&&_e(Ye),Bm(Re,Ye,N.current))}}),[]),bh(()=>{k.current.autoSaveId=e,k.current.direction=r,k.current.dragState=C,k.current.id=v,k.current.onLayout=i,k.current.storage=u}),vUe({committedValuesRef:k,eagerValuesRef:T,groupId:v,layout:E,panelDataArray:T.current.panelDataArray,setLayout:$,panelGroupElement:w.current}),y.useEffect(()=>{const{panelDataArray:de}=T.current;if(e){if(E.length===0||E.length!==de.length)return;let _e=RK[e];_e==null&&(_e=CUe(_Ue,jUe),RK[e]=_e);const Le=[...de],Re=new Map(M.current);_e(e,Le,Re,E,u)}},[e,E,u]),y.useEffect(()=>{});const P=y.useCallback(de=>{const{onLayout:_e}=k.current,{layout:Le,panelDataArray:Re}=T.current;if(de.constraints.collapsible){const Ye=Re.map(tn=>tn.constraints),{collapsedSize:Xe=0,panelSize:Je,pivotIndices:Ot}=ih(Re,de,Le);if(fn(Je!=null,`Panel size not found for panel "${de.id}"`),!Pu(Je,Xe)){M.current.set(de.id,Je);const an=ug(Re,de)===Re.length-1?Je-Xe:Xe-Je,Pt=Gy({delta:an,initialLayout:Le,panelConstraints:Ye,pivotIndices:Ot,prevLayout:Le,trigger:"imperative-api"});SC(Le,Pt)||($(Pt),T.current.layout=Pt,_e&&_e(Pt),Bm(Re,Pt,N.current))}}},[]),V=y.useCallback((de,_e)=>{const{onLayout:Le}=k.current,{layout:Re,panelDataArray:Ye}=T.current;if(de.constraints.collapsible){const Xe=Ye.map(Wt=>Wt.constraints),{collapsedSize:Je=0,panelSize:Ot=0,minSize:tn=0,pivotIndices:an}=ih(Ye,de,Re),Pt=_e??tn;if(Pu(Ot,Je)){const Wt=M.current.get(de.id),Lt=Wt!=null&&Wt>=Pt?Wt:Pt,Ge=ug(Ye,de)===Ye.length-1?Ot-Lt:Lt-Ot,dt=Gy({delta:Ge,initialLayout:Re,panelConstraints:Xe,pivotIndices:an,prevLayout:Re,trigger:"imperative-api"});SC(Re,dt)||($(dt),T.current.layout=dt,Le&&Le(dt),Bm(Ye,dt,N.current))}}},[]),q=y.useCallback(de=>{const{layout:_e,panelDataArray:Le}=T.current,{panelSize:Re}=ih(Le,de,_e);return fn(Re!=null,`Panel size not found for panel "${de.id}"`),Re},[]),K=y.useCallback((de,_e)=>{const{panelDataArray:Le}=T.current,Re=ug(Le,de);return wUe({defaultSize:_e,dragState:C,layout:E,panelData:Le,panelIndex:Re})},[C,E]),re=y.useCallback(de=>{const{layout:_e,panelDataArray:Le}=T.current,{collapsedSize:Re=0,collapsible:Ye,panelSize:Xe}=ih(Le,de,_e);return fn(Xe!=null,`Panel size not found for panel "${de.id}"`),Ye===!0&&Pu(Xe,Re)},[]),ee=y.useCallback(de=>{const{layout:_e,panelDataArray:Le}=T.current,{collapsedSize:Re=0,collapsible:Ye,panelSize:Xe}=ih(Le,de,_e);return fn(Xe!=null,`Panel size not found for panel "${de.id}"`),!Ye||Ah(Xe,Re)>0},[]),ue=y.useCallback(de=>{const{panelDataArray:_e}=T.current;_e.push(de),_e.sort((Le,Re)=>{const Ye=Le.order,Xe=Re.order;return Ye==null&&Xe==null?0:Ye==null?-1:Xe==null?1:Ye-Xe}),T.current.panelDataArrayChanged=!0,O()},[O]);bh(()=>{if(T.current.panelDataArrayChanged){T.current.panelDataArrayChanged=!1;const{autoSaveId:de,onLayout:_e,storage:Le}=k.current,{layout:Re,panelDataArray:Ye}=T.current;let Xe=null;if(de){const Ot=SUe(de,Ye,Le);Ot&&(M.current=new Map(Object.entries(Ot.expandToSizes)),Xe=Ot.layout)}Xe==null&&(Xe=bUe({panelDataArray:Ye}));const Je=$K({layout:Xe,panelConstraints:Ye.map(Ot=>Ot.constraints)});jK(Re,Je)||($(Je),T.current.layout=Je,_e&&_e(Je),Bm(Ye,Je,N.current))}}),bh(()=>{const de=T.current;return()=>{de.layout=[]}},[]);const he=y.useCallback(de=>{let _e=!1;const Le=w.current;return Le&&window.getComputedStyle(Le,null).getPropertyValue("direction")==="rtl"&&(_e=!0),function(Ye){Ye.preventDefault();const Xe=w.current;if(!Xe)return()=>null;const{direction:Je,dragState:Ot,id:tn,keyboardResizeBy:an,onLayout:Pt}=k.current,{layout:Wt,panelDataArray:Lt}=T.current,{initialLayout:Ln}=Ot??{},Ge=dae(tn,de,Xe);let dt=xUe(Ye,de,Je,Ot,an,Xe);const Z=Je==="horizontal";Z&&_e&&(dt=-dt);const oe=Lt.map(ze=>ze.constraints),me=Gy({delta:dt,initialLayout:Ln??Wt,panelConstraints:oe,pivotIndices:Ge,prevLayout:Wt,trigger:tae(Ye)?"keyboard":"mouse-or-touch"}),He=!SC(Wt,me);(nae(Ye)||rae(Ye))&&L.current!=dt&&(L.current=dt,!He&&dt!==0?Z?jT(de,dt<0?aae:iae):jT(de,dt<0?oae:lae):jT(de,0)),He&&($(me),T.current.layout=me,Pt&&Pt(me),Bm(Lt,me,N.current))}},[]),X=y.useCallback((de,_e)=>{const{onLayout:Le}=k.current,{layout:Re,panelDataArray:Ye}=T.current,Xe=Ye.map(Wt=>Wt.constraints),{panelSize:Je,pivotIndices:Ot}=ih(Ye,de,Re);fn(Je!=null,`Panel size not found for panel "${de.id}"`);const an=ug(Ye,de)===Ye.length-1?Je-_e:_e-Je,Pt=Gy({delta:an,initialLayout:Re,panelConstraints:Xe,pivotIndices:Ot,prevLayout:Re,trigger:"imperative-api"});SC(Re,Pt)||($(Pt),T.current.layout=Pt,Le&&Le(Pt),Bm(Ye,Pt,N.current))},[]),pe=y.useCallback((de,_e)=>{const{layout:Le,panelDataArray:Re}=T.current,{collapsedSize:Ye=0,collapsible:Xe}=_e,{collapsedSize:Je=0,collapsible:Ot,maxSize:tn=100,minSize:an=0}=de.constraints,{panelSize:Pt}=ih(Re,de,Le);Pt!=null&&(Xe&&Ot&&Pu(Pt,Ye)?Pu(Ye,Je)||X(de,Je):Pt<an?X(de,an):Pt>tn&&X(de,tn))},[X]),xe=y.useCallback((de,_e)=>{const{direction:Le}=k.current,{layout:Re}=T.current;if(!w.current)return;const Ye=j_(de,w.current);fn(Ye,`Drag handle element not found for id "${de}"`);const Xe=hae(Le,_e);_({dragHandleId:de,dragHandleRect:Ye.getBoundingClientRect(),initialCursorPosition:Xe,initialLayout:Re})},[]),be=y.useCallback(()=>{_(null)},[]),Y=y.useCallback(de=>{const{panelDataArray:_e}=T.current,Le=ug(_e,de);Le>=0&&(_e.splice(Le,1),delete N.current[de.id],T.current.panelDataArrayChanged=!0,O())},[O]),se=y.useMemo(()=>({collapsePanel:P,direction:r,dragState:C,expandPanel:V,getPanelSize:q,getPanelStyle:K,groupId:v,isPanelCollapsed:re,isPanelExpanded:ee,reevaluatePanelConstraints:pe,registerPanel:ue,registerResizeHandle:he,resizePanel:X,startDragging:xe,stopDragging:be,unregisterPanel:Y,panelGroupElement:w.current}),[P,C,r,V,q,K,v,re,ee,pe,ue,he,X,xe,be,Y]),Oe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y.createElement(w_.Provider,{value:se},y.createElement(h,{...g,children:t,className:n,id:a,ref:w,style:{...Oe,...f},[Ur.group]:"",[Ur.groupDirection]:r,[Ur.groupId]:v}))}const $M=y.forwardRef((e,t)=>y.createElement(vae,{...e,forwardedRef:t}));vae.displayName="PanelGroup";$M.displayName="forwardRef(PanelGroup)";function ug(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ih(e,t,n){const r=ug(e,t),a=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:a}}function EUe({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){y.useEffect(()=>{if(e||n==null||r==null)return;const s=j_(t,r);if(s==null)return;const a=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const l=s.getAttribute(Ur.groupId);fn(l,`No group element found for id "${l}"`);const u=X1(l,r),f=cae(l,t,r);fn(f!==null,`No resize element found for id "${t}"`);const h=i.shiftKey?f>0?f-1:u.length-1:f+1<u.length?f+1:0;u[h].focus();break}}};return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[r,e,t,n])}function RM({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:a,onClick:i,onDragging:l,onFocus:u,onPointerDown:f,onPointerUp:h,style:g={},tabIndex:v=0,tagName:w="div",...C}){var _,E;const $=y.useRef(null),O=y.useRef({onClick:i,onDragging:l,onPointerDown:f,onPointerUp:h});y.useEffect(()=>{O.current.onClick=i,O.current.onDragging=l,O.current.onPointerDown=f,O.current.onPointerUp=h});const N=y.useContext(w_);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:M,groupId:L,registerResizeHandle:k,startDragging:T,stopDragging:P,panelGroupElement:V}=N,q=jM(s),[K,re]=y.useState("inactive"),[ee,ue]=y.useState(!1),[he,X]=y.useState(null),pe=y.useRef({state:K});bh(()=>{pe.current.state=K}),y.useEffect(()=>{if(n)X(null);else{const se=k(q);X(()=>se)}},[n,q,k]);const xe=(_=r?.coarse)!==null&&_!==void 0?_:15,be=(E=r?.fine)!==null&&E!==void 0?E:5;y.useEffect(()=>{if(n||he==null)return;const se=$.current;fn(se,"Element ref not attached");let Oe=!1;return cUe(q,se,M,{coarse:xe,fine:be},(_e,Le,Re)=>{if(!Le){re("inactive");return}switch(_e){case"down":{re("drag"),Oe=!1,fn(Re,'Expected event to be defined for "down" action'),T(q,Re);const{onDragging:Ye,onPointerDown:Xe}=O.current;Ye?.(!0),Xe?.();break}case"move":{const{state:Ye}=pe.current;Oe=!0,Ye!=="drag"&&re("hover"),fn(Re,'Expected event to be defined for "move" action'),he(Re);break}case"up":{re("hover"),P();const{onClick:Ye,onDragging:Xe,onPointerUp:Je}=O.current;Xe?.(!1),Je?.(),Oe||Ye?.();break}}})},[xe,M,n,be,k,q,he,T,P]),EUe({disabled:n,handleId:q,resizeHandler:he,panelGroupElement:V});const Y={touchAction:"none",userSelect:"none"};return y.createElement(w,{...C,children:e,className:t,id:s,onBlur:()=>{ue(!1),a?.()},onFocus:()=>{ue(!0),u?.()},ref:$,role:"separator",style:{...Y,...g},tabIndex:v,[Ur.groupDirection]:M,[Ur.groupId]:L,[Ur.resizeHandle]:"",[Ur.resizeHandleActive]:K==="drag"?"pointer":ee?"keyboard":void 0,[Ur.resizeHandleEnabled]:!n,[Ur.resizeHandleId]:q,[Ur.resizeHandleState]:K})}RM.displayName="PanelResizeHandle";const $Ue=()=>{const{agent:e}=Gh(),{t}=H(),n=e?.id||null,[r,s]=br(),[a,i]=y.useState(!0),[l,u]=y.useState(null),[f,h]=y.useState([]),{allowed:g}=It({projectId:e?.projectIds,rightKeys:["agentConsoleNew"]}),v=r.has(vt.interval)?Number(r.get(vt.interval)):null,C=(()=>{const T=r.get(vt.consoleId);return T===null||l===null?null:l.entities[T]})(),_=C?.rights?.read||g,E=(f||[]).map(T=>({id:T,name:T})),$=(T,P)=>{const V=P??r.get(vt.consoleId),q=V&&T.ids.includes(V)?V:T.ids[0];q?r.set(vt.consoleId,q):r.delete(vt.consoleId);const K=T.entities[q];K?.tokenId&&r.set(vt.tokenId,K?.tokenId),s(r)},O=y.useCallback(async(T=!1,P)=>{if(!n){T&&i(!1);return}T&&i(!0),await $T.invoke(new E7e({agentId:n})),$T.right(V=>{u(V.items),h(V.tokens||[]),$(V.items,P)}),$T.left(()=>{u(null),h([])}),T&&i(!1)},[n]),N=T=>{l===null?u(new en([T],"id")):(l.push(T),u(l.clone())),r.set(vt.consoleId,T.id),s(r)},M=T=>{l!==null&&(l.entities[T.id]=T,u(l.clone()))},L=T=>{l&&(l.remove(T),l.length&&r.set(vt.consoleId,l.ids[0]),s(r),u(l.clone()))},k=y.useCallback(()=>O(!1,C?.id),[O,C?.id]);return Cx(k,30),y.useEffect(()=>{O(!0)},[O]),d.jsx(eDe,{children:d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[d.jsx("div",{className:"flex justify-between gap-4 items-center",children:d.jsx(W.Heading3,{className:"first-letter:uppercase",children:t("entities.console.nominative","Консоль")})}),a&&l===null&&d.jsx(wt,{}),!a&&l!==null&&d.jsxs(d.Fragment,{children:[_&&d.jsxs("div",{className:"flex justify-between gap-4 items-end",children:[C?.rights?.read?d.jsxs("div",{className:"flex gap-2.5 items-end z-10",children:[d.jsx("div",{className:"w-[360px]",children:d.jsx(lDe,{options:E})}),d.jsx("div",{className:"w-[186px]",children:d.jsx(dDe,{searchParams:r,setSearchParams:s})})]}):d.jsx("div",{}),d.jsx(Bq.Button,{projectId:e?.projectIds})]}),d.jsxs($M,{direction:"vertical",className:"relative flex flex-1 flex-col",children:[d.jsxs(Y1,{className:"flex flex-1 gap-2.5",defaultSize:50,minSize:30,order:1,children:[d.jsx("div",{className:"flex h-full w-5/6 border border-panel rounded flex-col justify-between",children:C!==null&&d.jsxs(d.Fragment,{children:[C?.rights?.read?d.jsx(QIe,{consoleId:C.id,agentId:n,interval:v}):d.jsx("div",{}),!!C?.rights?.write&&d.jsx(WIe,{consoleId:C.id,agentId:n})]})}),d.jsx("div",{className:"flex h-full w-1/6 min-w-[260px] border border-panel rounded ",children:d.jsx(QFe,{list:l||new en([],"id"),agentId:n,tokenOptions:E,onPinToken:M,onDeleteConsole:L,onToggleConsoleLock:M,onToggleConsoleOpen:M,onToggleConsoleType:M})})]}),d.jsx(RM,{className:Fn("h-2 w-[75px] self-center ease-in-out","bg-primary my-2 rounded-full","opacity-50 hover:opacity-100 active:opacity-100")}),d.jsx(Y1,{className:"flex flex-1 gap-2.5",order:2})]})]})]}),d.jsx(Bq.Modal,{agentId:n,tokenOptions:E,onSuccess:N})]})})},$T=new YLe,RUe=()=>{const{t:e}=H(),[t,n]=y.useState(!0),[r,s]=y.useState(null),{allowed:a}=It({permissionKey:ir.allowProjectList}),{allowed:i}=It({permissionKey:ir.allowUpdateProject}),{allowed:l}=It({permissionKey:ir.allowDeleteProject});y.useEffect(()=>{if(!a){n(!1);return}const h=new une({kind:s1.ALL});n(!0);const g=()=>{RT.right(s),RT.left(je.error),n(!1)};RT.invoke(h).then(g)},[a]);const u=h=>{a&&s(g=>{const v=g?[...g.values,h]:[h];return new en(v,"id")})},f=h=>{s(g=>g&&g.remove(h).clone())};return d.jsx(ure,{children:d.jsxs(wDe,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[t&&d.jsx(wt,{}),!t&&d.jsxs(d.Fragment,{children:[d.jsx(l1.AddButton,{}),!r?.length&&!a&&d.jsx(W,{className:"self-center",children:e("noRights.listMessage",{entity:e("entities.projects.genitive"),defaultValue:"У вас нет прав на просмотр списка проектов"})}),!r?.length&&a&&d.jsx(W,{className:"self-center",children:e("noData.listMessage",{entity:e("entities.projects.genitive"),defaultValue:"Список проектов пуст"})}),r?.map((h,g)=>d.jsx(XIe,{project:h,dropdownSide:g===r.length-1?"top":"bottom",dropdown:l||i?[d.jsx(l1.EditButton,{project:h}),d.jsx(Gq.Button,{projectId:h.id})]:void 0},h.id))]})]}),d.jsx(l1.Modal,{onSuccess:u}),d.jsx(Gq.Modal,{onSuccess:f})]})})},RT=new Pte,yae=({projectId:e})=>{const{t}=H(),[n,r]=y.useState(!1),[s,a]=y.useState(null),{allowed:i}=It({projectId:e,rightKeys:["userGroupList","userGroupListByProject"]}),{allowed:l}=It({projectId:e,rightKeys:["userGroupUpdate","userGroupDelete"]});y.useEffect(()=>{if(!e)return;const h=new mv({filter:{projectId:e}});r(!0);const g=()=>{OT.right(a),OT.left(je.error),r(!1)};OT.invoke(h).then(g)},[e]);const u=h=>{a(g=>{const v=g?[...g.values,h]:[h];return new en(v,"id")})},f=h=>{a(g=>g&&g.remove(h).clone())};return d.jsx(mre,{children:d.jsxs(MDe,{children:[n&&!!e&&d.jsx(wt,{}),!n&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(u1.AddButton,{projectId:e}),!s?.length&&!i&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.userGroups.genitive"),defaultValue:"У вас нет прав на просмотр списка групп пользователей"})}),!s?.length&&i&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),s?.map((h,g)=>d.jsx(y_,{userGroup:h,dropdown:l&&!(h.isSystem&&(h.type===$h.SUPER_ADMIN||h.type===$h.PROJECT_ADMIN))?[d.jsx(u1.EditButton,{userGroup:h,projectId:e}),d.jsx(zq.Button,{userGroupId:h.id,projectId:e})]:void 0,dropdownSide:s?.length-1===g?"top":"bottom"},h.id))]}),d.jsx(u1.Modal,{onSuccess:u,projectId:e}),d.jsx(zq.Modal,{onSuccess:f})]})})},OT=new fv,xae=({userId:e,onlyInfo:t})=>{const{t:n}=H(),[r,s]=y.useState(!1),[a,i]=y.useState(null),{checkPermission:l}=It({}),u=y.useCallback(async()=>{if(!e)return;s(!0);const h=new mv({filter:{userId:e,admin:!1}});await TT.invoke(h),TT.right(g=>i(g?wx(g.values,"projectId"):null)),TT.left(je.error),s(!1)},[e]);y.useEffect(()=>{u()},[u]);const f=()=>{u()};return d.jsxs(d.Fragment,{children:[r&&!!e&&d.jsx(wt,{}),!r&&!!e&&d.jsx(nse,{children:d.jsxs(cse,{children:[!t&&d.jsx(r2.Button,{label:n("modal.title.addToEntity",{entity:n("entities.userGroup.accusative"),defaultValue:"Добавить в группу пользователей"})}),!a?.size&&d.jsx(W,{className:"self-center",children:n("noData.listMessage",{entity:n("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),!!a?.size&&Array.from(a?.values()).map(h=>d.jsxs(y.Fragment,{children:[d.jsxs(W,{variant:"strong",color:"placeholder",className:"first-letter:uppercase",children:[n("entities.project.nominative","Проект"),": ",h[0].projectName]}),h.map((g,v)=>d.jsx(y_,{userGroup:g,dropdownSide:h?.length-1===v?"top":"bottom",dropdown:l({projectId:g.projectId,permissionKey:"userGroupUserDelete"})&&!t?[d.jsx(i2.Button,{userId:e,userGroupId:g.id,projectId:g.projectId})]:void 0},g.id))]},h[0].projectId)),d.jsx(r2.UserGroupListModal,{onSuccess:f,userId:e}),d.jsx(i2.Modal,{onSuccess:f})]})})]})},TT=new fv,OUe=({agentGroupId:e,projectId:t})=>{const{t:n}=H(),[r,s]=y.useState(!1),[a,i]=y.useState(null),{allowed:l}=It({projectId:t,rightKeys:["userGroupList","userGroupListByProject"]}),{allowed:u}=It({projectId:t,rightKeys:["agentGroupUserGroupDelete"]}),f=y.useCallback(async()=>{if(!e||!l)return;s(!0);const g=new mv({filter:{agentGroupIds:[e],admin:!1}});await AT.invoke(g),AT.right(i),s(!1),AT.left(je.error)},[e,l]);y.useEffect(()=>{f()},[f]);const h=()=>{f()};return d.jsx(hre,{children:d.jsxs(bre,{children:[r&&!!e&&d.jsx(wt,{}),!r&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(t2.Button,{projectId:t}),!a?.length&&!l&&d.jsx(W,{className:"self-center",children:n("noRights.listMessage",{entity:n("entities.userGroups.genitive"),defaultValue:"У вас нет прав на просмотр списка групп пользователей"})}),!a?.length&&l&&d.jsx(W,{className:"self-center",children:n("noData.listMessage",{entity:n("entities.userGroups.genitive"),defaultValue:"Список групп пользователей пуст"})}),a?.map((g,v)=>d.jsx(y_,{userGroup:g,dropdown:u?[d.jsx(n2.Button,{userGroupId:g.id,agentGroupId:e,projectId:t})]:void 0,dropdownSide:a?.length-1===v?"top":"bottom"},g.id))]}),d.jsx(t2.UserGroupListModal,{onSuccess:h,agentGroupId:e,projectId:t}),d.jsx(n2.Modal,{onSuccess:h})]})})},AT=new fv,c2=(e,t=!0)=>{if(!e||e.isDirectory&&!e.childs?.length&&t)return new Map;const{childs:n,...r}=e;return!e.isDirectory||!e.childs?.length?new Map([[e.name,{children:null,meta:r}]]):TUe(n)},TUe=e=>{const t=new Map;if(e===null)return t;for(const n of e){const{childs:r,...s}=n;t.set(n.name,{children:null,meta:s})}return t},Md=(e,t,n)=>{let a=`${t.replace(/^\/+/,"")}${Ti}${e}`.replace(/^\/+/,"");return(n!=="windows"||a==="")&&(a=`/${a}`),a},AUe=e=>{if(!e)return"";const t=e.toLocaleDateString("ru-RU"),n=e.toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"});return`${t} ${n}`},bae=({path:e,isDirectory:t,children:n,showOnlyCreate:r=!1,fileSystemType:s,projectId:a})=>{const{t:i}=H();return d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,children:n}),d.jsx(sn.Portal,{children:d.jsxs(sn.Content,{className:"min-w-[100px]! flex flex-col",side:"bottom",align:"end",children:[!r&&d.jsxs(d.Fragment,{children:[d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(dM.Button,{fromPath:e,modalTitle:t?i("renameFolder","Переименование папки"):i("renameFile","Переименование файла"),projectId:a,fileSystemType:s})}),d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(fM.Button,{fromPath:e,modalTitle:t?i("moveFolder","Перемещение папки"):i("moveFile","Перемещение файла"),projectId:a,fileSystemType:s})})]}),t&&d.jsxs(d.Fragment,{children:[d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(pM.Button,{folderPath:e,projectId:a,fileSystemType:s})}),d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(mM.Button,{folderPath:e,projectId:a,fileSystemType:s})})]}),!r&&d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(hM.Button,{path:e,itemIsDirectory:t,modalTitle:t?i("deleteFolder","Удаление папки"):i("deleteFile","Удаление файла"),projectId:a,fileSystemType:s})})]})})]})},wae=({meta:e,keyNode:t,path:n,onSuccess:r,onClick:s,agentId:a,fileSystemType:i,agentOs:l,projectId:u})=>{const f=!e||e.isDirectory,h=Md(n,e?.directory||"",i==="agent"?l:"linux"),g=y.useMemo(()=>{let w=i==="agent"?["agentRfsItemDelete","agentRfsItemMove","agentRfsItemRename"]:["agentLfsItemDelete","agentLfsItemMove","agentLfsItemRename"];return f&&(w=i==="agent"?[...w,"agentRfsFolderCreate","agentRfsFileCreate"]:[...w,"agentLfsFolderCreate","agentLfsFileCreate"]),w},[i,f]),{allowed:v}=It({projectId:u,rightKeys:g});return d.jsxs("div",{className:"flex w-full max-w-full h-6",children:[f&&d.jsx("div",{className:"flex items-center mr-1.5",children:d.jsx(Ufe,{})}),d.jsx("div",{className:"flex flex-1 mr-2.5 overflow-x-hidden items-center",children:d.jsx(W,{className:Fn("text-ellipsis whitespace-nowrap overflow-hidden"),children:t})}),d.jsxs("div",{className:"flex items-center gap-2.5",children:[!f&&d.jsxs(d.Fragment,{children:[d.jsx(W,{className:"!text-placeholder",size:"sm",variant:"strong",children:NMe(e?.size||0)}),v&&d.jsx("div",{className:"w-[1px] h-2.5 bg-white"})]}),f&&i==="agent"&&d.jsx(wre,{path:h,onSuccess:r,agentId:a}),!f&&i==="center"&&d.jsx(eVe,{agentId:a,path:h,fileName:e?.name,fileSize:e?.size,projectId:u}),v&&d.jsx(bae,{path:h,isDirectory:f,fileSystemType:i,projectId:u,children:d.jsx(Fe,{className:"text-text",variant:"link",onlyIcon:!0,onPointerDown:w=>s?.(w),children:d.jsx(v2,{})})})]})]})},Cae=({onSuccess:e,value:t,fileSystemType:n,projectId:r})=>{const{t:s}=H(),[a,i]=y.useState(t||""),[l,u]=y.useState(!1),{agent:f}=Gh(),h=f.id,g=y.useMemo(()=>{let $=n==="agent"?["agentRfsFolderCreate","agentRfsFileCreate"]:["agentLfsFolderCreate","agentLfsFileCreate"];return a&&a!=="/"&&($=n==="agent"?[...$,"agentRfsItemDelete","agentRfsItemMove","agentRfsItemRename"]:[...$,"agentLfsItemDelete","agentLfsItemMove","agentLfsItemRename"]),$},[n,a]),{allowed:v}=It({projectId:r,rightKeys:g});y.useEffect(()=>{i(t||"")},[t]);const w=async $=>{if(!$)return je.info(s("errors.pathRequired","Необходимо указать путь")),e($,null);u(!0),n==="agent"?(await kT.invoke(new hne({path:$,agentId:h})),kT.right(O=>e($,O)),kT.left(je.error)):(await NT.invoke(new mne({path:$,agentId:h})),NT.right(O=>e($,O)),NT.left(je.error)),u(!1)},C=$=>{$.preventDefault(),w(a)},_=$=>{const O=$.target.value;i(O.replace(/\\/g,Ti))},E=()=>{const O=a.split(Ti).slice(0,-1).join(Ti),N=Md(O,"",n==="agent"?f.osShortName:"linux");i(N),w(N)};return d.jsxs("form",{onSubmit:C,className:"flex w-full gap-2.5 items-center",children:[d.jsx(Fe,{onClick:E,onlyIcon:!0,disabled:l,variant:"secondary",children:d.jsx(B8,{})}),d.jsx("div",{className:"flex flex-1 min-w-[100px]",children:d.jsx(X2,{wrapperClassName:"w-full border-1 border-secondary-saturation rounded-xs",value:a,onChange:_,placeholder:`${s("placeholders.inputPath","Введите путь")}...`,autoComplete:"off"})}),d.jsx(Fe,{type:"submit",className:"w-[109px] justify-center",title:n==="agent"?s("loadFromCache","Загрузить из кэша"):"",disabled:l,children:l?`${s("loading","Загрузка")}...`:s("load","Загрузить")}),n==="agent"&&d.jsx(wre,{path:a,onSuccess:e,variant:"secondary",agentId:h}),v&&d.jsx(bae,{path:a||"/",isDirectory:!0,showOnlyCreate:!a||a==="/",projectId:r,fileSystemType:n,children:d.jsx(Fe,{onlyIcon:!0,variant:"secondary",children:d.jsx(v2,{})})})]})},kT=new Vte,NT=new Bte,Sae=({title:e})=>{const{t}=H();return d.jsxs(Gu,{className:"flex flex-col h-full",children:[d.jsx(Gu.Header,{children:d.jsx(W,{className:"cursor-pointer",size:"xl",variant:"strong",children:e})}),d.jsx(Gu.Body,{className:"flex-1 justify-center",children:d.jsx(W,{className:"self-center",children:t("noRights.fileManagerPanel","У вас нет прав на просмотр содержимого панели")})})]})},kUe=({onChangePath:e,projectId:t,...n})=>{const{t:r}=H(),[s,a]=y.useState("/"),[i,l]=y.useState("/"),[u,f]=y.useState(null),[h,g]=y.useState(null),{agent:v}=Gh(),w=v.id,C=y.useCallback((L,k,T)=>{e(L,k,T||null),l(L),a(L)},[e]),_=y.useCallback(async({newPath:L,newParentPath:k,needUpdatePath:T,showErrorMessage:P=!1}={})=>{const V=L||i;V&&(await LT.invoke(new hne({path:V,agentId:w})),LT.right(q=>{T&&C(V,k||i,q),g(q),f(c2(q))}),LT.left(q=>{P&&je.error(q)}))},[w,i,C]);y.useEffect(()=>{_({showErrorMessage:!0})},[]);const E=y.useCallback((L,k)=>{f(c2(k)),C(L,L,k)},[C]),$=y.useCallback(L=>{_({newPath:L,newParentPath:L,needUpdatePath:!0,showErrorMessage:!0})},[_]),O=y.useCallback(L=>d.jsx(wae,{fileSystemType:"agent",onSuccess:E,agentId:w,agentOs:v.osShortName,projectId:t,...L}),[v,w,E]),N=(L,k,{meta:T})=>{const P=Md(L,T?.directory||"",v.osShortName);a(L),e(P,i,T??null)},M=async(L,k,{meta:T,setLoading:P})=>{const V=Md(L,T?.directory||"",v.osShortName);T?.isDirectory?(P(!0),await _({newPath:V,newParentPath:V,needUpdatePath:!0,showErrorMessage:!0}),P(!1)):(a(L),e(V,i,T??null)),window.getSelection&&window.getSelection()?.removeAllRanges()};return Cx(_,5),d.jsx(_re,{children:d.jsx($re,{children:d.jsx(Nre,{children:d.jsx(Ire,{children:d.jsxs(Tre,{children:[d.jsx(_ne,{...n,nodes:u,title:rn(r("entities.agent.nominative","Агент")),bodyPrefix:d.jsx(Cae,{value:i,onSuccess:E,fileSystemType:"agent",projectId:t}),renderNode:O,path:s,onNodeClick:N,onNodeDoubleClick:M,emptyMessage:d.jsxs(d.Fragment,{children:[!h?.isEmpty&&!!s&&d.jsx(W,{className:"self-center",children:r("noData.cache","В кэше пока ничего нет")}),!!h?.isEmpty&&d.jsx(W,{className:"self-center",children:r("noData.folder","Папка пуста")})]})}),d.jsx(dM.Modal,{agentId:w,fileSystemType:"agent",onSuccess:$}),d.jsx(fM.Modal,{agentId:w,fileSystemType:"agent",onSuccess:$}),d.jsx(pM.Modal,{agentId:w,fileSystemType:"agent",onSuccess:$}),d.jsx(hM.Modal,{agentId:w,fileSystemType:"agent",onSuccess:$}),d.jsx(mM.Input,{agentId:w,fileSystemType:"agent",onSuccess:$})]})})})})})},LT=new Vte,NUe=Rt(kUe,{rightKeys:["agentRfsFolderList"],fallback:d.jsx(Sae,{title:"Агент"})}),LUe=({onChangePath:e,projectId:t,...n})=>{const{t:r}=H(),[s,a]=y.useState("/"),[i,l]=y.useState("/"),[u,f]=y.useState(null),[h,g]=y.useState(null),{agent:v}=Gh(),w=v.id,C=y.useCallback((L,k,T)=>{e(L,k,T||null),l(L),a(L)},[e]),_=y.useCallback(async({newPath:L,newParentPath:k,needUpdatePath:T,showErrorMessage:P=!1}={})=>{const V=L||i;V&&(await MT.invoke(new mne({path:V,agentId:w})),MT.right(q=>{f(c2(q)),g(q),T&&C(V,k||i,q)}),MT.left(q=>{P&&je.error(q)}))},[w,i,C]);y.useEffect(()=>{_({showErrorMessage:!0})},[]);const E=y.useCallback((L,k)=>{f(c2(k)),C(L,L,k)},[C]),$=y.useCallback(L=>{_({newPath:L,newParentPath:L,needUpdatePath:!0,showErrorMessage:!0})},[_]),O=(L,k,{meta:T})=>{const P=Md(L,T?.directory||"","linux");a(L),e(P,i,T??null)},N=async(L,k,{meta:T,setLoading:P})=>{const V=Md(L,T?.directory||"","linux");T?.isDirectory?(P(!0),await _({newPath:V,newParentPath:V,needUpdatePath:!0,showErrorMessage:!0}),P(!1)):(a(L),e(V,i,T??null)),window.getSelection&&window.getSelection()?.removeAllRanges()},M=y.useCallback(L=>d.jsx(wae,{fileSystemType:"center",onSuccess:E,agentId:w,agentOs:v.osShortName,projectId:t,...L}),[v,w,E]);return Cx(_,5),d.jsx(_re,{children:d.jsx($re,{children:d.jsx(Nre,{children:d.jsx(Ire,{children:d.jsxs(Tre,{children:[d.jsx(_ne,{...n,nodes:u,title:r("cloud","Облако"),bodyPrefix:d.jsx(Cae,{value:i,onSuccess:E,fileSystemType:"center",projectId:t}),renderNode:M,path:s,onNodeClick:O,onNodeDoubleClick:N,showLoader:!1,emptyMessage:(!h?.childs?.length||!!h?.isEmpty)&&d.jsx(W,{className:"self-center",children:r("noData.folder","Папка пуста")})}),d.jsx(dM.Modal,{agentId:w,fileSystemType:"center",onSuccess:$}),d.jsx(fM.Modal,{agentId:w,fileSystemType:"center",onSuccess:$}),d.jsx(pM.Modal,{agentId:w,fileSystemType:"center",onSuccess:$}),d.jsx(hM.Modal,{agentId:w,fileSystemType:"center",onSuccess:$}),d.jsx(mM.Input,{agentId:w,fileSystemType:"center",onSuccess:$})]})})})})})},MT=new Bte,MUe=Rt(LUe,{rightKeys:["agentLfsFolderList"],fallback:d.jsx(Sae,{title:"Облако"})}),IUe={[Ci.COPY]:"Копирование",[Ci.CREATE]:"Создание",[Ci.DELETE]:"Удаление",[Ci.GET]:"Получение файла",[Ci.GET_INFO]:"Получение информации",[Ci.LIST]:"Получение содержимого папки",[Ci.MOVE]:"Перемещение",[Ci.RENAME]:"Переименование",[Ci.RESET]:"Сброс"},PUe=[Ci.COPY,Ci.RENAME,Ci.MOVE],DUe={[Vu.COMPLETE]:"Выполнено",[Vu.ERROR]:"Ошибка",[Vu.NEW]:"Выполнение",[Vu.NONE]:"Выполнение"},VUe={[Vu.COMPLETE]:"primary",[Vu.ERROR]:"danger-red",[Vu.NEW]:"placeholder",[Vu.NONE]:"placeholder"},BUe=({dateTime:e,action:t,path1:n,path2:r,status:s})=>d.jsxs("div",{className:"flex flex-1 gap-2.5 overflow-hidden min-h-5",children:[!!e&&d.jsx(W,{className:"shrink-0",mono:!0,children:e}),d.jsx(W,{className:"shrink-0",mono:!0,children:t&&IUe[t]||""}),d.jsxs(W,{className:"overflow-x-hidden text-ellipsis",mono:!0,children:[n," ",PUe.includes(t)&&r?`-> ${r}`:""]}),d.jsx(W,{color:VUe[s]||"placeholder",className:"shrink-0",mono:!0,children:`[${DUe[s]??""}]`})]}),FUe=({agentId:e})=>{const{t}=H(),[n,r]=y.useState(!1),[s,a]=y.useState(null),i=y.useCallback(async({offset:f=0,showError:h=!1,isNew:g=!1})=>{if(!e)return;g||r(!0);const v=new G7e({agentId:e,offset:f,limit:100,reverse:!0});await IT.invoke(v),IT.right(w=>{a(C=>{if(f===0&&!g||!C)return w;if(C!==null){const _=w.data.ids.reduce((E,$)=>(E.data.entities[$]&&(E.data=E.data.remove($)),E),C);return new Ia({...w,data:g?w.data.concat(_.data):_.data.concat(w.data)})}return C})}),h&&IT.left(w=>{je.error(w)}),r(!1)},[e]),{intersector:l}=Fd(async()=>{s?.hasNextPage&&!n&&i({offset:s.offset})}),u=y.useCallback(()=>i({isNew:!0}),[i]);return y.useEffect(()=>{i({showError:!0})},[i]),Cx(u,10),d.jsxs(Xy,{className:"flex flex-col w-full max-h-full overflow-hidden",defaultOpen:!0,children:[d.jsx(Xy.Header,{children:t("agentCommandListTitle","Статусы команд агенту")}),d.jsxs(Xy.Body,{className:"!pb-0 flex-1 overflow-y-auto",children:[!n&&!!s&&!!s?.data?.isEmpty&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.commands.accusative","команд"),defaultValue:"Список команд пуст"})}),!!s&&!s.data?.isEmpty&&s.data.map(f=>d.jsx(BUe,{dateTime:AUe(f.updatedDate||f.createdDate),action:f.action,path1:f.path1,path2:f.path2,status:f.status},`action_${f.id}`)),n&&d.jsx(wt,{}),l]})]})},IT=new BLe,UUe=Rt(FUe,{rightKeys:["agentRfsActionStatusList"]}),GUe=()=>{const{t:e}=H(),[t,n]=y.useState(null),[r,s]=y.useState(null),[a,i]=y.useState(null),{agent:l}=Gh(),u=l.id,{allowed:f}=It({projectId:l?.projectIds,rightKeys:["agentRfsFolderList","agentRfsFileCreate","agentLfsFileGet"],every:!0}),{allowed:h}=It({projectId:l?.projectIds,rightKeys:["agentLfsFolderList","agentRfsFileGet","agentLfsFileCreate"],every:!0}),g=y.useCallback(($,O,N)=>{n({path:$,meta:N,parentPath:O}),i("left")},[]),v=y.useCallback(($,O,N)=>{s({path:$,meta:N,parentPath:O}),i("right")},[]),w=!r?.parentPath||r?.parentPath==="/"?"":r?.parentPath,C=Md(t?.meta?.name||"",w,"linux"),_=!t?.parentPath||t?.parentPath==="/"?"":t?.parentPath,E=Md(r?.meta?.name||"",_,l.osShortName);return u?d.jsxs("div",{className:"flex flex-col flex-1 gap-3",children:[d.jsx(W.Heading3,{children:e("tabs.agent.fileManager","Менеджер файлов")}),d.jsxs($M,{direction:"vertical",className:"relative flex flex-1 flex-col",children:[d.jsx(Y1,{className:"flex flex-1 gap-2.5",defaultSize:50,minSize:30,order:1,children:d.jsxs("div",{className:"flex gap-2.5 w-full h-full",children:[d.jsx("div",{className:"w-1/2 h-full overflow-hidden",children:d.jsx(NUe,{onChangePath:g,projectId:l?.projectIds})}),d.jsxs("div",{className:"flex flex-col w-[24px] h-full justify-center items-center gap-2.5",children:[d.jsx(Hq,{direction:"right",agentId:u,fromPath:t?.path,toPath:C,fileSize:t?.meta?.size||0,disabled:!h||!t?.meta||t?.meta?.isDirectory||a!=="left"}),d.jsx(Hq,{direction:"left",agentId:u,fromPath:r?.path,toPath:E,fileSize:r?.meta?.size||0,disabled:!f||!t?.parentPath||!r?.meta||r?.meta?.isDirectory||a!=="right"})]}),d.jsx("div",{className:"w-1/2 h-full overflow-hidden",children:d.jsx(MUe,{onChangePath:v,projectId:l?.projectIds})})]})}),d.jsx(RM,{className:Fn("h-2 w-[75px] self-center ease-in-out","bg-primary my-2 rounded-full","opacity-50 hover:opacity-100 active:opacity-100")}),d.jsx(Y1,{className:"flex flex-1 gap-2.5 items-start",order:2,defaultSize:50,minSize:30,children:d.jsx(UUe,{agentId:u})})]})]}):null},_ae=({projectId:e})=>{const{t}=H(),[n,r]=y.useState(!1),[s,a]=y.useState(null),{allowed:i}=It({projectId:e,rightKeys:["agentGroupList","agentGroupListByProject"]}),{allowed:l}=It({projectId:e,rightKeys:["agentGroupUpdate","agentGroupDelete"]});y.useEffect(()=>{if(!e||!i)return;const h=new cc({filter:{projectId:e}});r(!0);const g=()=>{PT.right(a),PT.left(je.error),r(!1)};PT.invoke(h).then(g)},[e,i]);const u=h=>{i&&a(g=>{const v=g?[...g.values,h]:[h];return new en(v,"id")})},f=h=>{a(g=>g&&g.remove(h).clone())};return d.jsx(Bre,{children:d.jsxs(sVe,{children:[n&&!!e&&d.jsx(wt,{}),!n&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(c1.AddButton,{projectId:e}),!s?.length&&!i&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"У вас нет прав на просмотр списка групп агентов"})}),!s?.length&&i&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),s?.map((h,g)=>d.jsx(JL,{agentGroup:h,dropdown:l&&!h?.isDefault?[d.jsx(c1.EditButton,{agentGroup:h,projectId:e}),d.jsx(qq.Button,{agentGroupId:h.id,projectId:e})]:void 0,dropdownSide:s?.length-1===g?"top":"bottom"},h.id))]}),d.jsx(c1.Modal,{onSuccess:u,projectId:e}),d.jsx(qq.Modal,{onSuccess:f})]})})},PT=new ac,zUe=({projectId:e})=>{const{t}=H(),{userGroupId:n}=fo(),[r,s]=y.useState(!1),[a,i]=y.useState(null),{allowed:l}=It({projectId:e,rightKeys:["agentGroupList","agentGroupListByProject"]}),{allowed:u}=It({projectId:e,rightKeys:["agentGroupUserGroupDelete"]}),f=y.useCallback(async()=>{if(!n||!e||!l)return;s(!0);const g=new cc({filter:{projectId:e,userGroupIds:[n]}});await DT.invoke(g),DT.right(i),s(!1),DT.left(je.error)},[e,n,l]);y.useEffect(()=>{f()},[f]);const h=()=>{f()};return d.jsx(hre,{children:d.jsxs(bre,{children:[r&&!!e&&d.jsx(wt,{}),!r&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(t2.Button,{label:t("modal.title.addToEntity",{entity:t("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"}),projectId:e}),!a?.length&&!l&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"У вас нет прав на просмотр списка групп агентов"})}),!a?.length&&l&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),a?.map((g,v)=>d.jsx(JL,{agentGroup:g,dropdown:u?[d.jsx(n2.Button,{userGroupId:n,agentGroupId:g.id,projectId:e})]:void 0,dropdownSide:a?.length-1===v?"top":"bottom"},g.id))]}),d.jsx(t2.AgentGroupListModal,{onSuccess:h,userGroupId:n,projectId:e}),d.jsx(n2.Modal,{onSuccess:h})]})})},DT=new ac,HUe=({projectId:e})=>{const{t}=H(),{clientKeyId:n}=fo(),[r,s]=y.useState(!1),[a,i]=y.useState(null),{allowed:l}=It({projectId:e,rightKeys:["agentGroupList","agentGroupListByProject"]}),{allowed:u}=It({projectId:e,rightKeys:["agentGroupClientKeyDelete"]}),f=y.useCallback(async()=>{if(!n||!e||!l)return;s(!0);const g=new cc({filter:{projectId:e,clientKeyId:n}});await VT.invoke(g),VT.right(i),s(!1),VT.left(je.error)},[e,n,l]);y.useEffect(()=>{f()},[f]);const h=()=>{f()};return d.jsx(sse,{children:d.jsxs(ose,{children:[r&&!!e&&d.jsx(wt,{}),!r&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(s2.Button,{label:t("modal.title.addToEntity",{entity:t("entities.agentGroup.accusative"),defaultValue:"Добавить в группу агентов"}),projectId:e}),!a?.length&&!l&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"У вас нет прав на просмотр списка групп агентов"})}),!a?.length&&l&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.agentGroups.genitive"),defaultValue:"Список групп агентов пуст"})}),a?.map((g,v)=>d.jsx(JL,{agentGroup:g,dropdown:u?[d.jsx(a2.Button,{clientKeyId:n,agentGroupId:g.id,projectId:e})]:void 0,dropdownSide:a?.length-1===v?"top":"bottom"},g.id))]}),d.jsx(s2.AgentGroupListModal,{onSuccess:h,clientKeyId:n,projectId:e}),d.jsx(a2.Modal,{onSuccess:h})]})})},VT=new ac,qUe=()=>{const{t:e}=H(),[t,n]=y.useState(!0),[r,s]=y.useState(null),{allowed:a}=It({permissionKey:ir.allowUserList}),{allowed:i}=It({permissionKey:ir.allowUpdateUser}),{allowed:l}=It({permissionKey:ir.allowDeleteUser}),u=y.useCallback((v=0)=>{if(!a){n(!1);return}const w=new v_({offset:v});n(!0);const C=()=>{BT.right(_=>{s(E=>v===0?_:E!==null?new Ia({..._,data:E.data.concat(_.data)}):null)}),BT.left(_=>{je.error(_),s(null)}),n(!1)};BT.invoke(w).then(C)},[a]),{intersector:f}=Fd(async()=>{r?.hasNextPage&&!t&&u(r.offset)});y.useEffect(()=>{u()},[u]);const h=()=>{u()},g=()=>{u()};return d.jsx(mVe,{children:d.jsx(vM,{children:d.jsxs(CVe,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[t&&r===null&&d.jsx(wt,{}),r!==null&&d.jsxs(d.Fragment,{children:[d.jsx(Kq.Button,{}),!r.data?.length&&!a&&d.jsx(W,{className:"self-center",children:e("noRights.listMessage",{entity:e("entities.users.genitive"),defaultValue:"У вас нет прав на просмотр списка пользователей"})}),!r.data?.length&&a&&d.jsx(W,{className:"self-center",children:e("noData.listMessage",{entity:e("entities.users.genitive"),defaultValue:"Список пользователей пуст"})}),r.data?.map((v,w)=>d.jsx(eM,{user:v,dropdownSide:w===r.data.length-1?"top":"bottom",dropdown:i||l?[d.jsx(Sd.Button,{user:v}),d.jsx(Yq.Button,{userId:v.id})]:void 0},v.id)),t&&d.jsx(wt,{}),f]})]}),d.jsx(Kq.Modal,{onSuccess:h}),d.jsx(Sd.Modal,{onSuccess:h}),d.jsx(Yq.Modal,{onSuccess:g})]})})})},BT=new p_,KUe=({projectId:e})=>{const{t}=H(),{userGroupId:n}=fo(),[r,s]=y.useState(!0),[a,i]=y.useState(null),{allowed:l}=It({projectId:e,rightKeys:["userList","userListAll"]}),{allowed:u}=It({projectId:e,rightKeys:["userGroupUserDelete"]}),f=y.useCallback((v=0)=>{if(!n||!l){s(!1);return}const w=new v_({offset:v,filter:{userGroupIds:[n]}});s(!0);const C=()=>{FT.right(_=>{i(E=>v===0?_:E!==null?new Ia({..._,data:E.data.concat(_.data)}):null)}),FT.left(_=>{je.error(_),i(null)}),s(!1)};FT.invoke(w).then(C)},[n,l]),{intersector:h}=Fd(async()=>{a?.hasNextPage&&!r&&f(a.offset)});y.useEffect(()=>{f()},[f]);const g=()=>{f()};return d.jsx(nse,{children:d.jsxs(cse,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[r&&a===null&&d.jsx(wt,{}),a!==null&&d.jsxs(d.Fragment,{children:[d.jsx(r2.Button,{projectId:e}),!a.data?.length&&!l&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.users.genitive"),defaultValue:"У вас нет прав на просмотр списка пользователей"})}),!a.data?.length&&l&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.users.genitive"),defaultValue:"Список пользователей пуст"})}),a.data?.map((v,w)=>d.jsx(eM,{user:v,dropdownSide:w===a.data.length-1?"top":"bottom",dropdown:u?[d.jsx(i2.Button,{userId:v.id,userGroupId:n,projectId:e})]:void 0},v.id)),r&&d.jsx(wt,{}),h]})]}),d.jsx(r2.UserListModal,{onSuccess:g,userGroupId:n}),d.jsx(i2.Modal,{onSuccess:g})]})})},FT=new p_,jae=({projectId:e,isLoaded:t,setIsLoaded:n})=>{const{t:r}=H(),[s,a]=y.useState(!1),[i,l]=y.useState(null),{allowed:u}=It({projectId:e,rightKeys:["clientKeyList","clientKeyListAll"]}),{allowed:f}=It({projectId:e,rightKeys:["clientKeyUpdate","clientKeyDelete","clientKeyGetFull"]});y.useEffect(()=>{if(!e||t||!u)return;const v=new QL({filter:{projectId:e}});a(!0);const w=()=>{UT.right(l),UT.left(je.error),a(!1),n?.(!0)};UT.invoke(v).then(w)},[e,t,n,u]);const h=v=>{u&&l(w=>{const C=w?[...w.values,v]:[v];return new en(C,"id")})},g=v=>{l(w=>w&&w.remove(v).clone())};return d.jsx(Zre,{children:d.jsx(kVe,{children:d.jsxs(NVe,{children:[s&&!!e&&d.jsx(wt,{}),!s&&!!e&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2.5 w-full",children:[d.jsx(d1.AddButton,{projectId:e}),d.jsx(Wq.Button,{projectId:e})]}),!i?.length&&d.jsx(W,{className:"self-center",children:r("noData.listMessage",{entity:r("entities.clientKeys.genitive"),defaultValue:"Список ключей пуст"})}),i?.map((v,w)=>d.jsx(jne,{clientKey:v,dropdown:f?({setIsLoading:C})=>[d.jsx(ese,{clientKeyId:v.id,clientKeyName:v.name,onChangeLoading:C,projectId:e}),v.id!==Eh&&d.jsx(d1.EditButton,{clientKey:v,projectId:e}),v.id!==Eh&&d.jsx(Zq.Button,{clientKeyId:v.id,projectId:e})]:void 0,dropdownSide:i?.length-1===w?"top":"bottom"},v.id))]}),d.jsx(d1.Modal,{onSuccess:h,projectId:e}),d.jsx(Zq.Modal,{onSuccess:g}),d.jsx(Wq.Modal,{projectId:e,onSuccess:h})]})})})},UT=new BL,YUe=({agentGroupId:e,projectId:t})=>{const{t:n}=H(),[r,s]=y.useState(!1),[a,i]=y.useState(null),{allowed:l}=It({projectId:t,rightKeys:["clientKeyList","clientKeyListAll"]}),{allowed:u}=It({projectId:t,rightKeys:["agentGroupClientKeyDelete"]}),f=y.useCallback(async()=>{if(!e||!l)return;s(!0);const g=new QL({filter:{agentGroupIds:[e]}});await GT.invoke(g),GT.right(i),s(!1),GT.left(je.error)},[e,l]);y.useEffect(()=>{f()},[f]);const h=()=>{f()};return d.jsx(sse,{children:d.jsxs(ose,{children:[r&&!!e&&d.jsx(wt,{}),!r&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(s2.Button,{projectId:t}),!a?.length&&!l&&d.jsx(W,{className:"self-center",children:n("noRights.listMessage",{entity:n("entities.clientKeys.genitive"),defaultValue:"У вас нет прав на просмотр списка ключей"})}),!a?.length&&l&&d.jsx(W,{className:"self-center",children:n("noData.listMessage",{entity:n("entities.clientKeys.genitive"),defaultValue:"Список клиентских ключей пуст"})}),a?.map((g,v)=>d.jsx(jne,{clientKey:g,dropdown:u?[d.jsx(a2.Button,{clientKeyId:g.id,agentGroupId:e,projectId:t})]:void 0,dropdownSide:a?.length-1===v?"top":"bottom"},g.id))]}),d.jsx(s2.ClientKeyListModal,{onSuccess:h,agentGroupId:e,projectId:t}),d.jsx(a2.Modal,{onSuccess:h})]})})},GT=new BL,Eae=({projectId:e,isLoaded:t,setIsLoaded:n})=>{const{t:r}=H(),[s,a]=y.useState(!1),[i,l]=y.useState(null),{allowed:u}=It({projectId:e,rightKeys:["clientSchemaList","clientSchemaListAll"]}),{allowed:f}=It({projectId:e,rightKeys:["clientSchemaUpdate","clientSchemaDelete"]});y.useEffect(()=>{if(!e||t||!u)return;const v=new dIe({filter:{projectId:e}});a(!0);const w=()=>{zT.right(l),zT.left(je.error),a(!1),n?.(!0)};zT.invoke(v).then(w)},[e,t,n,u]);const h=v=>{u&&l(w=>{const C=w?[...w.values,v]:[v];return new en(C,"id")})},g=v=>{l(w=>w&&w.remove(v).clone())};return d.jsx(pse,{children:d.jsx(jBe,{children:d.jsxs(PBe,{children:[s&&!!e&&d.jsx(wt,{}),!s&&!!e&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-2.5 w-full",children:[d.jsx(f1.AddButton,{projectId:e}),d.jsx(iK.Button,{projectId:e})]}),!i?.length&&!u&&d.jsx(W,{className:"self-center",children:r("noRights.listMessage",{entity:r("entities.clientSchemas.genitive"),defaultValue:"У вас нет прав на просмотр списка схем"})}),!i?.length&&u&&d.jsx(W,{className:"self-center",children:r("noData.listMessage",{entity:r("entities.clientSchemas.genitive"),defaultValue:"Список схем пуст"})}),i?.map((v,w)=>d.jsx(ePe,{clientSchema:v,dropdown:f?({setIsLoading:C})=>[d.jsxs(sn.Sub,{children:[d.jsxs(sn.SubTrigger,{className:"flex items-center",children:[d.jsx(W,{children:r("export","Экспорт")}),d.jsx(ec,{className:"text-text size-4 rotate-270 absolute right-2"})]}),d.jsx(sn.Portal,{children:d.jsxs(sn.SubContent,{className:"min-w-[100px]! flex flex-col z-99",children:[d.jsx(o2,{clientSchemaId:v.id,clientSchemaName:v.name,onChangeLoading:C,projectId:e,exportType:"json",label:"JSON",className:"justify-end!"}),d.jsx(o2,{clientSchemaId:v.id,clientSchemaName:v.name,onChangeLoading:C,projectId:e,exportType:"enums",label:"ZIP",className:"justify-end!"})]})})]}),v.id!==Eh&&d.jsx(f1.EditButton,{clientSchema:v,projectId:e,className:"justify-end"}),v.id!==Eh&&d.jsx(tK.Button,{clientSchemaId:v.id,projectId:e})]:void 0,dropdownSide:i?.length-1===w?"top":"bottom"},v.id))]}),d.jsx(f1.Modal,{onSuccess:h,projectId:e}),d.jsx(tK.Modal,{onSuccess:g}),d.jsx(iK.Modal,{projectId:e,onSuccess:h})]})})})},zT=new ALe,$ae=({projectId:e})=>{const{t}=H(),[n,r]=y.useState(!1),[s,a]=y.useState(null),{allowed:i}=It({projectId:e,rightKeys:["clientVersionList","clientVersionListAll"]}),{allowed:l}=It({projectId:e,rightKeys:["clientVersionUpdate","clientVersionDelete"]});y.useEffect(()=>{if(!e||!i)return;const h=new vIe({filter:{projectId:e}});r(!0);const g=()=>{HT.right(a),HT.left(je.error),r(!1)};HT.invoke(h).then(g)},[i,e]);const u=h=>{i&&a(g=>{const v=g?[...g.values,h]:[h];return new en(v,"id")})},f=h=>{a(g=>g&&g.remove(h).clone())};return d.jsx(yse,{children:d.jsxs(IBe,{children:[n&&!!e&&d.jsx(wt,{}),!n&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(h1.AddButton,{projectId:e}),!s?.length&&!i&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.clientVersions.genitive"),defaultValue:"У вас нет прав на просмотр списка версий"})}),!s?.length&&i&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.clientVersions.genitive"),defaultValue:"Список версий пуст"})}),s?.map((h,g)=>d.jsx(tPe,{clientVersion:h,dropdown:l?[d.jsx(h1.EditButton,{clientVersion:h,projectId:e}),d.jsx(sK.Button,{clientVersionId:h.id,projectId:e})]:void 0,dropdownSide:s?.length-1===g?"top":"bottom"},h.id))]}),d.jsx(h1.Modal,{onSuccess:u,projectId:e}),d.jsx(sK.Modal,{onSuccess:f})]})})},HT=new NLe,Rae=({projectId:e})=>{const{t}=H(),[n,r]=y.useState(!1),[s,a]=y.useState(null),{allowed:i}=It({projectId:e,rightKeys:["clientHandshakeList","clientHandshakeListAll"]}),{allowed:l}=It({projectId:e,rightKeys:["clientHandshakeUpdate","clientHandshakeDelete"]});y.useEffect(()=>{if(!e||!i)return;const h=new CIe({filter:{projectId:e}});r(!0);const g=()=>{qT.right(a),qT.left(je.error),r(!1)};qT.invoke(h).then(g)},[e,i]);const u=h=>{i&&a(g=>{const v=g?[...g.values,h]:[h];return new en(v,"id")})},f=h=>{a(g=>g&&g.remove(h).clone())};return d.jsx(_se,{children:d.jsxs(WBe,{children:[n&&!!e&&d.jsx(wt,{}),!n&&!!e&&d.jsxs(d.Fragment,{children:[d.jsx(p1.AddButton,{projectId:e}),!s?.length&&!i&&d.jsx(W,{className:"self-center",children:t("noRights.listMessage",{entity:t("entities.clientHandshakes.genitive"),defaultValue:"У вас нет прав на просмотр списка рукопожатий"})}),!s?.length&&i&&d.jsx(W,{className:"self-center",children:t("noData.listMessage",{entity:t("entities.clientHandshakes.genitive"),defaultValue:"Список рукопожатий пуст"})}),s?.map((h,g)=>d.jsx(nPe,{clientHandshake:h,dropdown:l?[d.jsx(p1.EditButton,{clientHandshake:h,projectId:e}),d.jsx(lK.Button,{clientHandshakeId:h.id,projectId:e})]:void 0,dropdownSide:s?.length-1===g?"top":"bottom"},h.id))]}),d.jsx(p1.Modal,{onSuccess:u,projectId:e}),d.jsx(lK.Modal,{onSuccess:f})]})})},qT=new LLe,Oae=y.createContext(null),Tae=()=>{const{t:e}=H(),t=y.useContext(Oae);if(t===null)throw new Error(e("errors.context",{name:"TagEditor",defaultValue:"Используется вне контекста TagEditor"}));return t},ZUe=({onClick:e,...t})=>{const{t:n}=H(),{setIsOpen:r}=Tae(),s=a=>{r(!0),e?.(a)};return d.jsx(Fe,{onlyIcon:!0,variant:"text",onClick:s,title:n("editTags","Редактировать теги"),...t,children:d.jsx(F8,{})})},Aae=y.createContext(null),kae=()=>{const{t:e}=H(),t=y.useContext(Aae);if(t===null)throw new Error(e("errors.context",{name:"DeleteTag",defaultValue:"Используется вне контекста DeleteTag"}));return t},XUe=({tagId:e,onClick:t,...n})=>{const{t:r}=H(),{setTagId:s}=kae(),a=i=>{s(e),t?.(i)};return d.jsx(Fe,{className:"!text-danger-red",variant:"ghost",onlyIcon:!0,onClick:a,title:r("delete","Удалить"),...n,children:d.jsx(Hfe,{})})},WUe=({onSuccess:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!1),{tagId:i,setTagId:l}=kae(),u=async()=>{if(a(!0),i!==null){const h=new NIe({idList:[i]});await KT.delete(h),KT.right(()=>{e(i)}),KT.left(je.error)}a(!1),l(null)},f=()=>{l(null),t?.()};return d.jsxs(ne,{isOpen:!!i,onClose:f,overlayClassName:"!z-[106]",...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.title.deleteEntity",{defaultValue:"Удаление тега",entity:r("entities.tag.genitive")})})}),d.jsx(ne.Body,{children:d.jsx(W,{variant:"strong",children:r("modal.deleteMessage.tag","Вы собираетесь удалить тег. Это действие необратимо.")})}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:s,onClick:f}),d.jsx(Fs,{isLoading:s,disabled:s,onClick:u})]})]})},KT=new Fte,OK={Modal:WUe,Button:XUe},QUe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({tagId:t,setTagId:n}),[t]);return d.jsx(Aae.Provider,{value:r,children:e})},JUe=({className:e,overlayClassName:t,tagList:n,setTagList:r,...s})=>{const{t:a}=H(),{isOpen:i,setIsOpen:l}=Tae(),[u,f]=y.useState(!1),h=y.useCallback(async()=>{f(!0),await YT.invoke(new bne({})),YT.right(_=>{r(_)}),YT.left(je.error),f(!1)},[r]);y.useEffect(()=>{i&&h()},[i,h]);const g=()=>{l(!1)},v=y.useCallback(_=>{let E=new en([_],"id");n!==null&&(E=E.concat(n)),r(E)},[r,n]),w=y.useCallback(_=>{const E=new en(n.map($=>$.id!==_.id?$:_),"id");r(E)},[r,n]),C=y.useCallback(_=>{const E=n.remove(_);r(new en(E.values,"id"))},[r,n]);return d.jsx(OFe,{children:d.jsxs(QUe,{children:[d.jsxs(Ms,{isOpen:i,onClose:g,className:Fn("!z-[105]",e),overlayClassName:Fn("!z-[104]",t),...s,children:[d.jsx(Ms.Header,{children:a("modal.title.editEntity",{entity:a("entities.tags.genitive"),defaultValue:"Редактирование тегов"})}),d.jsxs(Ms.Body,{children:[u&&n===null&&d.jsx(wt,{}),n!==null&&d.jsxs(d.Fragment,{children:[d.jsx(pT.Button,{}),d.jsx(pT.Row,{onSuccess:v,isCreation:!0}),!n.length&&d.jsx(W,{className:"self-center",children:a("noData.listMessage",{entity:a("entities.tags.genitive"),defaultValue:"Список тегов пуст"})}),n?.map(_=>d.jsx(pT.Row,{tag:_,onSuccess:w,postfix:d.jsx(OK.Button,{tagId:_.id})},_.id))]})]})]}),d.jsx(OK.Modal,{onSuccess:C})]})})},YT=new Ute,TK={Drawer:JUe,Button:ZUe},eGe=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(Oae.Provider,{value:r,children:e})},tGe=()=>{const[e]=br(),t=e.get(vt.search)||"",n=e.getAll(vt.projectIds),r=e.getAll(vt.agentGroupIds),s=e.getAll(vt.tagIds);return{filter:y.useMemo(()=>({projectIds:n,agentGroupIds:r,search:t,tagIds:s}),[JSON.stringify(r),JSON.stringify(n),JSON.stringify(s),t]),searchParams:e}},nGe=()=>{const{t:e}=H(),[t,n]=y.useState(null),[r,s]=y.useState({}),{filter:a}=tGe(),{allowed:i}=It({projectId:a?.projectIds[0],rightKeys:["agentGroupAgentAdd","agentGroupAgentDelete"]}),l=x7e({onOpenTags:n,showActions:i}),u=b7e(),{getColumnLabel:f,onChangeVisibility:h,visibilityState:g,visibleColumns:v}=l7e({tableColumns:l,columnsConfig:u,tableName:"agentTable"}),{projectList:w,isLoading:C}=Sne(),{agentGroupList:_,isLoading:E,loadAgentGroups:$}=KIe({projectId:a?.projectIds?.[0]}),{tagList:O,isLoading:N,setTagList:M}=jPe(),{loadAgents:L,isLoading:k,pageableList:T}=GIe(a),P=y.useMemo(()=>[{paramsKey:vt.projectIds,resolver:re=>w?.length?w?.entities[re]?.name:re,label:rn(e("entities.project.nominative","Проект")),dependentParams:[vt.agentGroupIds]},{paramsKey:vt.agentGroupIds,resolver:re=>_?.length?_?.entities[re]?.name:re,label:rn(e("entities.group.nominative","Группа"))},{paramsKey:vt.tagIds,resolver:re=>O?.length?O?.entities[re]?.name:re,label:rn(e("entities.tag.nominative","Тег"))}],[_,w,e,O]),V=y.useCallback(()=>{s({}),L()},[L]),q=y.useCallback((re,ee)=>{s(ee)},[]),K=y.useMemo(()=>r?Object.keys(r):[],[r]);return d.jsx(eGe,{children:d.jsx(RPe,{children:d.jsx(kFe,{children:d.jsxs(PFe,{children:[d.jsxs(Ql,{wrapperClassName:"flex-col max-w-[1920px]",children:[d.jsxs(y7e,{filters:P,isLoading:C||N,children:[d.jsx(Aq.Button,{}),d.jsx(v7e,{columnsConfig:u,getColumnLabel:f,onChangeVisibility:h,visibilityState:g})]}),i&&d.jsxs(d.Fragment,{children:[d.jsx(Tg,{}),d.jsx("div",{children:d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,disabled:!K?.length,children:d.jsxs(Fe,{className:"gap-1 focus-visible:outline-0",variant:"secondary",disabled:!K?.length,children:[e("actions","Действия"),d.jsx(ec,{})]})}),d.jsx(sn.Portal,{children:d.jsxs(sn.Content,{className:"z-100! relative min-w-[100px]!",side:"bottom",align:"start",children:[d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(yK.Button,{projectId:a?.projectIds[0],agentIds:K})}),d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(xK.Button,{projectId:a?.projectIds[0],agentIds:K})})]})})]})})]}),d.jsx("div",{className:"flex flex-1 flex-col w-full relative",children:d.jsx(ine,{pageableList:T,loadAgents:L,isLoading:k,columns:v,enableRowSelection:!k,onSelectionChange:q,rowSelection:r})})]}),d.jsx(RFe,{onSuccess:V,tagPostfix:d.jsx(TK.Button,{}),agent:t,setAgent:n,tagList:O,isLoadingTagList:N}),d.jsx(TK.Drawer,{tagList:O,setTagList:M}),d.jsx(Aq.Drawer,{projectList:w,agentGroupList:_,tagList:O,isLoadingAgentGroupList:E,isLoadingProjectList:C,isLoadingTagList:N,filter:a,loadAgentGroups:$}),d.jsx(yK.Modal,{onSuccess:V,projectId:a?.projectIds[0]}),d.jsx(xK.Modal,{onSuccess:V,projectId:a?.projectIds[0]})]})})})})},rGe=Rt(nGe,{permissionKey:ir.allowSystem,fallback:d.jsx(lc,{})}),sGe={login:"",password:""};var Kk=(e=>(e.login="login",e.password="password",e))(Kk||{});const aGe=()=>{const{t:e}=H(),t=kh(),{setAuthState:n}=Uh(),[r,s]=y.useState(!1),[a,i]=y.useState(),l=Cr({defaultValues:sGe,mode:"onBlur"}),u=async h=>{if(!(h.login||"").trim()||!(h.password||"").trim()){i(e("errors.allFieldsRequired","Необходимо заполнить все поля"));return}s(!0),await ZT.login(h.login,h.password),ZT.right(()=>{n(!0),s(!1),t(st.main)}),ZT.left(()=>{n(!1),s(!1),i(e("errors.login","Неверный логин или пароль"))})},f=()=>i("");return d.jsx("div",{className:"w-full h-full flex justify-center items-center",children:d.jsx(wr,{...l,children:d.jsxs("form",{className:"flex flex-col w-[340px] p-4 gap-8 items-center",onSubmit:l.handleSubmit(u),children:[d.jsx(W.Heading1,{children:e("loginTitle","Вход в систему")}),d.jsxs("div",{className:"flex flex-col w-full gap-2.5 items-center",children:[d.jsx("div",{className:"w-full",children:d.jsx(pt,{placeholder:e("fields.login","Логин"),name:Kk.login,inputClassName:"w-full",onFocus:f,required:!0})}),d.jsx("div",{className:"w-full",children:d.jsx(pt,{placeholder:e("fields.password","Пароль"),name:Kk.password,type:"password",inputClassName:"w-full",onFocus:f,required:!0})}),!!a&&d.jsx(W,{color:"red",children:a})]}),d.jsx("div",{className:"flex justify-center w-full",children:d.jsx(Fe,{type:"submit",disabled:r,className:"w-full justify-center",children:r?`${e("loggingIn","Вход")}...`:e("login","Войти")})})]})})})},ZT=new Ote,iGe=({name:e,title:t,rightKeys:n,pathname:r,projectIds:s,className:a})=>{const{allowed:i}=It({rightKeys:n,projectId:s});return i?d.jsx(Ni,{to:`${r}?${vt.tab}=${e}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:t,tab:e,variant:"ghost",className:a})}):null},Nae=()=>{const{t:e}=H();return y.useMemo(()=>[{name:Du.information,title:e("tabs.agent.information","Информация"),rightKeys:[]},{name:Du.console,title:e("tabs.agent.console","Консоль"),rightKeys:["agentConsoleList"]},{name:Du.fileManager,title:e("tabs.agent.fileManager","Менеджер файлов"),rightKeys:["agentLfsFolderList","agentRfsFolderList"]},{name:Du.portTunneling,title:e("tabs.agent.portTunneling","Туннелирование портов"),rightKeys:[]}],[e])},oGe=({projectIds:e})=>{const[t]=br(),r=Ds().pathname,s=Nae(),a=t.get("tab");return d.jsx(su,{tab:a,className:"!gap-2.5 overflow-hidden",direction:"vertical",children:s.map(i=>d.jsx(iGe,{...i,pathname:r,projectIds:e,className:"justify-start !h-8 !px-4"}))})},lGe=()=>{const{t:e}=H(),{agent:t}=Gh(),[n,r]=y.useState(null),[s,a]=y.useState(!1),[i,l]=y.useState(null),u=y.useCallback(async(v=0)=>{t&&(a(!0),await AK.invoke(new VIe({filter:{agentId:t.id},offset:v})),AK.right(w=>r(C=>v===0?w:C!==null?new Ia({...w,data:C.data.concat(w.data)}):null)),a(!1))},[t]),{intersector:f}=Fd(async()=>{n?.hasNextPage&&!s&&u(n.offset)});y.useEffect(()=>{u()},[u]);const h=y.useCallback(()=>{r(null),u()},[u]),g=v=>{l(v)};return d.jsx(gFe,{children:d.jsx(_Fe,{children:d.jsxs(SFe,{children:[d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-1 justify-between gap-4",children:[d.jsx(W.Heading3,{children:e("portsTunneling","Туннелирование портов")}),d.jsx(mK.Button,{})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[n?.data?.isEmpty&&!s&&d.jsx(W,{className:"self-center",children:e("noData.listMessage",{entity:e("entities.ports.genitive"),defaultValue:"Список портов пуст"})}),n!==null&&!n?.data?.isEmpty&&!!t&&d.jsx(uGe,{data:n?.data.values,onRowContextMenu:g,contextMenuChildren:d.jsxs(d.Fragment,{children:[d.jsx(vK.Button,{port:i}),d.jsx(gK.Button,{portId:i?.id})]})}),s&&d.jsx(wt,{}),f]})]}),d.jsx(mK.Modal,{agentId:t?.id,onSuccess:h}),d.jsx(vK.Modal,{onSuccess:h}),d.jsx(gK.Modal,{onSuccess:h})]})})})},uGe=Yhe(Dne),AK=new eMe,cGe=()=>{const{t:e}=H(),t=Nae(),{agentId:n}=fo(),[r,s]=br(),[a,i]=y.useState(null),[l,u]=y.useState(!0),f=r.get(vt.tab),{checkPermission:h}=It({}),g=y.useCallback(()=>{const w=t.filter(_=>h({rightKeys:_.rightKeys})),C=w.find(({name:_})=>_===f)||w[0];C&&(r.set(vt.tab,C.name),s(r))},[h,r,s,f,t]),v=y.useMemo(()=>({agent:a,setAgent:i}),[a]);return y.useEffect(()=>{if(!n){u(!1);return}u(!0);const w=()=>{_C.right(C=>{i(C),g()}),_C.left(C=>{i(null),je.error(C)}),u(!1)};_C.invoke(new C7e({id:n})).then(w),_C.right(i)},[n]),y.useEffect(()=>{document.title=a?.name||n||rn(e("entities.agent.nominative"))},[a,n,e]),d.jsx(one.Provider,{value:v,children:d.jsxs(Ql,{wrapperClassName:"min-h-full",children:[l&&d.jsx("div",{className:"flex w-full justify-center",children:d.jsx(wt,{})}),!a&&!l&&d.jsx("div",{className:"flex w-full justify-center",children:d.jsx(W,{children:e("noData.agent","Агент не найден или у вас нет доступа к данным агента")})}),!!a&&!l&&d.jsxs(d.Fragment,{children:[d.jsx(Ql.Menu,{children:d.jsx(oGe,{projectIds:a.projectIds})}),d.jsxs(Ql.Container,{children:[f===Du.information&&d.jsx(HFe,{}),f===Du.console&&d.jsx($Ue,{}),f===Du.fileManager&&d.jsx(GUe,{}),f===Du.portTunneling&&d.jsx(lGe,{})]})]})]})})},_C=new $Le,dGe=()=>{const{checkPermission:e}=It({}),n=sne().find(({permissionKey:s})=>e({permissionKey:s})),r=n?`/${st.settings}/${n.path}`:st.main;return d.jsx(t8,{to:r,replace:!0})},fGe=()=>{const{t:e}=H();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.projects.nominative","Проекты")}),d.jsx(RUe,{})]})},hGe=Rt(fGe,{permissionKey:ir.allowProjectSettings,fallback:d.jsx(lc,{})}),pGe=({name:e,title:t,rightKeys:n,projectId:r,pathname:s})=>{const{allowed:a}=It({projectId:r,rightKeys:n});return a?d.jsx(Ni,{to:`${s}?${vt.tab}=${e}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:t,tab:e,variant:"ghost"})}):null},Lae=()=>{const{t:e}=H();return y.useMemo(()=>[{name:so.userGroups,title:rn(e("entities.userGroups.nominative","Группы пользователей")),rightKeys:Cte},{name:so.agentGroups,title:rn(e("entities.agentGroups.nominative","Группы агентов")),rightKeys:vte},{name:so.clientKeys,title:rn(e("entities.clientKeys.nominative","Клиентские ключи")),rightKeys:yte},{name:so.clientVersions,title:rn(e("entities.clientVersions.nominative","Клиентские версии")),rightKeys:xte},{name:so.clientSchemas,title:rn(e("entities.clientSchemas.nominative","Клиентские схемы")),rightKeys:wte},{name:so.clientHandshakes,title:rn(e("entities.clientHandshakes.nominative","Клиентские рукопожатия")),rightKeys:bte}],[e])},mGe=({projectId:e})=>{const[t]=br(),n=Lae(),s=Ds().pathname,a=t.get("tab");return d.jsx(su,{tab:a,className:"!gap-4.5 overflow-hidden",children:n.map(i=>d.jsx(pGe,{...i,projectId:e,pathname:s}))})},gGe=()=>{const{t:e}=H(),t=Lae(),{projectId:n}=fo(),[r,s]=br(),a=r.get(vt.tab),[i,l]=y.useState(null),[u,f]=y.useState(!0),{checkPermission:h}=It({}),g=y.useCallback(v=>{const w=t.filter(_=>h({projectId:v,rightKeys:_.rightKeys})),C=w.find(({name:_})=>_===a)||w[0];C&&(r.set(vt.tab,C.name),s(r,{replace:!0}))},[h,r,s,a,t]);return y.useEffect(()=>{if(!n){f(!1);return}f(!0);const v=()=>{XT.right(w=>{l(w),g(w.id)}),XT.left(()=>l(null)),f(!1)};XT.getById(new I7e({id:n})).then(v)},[n]),d.jsxs(ure,{children:[d.jsx(oc,{isLoading:u,title:e("entities.project.nominative","Проект"),defaultUrl:`/${st.settings}`,actions:i?d.jsx(l1.EditButton,{variant:"outlined",project:i,label:e("edit","Редактировать")}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[u&&d.jsx(wt,{}),!u&&!i&&d.jsx(W,{className:"self-center",children:e("noData.projectSettings","Проект не найден или у вас нет доступа к данным проекта")}),!u&&!!i&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex flex-col gap-2.5",children:d.jsx(bt,{label:e("fields.title","Название"),value:i.name})}),d.jsx(mGe,{projectId:i.id}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[a===so.userGroups&&d.jsx(yae,{projectId:i.id}),a===so.agentGroups&&d.jsx(_ae,{projectId:i.id}),a===so.clientKeys&&d.jsx(jae,{projectId:i.id}),a===so.clientVersions&&d.jsx($ae,{projectId:i.id}),a===so.clientSchemas&&d.jsx(Eae,{projectId:i.id}),a===so.clientHandshakes&&d.jsx(Rae,{projectId:i.id})]})]})]}),d.jsx(l1.Modal,{onSuccess:l})]})},XT=new GL,vGe=()=>{const{t:e}=H(),{agentGroupId:t}=fo(),[n]=br(),s=Ds().pathname,a=n.get("tab")||ah.clientKeys,[i,l]=y.useState(null),[u,f]=y.useState(!0);return y.useEffect(()=>{if(!t){f(!1);return}f(!0);const h=()=>{WT.right(l),WT.left(()=>l(null)),f(!1)};WT.getById(new tIe({id:t})).then(h)},[t]),d.jsxs(Bre,{children:[d.jsx(oc,{isLoading:u,title:e("entities.agentGroup.nominative","Группа агентов"),defaultUrl:`/${st.settings}/${st.projects}`,actions:i&&!i?.isDefault?d.jsx(c1.EditButton,{projectId:i.projectId,variant:"outlined",agentGroup:i}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[u&&d.jsx(wt,{}),!u&&!i&&d.jsx(W,{className:"self-center",children:e("noData.agentGroupSettings","Группа не найдена или у вас нет доступа к данным группы агентов")}),!u&&!!i&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:i.projectName,labelClassName:"min-w-[66px] first-letter:uppercase"}),d.jsx(bt,{label:e("fields.title","Название"),value:i.name,labelClassName:"min-w-[66px] first-letter:uppercase"})]}),d.jsxs(su,{tab:a,className:"!gap-4.5 overflow-hidden shrink-0 h-[30px] items-center",children:[d.jsx(Ni,{to:`${s}?tab=${ah.clientKeys}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:rn(e("entities.clientKeys.nominative","Клиентские ключи")),tab:ah.clientKeys,variant:"ghost"})}),d.jsx(Ni,{to:`${s}?tab=${ah.userGroups}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:rn(e("entities.userGroups.nominative","Группы пользователей")),tab:ah.userGroups,variant:"ghost"})})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[a===ah.clientKeys&&d.jsx(YUe,{agentGroupId:i.id,projectId:i.projectId}),a===ah.userGroups&&d.jsx(OUe,{agentGroupId:i.id,projectId:i.projectId})]})]})]}),d.jsx(c1.Modal,{onSuccess:l,projectId:i?.projectId})]})},WT=new VL,yGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId);return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.agentGroups.nominative","Группы агентов")}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{}),d.jsx(_ae,{projectId:n})]})]})})},xGe=Rt(yGe,{permissionKey:ir.allowAgentGroupSettings,fallback:d.jsx(lc,{})}),bGe=()=>{const{t:e}=H();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.users.nominative","Пользователи")}),d.jsx(qUe,{})]})},wGe=Rt(bGe,{permissionKey:ir.allowUserSettings,fallback:d.jsx(lc,{})}),CGe=()=>{const{t:e}=H(),{userId:t}=fo(),[n,r]=y.useState(null),[s,a]=y.useState(!0),{allowed:i}=It({permissionKey:ir.allowUpdateUser});return y.useEffect(()=>{if(!t){a(!1);return}a(!0);const l=()=>{QT.right(r),QT.left(()=>r(null)),a(!1)};QT.getById(new oIe({id:t})).then(l)},[t]),d.jsxs(vM,{children:[d.jsx(oc,{isLoading:s,title:e("entities.user.nominative","Пользователь"),defaultUrl:`/${st.settings}/${st.users}`,actions:n?d.jsx(Sd.Button,{variant:"outlined",user:n,label:"Редактировать"}):null}),d.jsxs("div",{className:"flex flex-col gap-6",children:[s&&d.jsx(wt,{className:"self-center"}),!s&&!n&&d.jsx(W,{className:"self-center",children:e("noData.userSettings","Пользователь не найден или у вас нет доступа к данным пользователя")}),!s&&!!n&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("fields.name","Имя"),value:n.name,labelClassName:"min-w-[52px]"}),d.jsx(bt,{label:e("fields.login","Логин"),value:n.login,labelClassName:"min-w-[52px]"}),i&&d.jsx(bt,{label:e("fields.password","Пароль"),value:d.jsx(Sd.Button,{variant:"link",user:n,label:e("resetPassword","Сбросить пароль")}),labelClassName:"min-w-[52px]"})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(W,{variant:"strong",size:"lg",className:"first-letter:uppercase",children:e("entities.userGroups.nominative","Группы пользователей")}),d.jsx(xae,{userId:n.id})]})]})]}),d.jsx(Sd.Modal,{onSuccess:r})]})},QT=new bx,SGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId),[r,s]=y.useState(!1),a=y.useCallback(()=>{s(!1)},[]);return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx("div",{className:"flex items-center justify-between w-full",children:d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.clientKeys.nominative","Клиентские ключи")})}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{onChange:a}),d.jsx(jae,{projectId:n,isLoaded:r,setIsLoaded:s})]})]})},_Ge=Rt(SGe,{permissionKey:ir.allowClientKeySettings,fallback:d.jsx(lc,{})}),Mae=y.createContext(null),Iae=()=>{const{t:e}=H(),t=y.useContext(Mae);if(t===null)throw new Error(e("errors.context",{name:"UpdateClientKeySettings",defaultValue:"Используется вне контекста UpdateClientKeySettings"}));return t},E_=e=>Object.keys(e).filter(n=>isNaN(Number(n))).map(n=>({id:`${e[n]}`,name:n})),ur=(e,t=0)=>e?Number(e):t,jGe=e=>({agent:{canCreateAgentWithAgentId:e.agent?.canCreateAgentWithAgentId||!1,canLoginWithAgentId:e.agent?.canLoginWithAgentId||!1,canLoginWithDeviceId:e.agent?.canLoginWithDeviceId||!1},client:{canUseProxy:e.client?.canUseProxy||!1,checkVersion:e.client?.checkVersion||!1,createExpiration:ur(e.client?.createExpiration),createExpirationType:ur(e.client?.createExpirationType,zu.NONE),loginExpiration:ur(e.client?.loginExpiration),loginExpirationType:ur(e.client?.loginExpirationType,zu.NONE),loginInterval:ur(e.client?.loginInterval),loginIntervalByIp:ur(e.client?.loginIntervalByIp),maxByIp:ur(e.client?.maxByIp),maxByKey:ur(e.client?.maxByKey),transport:{canChangeFormat:e.client?.transport?.canChangeFormat||!1,format:ur(e.client?.transport?.format,dv.NONE)},type:ur(e.client?.type,d_.NONE)},debug:e.debug||!1,device:{maxByIp:ur(e.device?.maxByIp),maxByKey:ur(e.device?.maxByKey)},plugin:{consoles:{inputInterval:ur(e.plugin?.consoles?.inputInterval)}},stream:{pingMaxInterval:ur(e.stream?.pingMaxInterval),pingMinInterval:ur(e.stream?.pingMinInterval)},system:{intervalCorrection:ur(e.system?.intervalCorrection)},token:{commandPerRound:ur(e.token?.commandPerRound),commandRound:ur(e.token?.commandRound),expiration:ur(e.token?.expiration),expirationType:ur(e.token?.expirationType,zu.NONE),maxByAgent:ur(e.token?.maxByAgent),maxByIp:ur(e.token?.maxByIp),maxByKey:ur(e.token?.maxByKey),nextInterval:ur(e.token?.nextInterval),pingMaxInterval:ur(e.token?.pingMaxInterval),pingMinCount:ur(e.token?.pingMinCount),pingMinInterval:ur(e.token?.pingMinInterval)}}),EGe=({children:e})=>{const[t,n]=y.useState(null),r=y.useMemo(()=>({clientKeyId:t,setClientKeyId:n}),[t]);return d.jsx(Mae.Provider,{value:r,children:e})},$Ge=({onClick:e,clientKeyId:t,...n})=>{const{t:r}=H(),{setClientKeyId:s}=Iae(),a=i=>{s(t),e?.(i)};return d.jsx(Fe,{onClick:a,variant:"text",...n,children:r("modal.title.clientKeySettings","Настройки ключа")})},RGe=Rt($Ge,{permissionKey:"clientKeyGetFull"}),Oa={client:"client",token:"token",agent:"agent",device:"device",system:"system",console:"console"},kK={agent:{canCreateAgentWithAgentId:!1,canLoginWithAgentId:!1,canLoginWithDeviceId:!1},client:{canUseProxy:!1,checkVersion:!1,createExpiration:0,createExpirationType:`${zu.NONE}`,loginExpiration:0,loginExpirationType:`${zu.NONE}`,loginInterval:0,loginIntervalByIp:0,maxByIp:0,maxByKey:0,transport:{canChangeFormat:!1,format:`${dv.NONE}`},type:`${d_.NONE}`},debug:!1,device:{maxByIp:0,maxByKey:0},plugin:{consoles:{inputInterval:0}},stream:{pingMaxInterval:0,pingMinInterval:0},system:{intervalCorrection:0},token:{commandPerRound:0,commandRound:0,expiration:0,expirationType:`${zu.NONE}`,maxByAgent:0,maxByIp:0,maxByKey:0,nextInterval:0,pingMaxInterval:0,pingMinCount:0,pingMinInterval:0}},OGe=()=>{const{t:e}=H();return d.jsxs(d.Fragment,{children:[d.jsx(ao,{label:e("fields.clientType","Тип клиента"),placeholder:e("placeholders.selectType","Выбрать тип"),name:"client.type",labelProperty:"name",valueProperty:"id",options:TGe,styles:ca,dropdownClassName:"!z-[101]"}),d.jsx(ao,{label:e("fields.clientTransportFormat","Формат передачи данных"),placeholder:e("placeholders.selectFormat","Выбрать формат"),name:"client.transport.format",labelProperty:"name",valueProperty:"id",options:AGe,styles:ca,dropdownClassName:"!z-[101]"}),d.jsx(Ue,{name:"client.transport.canChangeFormat",label:e("fields.canChangeFormat","Может менять формат передачи данных")}),d.jsx(Ue,{name:"client.canUseProxy",label:e("fields.canUseProxy","Может использовать прокси")}),d.jsx(Ue,{name:"client.checkVersion",label:e("fields.checkVersion","Проверять версию")}),d.jsx(pt,{label:e("fields.loginInterval","Интервал логина"),placeholder:e("placeholders.inputInterval","Введите интервал"),name:"client.loginInterval",autoComplete:"off"}),d.jsx(pt,{label:e("fields.loginIntervalByIp","Интервал по IP"),placeholder:e("placeholders.inputInterval","Введите интервал"),name:"client.loginIntervalByIp",autoComplete:"off"}),d.jsx(pt,{label:e("fields.clientMaxByKey","Максимум клиентов с этим ключем"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"client.maxByKey",autoComplete:"off"}),d.jsx(pt,{label:e("fields.clientMaxByIp","Максимум клиентов с одинаковым IP-адресом"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"client.maxByIp",autoComplete:"off"}),d.jsx(pt,{label:e("fields.clientLoginExpiration","Время, когда истечет разрешение на логин"),placeholder:e("placeholders.inputTimeInSeconds","Введите время в секундах"),name:"client.loginExpiration",autoComplete:"off"}),d.jsx(ao,{label:e("fields.clientLoginExpirationType","Относительно чего считается время на истечение логина"),placeholder:e("placeholders.selectType","Выбрать тип"),name:"client.loginExpirationType",labelProperty:"name",valueProperty:"id",options:NK,styles:ca,dropdownClassName:"!z-[101]"}),d.jsx(pt,{label:e("fields.clientCreateExpiration","Время, когда истечет разрешение на создание агентов"),placeholder:e("placeholders.inputTimeInSeconds","Введите время в секундах"),name:"client.createExpiration",autoComplete:"off"}),d.jsx(ao,{label:e("fields.clientCreateExpirationType","Относительно чего считается время на истечение создания агентов"),placeholder:e("placeholders.selectType","Выбрать тип"),name:"client.createExpirationType",labelProperty:"name",valueProperty:"id",options:NK,styles:ca,dropdownClassName:"!z-[101]"})]})},TGe=E_(d_),AGe=E_(dv),NK=E_(zu),kGe=()=>{const{t:e}=H();return d.jsxs(d.Fragment,{children:[d.jsx(pt,{label:e("fields.tokenMaxByKey","Максимум токенов с этим ключом"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"token.maxByKey",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenMaxByIp","Максимум токенов с одинаковым IP-адресом"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"token.maxByIp",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenMaxByAgent","Максимум токенов с одного агента"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"token.maxByAgent",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenCommandRound","Время раунда в секунда"),placeholder:e("placeholders.inputTimeInSeconds","Введите время в секундах"),name:"token.commandRound",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenCommandPerRound","Максимум команд за один раунд"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"token.commandPerRound",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenPingMinInterval","Минимальный интервал для пинга"),placeholder:e("placeholders.inputMinValue","Введите минимальное значение"),name:"token.pingMinInterval",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenPingMaxInterval","Максимальный интервал для пинга"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"token.pingMaxInterval",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenNextInterval","Минимальный интервал для получения списка команд для обработки"),placeholder:e("placeholders.inputMinValue","Введите минимальное значение"),name:"token.nextInterval",autoComplete:"off"}),d.jsx(pt,{label:e("fields.tokenExpiration","Время истечения токена в секундах"),placeholder:e("placeholders.inputTimeInSeconds","Введите время в секундах"),name:"token.expiration",autoComplete:"off"}),d.jsx(ao,{label:e("fields.tokenExpirationType","Относительно чего считается время истечения токена"),placeholder:e("placeholders.selectType","Выбрать тип"),name:"token.expirationType",labelProperty:"name",valueProperty:"id",options:NGe,styles:ca,dropdownClassName:"!z-[101]"})]})},NGe=E_(zu),LGe=()=>{const{t:e}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"agent.canLoginWithAgentId",label:e("fields.agentCanCreateAgentWithAgentId","Разрешить вход с произвольным UUID агента")}),d.jsx(Ue,{name:"agent.canLoginWithDeviceId",label:e("fields.agentCanLoginWithDeviceId","Разрешить вход с произвольным UUID устройства")}),d.jsx(Ue,{name:"agent.canCreateAgentWithAgentId",label:e("fields.agentCanLoginWithAgentId","Разрешить создание агента с произвольным UUID агента")})]})},MGe=()=>{const{t:e}=H();return d.jsxs(d.Fragment,{children:[d.jsx(pt,{label:e("fields.deviceMaxByKey","Максимальное количество устройств с этим ключом"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"device.maxByKey",autoComplete:"off"}),d.jsx(pt,{label:e("fields.deviceMaxByIp","Максимальное количество устройств с одинаковым IP-адресом"),placeholder:e("placeholders.inputMaxValue","Введите максимальное значение"),name:"device.maxByIp",autoComplete:"off"})]})},IGe=()=>{const{t:e}=H();return d.jsxs(d.Fragment,{children:[d.jsx(Ue,{name:"debug",label:e("fields.debug","Режим отладки")}),d.jsx(pt,{label:e("fields.intervalCorrection","Интервал коррекции"),placeholder:e("placeholders.inputInterval","Введите интервал"),name:"system.intervalCorrection",autoComplete:"off"})]})},PGe=()=>{const{t:e}=H();return d.jsx(d.Fragment,{children:d.jsx(pt,{label:e("fields.minCommandInterval","Минимальный интервал для запроса команд"),placeholder:e("placeholders.inputTimeInSeconds","Введите время в секундах"),name:"plugin.consoles.inputInterval",autoComplete:"off"})})},DGe=()=>{const e=Bs();return y.useMemo(()=>{const t={message:e.number},n=Dk.number(t).int(t).min(0,t);return et({agent:et({canCreateAgentWithAgentId:we().nullish(),canLoginWithAgentId:we().nullish(),canLoginWithDeviceId:we().nullish()}).optional(),client:et({canUseProxy:we().nullish(),checkVersion:we().nullish(),createExpiration:n,createExpirationType:te().nullish(),loginExpiration:n,loginExpirationType:te().nullish(),loginInterval:n,loginIntervalByIp:n,maxByIp:n,maxByKey:n,transport:et({canChangeFormat:we().nullish(),format:te().nullish()}),type:te().nullish()}).optional(),debug:we().nullish().optional(),device:et({maxByIp:n,maxByKey:n}).optional(),plugin:et({consoles:et({inputInterval:n})}).optional(),system:et({intervalCorrection:n}).optional(),token:et({commandPerRound:n,commandRound:n,expiration:n,expirationType:te().nullish(),maxByAgent:n,maxByIp:n,maxByKey:n,nextInterval:n,pingMaxInterval:n,pingMinCount:n,pingMinInterval:n}).optional()})},[e])},VGe=({onSuccess:e,onClose:t,className:n,...r})=>{const{t:s}=H(),a=DGe(),[i,l]=y.useState(!1),[u,f]=y.useState(!1),[h,g]=y.useState(null),{clientKeyId:v,setClientKeyId:w}=Iae(),[C,_]=y.useState(Oa.client),E=y.useMemo(()=>{if(!h?.settings||Object.keys(h.settings).length===0)return kK;const k=Jte(kK,h.settings);return k.client.type=`${k.client.type}`,k.client.transport.format=`${k.client.transport.format}`,k.client.loginExpirationType=`${k.client.loginExpirationType}`,k.client.createExpirationType=`${k.client.createExpirationType}`,k.token.expirationType=`${k.token.expirationType}`,k},[h]),$=Cr({resolver:hs(a),defaultValues:E,mode:"onBlur"}),O=y.useCallback(async()=>{v&&(l(!0),await Um.getById(new WL({id:v,raw:!1})),Um.right(g),Um.left(()=>g(null)),l(!1))},[v]);y.useEffect(()=>{O()},[O]),y.useEffect(()=>{$.reset(E)},[E,$]);const N=async k=>{if(!h)return;f(!0);const T=new lne({id:h.id,name:h.name,settings:jGe(k)});await Um.update(T),Um.right(P=>e?.(P)),Um.left(je.error),$.reset({}),f(!1),w(null),_(Oa.client)},M=k=>{w(null),_(Oa.client),t?.(k)},L=k=>{_(k)};return d.jsx(wr,{...$,children:d.jsx("form",{onSubmit:$.handleSubmit(N),children:d.jsxs(ne,{isOpen:!!v,onClose:M,className:Fn("!w-[730px]",n),...r,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:s("modal.title.clientKeySettings","Настройки ключа")})}),d.jsxs(ne.Body,{className:"h-[448px] !p-0",children:[i&&h===null&&d.jsx("div",{className:"flex px-4 py-2.5",children:d.jsx(wt,{})}),h!==null&&d.jsxs("div",{className:"flex gap-2.5 w-full h-full overflow-hidden",children:[d.jsx("div",{className:"h-full pl-4 py-2.5 overflow-hidden min-w-[200px] max-w-[200px]",children:d.jsxs(su,{tab:C,className:"!gap-2.5 w-full h-full overflow-y-auto border-r border-r-secondary-saturation",onClick:L,direction:"vertical",children:[d.jsx(Yn,{label:s("tabs.clientKeySettings.client","Клиент"),tab:Oa.client,variant:"ghost",className:Fm}),d.jsx(Yn,{label:s("tabs.clientKeySettings.token","Токен"),tab:Oa.token,variant:"ghost",className:Fm}),d.jsx(Yn,{label:s("tabs.clientKeySettings.agent","Агент"),tab:Oa.agent,variant:"ghost",className:Fm}),d.jsx(Yn,{label:s("tabs.clientKeySettings.device","Устройство"),tab:Oa.device,variant:"ghost",className:Fm}),d.jsx(Yn,{label:s("tabs.clientKeySettings.system","Система"),tab:Oa.system,variant:"ghost",className:Fm}),d.jsx(Yn,{label:s("tabs.clientKeySettings.console",'Плагин "Консоль"'),tab:Oa.console,variant:"ghost",className:Fm})]})}),d.jsx("div",{className:"flex flex-1 h-full",children:d.jsxs("div",{className:"flex h-full w-full flex-col gap-2.5 pr-4 py-2.5 overflow-y-auto",children:[C===Oa.client&&d.jsx(OGe,{}),C===Oa.token&&d.jsx(kGe,{}),C===Oa.agent&&d.jsx(LGe,{}),C===Oa.device&&d.jsx(MGe,{}),C===Oa.system&&d.jsx(IGe,{}),C===Oa.console&&d.jsx(PGe,{})]})})]})]}),d.jsxs(ne.Footer,{children:[d.jsx(Nt,{disabled:u,onClick:M}),d.jsx(us,{disabled:u})]})]})})})},Fm="justify-start !h-8 !px-0 shrink-0",Um=new xx,LK={Modal:VGe,Button:RGe},BGe=()=>{const{t:e}=H(),{clientKeyId:t}=fo(),[n,r]=y.useState(null),[s,a]=y.useState(!0);y.useEffect(()=>{if(!t){a(!1);return}a(!0);const l=()=>{JT.right(r),JT.left(()=>r(null)),a(!1)};JT.getById(new WL({id:t})).then(l)},[t]);const i=l=>{r(l)};return d.jsx(Zre,{children:d.jsxs(EGe,{children:[d.jsx(oc,{isLoading:s,title:e("entities.clientKey.nominative","Клиентский ключ"),defaultUrl:`/${st.settings}/${st.projects}`,actions:n?d.jsxs(d.Fragment,{children:[d.jsx(ese,{clientKeyId:n.id,clientKeyName:n.name,variant:"text",label:e("export","Экспорт"),projectId:n.projectId}),n.id!==Eh&&d.jsx(LK.Button,{clientKeyId:n.id,projectId:n.projectId}),n.id!==Eh&&d.jsx(d1.EditButton,{variant:"outlined",clientKey:n,projectId:n.projectId})]}):null}),d.jsxs("div",{className:"flex flex-col gap-6",children:[s&&d.jsx(wt,{}),!s&&!n&&d.jsx(W,{className:"self-center",children:e("noData.clientKeySettings","Ключ не найден или у вас нет доступа к данным ключа")}),!s&&!!n&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:n.projectName,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:"Название",value:n.name,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.uuid","UUID"),value:n.id,copyable:!0,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.value","Значение"),value:n.value,copyable:!0,labelClassName:"min-w-[66px]"})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(W,{variant:"strong",size:"lg",className:"first-letter:uppercase",children:e("entities.agentGroups.nominative","Группы агентов")}),d.jsx(HUe,{projectId:n.projectId})]})]})]}),d.jsx(d1.Modal,{onSuccess:i,projectId:n?.projectId}),d.jsx(LK.Modal,{onSuccess:i})]})})},JT=new xx,FGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId);return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.userGroups.nominative","Группы пользователей")}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{}),d.jsx(yae,{projectId:n})]})]})},UGe=Rt(FGe,{permissionKey:ir.allowUserGroupSettings,fallback:d.jsx(lc,{})}),GGe=()=>{const{t:e}=H(),{userGroupId:t}=fo(),[n]=br(),s=Ds().pathname,a=n.get("tab")||sh.users,[i,l]=y.useState(null),[u,f]=y.useState(!0);y.useEffect(()=>{if(!t){f(!1);return}f(!0);const g=()=>{eA.right(l),eA.left(()=>l(null)),f(!1)};eA.getById(new B7e({id:t})).then(g)},[t]);const h=g=>{l(g)};return d.jsx(mre,{children:d.jsxs(JVe,{children:[d.jsx(oc,{isLoading:u,title:e("entities.userGroup.nominative","Группа пользователей"),defaultUrl:`/${st.settings}/${st.projects}`,actions:i?d.jsxs(d.Fragment,{children:[d.jsx(Jq.Button,{userGroup:i,projectId:i.projectId}),!(i.isSystem&&(i.type===$h.SUPER_ADMIN||i.type===$h.PROJECT_ADMIN))&&d.jsx(u1.EditButton,{variant:"outlined",userGroup:i,label:e("edit","Редактировать"),projectId:i.projectId})]}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[u&&d.jsx(wt,{}),!u&&!i&&d.jsx(W,{className:"self-center",children:e("noData.userGroupSettings","Группа не найдена или у вас нет доступа к данным пользовательской группы")}),!u&&!!i&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:i.projectName,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.title","Название"),value:i.name,labelClassName:"min-w-[66px]"})]}),d.jsxs(su,{tab:a,className:"!gap-4.5 overflow-hidden shrink-0 h-[30px] items-center",children:[d.jsx(Ni,{to:`${s}?tab=${sh.users}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:rn(e("entities.users.nominative","Пользователи")),tab:sh.users,variant:"ghost"})}),d.jsx(Ni,{to:`${s}?tab=${sh.agentGroups}`,relative:"path",replace:!0,children:d.jsx(Yn,{label:rn(e("entities.agentGroups.nominative","Группы агентов")),tab:sh.agentGroups,variant:"ghost"})})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[a===sh.users&&d.jsx(KUe,{projectId:i.projectId}),a===sh.agentGroups&&d.jsx(zUe,{projectId:i.projectId})]})]})]}),d.jsx(Jq.Modal,{onSuccess:h}),d.jsx(u1.Modal,{onSuccess:h,projectId:i?.projectId})]})})},eA=new m_,zGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId),[r,s]=y.useState(!1),a=y.useCallback(()=>{s(!1)},[]);return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx("div",{className:"flex items-center justify-between w-full",children:d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.clientSchemas.nominative","Клиентские схемы")})}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{onChange:a}),d.jsx(Eae,{projectId:n,isLoaded:r,setIsLoaded:s})]})]})},HGe=Rt(zGe,{permissionKey:ir.allowClientSchemaSettings,fallback:d.jsx(lc,{})}),qGe=()=>{const{t:e}=H(),{clientSchemaId:t}=fo(),[n,r]=y.useState(null),[s,a]=y.useState(!0),[i,l]=y.useState(!1);return y.useEffect(()=>{if(!t){a(!1);return}a(!0);const u=()=>{tA.right(r),tA.left(()=>r(null)),a(!1)};tA.getById(new xne({id:t})).then(u)},[t]),d.jsxs(pse,{children:[d.jsx(oc,{isLoading:s,title:e("entities.clientSchema.nominative","Клиентская схема"),defaultUrl:`/${st.settings}/${st.projects}`,actions:n?d.jsxs(d.Fragment,{children:[d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,children:d.jsxs(Fe,{className:"gap-1 focus-visible:outline-0",variant:"secondary",disabled:i,children:[e("export","Экспорт"),i?d.jsx(ho,{size:"small"}):d.jsx(ec,{})]})}),d.jsx(sn.Portal,{children:d.jsxs(sn.Content,{className:"flex flex-col z-100! relative min-w-[60px]!",side:"bottom",align:"end",children:[d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(o2,{clientSchemaId:n.id,clientSchemaName:n.name,onChangeLoading:l,projectId:n.projectId,exportType:"json",label:"JSON",className:"justify-end!"})}),d.jsx(sn.Item,{asChild:!0,className:"pl-2!",children:d.jsx(o2,{clientSchemaId:n.id,clientSchemaName:n.name,onChangeLoading:l,projectId:n.projectId,exportType:"enums",label:"ZIP",className:"justify-end!"})})]})})]}),n.id!==Eh&&d.jsx(f1.EditButton,{variant:"outlined",clientSchema:n,projectId:n.projectId})]}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[s&&d.jsx(wt,{}),!s&&!n&&d.jsx(W,{className:"self-center",children:e("noData.clientSchemaSettings","Схема не найдена или у вас нет доступа к данным клиентской схемы")}),!s&&!!n&&d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:n.projectName,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.title","Название"),value:n.name,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.uuid","UUID"),value:n.id,copyable:!0,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.value","Значение"),value:n.value,copyable:!0,labelClassName:"min-w-[66px]"})]})]}),d.jsx(f1.Modal,{onSuccess:r,projectId:n?.projectId})]})},tA=new h_,KGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId);return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.clientVersions.nominative","Клиентские версии")}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{}),d.jsx($ae,{projectId:n})]})]})})},YGe=Rt(KGe,{permissionKey:ir.allowClientVersionSettings,fallback:d.jsx(lc,{})}),ZGe=()=>{const{t:e}=H(),{clientVersionId:t}=fo(),[n,r]=y.useState(null),[s,a]=y.useState(!0);return y.useEffect(()=>{if(!t){a(!1);return}a(!0);const i=()=>{nA.right(r),nA.left(()=>r(null)),a(!1)};nA.getById(new gIe({id:t})).then(i)},[t]),d.jsxs(yse,{children:[d.jsx(oc,{isLoading:s,title:e("entities.clientVersion.nominative","Клиентская версия"),defaultUrl:`/${st.settings}/${st.projects}`,actions:n?d.jsx(d.Fragment,{children:d.jsx(h1.EditButton,{variant:"outlined",clientVersion:n,projectId:n.projectId})}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[s&&d.jsx(wt,{}),!s&&!n&&d.jsx(W,{className:"self-center",children:e("noData.clientVersionSettings","Версия не найдена или у вас нет доступа к данным клиентской версии")}),!s&&!!n&&d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:n.projectName,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.title","Название"),value:n.name,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.uuid","UUID"),value:n.id,copyable:!0,labelClassName:"min-w-[66px]"}),d.jsx(bt,{label:e("fields.value","Значение"),value:n.value,copyable:!0,labelClassName:"min-w-[66px]"})]})]}),d.jsx(h1.Modal,{onSuccess:r,projectId:n?.projectId})]})},nA=new FL,XGe=()=>{const{t:e}=H(),[t]=br(),n=t.get(vt.projectId);return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(W.Heading3,{className:"first-letter:uppercase",children:e("entities.clientHandshakes.nominative","Клиентские рукопожатия")}),d.jsxs("div",{className:"flex flex-col gap-2.5 w-full",children:[d.jsx(gv,{}),d.jsx(Rae,{projectId:n})]})]})})},WGe=Rt(XGe,{permissionKey:ir.allowClientHandshakeSettings,fallback:d.jsx(lc,{})}),QGe=()=>{const{t:e}=H(),{clientHandshakeId:t}=fo(),[n,r]=y.useState(null),[s,a]=y.useState(!0);return y.useEffect(()=>{if(!t){a(!1);return}a(!0);const i=()=>{rA.right(r),rA.left(()=>r(null)),a(!1)};rA.getById(new wIe({id:t})).then(i)},[t]),d.jsxs(_se,{children:[d.jsx(oc,{isLoading:s,title:e("entities.clientHandshake.nominative","Клиентское рукопожатие"),defaultUrl:`/${st.settings}/${st.projects}`,actions:n?d.jsx(p1.EditButton,{variant:"outlined",clientHandshake:n,projectId:n.projectId}):null}),d.jsxs("div",{className:"flex flex-col gap-4",children:[s&&d.jsx(wt,{}),!s&&!n&&d.jsx(W,{className:"self-center",children:e("noData.clientHandshakeSettings","Рукопожатие не найдено или у вас нет доступа к данным клиентского рукопожатия")}),!s&&!!n&&d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("entities.project.nominative","Проект"),value:n.projectName,labelClassName:"min-w-[119px]"}),d.jsx(bt,{label:e("fields.title","Название"),value:n.name,labelClassName:"min-w-[119px]"}),d.jsx(bt,{label:e("fields.uuid","UUID"),value:n.id,copyable:!0,labelClassName:"min-w-[119px]"}),d.jsx(bt,{label:e("fields.value","Значение"),value:n.value,copyable:!0,labelClassName:"min-w-[119px]"}),d.jsx(bt,{label:e("fields.publicKey","Публичный ключ"),value:n.publicKey,copyable:!0,labelClassName:"min-w-[119px]",className:"max-w-[629px]"})]})]}),d.jsx(p1.Modal,{onSuccess:r,projectId:n?.projectId})]})},rA=new UL,Pae=y.createContext(null),Dae=()=>{const{t:e}=H(),t=y.useContext(Pae);if(t===null)throw new Error(e("errors.context",{name:"AboutProgramModal",defaultValue:"Используется вне контекста AboutProgramModal"}));return t},JGe=({onClick:e,...t})=>{const{t:n}=H(),{setIsOpen:r}=Dae(),s=a=>{r(!0),e?.(a)};return d.jsx(Fe,{className:"w-full",variant:"text",onClick:s,...t,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:n("aboutProgram","О программе")})})},eze=({className:e,onClose:t,...n})=>{const{t:r}=H(),[s,a]=y.useState(!0),[i,l]=y.useState(null),{isOpen:u,setIsOpen:f}=Dae();y.useEffect(()=>{if(!u){a(!1);return}a(!0);const g=()=>{sA.right(l),sA.left(()=>l(null)),a(!1)};sA.getById().then(g)},[u]);const h=()=>{f(!1),t?.()};return d.jsxs(ne,{isOpen:u,onClose:h,className:Fn("min-w-[500px]",e),...n,children:[d.jsx(ne.Header,{children:d.jsx(W,{size:"xl",variant:"strong",children:r("modal.aboutProgram","О программе")})}),d.jsxs(ne.Body,{className:"min-h-[215px]",children:[s&&d.jsx("div",{className:"flex flex-col flex-1 items-center justify-center",children:d.jsx(ho,{size:"small"})}),!s&&!i&&d.jsx(W,{children:r("errors.aboutProgram","Не удалось получить данные о програме")}),!s&&!!i&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex gap-4 items-center",children:[d.jsx("img",{src:"/__root_path__/favicon.svg",alt:"Falcon",title:"Falcon",className:"h-10 w-10"}),d.jsx(W.Heading5,{children:i?.productName})]}),d.jsx(bt,{label:r("version","Версия"),value:i?.appVersion}),d.jsx(W.Heading5,{children:r("license","Лицензия")}),d.jsx(bt,{label:r("serialNumber","Серийный номер"),value:i?.serialNumber,labelClassName:"min-w-[126px]"}),d.jsx(bt,{label:r("company","Компания"),value:i?.subjectCompanyName,labelClassName:"min-w-[126px]"}),d.jsx(bt,{label:r("validUntil","Действительна до"),value:i.expireDate?i.expireDate.toLocaleString():"",labelClassName:"min-w-[126px]"})]})]})]})},sA=new tMe,MK={Modal:eze,Button:JGe},tze=({children:e})=>{const[t,n]=y.useState(!1),r=y.useMemo(()=>({isOpen:t,setIsOpen:n}),[t]);return d.jsx(Pae.Provider,{value:r,children:e})},IK=()=>{const{t:e}=H(),{isAuthenticated:t,isLoading:n,setAuthState:r,user:s}=Uh(),a="Falcon",i=kh(),{allowed:l}=It({permissionKey:ir.allowSystem}),u=()=>{nze.logout(),r(!1)},f=()=>{i(`/${st.currentUser}`)};return d.jsx(tze,{children:d.jsxs("header",{className:"bg-panel py-2 px-3 flex items-center justify-between",children:[d.jsx(Ni,{to:st.main,children:d.jsx(W,{className:"[&&]:text-lg",color:"primary",children:a.toUpperCase()})}),t&&!n&&!!s&&d.jsxs(sn.Root,{children:[d.jsx(sn.Trigger,{asChild:!0,children:d.jsxs(Fe,{className:"gap-1 !text-primary focus-visible:outline-0",variant:"ghost",children:[s.name||s.login,d.jsx(ec,{})]})}),d.jsx(sn.Portal,{children:d.jsxs(sn.Content,{className:"min-w-[100px]!",side:"bottom",align:"end",children:[d.jsx(sn.Item,{asChild:!0,children:l&&d.jsx(Fe,{className:"w-full",variant:"text",onClick:f,children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:e("settings","Настройки")})})}),d.jsx(sn.Item,{asChild:!0,children:d.jsx(MK.Button,{})}),d.jsx(sn.Item,{asChild:!0,children:d.jsx(Fe,{className:"w-full",onClick:u,variant:"text",children:d.jsx(W,{className:"w-full text-right",variant:"strong",children:e("logout","Выйти")})})})]})})]}),d.jsx(MK.Modal,{})]})})},nze=new Ote;class rze extends y.Component{constructor(t){super(t),this.state={hasError:!1,isOpen:!1,error:""}}componentDidCatch(t,n){console.log(t),console.log(n),this.setState(r=>({...r,hasError:!0,error:t.name+`

`+t.message+`

`+t.stack}))}handleReloadButtonClick(){location.reload()}handleModalClose(){this.setState(t=>({...t,isOpen:!1}))}handleOpenButtonClick(){this.setState(t=>({...t,isOpen:!0}))}async handleCopyButtonClick(){const{t}=this.props;try{await navigator.clipboard.writeText(this.state.error)}catch{console.warn(t("errors.copy","Не удалось скопировать"))}}render(){const{t}=this.props;return this.state.hasError?d.jsxs("div",{className:"flex flex-1 flex-col h-full bg-bg",children:[d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2.5",children:[d.jsx(W.Heading4,{className:"mb-2",children:t("errors.errorBoundary.title","Произошла ошибка")}),d.jsx(W,{children:t("errors.errorBoundary.unknownError","Кажется, мы столкнулись с непредвиденной ошибкой на стороне приложения.")}),d.jsx(W,{className:"flex",children:d.jsx(tq,{i18nKey:"errors.errorBoundary.reload",components:{ReloadButton:d.jsx(Fe,{className:"px-1!",variant:"link",onClick:this.handleReloadButtonClick.bind(this)})},defaults:"Попробуйте <ReloadButton>обновить</ReloadButton> страницу."})}),d.jsx(W,{children:t("errors.errorBoundary.feedback","Если проблема сохраняется, сообщите нам об этом, чтобы мы могли оперативно всё исправить.")}),d.jsx(W,{children:t("errors.errorBoundary.thanks","🛠️ Спасибо за ваше понимание!")}),d.jsx(W,{className:"flex",children:d.jsx(tq,{i18nKey:"errors.errorBoundary.viewError",components:{ViewButton:d.jsx(Fe,{className:"px-1!",variant:"link",onClick:this.handleOpenButtonClick.bind(this)}),CopyButton:d.jsx(Fe,{className:"px-1!",variant:"link",onClick:this.handleCopyButtonClick.bind(this)})},defaults:"<ViewButton>Посмотреть</ViewButton> или <CopyButton>скопировать</CopyButton> логи ошибки."})})]}),d.jsxs(ne,{className:"w-full max-h-full!",isOpen:this.state.isOpen,onClose:this.handleModalClose.bind(this),children:[d.jsxs(ne.Header,{className:"justify-between",children:[d.jsx(W,{size:"lg",variant:"strong",children:t("errors.errorBoundary.logsTitle","Логи ошибки")}),d.jsx(Fe,{variant:"link",onClick:this.handleCopyButtonClick.bind(this),children:t("copy","Скопировать")})]}),d.jsx(ne.Body,{children:d.jsx("div",{className:"h-[80vh] px-4 py-2.5 bg-bg overflow-y-auto ",children:d.jsx(W,{className:"whitespace-pre-wrap",mono:!0,children:this.state.error})})})]})]}):this.props.children}}const sze=AMe()(rze),aze=()=>{const{t:e}=H(),{user:t,updateUserInfo:n}=Uh();return d.jsxs(vM,{children:[d.jsxs(Ql,{wrapperClassName:"flex-col",children:[d.jsx(oc,{title:rn(e("entities.user.nominative","Пользователь")),defaultUrl:st.main,actions:t?d.jsx(Sd.ButtonInner,{variant:"outlined",user:t,label:e("edit","Редактировать")}):null}),d.jsx("div",{className:"flex flex-col gap-6",children:!!t&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(bt,{label:e("fields.name","Имя"),value:t.name,labelClassName:"min-w-[52px]"}),d.jsx(bt,{label:e("fields.login","Логин"),value:t.login,labelClassName:"min-w-[52px]"}),d.jsx(bt,{label:e("fields.password","Пароль"),value:d.jsx(Sd.ButtonInner,{variant:"link",user:t,label:e("resetPassword","Сбросить пароль")}),labelClassName:"min-w-[52px]"})]}),d.jsxs("div",{className:"flex flex-col gap-2.5",children:[d.jsx(W,{variant:"strong",size:"lg",children:e("entities.userGroups.nominative","Группы пользователей")}),d.jsx(xae,{userId:t.id,onlyInfo:!0})]})]})})]}),d.jsx(Sd.Modal,{onSuccess:n})]})};function ize(){return d.jsx(sze,{children:d.jsxs(nMe,{children:[d.jsx(zoe,{basename:"/__root_path__",children:d.jsxs(xoe,{children:[d.jsx(Tn,{path:st.login,element:d.jsx(nq,{header:d.jsx(IK,{}),children:d.jsx(aGe,{})})}),d.jsx(Tn,{path:st.monitor,children:d.jsxs(Tn,{element:d.jsx(nq,{header:d.jsx(IK,{}),tabs:d.jsx(d7e,{})}),children:[d.jsx(Tn,{index:!0,path:st.monitor,element:d.jsx(rGe,{})}),d.jsx(Tn,{path:st.agent,element:d.jsx(cGe,{})}),d.jsx(Tn,{path:st.settings,children:d.jsxs(Tn,{element:d.jsx(g7e,{topMenu:d.jsx(h7e,{})}),children:[d.jsx(Tn,{index:!0,element:d.jsx(dGe,{})}),d.jsxs(Tn,{path:st.projects,children:[d.jsx(Tn,{index:!0,element:d.jsx(hGe,{})}),d.jsx(Tn,{path:st.project,element:d.jsx(gGe,{})})]}),d.jsxs(Tn,{path:st.agentGroups,children:[d.jsx(Tn,{index:!0,element:d.jsx(xGe,{})}),d.jsx(Tn,{path:st.agentGroup,element:d.jsx(vGe,{})})]}),d.jsxs(Tn,{path:st.users,children:[d.jsx(Tn,{index:!0,element:d.jsx(wGe,{})}),d.jsx(Tn,{path:st.user,element:d.jsx(CGe,{})})]}),d.jsxs(Tn,{path:st.clientKeys,children:[d.jsx(Tn,{index:!0,element:d.jsx(_Ge,{})}),d.jsx(Tn,{path:st.clientKey,element:d.jsx(BGe,{})})]}),d.jsxs(Tn,{path:st.userGroups,children:[d.jsx(Tn,{index:!0,element:d.jsx(UGe,{})}),d.jsx(Tn,{path:st.userGroup,element:d.jsx(GGe,{})})]}),d.jsxs(Tn,{path:st.clientVersions,children:[d.jsx(Tn,{index:!0,element:d.jsx(YGe,{})}),d.jsx(Tn,{path:st.clientVersion,element:d.jsx(ZGe,{})})]}),d.jsxs(Tn,{path:st.clientSchemas,children:[d.jsx(Tn,{index:!0,element:d.jsx(HGe,{})}),d.jsx(Tn,{path:st.clientSchema,element:d.jsx(qGe,{})})]}),d.jsxs(Tn,{path:st.clientHandshakes,children:[d.jsx(Tn,{index:!0,element:d.jsx(WGe,{})}),d.jsx(Tn,{path:st.clientHandshake,element:d.jsx(QGe,{})})]})]})}),d.jsx(Tn,{path:st.currentUser,element:d.jsx(aze,{})}),d.jsx(Tn,{path:"*",element:d.jsx(t8,{to:"/",replace:!0})})]})})]})}),d.jsx(jTe,{position:"bottom-right"})]})})}o7e.finally(()=>bie.createRoot(document.getElementById("root")).render(d.jsx(ize,{})))});export default oze();
