InvokeAI/frontend/dist/assets/index.ec2d89c6.js
Lincoln Stein 3929bd3e13
Lstein release candidate 2.2.5 (#2137)
* installer tweaks in preparation for v2.2.5

- pin numpy to 1.23.* to avoid requirements conflict with numba
- update.sh and update.bat now accept a tag or branch string, not a URL
- update scripts download latest requirements-base before updating.

* update.bat.in debugged and working

* update pulls from "latest" now

* bump version number

* fix permissions on create_installer.sh

* give Linux user option of installing ROCm or CUDA

* rc2.2.5 (install.sh) relative path fixes (#2155)

* (installer) fix bug in resolution of relative paths in linux install script

point installer at 2.2.5-rc1

selecting ~/Data/myapps/ as location  would create a ./~/Data/myapps
instead of expanding the ~/ to the value of ${HOME}

also, squash the trailing slash in path, if it was entered by the user

* (installer) add option to automatically start the app after install

also: when exiting, print the command to get back into the app

* remove extraneous whitespace

* model_cache applies rootdir to config path

* bring installers up to date with 2.2.5-rc2

* bump rc version

* create_installer now adds version number

* rebuild frontend

* bump rc#

* add locales to frontend dist package

- bump to patchlevel 6

* bump patchlevel

* use invoke-ai version of GFPGAN

- This version is very slightly modified to allow weights files
  to be pre-downloaded by the configure script.

* fix formatting error during startup

* bump patch level

* workaround #2 for GFPGAN facexlib() weights downloading

* bump patch

* ready for merge and release

* remove extraneous comment

* set PYTORCH_ENABLE_MPS_FALLBACK directly in invoke.py

Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2023-01-01 17:54:45 +00:00

626 lines
1.5 MiB

var YJ=Object.defineProperty;var KJ=(e,t,n)=>t in e?YJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sn=(e,t,n)=>(KJ(e,typeof t!="symbol"?t+"":t,n),n);function wze(){import("data:text/javascript,")}function qN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Q8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},nn={};/**
* @license React
* react.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 iy=Symbol.for("react.element"),XJ=Symbol.for("react.portal"),ZJ=Symbol.for("react.fragment"),QJ=Symbol.for("react.strict_mode"),JJ=Symbol.for("react.profiler"),eee=Symbol.for("react.provider"),tee=Symbol.for("react.context"),nee=Symbol.for("react.forward_ref"),ree=Symbol.for("react.suspense"),iee=Symbol.for("react.memo"),oee=Symbol.for("react.lazy"),XT=Symbol.iterator;function aee(e){return e===null||typeof e!="object"?null:(e=XT&&e[XT]||e["@@iterator"],typeof e=="function"?e:null)}var YN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KN=Object.assign,XN={};function u1(e,t,n){this.props=e,this.context=t,this.refs=XN,this.updater=n||YN}u1.prototype.isReactComponent={};u1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};u1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZN(){}ZN.prototype=u1.prototype;function J8(e,t,n){this.props=e,this.context=t,this.refs=XN,this.updater=n||YN}var e_=J8.prototype=new ZN;e_.constructor=J8;KN(e_,u1.prototype);e_.isPureReactComponent=!0;var ZT=Array.isArray,QN=Object.prototype.hasOwnProperty,t_={current:null},JN={key:!0,ref:!0,__self:!0,__source:!0};function eB(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)QN.call(t,r)&&!JN.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:iy,type:e,key:o,ref:a,props:i,_owner:t_.current}}function see(e,t){return{$$typeof:iy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function n_(e){return typeof e=="object"&&e!==null&&e.$$typeof===iy}function lee(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var QT=/\/+/g;function Nw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lee(""+e.key):t.toString(36)}function Wb(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case iy:case XJ:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Nw(a,0):r,ZT(i)?(n="",e!=null&&(n=e.replace(QT,"$&/")+"/"),Wb(i,t,n,"",function(u){return u})):i!=null&&(n_(i)&&(i=see(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(QT,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",ZT(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+Nw(o,s);a+=Wb(o,t,n,l,i)}else if(l=aee(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+Nw(o,s++),a+=Wb(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function T3(e,t,n){if(e==null)return e;var r=[],i=0;return Wb(e,r,"","",function(o){return t.call(n,o,i++)}),r}function uee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Po={current:null},Gb={transition:null},cee={ReactCurrentDispatcher:Po,ReactCurrentBatchConfig:Gb,ReactCurrentOwner:t_};nn.Children={map:T3,forEach:function(e,t,n){T3(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T3(e,function(){t++}),t},toArray:function(e){return T3(e,function(t){return t})||[]},only:function(e){if(!n_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nn.Component=u1;nn.Fragment=ZJ;nn.Profiler=JJ;nn.PureComponent=J8;nn.StrictMode=QJ;nn.Suspense=ree;nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cee;nn.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=KN({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=t_.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)QN.call(t,l)&&!JN.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:iy,type:e.type,key:i,ref:o,props:r,_owner:a}};nn.createContext=function(e){return e={$$typeof:tee,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eee,_context:e},e.Consumer=e};nn.createElement=eB;nn.createFactory=function(e){var t=eB.bind(null,e);return t.type=e,t};nn.createRef=function(){return{current:null}};nn.forwardRef=function(e){return{$$typeof:nee,render:e}};nn.isValidElement=n_;nn.lazy=function(e){return{$$typeof:oee,_payload:{_status:-1,_result:e},_init:uee}};nn.memo=function(e,t){return{$$typeof:iee,type:e,compare:t===void 0?null:t}};nn.startTransition=function(e){var t=Gb.transition;Gb.transition={};try{e()}finally{Gb.transition=t}};nn.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};nn.useCallback=function(e,t){return Po.current.useCallback(e,t)};nn.useContext=function(e){return Po.current.useContext(e)};nn.useDebugValue=function(){};nn.useDeferredValue=function(e){return Po.current.useDeferredValue(e)};nn.useEffect=function(e,t){return Po.current.useEffect(e,t)};nn.useId=function(){return Po.current.useId()};nn.useImperativeHandle=function(e,t,n){return Po.current.useImperativeHandle(e,t,n)};nn.useInsertionEffect=function(e,t){return Po.current.useInsertionEffect(e,t)};nn.useLayoutEffect=function(e,t){return Po.current.useLayoutEffect(e,t)};nn.useMemo=function(e,t){return Po.current.useMemo(e,t)};nn.useReducer=function(e,t,n){return Po.current.useReducer(e,t,n)};nn.useRef=function(e){return Po.current.useRef(e)};nn.useState=function(e){return Po.current.useState(e)};nn.useSyncExternalStore=function(e,t,n){return Po.current.useSyncExternalStore(e,t,n)};nn.useTransition=function(){return Po.current.useTransition()};nn.version="18.2.0";(function(e){e.exports=nn})(C);const oe=Q8(C.exports),jC=qN({__proto__:null,default:oe},[C.exports]);var HC={},pu={exports:{}},Da={},fg={exports:{}},tB={};/**
* @license React
* scheduler.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.
*/(function(e){function t(U,X){var le=U.length;U.push(X);e:for(;0<le;){var fe=le-1>>>1,Se=U[fe];if(0<i(Se,X))U[fe]=X,U[le]=Se,le=fe;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var X=U[0],le=U.pop();if(le!==X){U[0]=le;e:for(var fe=0,Se=U.length,Ae=Se>>>1;fe<Ae;){var be=2*(fe+1)-1,ke=U[be],De=be+1,Je=U[De];if(0>i(ke,le))De<Se&&0>i(Je,ke)?(U[fe]=Je,U[De]=le,fe=De):(U[fe]=ke,U[be]=le,fe=be);else if(De<Se&&0>i(Je,le))U[fe]=Je,U[De]=le,fe=De;else break e}}return X}function i(U,X){var le=U.sortIndex-X.sortIndex;return le!==0?le:U.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],f=1,p=null,m=3,v=!1,b=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(U){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=U)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function A(U){if(x=!1,T(U),!b)if(n(l)!==null)b=!0,J(R);else{var X=n(u);X!==null&&Z(A,X.startTime-U)}}function R(U,X){b=!1,x&&(x=!1,k(B),B=-1),v=!0;var le=m;try{for(T(X),p=n(l);p!==null&&(!(p.expirationTime>X)||U&&!Y());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,m=p.priorityLevel;var Se=fe(p.expirationTime<=X);X=e.unstable_now(),typeof Se=="function"?p.callback=Se:p===n(l)&&r(l),T(X)}else r(l);p=n(l)}if(p!==null)var Ae=!0;else{var be=n(u);be!==null&&Z(A,be.startTime-X),Ae=!1}return Ae}finally{p=null,m=le,v=!1}}var I=!1,D=null,B=-1,z=5,j=-1;function Y(){return!(e.unstable_now()-j<z)}function te(){if(D!==null){var U=e.unstable_now();j=U;var X=!0;try{X=D(!0,U)}finally{X?G():(I=!1,D=null)}}else I=!1}var G;if(typeof _=="function")G=function(){_(te)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,V=$.port2;$.port1.onmessage=te,G=function(){V.postMessage(null)}}else G=function(){E(te,0)};function J(U){D=U,I||(I=!0,G())}function Z(U,X){B=E(function(){U(e.unstable_now())},X)}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(U){U.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,J(R))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(U){switch(m){case 1:case 2:case 3:var X=3;break;default:X=m}var le=m;m=X;try{return U()}finally{m=le}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,X){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var le=m;m=U;try{return X()}finally{m=le}},e.unstable_scheduleCallback=function(U,X,le){var fe=e.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?fe+le:fe):le=fe,U){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=le+Se,U={id:f++,callback:X,priorityLevel:U,startTime:le,expirationTime:Se,sortIndex:-1},le>fe?(U.sortIndex=le,t(u,U),n(l)===null&&U===n(u)&&(x?(k(B),B=-1):x=!0,Z(A,le-fe))):(U.sortIndex=Se,t(l,U),b||v||(b=!0,J(R))),U},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(U){var X=m;return function(){var le=m;m=X;try{return U.apply(this,arguments)}finally{m=le}}}})(tB);(function(e){e.exports=tB})(fg);/**
* @license React
* react-dom.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 nB=C.exports,Ma=fg.exports;function Fe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rB=new Set,c2={};function op(e,t){zg(e,t),zg(e+"Capture",t)}function zg(e,t){for(c2[e]=t,e=0;e<t.length;e++)rB.add(t[e])}var tc=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),VC=Object.prototype.hasOwnProperty,dee=/^[: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]*$/,JT={},eL={};function fee(e){return VC.call(eL,e)?!0:VC.call(JT,e)?!1:dee.test(e)?eL[e]=!0:(JT[e]=!0,!1)}function hee(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pee(e,t,n,r){if(t===null||typeof t>"u"||hee(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function To(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Gi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gi[e]=new To(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gi[t]=new To(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gi[e]=new To(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gi[e]=new To(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gi[e]=new To(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gi[e]=new To(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gi[e]=new To(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gi[e]=new To(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gi[e]=new To(e,5,!1,e.toLowerCase(),null,!1,!1)});var r_=/[\-:]([a-z])/g;function i_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r_,i_);Gi[t]=new To(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r_,i_);Gi[t]=new To(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r_,i_);Gi[t]=new To(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gi[e]=new To(e,1,!1,e.toLowerCase(),null,!1,!1)});Gi.xlinkHref=new To("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gi[e]=new To(e,1,!1,e.toLowerCase(),null,!0,!0)});function o_(e,t,n,r){var i=Gi.hasOwnProperty(t)?Gi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pee(t,n,i,r)&&(n=null),r||i===null?fee(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pc=nB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L3=Symbol.for("react.element"),j0=Symbol.for("react.portal"),H0=Symbol.for("react.fragment"),a_=Symbol.for("react.strict_mode"),UC=Symbol.for("react.profiler"),iB=Symbol.for("react.provider"),oB=Symbol.for("react.context"),s_=Symbol.for("react.forward_ref"),WC=Symbol.for("react.suspense"),GC=Symbol.for("react.suspense_list"),l_=Symbol.for("react.memo"),vd=Symbol.for("react.lazy"),aB=Symbol.for("react.offscreen"),tL=Symbol.iterator;function $m(e){return e===null||typeof e!="object"?null:(e=tL&&e[tL]||e["@@iterator"],typeof e=="function"?e:null)}var xr=Object.assign,Bw;function pv(e){if(Bw===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bw=t&&t[1]||""}return`
`+Bw+e}var $w=!1;function Fw(e,t){if(!e||$w)return"";$w=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{$w=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pv(e):""}function gee(e){switch(e.tag){case 5:return pv(e.type);case 16:return pv("Lazy");case 13:return pv("Suspense");case 19:return pv("SuspenseList");case 0:case 2:case 15:return e=Fw(e.type,!1),e;case 11:return e=Fw(e.type.render,!1),e;case 1:return e=Fw(e.type,!0),e;default:return""}}function qC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H0:return"Fragment";case j0:return"Portal";case UC:return"Profiler";case a_:return"StrictMode";case WC:return"Suspense";case GC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oB:return(e.displayName||"Context")+".Consumer";case iB:return(e._context.displayName||"Context")+".Provider";case s_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case l_:return t=e.displayName||null,t!==null?t:qC(e.type)||"Memo";case vd:t=e._payload,e=e._init;try{return qC(e(t))}catch(n){}}return null}function mee(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qC(t);case 8:return t===a_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vee(e){var t=sB(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function A3(e){e._valueTracker||(e._valueTracker=vee(e))}function lB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sB(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function I4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function YC(e,t){var n=t.checked;return xr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function nL(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qd(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uB(e,t){t=t.checked,t!=null&&o_(e,"checked",t,!1)}function KC(e,t){uB(e,t);var n=qd(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?XC(e,t.type,n):t.hasOwnProperty("defaultValue")&&XC(e,t.type,qd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rL(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function XC(e,t,n){(t!=="number"||I4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gv=Array.isArray;function hg(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qd(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ZC(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Fe(91));return xr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function iL(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Fe(92));if(gv(n)){if(1<n.length)throw Error(Fe(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:qd(n)}}function cB(e,t){var n=qd(t.value),r=qd(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function oL(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function QC(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dB(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var O3,fB=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(O3=O3||document.createElement("div"),O3.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=O3.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function d2(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mv={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yee=["Webkit","ms","Moz","O"];Object.keys(Mv).forEach(function(e){yee.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mv[t]=Mv[e]})});function hB(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mv.hasOwnProperty(e)&&Mv[e]?(""+t).trim():t+"px"}function pB(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hB(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var bee=xr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function JC(e,t){if(t){if(bee[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Fe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Fe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Fe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Fe(62))}}function e7(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var t7=null;function u_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var n7=null,pg=null,gg=null;function aL(e){if(e=sy(e)){if(typeof n7!="function")throw Error(Fe(280));var t=e.stateNode;t&&(t=cS(t),n7(e.stateNode,e.type,t))}}function gB(e){pg?gg?gg.push(e):gg=[e]:pg=e}function mB(){if(pg){var e=pg,t=gg;if(gg=pg=null,aL(e),t)for(e=0;e<t.length;e++)aL(t[e])}}function vB(e,t){return e(t)}function yB(){}var zw=!1;function bB(e,t,n){if(zw)return e(t,n);zw=!0;try{return vB(e,t,n)}finally{zw=!1,(pg!==null||gg!==null)&&(yB(),mB())}}function f2(e,t){var n=e.stateNode;if(n===null)return null;var r=cS(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Fe(231,t,typeof n));return n}var r7=!1;if(tc)try{var Fm={};Object.defineProperty(Fm,"passive",{get:function(){r7=!0}}),window.addEventListener("test",Fm,Fm),window.removeEventListener("test",Fm,Fm)}catch(e){r7=!1}function See(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var Rv=!1,D4=null,N4=!1,i7=null,xee={onError:function(e){Rv=!0,D4=e}};function wee(e,t,n,r,i,o,a,s,l){Rv=!1,D4=null,See.apply(xee,arguments)}function Cee(e,t,n,r,i,o,a,s,l){if(wee.apply(this,arguments),Rv){if(Rv){var u=D4;Rv=!1,D4=null}else throw Error(Fe(198));N4||(N4=!0,i7=u)}}function ap(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function SB(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sL(e){if(ap(e)!==e)throw Error(Fe(188))}function _ee(e){var t=e.alternate;if(!t){if(t=ap(e),t===null)throw Error(Fe(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return sL(i),e;if(o===r)return sL(i),t;o=o.sibling}throw Error(Fe(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Fe(189))}}if(n.alternate!==r)throw Error(Fe(190))}if(n.tag!==3)throw Error(Fe(188));return n.stateNode.current===n?e:t}function xB(e){return e=_ee(e),e!==null?wB(e):null}function wB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=wB(e);if(t!==null)return t;e=e.sibling}return null}var CB=Ma.unstable_scheduleCallback,lL=Ma.unstable_cancelCallback,kee=Ma.unstable_shouldYield,Eee=Ma.unstable_requestPaint,Gr=Ma.unstable_now,Pee=Ma.unstable_getCurrentPriorityLevel,c_=Ma.unstable_ImmediatePriority,_B=Ma.unstable_UserBlockingPriority,B4=Ma.unstable_NormalPriority,Tee=Ma.unstable_LowPriority,kB=Ma.unstable_IdlePriority,aS=null,Zl=null;function Lee(e){if(Zl&&typeof Zl.onCommitFiberRoot=="function")try{Zl.onCommitFiberRoot(aS,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Gs=Math.clz32?Math.clz32:Mee,Aee=Math.log,Oee=Math.LN2;function Mee(e){return e>>>=0,e===0?32:31-(Aee(e)/Oee|0)|0}var M3=64,R3=4194304;function mv(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=mv(s):(o&=a,o!==0&&(r=mv(o)))}else a=n&~i,a!==0?r=mv(a):o!==0&&(r=mv(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Gs(t),i=1<<n,r|=e[n],t&=~i;return r}function Ree(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Iee(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Gs(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=Ree(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function o7(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function EB(){var e=M3;return M3<<=1,(M3&4194240)===0&&(M3=64),e}function jw(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function oy(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gs(t),e[t]=n}function Dee(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Gs(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function d_(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Gs(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var In=0;function PB(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var TB,f_,LB,AB,OB,a7=!1,I3=[],Id=null,Dd=null,Nd=null,h2=new Map,p2=new Map,xd=[],Nee="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function uL(e,t){switch(e){case"focusin":case"focusout":Id=null;break;case"dragenter":case"dragleave":Dd=null;break;case"mouseover":case"mouseout":Nd=null;break;case"pointerover":case"pointerout":h2.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":p2.delete(t.pointerId)}}function zm(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=sy(t),t!==null&&f_(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Bee(e,t,n,r,i){switch(t){case"focusin":return Id=zm(Id,e,t,n,r,i),!0;case"dragenter":return Dd=zm(Dd,e,t,n,r,i),!0;case"mouseover":return Nd=zm(Nd,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return h2.set(o,zm(h2.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,p2.set(o,zm(p2.get(o)||null,e,t,n,r,i)),!0}return!1}function MB(e){var t=Eh(e.target);if(t!==null){var n=ap(t);if(n!==null){if(t=n.tag,t===13){if(t=SB(n),t!==null){e.blockedOn=t,OB(e.priority,function(){LB(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qb(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=s7(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);t7=r,n.target.dispatchEvent(r),t7=null}else return t=sy(n),t!==null&&f_(t),e.blockedOn=n,!1;t.shift()}return!0}function cL(e,t,n){qb(e)&&n.delete(t)}function $ee(){a7=!1,Id!==null&&qb(Id)&&(Id=null),Dd!==null&&qb(Dd)&&(Dd=null),Nd!==null&&qb(Nd)&&(Nd=null),h2.forEach(cL),p2.forEach(cL)}function jm(e,t){e.blockedOn===t&&(e.blockedOn=null,a7||(a7=!0,Ma.unstable_scheduleCallback(Ma.unstable_NormalPriority,$ee)))}function g2(e){function t(i){return jm(i,e)}if(0<I3.length){jm(I3[0],e);for(var n=1;n<I3.length;n++){var r=I3[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Id!==null&&jm(Id,e),Dd!==null&&jm(Dd,e),Nd!==null&&jm(Nd,e),h2.forEach(t),p2.forEach(t),n=0;n<xd.length;n++)r=xd[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<xd.length&&(n=xd[0],n.blockedOn===null);)MB(n),n.blockedOn===null&&xd.shift()}var mg=pc.ReactCurrentBatchConfig,F4=!0;function Fee(e,t,n,r){var i=In,o=mg.transition;mg.transition=null;try{In=1,h_(e,t,n,r)}finally{In=i,mg.transition=o}}function zee(e,t,n,r){var i=In,o=mg.transition;mg.transition=null;try{In=4,h_(e,t,n,r)}finally{In=i,mg.transition=o}}function h_(e,t,n,r){if(F4){var i=s7(e,t,n,r);if(i===null)Zw(e,t,r,z4,n),uL(e,r);else if(Bee(i,e,t,n,r))r.stopPropagation();else if(uL(e,r),t&4&&-1<Nee.indexOf(e)){for(;i!==null;){var o=sy(i);if(o!==null&&TB(o),o=s7(e,t,n,r),o===null&&Zw(e,t,r,z4,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Zw(e,t,r,null,n)}}var z4=null;function s7(e,t,n,r){if(z4=null,e=u_(r),e=Eh(e),e!==null)if(t=ap(e),t===null)e=null;else if(n=t.tag,n===13){if(e=SB(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return z4=e,null}function RB(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Pee()){case c_:return 1;case _B:return 4;case B4:case Tee:return 16;case kB:return 536870912;default:return 16}default:return 16}}var Ed=null,p_=null,Yb=null;function IB(){if(Yb)return Yb;var e,t=p_,n=t.length,r,i="value"in Ed?Ed.value:Ed.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Yb=i.slice(e,1<r?1-r:void 0)}function Kb(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function D3(){return!0}function dL(){return!1}function Na(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?D3:dL,this.isPropagationStopped=dL,this}return xr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=D3)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=D3)},persist:function(){},isPersistent:D3}),t}var c1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},g_=Na(c1),ay=xr({},c1,{view:0,detail:0}),jee=Na(ay),Hw,Vw,Hm,sS=xr({},ay,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:m_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hm&&(Hm&&e.type==="mousemove"?(Hw=e.screenX-Hm.screenX,Vw=e.screenY-Hm.screenY):Vw=Hw=0,Hm=e),Hw)},movementY:function(e){return"movementY"in e?e.movementY:Vw}}),fL=Na(sS),Hee=xr({},sS,{dataTransfer:0}),Vee=Na(Hee),Uee=xr({},ay,{relatedTarget:0}),Uw=Na(Uee),Wee=xr({},c1,{animationName:0,elapsedTime:0,pseudoElement:0}),Gee=Na(Wee),qee=xr({},c1,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yee=Na(qee),Kee=xr({},c1,{data:0}),hL=Na(Kee),Xee={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zee={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"},Qee={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jee(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qee[e])?!!t[e]:!1}function m_(){return Jee}var ete=xr({},ay,{key:function(e){if(e.key){var t=Xee[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Kb(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zee[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:m_,charCode:function(e){return e.type==="keypress"?Kb(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Kb(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tte=Na(ete),nte=xr({},sS,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pL=Na(nte),rte=xr({},ay,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:m_}),ite=Na(rte),ote=xr({},c1,{propertyName:0,elapsedTime:0,pseudoElement:0}),ate=Na(ote),ste=xr({},sS,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lte=Na(ste),ute=[9,13,27,32],v_=tc&&"CompositionEvent"in window,Iv=null;tc&&"documentMode"in document&&(Iv=document.documentMode);var cte=tc&&"TextEvent"in window&&!Iv,DB=tc&&(!v_||Iv&&8<Iv&&11>=Iv),gL=String.fromCharCode(32),mL=!1;function NB(e,t){switch(e){case"keyup":return ute.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var V0=!1;function dte(e,t){switch(e){case"compositionend":return BB(t);case"keypress":return t.which!==32?null:(mL=!0,gL);case"textInput":return e=t.data,e===gL&&mL?null:e;default:return null}}function fte(e,t){if(V0)return e==="compositionend"||!v_&&NB(e,t)?(e=IB(),Yb=p_=Ed=null,V0=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return DB&&t.locale!=="ko"?null:t.data;default:return null}}var hte={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 vL(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hte[e.type]:t==="textarea"}function $B(e,t,n,r){gB(r),t=j4(t,"onChange"),0<t.length&&(n=new g_("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dv=null,m2=null;function pte(e){KB(e,0)}function lS(e){var t=G0(e);if(lB(t))return e}function gte(e,t){if(e==="change")return t}var FB=!1;if(tc){var Ww;if(tc){var Gw="oninput"in document;if(!Gw){var yL=document.createElement("div");yL.setAttribute("oninput","return;"),Gw=typeof yL.oninput=="function"}Ww=Gw}else Ww=!1;FB=Ww&&(!document.documentMode||9<document.documentMode)}function bL(){Dv&&(Dv.detachEvent("onpropertychange",zB),m2=Dv=null)}function zB(e){if(e.propertyName==="value"&&lS(m2)){var t=[];$B(t,m2,e,u_(e)),bB(pte,t)}}function mte(e,t,n){e==="focusin"?(bL(),Dv=t,m2=n,Dv.attachEvent("onpropertychange",zB)):e==="focusout"&&bL()}function vte(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lS(m2)}function yte(e,t){if(e==="click")return lS(t)}function bte(e,t){if(e==="input"||e==="change")return lS(t)}function Ste(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var el=typeof Object.is=="function"?Object.is:Ste;function v2(e,t){if(el(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!VC.call(t,i)||!el(e[i],t[i]))return!1}return!0}function SL(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xL(e,t){var n=SL(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=SL(n)}}function jB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function HB(){for(var e=window,t=I4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=I4(e.document)}return t}function y_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xte(e){var t=HB(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jB(n.ownerDocument.documentElement,n)){if(r!==null&&y_(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=xL(n,o);var a=xL(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var wte=tc&&"documentMode"in document&&11>=document.documentMode,U0=null,l7=null,Nv=null,u7=!1;function wL(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;u7||U0==null||U0!==I4(r)||(r=U0,"selectionStart"in r&&y_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nv&&v2(Nv,r)||(Nv=r,r=j4(l7,"onSelect"),0<r.length&&(t=new g_("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=U0)))}function N3(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var W0={animationend:N3("Animation","AnimationEnd"),animationiteration:N3("Animation","AnimationIteration"),animationstart:N3("Animation","AnimationStart"),transitionend:N3("Transition","TransitionEnd")},qw={},VB={};tc&&(VB=document.createElement("div").style,"AnimationEvent"in window||(delete W0.animationend.animation,delete W0.animationiteration.animation,delete W0.animationstart.animation),"TransitionEvent"in window||delete W0.transitionend.transition);function uS(e){if(qw[e])return qw[e];if(!W0[e])return e;var t=W0[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in VB)return qw[e]=t[n];return e}var UB=uS("animationend"),WB=uS("animationiteration"),GB=uS("animationstart"),qB=uS("transitionend"),YB=new Map,CL="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function af(e,t){YB.set(e,t),op(t,[e])}for(var Yw=0;Yw<CL.length;Yw++){var Kw=CL[Yw],Cte=Kw.toLowerCase(),_te=Kw[0].toUpperCase()+Kw.slice(1);af(Cte,"on"+_te)}af(UB,"onAnimationEnd");af(WB,"onAnimationIteration");af(GB,"onAnimationStart");af("dblclick","onDoubleClick");af("focusin","onFocus");af("focusout","onBlur");af(qB,"onTransitionEnd");zg("onMouseEnter",["mouseout","mouseover"]);zg("onMouseLeave",["mouseout","mouseover"]);zg("onPointerEnter",["pointerout","pointerover"]);zg("onPointerLeave",["pointerout","pointerover"]);op("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));op("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));op("onBeforeInput",["compositionend","keypress","textInput","paste"]);op("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));op("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));op("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vv="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(" "),kte=new Set("cancel close invalid load scroll toggle".split(" ").concat(vv));function _L(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Cee(r,t,void 0,e),e.currentTarget=null}function KB(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;_L(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;_L(i,s,u),o=l}}}if(N4)throw e=i7,N4=!1,i7=null,e}function nr(e,t){var n=t[p7];n===void 0&&(n=t[p7]=new Set);var r=e+"__bubble";n.has(r)||(XB(t,e,2,!1),n.add(r))}function Xw(e,t,n){var r=0;t&&(r|=4),XB(n,e,r,t)}var B3="_reactListening"+Math.random().toString(36).slice(2);function y2(e){if(!e[B3]){e[B3]=!0,rB.forEach(function(n){n!=="selectionchange"&&(kte.has(n)||Xw(n,!1,e),Xw(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[B3]||(t[B3]=!0,Xw("selectionchange",!1,t))}}function XB(e,t,n,r){switch(RB(t)){case 1:var i=Fee;break;case 4:i=zee;break;default:i=h_}n=i.bind(null,t,n,e),i=void 0,!r7||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Zw(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Eh(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}bB(function(){var u=o,f=u_(n),p=[];e:{var m=YB.get(e);if(m!==void 0){var v=g_,b=e;switch(e){case"keypress":if(Kb(n)===0)break e;case"keydown":case"keyup":v=tte;break;case"focusin":b="focus",v=Uw;break;case"focusout":b="blur",v=Uw;break;case"beforeblur":case"afterblur":v=Uw;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=fL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Vee;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=ite;break;case UB:case WB:case GB:v=Gee;break;case qB:v=ate;break;case"scroll":v=jee;break;case"wheel":v=lte;break;case"copy":case"cut":case"paste":v=Yee;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=pL}var x=(t&4)!==0,E=!x&&e==="scroll",k=x?m!==null?m+"Capture":null:m;x=[];for(var _=u,T;_!==null;){T=_;var A=T.stateNode;if(T.tag===5&&A!==null&&(T=A,k!==null&&(A=f2(_,k),A!=null&&x.push(b2(_,A,T)))),E)break;_=_.return}0<x.length&&(m=new v(m,b,null,n,f),p.push({event:m,listeners:x}))}}if((t&7)===0){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==t7&&(b=n.relatedTarget||n.fromElement)&&(Eh(b)||b[nc]))break e;if((v||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=u,b=b?Eh(b):null,b!==null&&(E=ap(b),b!==E||b.tag!==5&&b.tag!==6)&&(b=null)):(v=null,b=u),v!==b)){if(x=fL,A="onMouseLeave",k="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(x=pL,A="onPointerLeave",k="onPointerEnter",_="pointer"),E=v==null?m:G0(v),T=b==null?m:G0(b),m=new x(A,_+"leave",v,n,f),m.target=E,m.relatedTarget=T,A=null,Eh(f)===u&&(x=new x(k,_+"enter",b,n,f),x.target=T,x.relatedTarget=E,A=x),E=A,v&&b)t:{for(x=v,k=b,_=0,T=x;T;T=x0(T))_++;for(T=0,A=k;A;A=x0(A))T++;for(;0<_-T;)x=x0(x),_--;for(;0<T-_;)k=x0(k),T--;for(;_--;){if(x===k||k!==null&&x===k.alternate)break t;x=x0(x),k=x0(k)}x=null}else x=null;v!==null&&kL(p,m,v,x,!1),b!==null&&E!==null&&kL(p,E,b,x,!0)}}e:{if(m=u?G0(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var R=gte;else if(vL(m))if(FB)R=bte;else{R=vte;var I=mte}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(R=yte);if(R&&(R=R(e,u))){$B(p,R,n,f);break e}I&&I(e,m,u),e==="focusout"&&(I=m._wrapperState)&&I.controlled&&m.type==="number"&&XC(m,"number",m.value)}switch(I=u?G0(u):window,e){case"focusin":(vL(I)||I.contentEditable==="true")&&(U0=I,l7=u,Nv=null);break;case"focusout":Nv=l7=U0=null;break;case"mousedown":u7=!0;break;case"contextmenu":case"mouseup":case"dragend":u7=!1,wL(p,n,f);break;case"selectionchange":if(wte)break;case"keydown":case"keyup":wL(p,n,f)}var D;if(v_)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else V0?NB(e,n)&&(B="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(DB&&n.locale!=="ko"&&(V0||B!=="onCompositionStart"?B==="onCompositionEnd"&&V0&&(D=IB()):(Ed=f,p_="value"in Ed?Ed.value:Ed.textContent,V0=!0)),I=j4(u,B),0<I.length&&(B=new hL(B,e,null,n,f),p.push({event:B,listeners:I}),D?B.data=D:(D=BB(n),D!==null&&(B.data=D)))),(D=cte?dte(e,n):fte(e,n))&&(u=j4(u,"onBeforeInput"),0<u.length&&(f=new hL("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:u}),f.data=D))}KB(p,t)})}function b2(e,t,n){return{instance:e,listener:t,currentTarget:n}}function j4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=f2(e,n),o!=null&&r.unshift(b2(e,o,i)),o=f2(e,t),o!=null&&r.push(b2(e,o,i))),e=e.return}return r}function x0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kL(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=f2(n,o),l!=null&&a.unshift(b2(n,l,s))):i||(l=f2(n,o),l!=null&&a.push(b2(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Ete=/\r\n?/g,Pte=/\u0000|\uFFFD/g;function EL(e){return(typeof e=="string"?e:""+e).replace(Ete,`
`).replace(Pte,"")}function $3(e,t,n){if(t=EL(t),EL(e)!==t&&n)throw Error(Fe(425))}function H4(){}var c7=null,d7=null;function f7(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var h7=typeof setTimeout=="function"?setTimeout:void 0,Tte=typeof clearTimeout=="function"?clearTimeout:void 0,PL=typeof Promise=="function"?Promise:void 0,Lte=typeof queueMicrotask=="function"?queueMicrotask:typeof PL<"u"?function(e){return PL.resolve(null).then(e).catch(Ate)}:h7;function Ate(e){setTimeout(function(){throw e})}function Qw(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),g2(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);g2(t)}function Bd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function TL(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var d1=Math.random().toString(36).slice(2),Vl="__reactFiber$"+d1,S2="__reactProps$"+d1,nc="__reactContainer$"+d1,p7="__reactEvents$"+d1,Ote="__reactListeners$"+d1,Mte="__reactHandles$"+d1;function Eh(e){var t=e[Vl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nc]||n[Vl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=TL(e);e!==null;){if(n=e[Vl])return n;e=TL(e)}return t}e=n,n=e.parentNode}return null}function sy(e){return e=e[Vl]||e[nc],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function G0(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Fe(33))}function cS(e){return e[S2]||null}var g7=[],q0=-1;function sf(e){return{current:e}}function or(e){0>q0||(e.current=g7[q0],g7[q0]=null,q0--)}function er(e,t){q0++,g7[q0]=e.current,e.current=t}var Yd={},ao=sf(Yd),Qo=sf(!1),Gh=Yd;function jg(e,t){var n=e.type.contextTypes;if(!n)return Yd;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jo(e){return e=e.childContextTypes,e!=null}function V4(){or(Qo),or(ao)}function LL(e,t,n){if(ao.current!==Yd)throw Error(Fe(168));er(ao,t),er(Qo,n)}function ZB(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Fe(108,mee(e)||"Unknown",i));return xr({},n,r)}function U4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yd,Gh=ao.current,er(ao,e),er(Qo,Qo.current),!0}function AL(e,t,n){var r=e.stateNode;if(!r)throw Error(Fe(169));n?(e=ZB(e,t,Gh),r.__reactInternalMemoizedMergedChildContext=e,or(Qo),or(ao),er(ao,e)):or(Qo),er(Qo,n)}var Gu=null,dS=!1,Jw=!1;function QB(e){Gu===null?Gu=[e]:Gu.push(e)}function Rte(e){dS=!0,QB(e)}function lf(){if(!Jw&&Gu!==null){Jw=!0;var e=0,t=In;try{var n=Gu;for(In=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gu=null,dS=!1}catch(i){throw Gu!==null&&(Gu=Gu.slice(e+1)),CB(c_,lf),i}finally{In=t,Jw=!1}}return null}var Y0=[],K0=0,W4=null,G4=0,Qa=[],Ja=0,qh=null,Yu=1,Ku="";function gh(e,t){Y0[K0++]=G4,Y0[K0++]=W4,W4=e,G4=t}function JB(e,t,n){Qa[Ja++]=Yu,Qa[Ja++]=Ku,Qa[Ja++]=qh,qh=e;var r=Yu;e=Ku;var i=32-Gs(r)-1;r&=~(1<<i),n+=1;var o=32-Gs(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yu=1<<32-Gs(t)+i|n<<i|r,Ku=o+e}else Yu=1<<o|n<<i|r,Ku=e}function b_(e){e.return!==null&&(gh(e,1),JB(e,1,0))}function S_(e){for(;e===W4;)W4=Y0[--K0],Y0[K0]=null,G4=Y0[--K0],Y0[K0]=null;for(;e===qh;)qh=Qa[--Ja],Qa[Ja]=null,Ku=Qa[--Ja],Qa[Ja]=null,Yu=Qa[--Ja],Qa[Ja]=null}var Ta=null,Pa=null,cr=!1,Hs=null;function e$(e,t){var n=is(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function OL(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ta=e,Pa=Bd(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ta=e,Pa=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qh!==null?{id:Yu,overflow:Ku}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=is(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ta=e,Pa=null,!0):!1;default:return!1}}function m7(e){return(e.mode&1)!==0&&(e.flags&128)===0}function v7(e){if(cr){var t=Pa;if(t){var n=t;if(!OL(e,t)){if(m7(e))throw Error(Fe(418));t=Bd(n.nextSibling);var r=Ta;t&&OL(e,t)?e$(r,n):(e.flags=e.flags&-4097|2,cr=!1,Ta=e)}}else{if(m7(e))throw Error(Fe(418));e.flags=e.flags&-4097|2,cr=!1,Ta=e}}}function ML(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ta=e}function F3(e){if(e!==Ta)return!1;if(!cr)return ML(e),cr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!f7(e.type,e.memoizedProps)),t&&(t=Pa)){if(m7(e))throw t$(),Error(Fe(418));for(;t;)e$(e,t),t=Bd(t.nextSibling)}if(ML(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Fe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pa=Bd(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pa=null}}else Pa=Ta?Bd(e.stateNode.nextSibling):null;return!0}function t$(){for(var e=Pa;e;)e=Bd(e.nextSibling)}function Hg(){Pa=Ta=null,cr=!1}function x_(e){Hs===null?Hs=[e]:Hs.push(e)}var Ite=pc.ReactCurrentBatchConfig;function Fs(e,t){if(e&&e.defaultProps){t=xr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var q4=sf(null),Y4=null,X0=null,w_=null;function C_(){w_=X0=Y4=null}function __(e){var t=q4.current;or(q4),e._currentValue=t}function y7(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vg(e,t){Y4=e,w_=X0=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Xo=!0),e.firstContext=null)}function us(e){var t=e._currentValue;if(w_!==e)if(e={context:e,memoizedValue:t,next:null},X0===null){if(Y4===null)throw Error(Fe(308));X0=e,Y4.dependencies={lanes:0,firstContext:e}}else X0=X0.next=e;return t}var Ph=null;function k_(e){Ph===null?Ph=[e]:Ph.push(e)}function n$(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,k_(t)):(n.next=i.next,i.next=n),t.interleaved=n,rc(e,r)}function rc(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yd=!1;function E_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r$(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $d(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(gn&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,rc(e,n)}return i=r.interleaved,i===null?(t.next=t,k_(r)):(t.next=i.next,i.next=t),r.interleaved=t,rc(e,n)}function Xb(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d_(e,n)}}function RL(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function K4(e,t,n,r){var i=e.updateQueue;yd=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==a&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(o!==null){var p=i.baseState;a=0,f=u=l=null,s=o;do{var m=s.lane,v=s.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var b=e,x=s;switch(m=t,v=n,x.tag){case 1:if(b=x.payload,typeof b=="function"){p=b.call(v,p,m);break e}p=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=x.payload,m=typeof b=="function"?b.call(v,p,m):b,m==null)break e;p=xr({},p,m);break e;case 2:yd=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else v={eventTime:v,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=v,l=p):f=f.next=v,a|=m;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);if(f===null&&(l=p),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Kh|=a,e.lanes=a,e.memoizedState=p}}function IL(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Fe(191,i));i.call(r)}}}var i$=new nB.Component().refs;function b7(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fS={isMounted:function(e){return(e=e._reactInternals)?ap(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_o(),i=zd(e),o=Zu(r,i);o.payload=t,n!=null&&(o.callback=n),t=$d(e,o,i),t!==null&&(qs(t,e,i,r),Xb(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_o(),i=zd(e),o=Zu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=$d(e,o,i),t!==null&&(qs(t,e,i,r),Xb(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_o(),r=zd(e),i=Zu(n,r);i.tag=2,t!=null&&(i.callback=t),t=$d(e,i,r),t!==null&&(qs(t,e,r,n),Xb(t,e,r))}};function DL(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!v2(n,r)||!v2(i,o):!0}function o$(e,t,n){var r=!1,i=Yd,o=t.contextType;return typeof o=="object"&&o!==null?o=us(o):(i=Jo(t)?Gh:ao.current,r=t.contextTypes,o=(r=r!=null)?jg(e,i):Yd),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fS,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function NL(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fS.enqueueReplaceState(t,t.state,null)}function S7(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=i$,E_(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=us(o):(o=Jo(t)?Gh:ao.current,i.context=jg(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(b7(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&fS.enqueueReplaceState(i,i.state,null),K4(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vm(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Fe(309));var r=n.stateNode}if(!r)throw Error(Fe(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===i$&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Fe(284));if(!n._owner)throw Error(Fe(290,e))}return e}function z3(e,t){throw e=Object.prototype.toString.call(t),Error(Fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function BL(e){var t=e._init;return t(e._payload)}function a$(e){function t(k,_){if(e){var T=k.deletions;T===null?(k.deletions=[_],k.flags|=16):T.push(_)}}function n(k,_){if(!e)return null;for(;_!==null;)t(k,_),_=_.sibling;return null}function r(k,_){for(k=new Map;_!==null;)_.key!==null?k.set(_.key,_):k.set(_.index,_),_=_.sibling;return k}function i(k,_){return k=jd(k,_),k.index=0,k.sibling=null,k}function o(k,_,T){return k.index=T,e?(T=k.alternate,T!==null?(T=T.index,T<_?(k.flags|=2,_):T):(k.flags|=2,_)):(k.flags|=1048576,_)}function a(k){return e&&k.alternate===null&&(k.flags|=2),k}function s(k,_,T,A){return _===null||_.tag!==6?(_=a6(T,k.mode,A),_.return=k,_):(_=i(_,T),_.return=k,_)}function l(k,_,T,A){var R=T.type;return R===H0?f(k,_,T.props.children,A,T.key):_!==null&&(_.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===vd&&BL(R)===_.type)?(A=i(_,T.props),A.ref=Vm(k,_,T),A.return=k,A):(A=n4(T.type,T.key,T.props,null,k.mode,A),A.ref=Vm(k,_,T),A.return=k,A)}function u(k,_,T,A){return _===null||_.tag!==4||_.stateNode.containerInfo!==T.containerInfo||_.stateNode.implementation!==T.implementation?(_=s6(T,k.mode,A),_.return=k,_):(_=i(_,T.children||[]),_.return=k,_)}function f(k,_,T,A,R){return _===null||_.tag!==7?(_=Nh(T,k.mode,A,R),_.return=k,_):(_=i(_,T),_.return=k,_)}function p(k,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return _=a6(""+_,k.mode,T),_.return=k,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case L3:return T=n4(_.type,_.key,_.props,null,k.mode,T),T.ref=Vm(k,null,_),T.return=k,T;case j0:return _=s6(_,k.mode,T),_.return=k,_;case vd:var A=_._init;return p(k,A(_._payload),T)}if(gv(_)||$m(_))return _=Nh(_,k.mode,T,null),_.return=k,_;z3(k,_)}return null}function m(k,_,T,A){var R=_!==null?_.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return R!==null?null:s(k,_,""+T,A);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case L3:return T.key===R?l(k,_,T,A):null;case j0:return T.key===R?u(k,_,T,A):null;case vd:return R=T._init,m(k,_,R(T._payload),A)}if(gv(T)||$m(T))return R!==null?null:f(k,_,T,A,null);z3(k,T)}return null}function v(k,_,T,A,R){if(typeof A=="string"&&A!==""||typeof A=="number")return k=k.get(T)||null,s(_,k,""+A,R);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case L3:return k=k.get(A.key===null?T:A.key)||null,l(_,k,A,R);case j0:return k=k.get(A.key===null?T:A.key)||null,u(_,k,A,R);case vd:var I=A._init;return v(k,_,T,I(A._payload),R)}if(gv(A)||$m(A))return k=k.get(T)||null,f(_,k,A,R,null);z3(_,A)}return null}function b(k,_,T,A){for(var R=null,I=null,D=_,B=_=0,z=null;D!==null&&B<T.length;B++){D.index>B?(z=D,D=null):z=D.sibling;var j=m(k,D,T[B],A);if(j===null){D===null&&(D=z);break}e&&D&&j.alternate===null&&t(k,D),_=o(j,_,B),I===null?R=j:I.sibling=j,I=j,D=z}if(B===T.length)return n(k,D),cr&&gh(k,B),R;if(D===null){for(;B<T.length;B++)D=p(k,T[B],A),D!==null&&(_=o(D,_,B),I===null?R=D:I.sibling=D,I=D);return cr&&gh(k,B),R}for(D=r(k,D);B<T.length;B++)z=v(D,k,B,T[B],A),z!==null&&(e&&z.alternate!==null&&D.delete(z.key===null?B:z.key),_=o(z,_,B),I===null?R=z:I.sibling=z,I=z);return e&&D.forEach(function(Y){return t(k,Y)}),cr&&gh(k,B),R}function x(k,_,T,A){var R=$m(T);if(typeof R!="function")throw Error(Fe(150));if(T=R.call(T),T==null)throw Error(Fe(151));for(var I=R=null,D=_,B=_=0,z=null,j=T.next();D!==null&&!j.done;B++,j=T.next()){D.index>B?(z=D,D=null):z=D.sibling;var Y=m(k,D,j.value,A);if(Y===null){D===null&&(D=z);break}e&&D&&Y.alternate===null&&t(k,D),_=o(Y,_,B),I===null?R=Y:I.sibling=Y,I=Y,D=z}if(j.done)return n(k,D),cr&&gh(k,B),R;if(D===null){for(;!j.done;B++,j=T.next())j=p(k,j.value,A),j!==null&&(_=o(j,_,B),I===null?R=j:I.sibling=j,I=j);return cr&&gh(k,B),R}for(D=r(k,D);!j.done;B++,j=T.next())j=v(D,k,B,j.value,A),j!==null&&(e&&j.alternate!==null&&D.delete(j.key===null?B:j.key),_=o(j,_,B),I===null?R=j:I.sibling=j,I=j);return e&&D.forEach(function(te){return t(k,te)}),cr&&gh(k,B),R}function E(k,_,T,A){if(typeof T=="object"&&T!==null&&T.type===H0&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case L3:e:{for(var R=T.key,I=_;I!==null;){if(I.key===R){if(R=T.type,R===H0){if(I.tag===7){n(k,I.sibling),_=i(I,T.props.children),_.return=k,k=_;break e}}else if(I.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===vd&&BL(R)===I.type){n(k,I.sibling),_=i(I,T.props),_.ref=Vm(k,I,T),_.return=k,k=_;break e}n(k,I);break}else t(k,I);I=I.sibling}T.type===H0?(_=Nh(T.props.children,k.mode,A,T.key),_.return=k,k=_):(A=n4(T.type,T.key,T.props,null,k.mode,A),A.ref=Vm(k,_,T),A.return=k,k=A)}return a(k);case j0:e:{for(I=T.key;_!==null;){if(_.key===I)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(k,_.sibling),_=i(_,T.children||[]),_.return=k,k=_;break e}else{n(k,_);break}else t(k,_);_=_.sibling}_=s6(T,k.mode,A),_.return=k,k=_}return a(k);case vd:return I=T._init,E(k,_,I(T._payload),A)}if(gv(T))return b(k,_,T,A);if($m(T))return x(k,_,T,A);z3(k,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(k,_.sibling),_=i(_,T),_.return=k,k=_):(n(k,_),_=a6(T,k.mode,A),_.return=k,k=_),a(k)):n(k,_)}return E}var Vg=a$(!0),s$=a$(!1),ly={},Ql=sf(ly),x2=sf(ly),w2=sf(ly);function Th(e){if(e===ly)throw Error(Fe(174));return e}function P_(e,t){switch(er(w2,t),er(x2,e),er(Ql,ly),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:QC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=QC(t,e)}or(Ql),er(Ql,t)}function Ug(){or(Ql),or(x2),or(w2)}function l$(e){Th(w2.current);var t=Th(Ql.current),n=QC(t,e.type);t!==n&&(er(x2,e),er(Ql,n))}function T_(e){x2.current===e&&(or(Ql),or(x2))}var vr=sf(0);function X4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var e6=[];function L_(){for(var e=0;e<e6.length;e++)e6[e]._workInProgressVersionPrimary=null;e6.length=0}var Zb=pc.ReactCurrentDispatcher,t6=pc.ReactCurrentBatchConfig,Yh=0,Sr=null,hi=null,Ti=null,Z4=!1,Bv=!1,C2=0,Dte=0;function Zi(){throw Error(Fe(321))}function A_(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!el(e[n],t[n]))return!1;return!0}function O_(e,t,n,r,i,o){if(Yh=o,Sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zb.current=e===null||e.memoizedState===null?Fte:zte,e=n(r,i),Bv){o=0;do{if(Bv=!1,C2=0,25<=o)throw Error(Fe(301));o+=1,Ti=hi=null,t.updateQueue=null,Zb.current=jte,e=n(r,i)}while(Bv)}if(Zb.current=Q4,t=hi!==null&&hi.next!==null,Yh=0,Ti=hi=Sr=null,Z4=!1,t)throw Error(Fe(300));return e}function M_(){var e=C2!==0;return C2=0,e}function Bl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ti===null?Sr.memoizedState=Ti=e:Ti=Ti.next=e,Ti}function cs(){if(hi===null){var e=Sr.alternate;e=e!==null?e.memoizedState:null}else e=hi.next;var t=Ti===null?Sr.memoizedState:Ti.next;if(t!==null)Ti=t,hi=e;else{if(e===null)throw Error(Fe(310));hi=e,e={memoizedState:hi.memoizedState,baseState:hi.baseState,baseQueue:hi.baseQueue,queue:hi.queue,next:null},Ti===null?Sr.memoizedState=Ti=e:Ti=Ti.next=e}return Ti}function _2(e,t){return typeof t=="function"?t(e):t}function n6(e){var t=cs(),n=t.queue;if(n===null)throw Error(Fe(311));n.lastRenderedReducer=e;var r=hi,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var f=u.lane;if((Yh&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=p,a=r):l=l.next=p,Sr.lanes|=f,Kh|=f}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,el(r,t.memoizedState)||(Xo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Sr.lanes|=o,Kh|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function r6(e){var t=cs(),n=t.queue;if(n===null)throw Error(Fe(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);el(o,t.memoizedState)||(Xo=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function u$(){}function c$(e,t){var n=Sr,r=cs(),i=t(),o=!el(r.memoizedState,i);if(o&&(r.memoizedState=i,Xo=!0),r=r.queue,R_(h$.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ti!==null&&Ti.memoizedState.tag&1){if(n.flags|=2048,k2(9,f$.bind(null,n,r,i,t),void 0,null),Li===null)throw Error(Fe(349));(Yh&30)!==0||d$(n,t,i)}return i}function d$(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Sr.updateQueue,t===null?(t={lastEffect:null,stores:null},Sr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function f$(e,t,n,r){t.value=n,t.getSnapshot=r,p$(t)&&g$(e)}function h$(e,t,n){return n(function(){p$(t)&&g$(e)})}function p$(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!el(e,n)}catch(r){return!0}}function g$(e){var t=rc(e,1);t!==null&&qs(t,e,1,-1)}function $L(e){var t=Bl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_2,lastRenderedState:e},t.queue=e,e=e.dispatch=$te.bind(null,Sr,e),[t.memoizedState,e]}function k2(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Sr.updateQueue,t===null?(t={lastEffect:null,stores:null},Sr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function m$(){return cs().memoizedState}function Qb(e,t,n,r){var i=Bl();Sr.flags|=e,i.memoizedState=k2(1|t,n,void 0,r===void 0?null:r)}function hS(e,t,n,r){var i=cs();r=r===void 0?null:r;var o=void 0;if(hi!==null){var a=hi.memoizedState;if(o=a.destroy,r!==null&&A_(r,a.deps)){i.memoizedState=k2(t,n,o,r);return}}Sr.flags|=e,i.memoizedState=k2(1|t,n,o,r)}function FL(e,t){return Qb(8390656,8,e,t)}function R_(e,t){return hS(2048,8,e,t)}function v$(e,t){return hS(4,2,e,t)}function y$(e,t){return hS(4,4,e,t)}function b$(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function S$(e,t,n){return n=n!=null?n.concat([e]):null,hS(4,4,b$.bind(null,t,e),n)}function I_(){}function x$(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A_(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function w$(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A_(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function C$(e,t,n){return(Yh&21)===0?(e.baseState&&(e.baseState=!1,Xo=!0),e.memoizedState=n):(el(n,t)||(n=EB(),Sr.lanes|=n,Kh|=n,e.baseState=!0),t)}function Nte(e,t){var n=In;In=n!==0&&4>n?n:4,e(!0);var r=t6.transition;t6.transition={};try{e(!1),t()}finally{In=n,t6.transition=r}}function _$(){return cs().memoizedState}function Bte(e,t,n){var r=zd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},k$(e))E$(t,n);else if(n=n$(e,t,n,r),n!==null){var i=_o();qs(n,e,r,i),P$(n,t,r)}}function $te(e,t,n){var r=zd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(k$(e))E$(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,el(s,a)){var l=t.interleaved;l===null?(i.next=i,k_(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch(u){}finally{}n=n$(e,t,i,r),n!==null&&(i=_o(),qs(n,e,r,i),P$(n,t,r))}}function k$(e){var t=e.alternate;return e===Sr||t!==null&&t===Sr}function E$(e,t){Bv=Z4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function P$(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d_(e,n)}}var Q4={readContext:us,useCallback:Zi,useContext:Zi,useEffect:Zi,useImperativeHandle:Zi,useInsertionEffect:Zi,useLayoutEffect:Zi,useMemo:Zi,useReducer:Zi,useRef:Zi,useState:Zi,useDebugValue:Zi,useDeferredValue:Zi,useTransition:Zi,useMutableSource:Zi,useSyncExternalStore:Zi,useId:Zi,unstable_isNewReconciler:!1},Fte={readContext:us,useCallback:function(e,t){return Bl().memoizedState=[e,t===void 0?null:t],e},useContext:us,useEffect:FL,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qb(4194308,4,b$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qb(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qb(4,2,e,t)},useMemo:function(e,t){var n=Bl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bte.bind(null,Sr,e),[r.memoizedState,e]},useRef:function(e){var t=Bl();return e={current:e},t.memoizedState=e},useState:$L,useDebugValue:I_,useDeferredValue:function(e){return Bl().memoizedState=e},useTransition:function(){var e=$L(!1),t=e[0];return e=Nte.bind(null,e[1]),Bl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sr,i=Bl();if(cr){if(n===void 0)throw Error(Fe(407));n=n()}else{if(n=t(),Li===null)throw Error(Fe(349));(Yh&30)!==0||d$(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,FL(h$.bind(null,r,o,e),[e]),r.flags|=2048,k2(9,f$.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bl(),t=Li.identifierPrefix;if(cr){var n=Ku,r=Yu;n=(r&~(1<<32-Gs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=C2++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Dte++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zte={readContext:us,useCallback:x$,useContext:us,useEffect:R_,useImperativeHandle:S$,useInsertionEffect:v$,useLayoutEffect:y$,useMemo:w$,useReducer:n6,useRef:m$,useState:function(){return n6(_2)},useDebugValue:I_,useDeferredValue:function(e){var t=cs();return C$(t,hi.memoizedState,e)},useTransition:function(){var e=n6(_2)[0],t=cs().memoizedState;return[e,t]},useMutableSource:u$,useSyncExternalStore:c$,useId:_$,unstable_isNewReconciler:!1},jte={readContext:us,useCallback:x$,useContext:us,useEffect:R_,useImperativeHandle:S$,useInsertionEffect:v$,useLayoutEffect:y$,useMemo:w$,useReducer:r6,useRef:m$,useState:function(){return r6(_2)},useDebugValue:I_,useDeferredValue:function(e){var t=cs();return hi===null?t.memoizedState=e:C$(t,hi.memoizedState,e)},useTransition:function(){var e=r6(_2)[0],t=cs().memoizedState;return[e,t]},useMutableSource:u$,useSyncExternalStore:c$,useId:_$,unstable_isNewReconciler:!1};function Wg(e,t){try{var n="",r=t;do n+=gee(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function i6(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function x7(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Hte=typeof WeakMap=="function"?WeakMap:Map;function T$(e,t,n){n=Zu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){e5||(e5=!0,O7=r),x7(e,t)},n}function L$(e,t,n){n=Zu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){x7(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){x7(e,t),typeof r!="function"&&(Fd===null?Fd=new Set([this]):Fd.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function zL(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hte;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nne.bind(null,e,t,n),t.then(e,e))}function jL(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function HL(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Zu(-1,1),t.tag=2,$d(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Vte=pc.ReactCurrentOwner,Xo=!1;function So(e,t,n,r){t.child=e===null?s$(t,null,n,r):Vg(t,e.child,n,r)}function VL(e,t,n,r,i){n=n.render;var o=t.ref;return vg(t,i),r=O_(e,t,n,r,o,i),n=M_(),e!==null&&!Xo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ic(e,t,i)):(cr&&n&&b_(t),t.flags|=1,So(e,t,r,i),t.child)}function UL(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!H_(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,A$(e,t,o,r,i)):(e=n4(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:v2,n(a,r)&&e.ref===t.ref)return ic(e,t,i)}return t.flags|=1,e=jd(o,r),e.ref=t.ref,e.return=t,t.child=e}function A$(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(v2(o,r)&&e.ref===t.ref)if(Xo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Xo=!0);else return t.lanes=e.lanes,ic(e,t,i)}return w7(e,t,n,r,i)}function O$(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},er(Q0,ka),ka|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,er(Q0,ka),ka|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,er(Q0,ka),ka|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,er(Q0,ka),ka|=r;return So(e,t,i,n),t.child}function M$(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function w7(e,t,n,r,i){var o=Jo(n)?Gh:ao.current;return o=jg(t,o),vg(t,i),n=O_(e,t,n,r,o,i),r=M_(),e!==null&&!Xo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ic(e,t,i)):(cr&&r&&b_(t),t.flags|=1,So(e,t,n,i),t.child)}function WL(e,t,n,r,i){if(Jo(n)){var o=!0;U4(t)}else o=!1;if(vg(t,i),t.stateNode===null)Jb(e,t),o$(t,n,r),S7(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=us(u):(u=Jo(n)?Gh:ao.current,u=jg(t,u));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&NL(t,a,r,u),yd=!1;var m=t.memoizedState;a.state=m,K4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Qo.current||yd?(typeof f=="function"&&(b7(t,n,f,r),l=t.memoizedState),(s=yd||DL(t,n,s,r,m,l,u))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,r$(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Fs(t.type,s),a.props=u,p=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=us(l):(l=Jo(n)?Gh:ao.current,l=jg(t,l));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==p||m!==l)&&NL(t,a,r,l),yd=!1,m=t.memoizedState,a.state=m,K4(t,r,a,i);var b=t.memoizedState;s!==p||m!==b||Qo.current||yd?(typeof v=="function"&&(b7(t,n,v,r),b=t.memoizedState),(u=yd||DL(t,n,u,r,m,b,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,b,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,b,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),a.props=r,a.state=b,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return C7(e,t,n,r,o,i)}function C7(e,t,n,r,i,o){M$(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&AL(t,n,!1),ic(e,t,o);r=t.stateNode,Vte.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Vg(t,e.child,null,o),t.child=Vg(t,null,s,o)):So(e,t,s,o),t.memoizedState=r.state,i&&AL(t,n,!0),t.child}function R$(e){var t=e.stateNode;t.pendingContext?LL(e,t.pendingContext,t.pendingContext!==t.context):t.context&&LL(e,t.context,!1),P_(e,t.containerInfo)}function GL(e,t,n,r,i){return Hg(),x_(i),t.flags|=256,So(e,t,n,r),t.child}var _7={dehydrated:null,treeContext:null,retryLane:0};function k7(e){return{baseLanes:e,cachePool:null,transitions:null}}function I$(e,t,n){var r=t.pendingProps,i=vr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),er(vr,i&1),e===null)return v7(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=mS(a,r,0,null),e=Nh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=k7(n),t.memoizedState=_7,e):D_(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Ute(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=jd(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=jd(s,o):(o=Nh(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?k7(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=_7,r}return o=e.child,e=o.sibling,r=jd(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function D_(e,t){return t=mS({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function j3(e,t,n,r){return r!==null&&x_(r),Vg(t,e.child,null,n),e=D_(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ute(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=i6(Error(Fe(422))),j3(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=mS({mode:"visible",children:r.children},i,0,null),o=Nh(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&Vg(t,e.child,null,a),t.child.memoizedState=k7(a),t.memoizedState=_7,o);if((t.mode&1)===0)return j3(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Fe(419)),r=i6(o,r,void 0),j3(e,t,a,r)}if(s=(a&e.childLanes)!==0,Xo||s){if(r=Li,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,rc(e,i),qs(r,e,i,-1))}return j_(),r=i6(Error(Fe(421))),j3(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rne.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Pa=Bd(i.nextSibling),Ta=t,cr=!0,Hs=null,e!==null&&(Qa[Ja++]=Yu,Qa[Ja++]=Ku,Qa[Ja++]=qh,Yu=e.id,Ku=e.overflow,qh=t),t=D_(t,r.children),t.flags|=4096,t)}function qL(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),y7(e.return,t,n)}function o6(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function D$(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(So(e,t,r.children,n),r=vr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qL(e,n,t);else if(e.tag===19)qL(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(er(vr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&X4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),o6(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&X4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}o6(t,!0,n,null,o);break;case"together":o6(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jb(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ic(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kh|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Fe(153));if(t.child!==null){for(e=t.child,n=jd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=jd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wte(e,t,n){switch(t.tag){case 3:R$(t),Hg();break;case 5:l$(t);break;case 1:Jo(t.type)&&U4(t);break;case 4:P_(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;er(q4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(er(vr,vr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?I$(e,t,n):(er(vr,vr.current&1),e=ic(e,t,n),e!==null?e.sibling:null);er(vr,vr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return D$(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),er(vr,vr.current),r)break;return null;case 22:case 23:return t.lanes=0,O$(e,t,n)}return ic(e,t,n)}var N$,E7,B$,$$;N$=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};E7=function(){};B$=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Th(Ql.current);var o=null;switch(n){case"input":i=YC(e,i),r=YC(e,r),o=[];break;case"select":i=xr({},i,{value:void 0}),r=xr({},r,{value:void 0}),o=[];break;case"textarea":i=ZC(e,i),r=ZC(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=H4)}JC(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(c2.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(c2.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&nr("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};$$=function(e,t,n,r){n!==r&&(t.flags|=4)};function Um(e,t){if(!cr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gte(e,t,n){var r=t.pendingProps;switch(S_(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qi(t),null;case 1:return Jo(t.type)&&V4(),Qi(t),null;case 3:return r=t.stateNode,Ug(),or(Qo),or(ao),L_(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(F3(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hs!==null&&(I7(Hs),Hs=null))),E7(e,t),Qi(t),null;case 5:T_(t);var i=Th(w2.current);if(n=t.type,e!==null&&t.stateNode!=null)B$(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Fe(166));return Qi(t),null}if(e=Th(Ql.current),F3(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Vl]=t,r[S2]=o,e=(t.mode&1)!==0,n){case"dialog":nr("cancel",r),nr("close",r);break;case"iframe":case"object":case"embed":nr("load",r);break;case"video":case"audio":for(i=0;i<vv.length;i++)nr(vv[i],r);break;case"source":nr("error",r);break;case"img":case"image":case"link":nr("error",r),nr("load",r);break;case"details":nr("toggle",r);break;case"input":nL(r,o),nr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},nr("invalid",r);break;case"textarea":iL(r,o),nr("invalid",r)}JC(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&$3(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&$3(r.textContent,s,e),i=["children",""+s]):c2.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&nr("scroll",r)}switch(n){case"input":A3(r),rL(r,o,!0);break;case"textarea":A3(r),oL(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=H4)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dB(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Vl]=t,e[S2]=r,N$(e,t,!1,!1),t.stateNode=e;e:{switch(a=e7(n,r),n){case"dialog":nr("cancel",e),nr("close",e),i=r;break;case"iframe":case"object":case"embed":nr("load",e),i=r;break;case"video":case"audio":for(i=0;i<vv.length;i++)nr(vv[i],e);i=r;break;case"source":nr("error",e),i=r;break;case"img":case"image":case"link":nr("error",e),nr("load",e),i=r;break;case"details":nr("toggle",e),i=r;break;case"input":nL(e,r),i=YC(e,r),nr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=xr({},r,{value:void 0}),nr("invalid",e);break;case"textarea":iL(e,r),i=ZC(e,r),nr("invalid",e);break;default:i=r}JC(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?pB(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fB(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&d2(e,l):typeof l=="number"&&d2(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(c2.hasOwnProperty(o)?l!=null&&o==="onScroll"&&nr("scroll",e):l!=null&&o_(e,o,l,a))}switch(n){case"input":A3(e),rL(e,r,!1);break;case"textarea":A3(e),oL(e);break;case"option":r.value!=null&&e.setAttribute("value",""+qd(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?hg(e,!!r.multiple,o,!1):r.defaultValue!=null&&hg(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=H4)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qi(t),null;case 6:if(e&&t.stateNode!=null)$$(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Fe(166));if(n=Th(w2.current),Th(Ql.current),F3(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vl]=t,(o=r.nodeValue!==n)&&(e=Ta,e!==null))switch(e.tag){case 3:$3(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$3(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vl]=t,t.stateNode=r}return Qi(t),null;case 13:if(or(vr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(cr&&Pa!==null&&(t.mode&1)!==0&&(t.flags&128)===0)t$(),Hg(),t.flags|=98560,o=!1;else if(o=F3(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Fe(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Fe(317));o[Vl]=t}else Hg(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qi(t),o=!1}else Hs!==null&&(I7(Hs),Hs=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(vr.current&1)!==0?mi===0&&(mi=3):j_())),t.updateQueue!==null&&(t.flags|=4),Qi(t),null);case 4:return Ug(),E7(e,t),e===null&&y2(t.stateNode.containerInfo),Qi(t),null;case 10:return __(t.type._context),Qi(t),null;case 17:return Jo(t.type)&&V4(),Qi(t),null;case 19:if(or(vr),o=t.memoizedState,o===null)return Qi(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Um(o,!1);else{if(mi!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=X4(e),a!==null){for(t.flags|=128,Um(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return er(vr,vr.current&1|2),t.child}e=e.sibling}o.tail!==null&&Gr()>Gg&&(t.flags|=128,r=!0,Um(o,!1),t.lanes=4194304)}else{if(!r)if(e=X4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Um(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!cr)return Qi(t),null}else 2*Gr()-o.renderingStartTime>Gg&&n!==1073741824&&(t.flags|=128,r=!0,Um(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Gr(),t.sibling=null,n=vr.current,er(vr,r?n&1|2:n&1),t):(Qi(t),null);case 22:case 23:return z_(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ka&1073741824)!==0&&(Qi(t),t.subtreeFlags&6&&(t.flags|=8192)):Qi(t),null;case 24:return null;case 25:return null}throw Error(Fe(156,t.tag))}function qte(e,t){switch(S_(t),t.tag){case 1:return Jo(t.type)&&V4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ug(),or(Qo),or(ao),L_(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return T_(t),null;case 13:if(or(vr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Fe(340));Hg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return or(vr),null;case 4:return Ug(),null;case 10:return __(t.type._context),null;case 22:case 23:return z_(),null;case 24:return null;default:return null}}var H3=!1,ro=!1,Yte=typeof WeakSet=="function"?WeakSet:Set,pt=null;function Z0(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Rr(e,t,r)}else n.current=null}function P7(e,t,n){try{n()}catch(r){Rr(e,t,r)}}var YL=!1;function Kte(e,t){if(c7=F4,e=HB(),y_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(A){n=null;break e}var a=0,s=-1,l=-1,u=0,f=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++f===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(d7={focusedElem:e,selectionRange:n},F4=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){t=pt;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var x=b.memoizedProps,E=b.memoizedState,k=t.stateNode,_=k.getSnapshotBeforeUpdate(t.elementType===t.type?x:Fs(t.type,x),E);k.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Fe(163))}}catch(A){Rr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}return b=YL,YL=!1,b}function $v(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&P7(t,n,o)}i=i.next}while(i!==r)}}function pS(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function T7(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function F$(e){var t=e.alternate;t!==null&&(e.alternate=null,F$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vl],delete t[S2],delete t[p7],delete t[Ote],delete t[Mte])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function z$(e){return e.tag===5||e.tag===3||e.tag===4}function KL(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||z$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function L7(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=H4));else if(r!==4&&(e=e.child,e!==null))for(L7(e,t,n),e=e.sibling;e!==null;)L7(e,t,n),e=e.sibling}function A7(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(A7(e,t,n),e=e.sibling;e!==null;)A7(e,t,n),e=e.sibling}var ji=null,zs=!1;function ld(e,t,n){for(n=n.child;n!==null;)j$(e,t,n),n=n.sibling}function j$(e,t,n){if(Zl&&typeof Zl.onCommitFiberUnmount=="function")try{Zl.onCommitFiberUnmount(aS,n)}catch(s){}switch(n.tag){case 5:ro||Z0(n,t);case 6:var r=ji,i=zs;ji=null,ld(e,t,n),ji=r,zs=i,ji!==null&&(zs?(e=ji,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ji.removeChild(n.stateNode));break;case 18:ji!==null&&(zs?(e=ji,n=n.stateNode,e.nodeType===8?Qw(e.parentNode,n):e.nodeType===1&&Qw(e,n),g2(e)):Qw(ji,n.stateNode));break;case 4:r=ji,i=zs,ji=n.stateNode.containerInfo,zs=!0,ld(e,t,n),ji=r,zs=i;break;case 0:case 11:case 14:case 15:if(!ro&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&P7(n,t,a),i=i.next}while(i!==r)}ld(e,t,n);break;case 1:if(!ro&&(Z0(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Rr(n,t,s)}ld(e,t,n);break;case 21:ld(e,t,n);break;case 22:n.mode&1?(ro=(r=ro)||n.memoizedState!==null,ld(e,t,n),ro=r):ld(e,t,n);break;default:ld(e,t,n)}}function XL(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Yte),t.forEach(function(r){var i=ine.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Rs(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:ji=s.stateNode,zs=!1;break e;case 3:ji=s.stateNode.containerInfo,zs=!0;break e;case 4:ji=s.stateNode.containerInfo,zs=!0;break e}s=s.return}if(ji===null)throw Error(Fe(160));j$(o,a,i),ji=null,zs=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Rr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)H$(t,e),t=t.sibling}function H$(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Rs(t,e),Ol(e),r&4){try{$v(3,e,e.return),pS(3,e)}catch(x){Rr(e,e.return,x)}try{$v(5,e,e.return)}catch(x){Rr(e,e.return,x)}}break;case 1:Rs(t,e),Ol(e),r&512&&n!==null&&Z0(n,n.return);break;case 5:if(Rs(t,e),Ol(e),r&512&&n!==null&&Z0(n,n.return),e.flags&32){var i=e.stateNode;try{d2(i,"")}catch(x){Rr(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&uB(i,o),e7(s,a);var u=e7(s,o);for(a=0;a<l.length;a+=2){var f=l[a],p=l[a+1];f==="style"?pB(i,p):f==="dangerouslySetInnerHTML"?fB(i,p):f==="children"?d2(i,p):o_(i,f,p,u)}switch(s){case"input":KC(i,o);break;case"textarea":cB(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?hg(i,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?hg(i,!!o.multiple,o.defaultValue,!0):hg(i,!!o.multiple,o.multiple?[]:"",!1))}i[S2]=o}catch(x){Rr(e,e.return,x)}}break;case 6:if(Rs(t,e),Ol(e),r&4){if(e.stateNode===null)throw Error(Fe(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){Rr(e,e.return,x)}}break;case 3:if(Rs(t,e),Ol(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{g2(t.containerInfo)}catch(x){Rr(e,e.return,x)}break;case 4:Rs(t,e),Ol(e);break;case 13:Rs(t,e),Ol(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||($_=Gr())),r&4&&XL(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(ro=(u=ro)||f,Rs(t,e),ro=u):Rs(t,e),Ol(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&(e.mode&1)!==0)for(pt=e,f=e.child;f!==null;){for(p=pt=f;pt!==null;){switch(m=pt,v=m.child,m.tag){case 0:case 11:case 14:case 15:$v(4,m,m.return);break;case 1:Z0(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(x){Rr(r,n,x)}}break;case 5:Z0(m,m.return);break;case 22:if(m.memoizedState!==null){QL(p);continue}}v!==null?(v.return=m,pt=v):QL(p)}f=f.sibling}e:for(f=null,p=e;;){if(p.tag===5){if(f===null){f=p;try{i=p.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=p.stateNode,l=p.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=hB("display",a))}catch(x){Rr(e,e.return,x)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(x){Rr(e,e.return,x)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Rs(t,e),Ol(e),r&4&&XL(e);break;case 21:break;default:Rs(t,e),Ol(e)}}function Ol(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(z$(n)){var r=n;break e}n=n.return}throw Error(Fe(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(d2(i,""),r.flags&=-33);var o=KL(e);A7(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=KL(e);L7(e,s,a);break;default:throw Error(Fe(161))}}catch(l){Rr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xte(e,t,n){pt=e,V$(e)}function V$(e,t,n){for(var r=(e.mode&1)!==0;pt!==null;){var i=pt,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||H3;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||ro;s=H3;var u=ro;if(H3=a,(ro=l)&&!u)for(pt=i;pt!==null;)a=pt,l=a.child,a.tag===22&&a.memoizedState!==null?JL(i):l!==null?(l.return=a,pt=l):JL(i);for(;o!==null;)pt=o,V$(o),o=o.sibling;pt=i,H3=s,ro=u}ZL(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,pt=o):ZL(e)}}function ZL(e){for(;pt!==null;){var t=pt;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ro||pS(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ro)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Fs(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&IL(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}IL(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&g2(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Fe(163))}ro||t.flags&512&&T7(t)}catch(m){Rr(t,t.return,m)}}if(t===e){pt=null;break}if(n=t.sibling,n!==null){n.return=t.return,pt=n;break}pt=t.return}}function QL(e){for(;pt!==null;){var t=pt;if(t===e){pt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,pt=n;break}pt=t.return}}function JL(e){for(;pt!==null;){var t=pt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pS(4,t)}catch(l){Rr(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Rr(t,i,l)}}var o=t.return;try{T7(t)}catch(l){Rr(t,o,l)}break;case 5:var a=t.return;try{T7(t)}catch(l){Rr(t,a,l)}}}catch(l){Rr(t,t.return,l)}if(t===e){pt=null;break}var s=t.sibling;if(s!==null){s.return=t.return,pt=s;break}pt=t.return}}var Zte=Math.ceil,J4=pc.ReactCurrentDispatcher,N_=pc.ReactCurrentOwner,ss=pc.ReactCurrentBatchConfig,gn=0,Li=null,ii=null,Ui=0,ka=0,Q0=sf(0),mi=0,E2=null,Kh=0,gS=0,B_=0,Fv=null,Yo=null,$_=0,Gg=1/0,Wu=null,e5=!1,O7=null,Fd=null,V3=!1,Pd=null,t5=0,zv=0,M7=null,e4=-1,t4=0;function _o(){return(gn&6)!==0?Gr():e4!==-1?e4:e4=Gr()}function zd(e){return(e.mode&1)===0?1:(gn&2)!==0&&Ui!==0?Ui&-Ui:Ite.transition!==null?(t4===0&&(t4=EB()),t4):(e=In,e!==0||(e=window.event,e=e===void 0?16:RB(e.type)),e)}function qs(e,t,n,r){if(50<zv)throw zv=0,M7=null,Error(Fe(185));oy(e,n,r),((gn&2)===0||e!==Li)&&(e===Li&&((gn&2)===0&&(gS|=n),mi===4&&wd(e,Ui)),ea(e,r),n===1&&gn===0&&(t.mode&1)===0&&(Gg=Gr()+500,dS&&lf()))}function ea(e,t){var n=e.callbackNode;Iee(e,t);var r=$4(e,e===Li?Ui:0);if(r===0)n!==null&&lL(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&lL(n),t===1)e.tag===0?Rte(eA.bind(null,e)):QB(eA.bind(null,e)),Lte(function(){(gn&6)===0&&lf()}),n=null;else{switch(PB(r)){case 1:n=c_;break;case 4:n=_B;break;case 16:n=B4;break;case 536870912:n=kB;break;default:n=B4}n=Z$(n,U$.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function U$(e,t){if(e4=-1,t4=0,(gn&6)!==0)throw Error(Fe(327));var n=e.callbackNode;if(yg()&&e.callbackNode!==n)return null;var r=$4(e,e===Li?Ui:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=n5(e,r);else{t=r;var i=gn;gn|=2;var o=G$();(Li!==e||Ui!==t)&&(Wu=null,Gg=Gr()+500,Dh(e,t));do try{ene();break}catch(s){W$(e,s)}while(1);C_(),J4.current=o,gn=i,ii!==null?t=0:(Li=null,Ui=0,t=mi)}if(t!==0){if(t===2&&(i=o7(e),i!==0&&(r=i,t=R7(e,i))),t===1)throw n=E2,Dh(e,0),wd(e,r),ea(e,Gr()),n;if(t===6)wd(e,r);else{if(i=e.current.alternate,(r&30)===0&&!Qte(i)&&(t=n5(e,r),t===2&&(o=o7(e),o!==0&&(r=o,t=R7(e,o))),t===1))throw n=E2,Dh(e,0),wd(e,r),ea(e,Gr()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Fe(345));case 2:mh(e,Yo,Wu);break;case 3:if(wd(e,r),(r&130023424)===r&&(t=$_+500-Gr(),10<t)){if($4(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){_o(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=h7(mh.bind(null,e,Yo,Wu),t);break}mh(e,Yo,Wu);break;case 4:if(wd(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Gs(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Gr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zte(r/1960))-r,10<r){e.timeoutHandle=h7(mh.bind(null,e,Yo,Wu),r);break}mh(e,Yo,Wu);break;case 5:mh(e,Yo,Wu);break;default:throw Error(Fe(329))}}}return ea(e,Gr()),e.callbackNode===n?U$.bind(null,e):null}function R7(e,t){var n=Fv;return e.current.memoizedState.isDehydrated&&(Dh(e,t).flags|=256),e=n5(e,t),e!==2&&(t=Yo,Yo=n,t!==null&&I7(t)),e}function I7(e){Yo===null?Yo=e:Yo.push.apply(Yo,e)}function Qte(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!el(o(),i))return!1}catch(a){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wd(e,t){for(t&=~B_,t&=~gS,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gs(t),r=1<<n;e[n]=-1,t&=~r}}function eA(e){if((gn&6)!==0)throw Error(Fe(327));yg();var t=$4(e,0);if((t&1)===0)return ea(e,Gr()),null;var n=n5(e,t);if(e.tag!==0&&n===2){var r=o7(e);r!==0&&(t=r,n=R7(e,r))}if(n===1)throw n=E2,Dh(e,0),wd(e,t),ea(e,Gr()),n;if(n===6)throw Error(Fe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,mh(e,Yo,Wu),ea(e,Gr()),null}function F_(e,t){var n=gn;gn|=1;try{return e(t)}finally{gn=n,gn===0&&(Gg=Gr()+500,dS&&lf())}}function Xh(e){Pd!==null&&Pd.tag===0&&(gn&6)===0&&yg();var t=gn;gn|=1;var n=ss.transition,r=In;try{if(ss.transition=null,In=1,e)return e()}finally{In=r,ss.transition=n,gn=t,(gn&6)===0&&lf()}}function z_(){ka=Q0.current,or(Q0)}function Dh(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Tte(n)),ii!==null)for(n=ii.return;n!==null;){var r=n;switch(S_(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&V4();break;case 3:Ug(),or(Qo),or(ao),L_();break;case 5:T_(r);break;case 4:Ug();break;case 13:or(vr);break;case 19:or(vr);break;case 10:__(r.type._context);break;case 22:case 23:z_()}n=n.return}if(Li=e,ii=e=jd(e.current,null),Ui=ka=t,mi=0,E2=null,B_=gS=Kh=0,Yo=Fv=null,Ph!==null){for(t=0;t<Ph.length;t++)if(n=Ph[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Ph=null}return e}function W$(e,t){do{var n=ii;try{if(C_(),Zb.current=Q4,Z4){for(var r=Sr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Z4=!1}if(Yh=0,Ti=hi=Sr=null,Bv=!1,C2=0,N_.current=null,n===null||n.return===null){mi=1,E2=t,ii=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Ui,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=s,p=f.tag;if((f.mode&1)===0&&(p===0||p===11||p===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=jL(a);if(v!==null){v.flags&=-257,HL(v,a,s,o,t),v.mode&1&&zL(o,u,t),t=v,l=u;var b=t.updateQueue;if(b===null){var x=new Set;x.add(l),t.updateQueue=x}else b.add(l);break e}else{if((t&1)===0){zL(o,u,t),j_();break e}l=Error(Fe(426))}}else if(cr&&s.mode&1){var E=jL(a);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),HL(E,a,s,o,t),x_(Wg(l,s));break e}}o=l=Wg(l,s),mi!==4&&(mi=2),Fv===null?Fv=[o]:Fv.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var k=T$(o,l,t);RL(o,k);break e;case 1:s=l;var _=o.type,T=o.stateNode;if((o.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Fd===null||!Fd.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var A=L$(o,s,t);RL(o,A);break e}}o=o.return}while(o!==null)}Y$(n)}catch(R){t=R,ii===n&&n!==null&&(ii=n=n.return);continue}break}while(1)}function G$(){var e=J4.current;return J4.current=Q4,e===null?Q4:e}function j_(){(mi===0||mi===3||mi===2)&&(mi=4),Li===null||(Kh&268435455)===0&&(gS&268435455)===0||wd(Li,Ui)}function n5(e,t){var n=gn;gn|=2;var r=G$();(Li!==e||Ui!==t)&&(Wu=null,Dh(e,t));do try{Jte();break}catch(i){W$(e,i)}while(1);if(C_(),gn=n,J4.current=r,ii!==null)throw Error(Fe(261));return Li=null,Ui=0,mi}function Jte(){for(;ii!==null;)q$(ii)}function ene(){for(;ii!==null&&!kee();)q$(ii)}function q$(e){var t=X$(e.alternate,e,ka);e.memoizedProps=e.pendingProps,t===null?Y$(e):ii=t,N_.current=null}function Y$(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Gte(n,t,ka),n!==null){ii=n;return}}else{if(n=qte(n,t),n!==null){n.flags&=32767,ii=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{mi=6,ii=null;return}}if(t=t.sibling,t!==null){ii=t;return}ii=t=e}while(t!==null);mi===0&&(mi=5)}function mh(e,t,n){var r=In,i=ss.transition;try{ss.transition=null,In=1,tne(e,t,n,r)}finally{ss.transition=i,In=r}return null}function tne(e,t,n,r){do yg();while(Pd!==null);if((gn&6)!==0)throw Error(Fe(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Fe(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Dee(e,o),e===Li&&(ii=Li=null,Ui=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||V3||(V3=!0,Z$(B4,function(){return yg(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=ss.transition,ss.transition=null;var a=In;In=1;var s=gn;gn|=4,N_.current=null,Kte(e,n),H$(n,e),xte(d7),F4=!!c7,d7=c7=null,e.current=n,Xte(n),Eee(),gn=s,In=a,ss.transition=o}else e.current=n;if(V3&&(V3=!1,Pd=e,t5=i),o=e.pendingLanes,o===0&&(Fd=null),Lee(n.stateNode),ea(e,Gr()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(e5)throw e5=!1,e=O7,O7=null,e;return(t5&1)!==0&&e.tag!==0&&yg(),o=e.pendingLanes,(o&1)!==0?e===M7?zv++:(zv=0,M7=e):zv=0,lf(),null}function yg(){if(Pd!==null){var e=PB(t5),t=ss.transition,n=In;try{if(ss.transition=null,In=16>e?16:e,Pd===null)var r=!1;else{if(e=Pd,Pd=null,t5=0,(gn&6)!==0)throw Error(Fe(331));var i=gn;for(gn|=4,pt=e.current;pt!==null;){var o=pt,a=o.child;if((pt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(pt=u;pt!==null;){var f=pt;switch(f.tag){case 0:case 11:case 15:$v(8,f,o)}var p=f.child;if(p!==null)p.return=f,pt=p;else for(;pt!==null;){f=pt;var m=f.sibling,v=f.return;if(F$(f),f===u){pt=null;break}if(m!==null){m.return=v,pt=m;break}pt=v}}}var b=o.alternate;if(b!==null){var x=b.child;if(x!==null){b.child=null;do{var E=x.sibling;x.sibling=null,x=E}while(x!==null)}}pt=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,pt=a;else e:for(;pt!==null;){if(o=pt,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:$v(9,o,o.return)}var k=o.sibling;if(k!==null){k.return=o.return,pt=k;break e}pt=o.return}}var _=e.current;for(pt=_;pt!==null;){a=pt;var T=a.child;if((a.subtreeFlags&2064)!==0&&T!==null)T.return=a,pt=T;else e:for(a=_;pt!==null;){if(s=pt,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:pS(9,s)}}catch(R){Rr(s,s.return,R)}if(s===a){pt=null;break e}var A=s.sibling;if(A!==null){A.return=s.return,pt=A;break e}pt=s.return}}if(gn=i,lf(),Zl&&typeof Zl.onPostCommitFiberRoot=="function")try{Zl.onPostCommitFiberRoot(aS,e)}catch(R){}r=!0}return r}finally{In=n,ss.transition=t}}return!1}function tA(e,t,n){t=Wg(n,t),t=T$(e,t,1),e=$d(e,t,1),t=_o(),e!==null&&(oy(e,1,t),ea(e,t))}function Rr(e,t,n){if(e.tag===3)tA(e,e,n);else for(;t!==null;){if(t.tag===3){tA(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fd===null||!Fd.has(r))){e=Wg(n,e),e=L$(t,e,1),t=$d(t,e,1),e=_o(),t!==null&&(oy(t,1,e),ea(t,e));break}}t=t.return}}function nne(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_o(),e.pingedLanes|=e.suspendedLanes&n,Li===e&&(Ui&n)===n&&(mi===4||mi===3&&(Ui&130023424)===Ui&&500>Gr()-$_?Dh(e,0):B_|=n),ea(e,t)}function K$(e,t){t===0&&((e.mode&1)===0?t=1:(t=R3,R3<<=1,(R3&130023424)===0&&(R3=4194304)));var n=_o();e=rc(e,t),e!==null&&(oy(e,t,n),ea(e,n))}function rne(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),K$(e,n)}function ine(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Fe(314))}r!==null&&r.delete(t),K$(e,n)}var X$;X$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qo.current)Xo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Xo=!1,Wte(e,t,n);Xo=(e.flags&131072)!==0}else Xo=!1,cr&&(t.flags&1048576)!==0&&JB(t,G4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Jb(e,t),e=t.pendingProps;var i=jg(t,ao.current);vg(t,n),i=O_(null,t,r,e,i,n);var o=M_();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jo(r)?(o=!0,U4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,E_(t),i.updater=fS,t.stateNode=i,i._reactInternals=t,S7(t,r,e,n),t=C7(null,t,r,!0,o,n)):(t.tag=0,cr&&o&&b_(t),So(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Jb(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ane(r),e=Fs(r,e),i){case 0:t=w7(null,t,r,e,n);break e;case 1:t=WL(null,t,r,e,n);break e;case 11:t=VL(null,t,r,e,n);break e;case 14:t=UL(null,t,r,Fs(r.type,e),n);break e}throw Error(Fe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fs(r,i),w7(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fs(r,i),WL(e,t,r,i,n);case 3:e:{if(R$(t),e===null)throw Error(Fe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,r$(e,t),K4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wg(Error(Fe(423)),t),t=GL(e,t,r,n,i);break e}else if(r!==i){i=Wg(Error(Fe(424)),t),t=GL(e,t,r,n,i);break e}else for(Pa=Bd(t.stateNode.containerInfo.firstChild),Ta=t,cr=!0,Hs=null,n=s$(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hg(),r===i){t=ic(e,t,n);break e}So(e,t,r,n)}t=t.child}return t;case 5:return l$(t),e===null&&v7(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,f7(r,i)?a=null:o!==null&&f7(r,o)&&(t.flags|=32),M$(e,t),So(e,t,a,n),t.child;case 6:return e===null&&v7(t),null;case 13:return I$(e,t,n);case 4:return P_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vg(t,null,r,n):So(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fs(r,i),VL(e,t,r,i,n);case 7:return So(e,t,t.pendingProps,n),t.child;case 8:return So(e,t,t.pendingProps.children,n),t.child;case 12:return So(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,er(q4,r._currentValue),r._currentValue=a,o!==null)if(el(o.value,a)){if(o.children===i.children&&!Qo.current){t=ic(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Zu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),y7(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Fe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),y7(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}So(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vg(t,n),i=us(i),r=r(i),t.flags|=1,So(e,t,r,n),t.child;case 14:return r=t.type,i=Fs(r,t.pendingProps),i=Fs(r.type,i),UL(e,t,r,i,n);case 15:return A$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fs(r,i),Jb(e,t),t.tag=1,Jo(r)?(e=!0,U4(t)):e=!1,vg(t,n),o$(t,r,i),S7(t,r,i,n),C7(null,t,r,!0,e,n);case 19:return D$(e,t,n);case 22:return O$(e,t,n)}throw Error(Fe(156,t.tag))};function Z$(e,t){return CB(e,t)}function one(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function is(e,t,n,r){return new one(e,t,n,r)}function H_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ane(e){if(typeof e=="function")return H_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===s_)return 11;if(e===l_)return 14}return 2}function jd(e,t){var n=e.alternate;return n===null?(n=is(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function n4(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")H_(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case H0:return Nh(n.children,i,o,t);case a_:a=8,i|=8;break;case UC:return e=is(12,n,t,i|2),e.elementType=UC,e.lanes=o,e;case WC:return e=is(13,n,t,i),e.elementType=WC,e.lanes=o,e;case GC:return e=is(19,n,t,i),e.elementType=GC,e.lanes=o,e;case aB:return mS(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iB:a=10;break e;case oB:a=9;break e;case s_:a=11;break e;case l_:a=14;break e;case vd:a=16,r=null;break e}throw Error(Fe(130,e==null?e:typeof e,""))}return t=is(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Nh(e,t,n,r){return e=is(7,e,r,t),e.lanes=n,e}function mS(e,t,n,r){return e=is(22,e,r,t),e.elementType=aB,e.lanes=n,e.stateNode={isHidden:!1},e}function a6(e,t,n){return e=is(6,e,null,t),e.lanes=n,e}function s6(e,t,n){return t=is(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sne(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jw(0),this.expirationTimes=jw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jw(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function V_(e,t,n,r,i,o,a,s,l){return e=new sne(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=is(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E_(o),e}function lne(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j0,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Q$(e){if(!e)return Yd;e=e._reactInternals;e:{if(ap(e)!==e||e.tag!==1)throw Error(Fe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Jo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Fe(171))}if(e.tag===1){var n=e.type;if(Jo(n))return ZB(e,n,t)}return t}function J$(e,t,n,r,i,o,a,s,l){return e=V_(n,r,!0,e,i,o,a,s,l),e.context=Q$(null),n=e.current,r=_o(),i=zd(n),o=Zu(r,i),o.callback=t!=null?t:null,$d(n,o,i),e.current.lanes=i,oy(e,i,r),ea(e,r),e}function vS(e,t,n,r){var i=t.current,o=_o(),a=zd(i);return n=Q$(n),t.context===null?t.context=n:t.pendingContext=n,t=Zu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$d(i,t,a),e!==null&&(qs(e,i,a,o),Xb(e,i,a)),a}function r5(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function nA(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function U_(e,t){nA(e,t),(e=e.alternate)&&nA(e,t)}function une(){return null}var eF=typeof reportError=="function"?reportError:function(e){console.error(e)};function W_(e){this._internalRoot=e}yS.prototype.render=W_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Fe(409));vS(e,t,null,null)};yS.prototype.unmount=W_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xh(function(){vS(null,e,null,null)}),t[nc]=null}};function yS(e){this._internalRoot=e}yS.prototype.unstable_scheduleHydration=function(e){if(e){var t=AB();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xd.length&&t!==0&&t<xd[n].priority;n++);xd.splice(n,0,e),n===0&&MB(e)}};function G_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rA(){}function cne(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=r5(a);o.call(u)}}var a=J$(t,r,e,0,null,!1,!1,"",rA);return e._reactRootContainer=a,e[nc]=a.current,y2(e.nodeType===8?e.parentNode:e),Xh(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=r5(l);s.call(u)}}var l=V_(e,0,!1,null,null,!1,!1,"",rA);return e._reactRootContainer=l,e[nc]=l.current,y2(e.nodeType===8?e.parentNode:e),Xh(function(){vS(t,l,n,r)}),l}function SS(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=r5(a);s.call(l)}}vS(t,a,e,i)}else a=cne(n,t,e,i,r);return r5(a)}TB=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mv(t.pendingLanes);n!==0&&(d_(t,n|1),ea(t,Gr()),(gn&6)===0&&(Gg=Gr()+500,lf()))}break;case 13:Xh(function(){var r=rc(e,1);if(r!==null){var i=_o();qs(r,e,1,i)}}),U_(e,1)}};f_=function(e){if(e.tag===13){var t=rc(e,134217728);if(t!==null){var n=_o();qs(t,e,134217728,n)}U_(e,134217728)}};LB=function(e){if(e.tag===13){var t=zd(e),n=rc(e,t);if(n!==null){var r=_o();qs(n,e,t,r)}U_(e,t)}};AB=function(){return In};OB=function(e,t){var n=In;try{return In=e,t()}finally{In=n}};n7=function(e,t,n){switch(t){case"input":if(KC(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=cS(r);if(!i)throw Error(Fe(90));lB(r),KC(r,i)}}}break;case"textarea":cB(e,n);break;case"select":t=n.value,t!=null&&hg(e,!!n.multiple,t,!1)}};vB=F_;yB=Xh;var dne={usingClientEntryPoint:!1,Events:[sy,G0,cS,gB,mB,F_]},Wm={findFiberByHostInstance:Eh,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},fne={bundleType:Wm.bundleType,version:Wm.version,rendererPackageName:Wm.rendererPackageName,rendererConfig:Wm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pc.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xB(e),e===null?null:e.stateNode},findFiberByHostInstance:Wm.findFiberByHostInstance||une,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var U3=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!U3.isDisabled&&U3.supportsFiber)try{aS=U3.inject(fne),Zl=U3}catch(e){}}Da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dne;Da.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!G_(t))throw Error(Fe(200));return lne(e,t,null,n)};Da.createRoot=function(e,t){if(!G_(e))throw Error(Fe(299));var n=!1,r="",i=eF;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=V_(e,1,!1,null,null,n,!1,r,i),e[nc]=t.current,y2(e.nodeType===8?e.parentNode:e),new W_(t)};Da.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Fe(188)):(e=Object.keys(e).join(","),Error(Fe(268,e)));return e=xB(t),e=e===null?null:e.stateNode,e};Da.flushSync=function(e){return Xh(e)};Da.hydrate=function(e,t,n){if(!bS(t))throw Error(Fe(200));return SS(null,e,t,!0,n)};Da.hydrateRoot=function(e,t,n){if(!G_(e))throw Error(Fe(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=eF;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=J$(t,null,e,1,n!=null?n:null,i,!1,o,a),e[nc]=t.current,y2(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new yS(t)};Da.render=function(e,t,n){if(!bS(t))throw Error(Fe(200));return SS(null,e,t,!1,n)};Da.unmountComponentAtNode=function(e){if(!bS(e))throw Error(Fe(40));return e._reactRootContainer?(Xh(function(){SS(null,null,e,!1,function(){e._reactRootContainer=null,e[nc]=null})}),!0):!1};Da.unstable_batchedUpdates=F_;Da.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!bS(n))throw Error(Fe(200));if(e==null||e._reactInternals===void 0)throw Error(Fe(38));return SS(e,t,n,!1,r)};Da.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Da})(pu);const W3=Q8(pu.exports);var iA=pu.exports;HC.createRoot=iA.createRoot,HC.hydrateRoot=iA.hydrateRoot;var Ys=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:C.exports.useEffect,xS={exports:{}},wS={};/**
* @license React
* react-jsx-runtime.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 hne=C.exports,pne=Symbol.for("react.element"),gne=Symbol.for("react.fragment"),mne=Object.prototype.hasOwnProperty,vne=hne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yne={key:!0,ref:!0,__self:!0,__source:!0};function tF(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mne.call(t,r)&&!yne.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:pne,type:e,key:o,ref:a,props:i,_owner:vne.current}}wS.Fragment=gne;wS.jsx=tF;wS.jsxs=tF;(function(e){e.exports=wS})(xS);const fn=xS.exports.Fragment,y=xS.exports.jsx,K=xS.exports.jsxs;var q_=C.exports.createContext({});q_.displayName="ColorModeContext";function uy(){const e=C.exports.useContext(q_);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var G3={light:"chakra-ui-light",dark:"chakra-ui-dark"};function bne(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?G3.dark:G3.light),document.body.classList.remove(r?G3.light:G3.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var o;return((o=n.query().matches)!=null?o:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var Sne="chakra-ui-color-mode";function xne(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch(r){}return n||t},set(t){try{localStorage.setItem(e,t)}catch(n){}}}}var wne=xne(Sne),oA=()=>{};function aA(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function nF(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=wne}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>aA(a,s)),[f,p]=C.exports.useState(()=>aA(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:x}=C.exports.useMemo(()=>bne({preventTransition:o}),[o]),E=i==="system"&&!l?f:l,k=C.exports.useCallback(A=>{const R=A==="system"?m():A;u(R),v(R==="dark"),b(R),a.set(R)},[a,m,v,b]);Ys(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const A=a.get();if(A){k(A);return}if(i==="system"){k("system");return}k(s)},[a,s,i,k]);const _=C.exports.useCallback(()=>{k(E==="dark"?"light":"dark")},[E,k]);C.exports.useEffect(()=>{if(!!r)return x(k)},[r,x,k]);const T=C.exports.useMemo(()=>({colorMode:t!=null?t:E,toggleColorMode:t?oA:_,setColorMode:t?oA:k,forced:t!==void 0}),[E,_,k,t]);return y(q_.Provider,{value:T,children:n})}nF.displayName="ColorModeProvider";var D7={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",x="[object Map]",E="[object Number]",k="[object Null]",_="[object Object]",T="[object Proxy]",A="[object RegExp]",R="[object Set]",I="[object String]",D="[object Undefined]",B="[object WeakMap]",z="[object ArrayBuffer]",j="[object DataView]",Y="[object Float32Array]",te="[object Float64Array]",G="[object Int8Array]",$="[object Int16Array]",V="[object Int32Array]",J="[object Uint8Array]",Z="[object Uint8ClampedArray]",U="[object Uint16Array]",X="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,Se=/^(?:0|[1-9]\d*)$/,Ae={};Ae[Y]=Ae[te]=Ae[G]=Ae[$]=Ae[V]=Ae[J]=Ae[Z]=Ae[U]=Ae[X]=!0,Ae[s]=Ae[l]=Ae[z]=Ae[f]=Ae[j]=Ae[p]=Ae[m]=Ae[v]=Ae[x]=Ae[E]=Ae[_]=Ae[A]=Ae[R]=Ae[I]=Ae[B]=!1;var be=typeof xo=="object"&&xo&&xo.Object===Object&&xo,ke=typeof self=="object"&&self&&self.Object===Object&&self,De=be||ke||Function("return this")(),Je=t&&!t.nodeType&&t,Ye=Je&&!0&&e&&!e.nodeType&&e,mt=Ye&&Ye.exports===Je,_t=mt&&be.process,dt=function(){try{var q=Ye&&Ye.require&&Ye.require("util").types;return q||_t&&_t.binding&&_t.binding("util")}catch(re){}}(),vt=dt&&dt.isTypedArray;function xt(q,re,ge){switch(ge.length){case 0:return q.call(re);case 1:return q.call(re,ge[0]);case 2:return q.call(re,ge[0],ge[1]);case 3:return q.call(re,ge[0],ge[1],ge[2])}return q.apply(re,ge)}function Le(q,re){for(var ge=-1,it=Array(q);++ge<q;)it[ge]=re(ge);return it}function ut(q){return function(re){return q(re)}}function Rt(q,re){return q==null?void 0:q[re]}function ot(q,re){return function(ge){return q(re(ge))}}var Ct=Array.prototype,ln=Function.prototype,ue=Object.prototype,Ie=De["__core-js_shared__"],We=ln.toString,Xe=ue.hasOwnProperty,Ce=function(){var q=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||"");return q?"Symbol(src)_1."+q:""}(),Ne=ue.toString,kt=We.call(Object),Nt=RegExp("^"+We.call(Xe).replace(le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=mt?De.Buffer:void 0,Et=De.Symbol,Ut=De.Uint8Array,Ve=Te?Te.allocUnsafe:void 0,ft=ot(Object.getPrototypeOf,Object),un=Object.create,ze=ue.propertyIsEnumerable,St=Ct.splice,ct=Et?Et.toStringTag:void 0,Vt=function(){try{var q=xs(Object,"defineProperty");return q({},"",{}),q}catch(re){}}(),hn=Te?Te.isBuffer:void 0,Er=Math.max,dr=Date.now,Kr=xs(De,"Map"),ia=xs(Object,"create"),O1=function(){function q(){}return function(re){if(!ua(re))return{};if(un)return un(re);q.prototype=re;var ge=new q;return q.prototype=void 0,ge}}();function Fa(q){var re=-1,ge=q==null?0:q.length;for(this.clear();++re<ge;){var it=q[re];this.set(it[0],it[1])}}function kp(){this.__data__=ia?ia(null):{},this.size=0}function M1(q){var re=this.has(q)&&delete this.__data__[q];return this.size-=re?1:0,re}function wc(q){var re=this.__data__;if(ia){var ge=re[q];return ge===r?void 0:ge}return Xe.call(re,q)?re[q]:void 0}function Ep(q){var re=this.__data__;return ia?re[q]!==void 0:Xe.call(re,q)}function Pp(q,re){var ge=this.__data__;return this.size+=this.has(q)?0:1,ge[q]=ia&&re===void 0?r:re,this}Fa.prototype.clear=kp,Fa.prototype.delete=M1,Fa.prototype.get=wc,Fa.prototype.has=Ep,Fa.prototype.set=Pp;function oa(q){var re=-1,ge=q==null?0:q.length;for(this.clear();++re<ge;){var it=q[re];this.set(it[0],it[1])}}function wf(){this.__data__=[],this.size=0}function R1(q){var re=this.__data__,ge=bs(re,q);if(ge<0)return!1;var it=re.length-1;return ge==it?re.pop():St.call(re,ge,1),--this.size,!0}function Cc(q){var re=this.__data__,ge=bs(re,q);return ge<0?void 0:re[ge][1]}function Cf(q){return bs(this.__data__,q)>-1}function I1(q,re){var ge=this.__data__,it=bs(ge,q);return it<0?(++this.size,ge.push([q,re])):ge[it][1]=re,this}oa.prototype.clear=wf,oa.prototype.delete=R1,oa.prototype.get=Cc,oa.prototype.has=Cf,oa.prototype.set=I1;function sl(q){var re=-1,ge=q==null?0:q.length;for(this.clear();++re<ge;){var it=q[re];this.set(it[0],it[1])}}function _c(){this.size=0,this.__data__={hash:new Fa,map:new(Kr||oa),string:new Fa}}function D1(q){var re=_u(this,q).delete(q);return this.size-=re?1:0,re}function N1(q){return _u(this,q).get(q)}function B1(q){return _u(this,q).has(q)}function $1(q,re){var ge=_u(this,q),it=ge.size;return ge.set(q,re),this.size+=ge.size==it?0:1,this}sl.prototype.clear=_c,sl.prototype.delete=D1,sl.prototype.get=N1,sl.prototype.has=B1,sl.prototype.set=$1;function ys(q){var re=this.__data__=new oa(q);this.size=re.size}function F1(){this.__data__=new oa,this.size=0}function z1(q){var re=this.__data__,ge=re.delete(q);return this.size=re.size,ge}function j1(q){return this.__data__.get(q)}function H1(q){return this.__data__.has(q)}function V1(q,re){var ge=this.__data__;if(ge instanceof oa){var it=ge.__data__;if(!Kr||it.length<n-1)return it.push([q,re]),this.size=++ge.size,this;ge=this.__data__=new sl(it)}return ge.set(q,re),this.size=ge.size,this}ys.prototype.clear=F1,ys.prototype.delete=z1,ys.prototype.get=j1,ys.prototype.has=H1,ys.prototype.set=V1;function U1(q,re){var ge=Eu(q),it=!ge&&Tf(q),Gt=!ge&&!it&&Lc(q),bn=!ge&&!it&&!Gt&&Rp(q),Pt=ge||it||Gt||bn,Bt=Pt?Le(q.length,String):[],Qt=Bt.length;for(var Xr in q)(re||Xe.call(q,Xr))&&!(Pt&&(Xr=="length"||Gt&&(Xr=="offset"||Xr=="parent")||bn&&(Xr=="buffer"||Xr=="byteLength"||Xr=="byteOffset")||Lp(Xr,Qt)))&&Bt.push(Xr);return Bt}function ll(q,re,ge){(ge!==void 0&&!za(q[re],ge)||ge===void 0&&!(re in q))&&xu(q,re,ge)}function W1(q,re,ge){var it=q[re];(!(Xe.call(q,re)&&za(it,ge))||ge===void 0&&!(re in q))&&xu(q,re,ge)}function bs(q,re){for(var ge=q.length;ge--;)if(za(q[ge][0],re))return ge;return-1}function xu(q,re,ge){re=="__proto__"&&Vt?Vt(q,re,{configurable:!0,enumerable:!0,value:ge,writable:!0}):q[re]=ge}var wu=_f();function ul(q){return q==null?q===void 0?D:k:ct&&ct in Object(q)?kf(q):ku(q)}function Cu(q){return Yn(q)&&ul(q)==s}function Tp(q){if(!ua(q)||fl(q))return!1;var re=Ac(q)?Nt:fe;return re.test(Tc(q))}function kc(q){return Yn(q)&&Mp(q.length)&&!!Ae[ul(q)]}function cl(q){if(!ua(q))return hl(q);var re=Ao(q),ge=[];for(var it in q)it=="constructor"&&(re||!Xe.call(q,it))||ge.push(it);return ge}function aa(q,re,ge,it,Gt){q!==re&&wu(re,function(bn,Pt){if(Gt||(Gt=new ys),ua(bn))Mn(q,re,Pt,ge,aa,it,Gt);else{var Bt=it?it(Ec(q,Pt),bn,Pt+"",q,re,Gt):void 0;Bt===void 0&&(Bt=bn),ll(q,Pt,Bt)}},Ip)}function Mn(q,re,ge,it,Gt,bn,Pt){var Bt=Ec(q,ge),Qt=Ec(re,ge),Xr=Pt.get(Qt);if(Xr){ll(q,ge,Xr);return}var Pr=bn?bn(Bt,Qt,ge+"",q,re,Pt):void 0,Sn=Pr===void 0;if(Sn){var li=Eu(Qt),Oo=!li&&Lc(Qt),lo=!li&&!Oo&&Rp(Qt);Pr=Qt,li||Oo||lo?Eu(Bt)?Pr=Bt:Op(Bt)?Pr=dl(Bt):Oo?(Sn=!1,Pr=Br(Qt,!0)):lo?(Sn=!1,Pr=la(Qt,!0)):Pr=[]:Lf(Qt)||Tf(Qt)?(Pr=Bt,Tf(Bt)?Pr=Af(Bt):(!ua(Bt)||Ac(Bt))&&(Pr=Oi(Qt))):Sn=!1}Sn&&(Pt.set(Qt,Pr),Gt(Pr,Qt,it,bn,Pt),Pt.delete(Qt)),ll(q,ge,Pr)}function kn(q,re){return Pc(G1(q,re,Dp),q+"")}var sa=Vt?function(q,re){return Vt(q,"toString",{configurable:!0,enumerable:!1,value:Zt(re),writable:!0})}:Dp;function Br(q,re){if(re)return q.slice();var ge=q.length,it=Ve?Ve(ge):new q.constructor(ge);return q.copy(it),it}function ai(q){var re=new q.constructor(q.byteLength);return new Ut(re).set(new Ut(q)),re}function la(q,re){var ge=re?ai(q.buffer):q.buffer;return new q.constructor(ge,q.byteOffset,q.length)}function dl(q,re){var ge=-1,it=q.length;for(re||(re=Array(it));++ge<it;)re[ge]=q[ge];return re}function si(q,re,ge,it){var Gt=!ge;ge||(ge={});for(var bn=-1,Pt=re.length;++bn<Pt;){var Bt=re[bn],Qt=it?it(ge[Bt],q[Bt],Bt,ge,q):void 0;Qt===void 0&&(Qt=q[Bt]),Gt?xu(ge,Bt,Qt):W1(ge,Bt,Qt)}return ge}function Ss(q){return kn(function(re,ge){var it=-1,Gt=ge.length,bn=Gt>1?ge[Gt-1]:void 0,Pt=Gt>2?ge[2]:void 0;for(bn=q.length>3&&typeof bn=="function"?(Gt--,bn):void 0,Pt&&Ap(ge[0],ge[1],Pt)&&(bn=Gt<3?void 0:bn,Gt=1),re=Object(re);++it<Gt;){var Bt=ge[it];Bt&&q(re,Bt,it,bn)}return re})}function _f(q){return function(re,ge,it){for(var Gt=-1,bn=Object(re),Pt=it(re),Bt=Pt.length;Bt--;){var Qt=Pt[q?Bt:++Gt];if(ge(bn[Qt],Qt,bn)===!1)break}return re}}function _u(q,re){var ge=q.__data__;return Ef(re)?ge[typeof re=="string"?"string":"hash"]:ge.map}function xs(q,re){var ge=Rt(q,re);return Tp(ge)?ge:void 0}function kf(q){var re=Xe.call(q,ct),ge=q[ct];try{q[ct]=void 0;var it=!0}catch(bn){}var Gt=Ne.call(q);return it&&(re?q[ct]=ge:delete q[ct]),Gt}function Oi(q){return typeof q.constructor=="function"&&!Ao(q)?O1(ft(q)):{}}function Lp(q,re){var ge=typeof q;return re=re==null?a:re,!!re&&(ge=="number"||ge!="symbol"&&Se.test(q))&&q>-1&&q%1==0&&q<re}function Ap(q,re,ge){if(!ua(ge))return!1;var it=typeof re;return(it=="number"?Xt(ge)&&Lp(re,ge.length):it=="string"&&re in ge)?za(ge[re],q):!1}function Ef(q){var re=typeof q;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?q!=="__proto__":q===null}function fl(q){return!!Ce&&Ce in q}function Ao(q){var re=q&&q.constructor,ge=typeof re=="function"&&re.prototype||ue;return q===ge}function hl(q){var re=[];if(q!=null)for(var ge in Object(q))re.push(ge);return re}function ku(q){return Ne.call(q)}function G1(q,re,ge){return re=Er(re===void 0?q.length-1:re,0),function(){for(var it=arguments,Gt=-1,bn=Er(it.length-re,0),Pt=Array(bn);++Gt<bn;)Pt[Gt]=it[re+Gt];Gt=-1;for(var Bt=Array(re+1);++Gt<re;)Bt[Gt]=it[Gt];return Bt[re]=ge(Pt),xt(q,this,Bt)}}function Ec(q,re){if(!(re==="constructor"&&typeof q[re]=="function")&&re!="__proto__")return q[re]}var Pc=Pf(sa);function Pf(q){var re=0,ge=0;return function(){var it=dr(),Gt=o-(it-ge);if(ge=it,Gt>0){if(++re>=i)return arguments[0]}else re=0;return q.apply(void 0,arguments)}}function Tc(q){if(q!=null){try{return We.call(q)}catch(re){}try{return q+""}catch(re){}}return""}function za(q,re){return q===re||q!==q&&re!==re}var Tf=Cu(function(){return arguments}())?Cu:function(q){return Yn(q)&&Xe.call(q,"callee")&&!ze.call(q,"callee")},Eu=Array.isArray;function Xt(q){return q!=null&&Mp(q.length)&&!Ac(q)}function Op(q){return Yn(q)&&Xt(q)}var Lc=hn||q1;function Ac(q){if(!ua(q))return!1;var re=ul(q);return re==v||re==b||re==u||re==T}function Mp(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=a}function ua(q){var re=typeof q;return q!=null&&(re=="object"||re=="function")}function Yn(q){return q!=null&&typeof q=="object"}function Lf(q){if(!Yn(q)||ul(q)!=_)return!1;var re=ft(q);if(re===null)return!0;var ge=Xe.call(re,"constructor")&&re.constructor;return typeof ge=="function"&&ge instanceof ge&&We.call(ge)==kt}var Rp=vt?ut(vt):kc;function Af(q){return si(q,Ip(q))}function Ip(q){return Xt(q)?U1(q,!0):cl(q)}var mn=Ss(function(q,re,ge,it){aa(q,re,ge,it)});function Zt(q){return function(){return q}}function Dp(q){return q}function q1(){return!1}e.exports=mn})(D7,D7.exports);const ql=D7.exports;function Ks(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lh(e,...t){return Cne(e)?e(...t):e}var Cne=e=>typeof e=="function",_ne=e=>/!(important)?$/.test(e),sA=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,N7=(e,t)=>n=>{const r=String(t),i=_ne(r),o=sA(r),a=e?`${e}.${o}`:o;let s=Ks(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=sA(s),i?`${s} !important`:s};function P2(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var u;const s=N7(t,o)(a);let l=(u=n==null?void 0:n(s,a))!=null?u:s;return r&&(l=r(l,a)),l}}var q3=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Is(e,t){return n=>{const r={property:n,scale:e};return r.transform=P2({scale:e,transform:t}),r}}var kne=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Ene(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:kne(t),transform:n?P2({scale:n,compose:r}):r}}var rF=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Pne(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rF].join(" ")}function Tne(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rF].join(" ")}var Lne={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Ane={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function One(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Mne={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},iF="& > :not(style) ~ :not(style)",Rne={[iF]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},Ine={[iF]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},B7={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Dne=new Set(Object.values(B7)),oF=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Nne=e=>e.trim();function Bne(e,t){var p;var n;if(e==null||oF.has(e))return e;const r=new RegExp("(?<type>^[a-z-A-Z]+)\\((?<values>(.*))\\)","g"),{type:i,values:o}=(p=(n=r.exec(e))==null?void 0:n.groups)!=null?p:{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(Nne).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in B7?B7[s]:s;l.unshift(u);const f=l.map(m=>{if(Dne.has(m))return m;const v=m.indexOf(" "),[b,x]=v!==-1?[m.substr(0,v),m.substr(v+1)]:[m],E=aF(x)?x:x&&x.split(" "),k=`colors.${b}`,_=k in t.__cssMap?t.__cssMap[k].varRef:b;return E?[_,...Array.isArray(E)?E:[E]].join(" "):_});return`${a}(${f.join(", ")})`}var aF=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),$ne=(e,t)=>Bne(e,t!=null?t:{});function Fne(e){return/^var\(--.+\)$/.test(e)}var zne=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ml=e=>t=>`${e}(${t})`,pn={filter(e){return e!=="auto"?e:Lne},backdropFilter(e){return e!=="auto"?e:Ane},ring(e){return One(pn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Pne():e==="auto-gpu"?Tne():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=zne(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(Fne(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:$ne,blur:Ml("blur"),opacity:Ml("opacity"),brightness:Ml("brightness"),contrast:Ml("contrast"),dropShadow:Ml("drop-shadow"),grayscale:Ml("grayscale"),hueRotate:Ml("hue-rotate"),invert:Ml("invert"),saturate:Ml("saturate"),sepia:Ml("sepia"),bgImage(e){return e==null||aF(e)||oF.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var i;const{space:t,divide:n}=(i=Mne[e])!=null?i:{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:Is("borderWidths"),borderStyles:Is("borderStyles"),colors:Is("colors"),borders:Is("borders"),radii:Is("radii",pn.px),space:Is("space",q3(pn.vh,pn.px)),spaceT:Is("space",q3(pn.vh,pn.px)),degreeT(e){return{property:e,transform:pn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:P2({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Is("sizes",q3(pn.vh,pn.px)),sizesT:Is("sizes",q3(pn.vh,pn.fraction)),shadows:Is("shadows"),logical:Ene,blur:Is("blur",pn.blur)},r4={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",pn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:pn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",pn.gradient),bgClip:{transform:pn.bgClip}};Object.assign(r4,{bgImage:r4.backgroundImage,bgImg:r4.backgroundImage});var xn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(xn,{rounded:xn.borderRadius,roundedTop:xn.borderTopRadius,roundedTopLeft:xn.borderTopLeftRadius,roundedTopRight:xn.borderTopRightRadius,roundedTopStart:xn.borderStartStartRadius,roundedTopEnd:xn.borderStartEndRadius,roundedBottom:xn.borderBottomRadius,roundedBottomLeft:xn.borderBottomLeftRadius,roundedBottomRight:xn.borderBottomRightRadius,roundedBottomStart:xn.borderEndStartRadius,roundedBottomEnd:xn.borderEndEndRadius,roundedLeft:xn.borderLeftRadius,roundedRight:xn.borderRightRadius,roundedStart:xn.borderInlineStartRadius,roundedEnd:xn.borderInlineEndRadius,borderStart:xn.borderInlineStart,borderEnd:xn.borderInlineEnd,borderTopStartRadius:xn.borderStartStartRadius,borderTopEndRadius:xn.borderStartEndRadius,borderBottomStartRadius:xn.borderEndStartRadius,borderBottomEndRadius:xn.borderEndEndRadius,borderStartRadius:xn.borderInlineStartRadius,borderEndRadius:xn.borderInlineEndRadius,borderStartWidth:xn.borderInlineStartWidth,borderEndWidth:xn.borderInlineEndWidth,borderStartColor:xn.borderInlineStartColor,borderEndColor:xn.borderInlineEndColor,borderStartStyle:xn.borderInlineStartStyle,borderEndStyle:xn.borderInlineEndStyle});var jne={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},$7={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign($7,{shadow:$7.boxShadow});var Hne={filter:{transform:pn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",pn.brightness),contrast:ae.propT("--chakra-contrast",pn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",pn.invert),saturate:ae.propT("--chakra-saturate",pn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",pn.dropShadow),backdropFilter:{transform:pn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",pn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",pn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",pn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",pn.saturate)},i5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:pn.flexDirection},experimental_spaceX:{static:Rne,transform:P2({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:Ine,transform:P2({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(i5,{flexDir:i5.flexDirection});var sF={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Vne={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:pn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Za={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",pn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Za,{w:Za.width,h:Za.height,minW:Za.minWidth,maxW:Za.maxWidth,minH:Za.minHeight,maxH:Za.maxHeight,overscroll:Za.overscrollBehavior,overscrollX:Za.overscrollBehaviorX,overscrollY:Za.overscrollBehaviorY});var Une={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function Wne(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Gne=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},qne=Gne(Wne),Yne={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Kne={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},l6=(e,t,n)=>{const r={},i=qne(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},Xne={srOnly:{transform(e){return e===!0?Yne:e==="focusable"?Kne:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>l6(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>l6(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>l6(t,e,n)}},jv={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(jv,{insetStart:jv.insetInlineStart,insetEnd:jv.insetInlineEnd});var Zne={ring:{transform:pn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},rr={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(rr,{m:rr.margin,mt:rr.marginTop,mr:rr.marginRight,me:rr.marginInlineEnd,marginEnd:rr.marginInlineEnd,mb:rr.marginBottom,ml:rr.marginLeft,ms:rr.marginInlineStart,marginStart:rr.marginInlineStart,mx:rr.marginX,my:rr.marginY,p:rr.padding,pt:rr.paddingTop,py:rr.paddingY,px:rr.paddingX,pb:rr.paddingBottom,pl:rr.paddingLeft,ps:rr.paddingInlineStart,paddingStart:rr.paddingInlineStart,pr:rr.paddingRight,pe:rr.paddingInlineEnd,paddingEnd:rr.paddingInlineEnd});var Qne={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},Jne={clipPath:!0,transform:ae.propT("transform",pn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},ere={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},tre={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",pn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},nre={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function lF(e){return Ks(e)&&e.reference?e.reference:String(e)}var CS=(e,...t)=>t.map(lF).join(` ${e} `).replace(/calc/g,""),lA=(...e)=>`calc(${CS("+",...e)})`,uA=(...e)=>`calc(${CS("-",...e)})`,F7=(...e)=>`calc(${CS("*",...e)})`,cA=(...e)=>`calc(${CS("/",...e)})`,dA=e=>{const t=lF(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:F7(t,-1)},Ch=Object.assign(e=>({add:(...t)=>Ch(lA(e,...t)),subtract:(...t)=>Ch(uA(e,...t)),multiply:(...t)=>Ch(F7(e,...t)),divide:(...t)=>Ch(cA(e,...t)),negate:()=>Ch(dA(e)),toString:()=>e.toString()}),{add:lA,subtract:uA,multiply:F7,divide:cA,negate:dA});function rre(e,t="-"){return e.replace(/\s+/g,t)}function ire(e){const t=rre(e.toString());return are(ore(t))}function ore(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function are(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function sre(e,t=""){return[t,e].filter(Boolean).join("-")}function lre(e,t){return`var(${e}${t?`, ${t}`:""})`}function ure(e,t=""){return ire(`--${sre(e,t)}`)}function jn(e,t,n){const r=ure(e,n);return{variable:r,reference:lre(r,t)}}function cre(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function dre(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function z7(e){if(e==null)return e;const{unitless:t}=dre(e);return t||typeof e=="number"?`${e}px`:e}var uF=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Y_=e=>Object.fromEntries(Object.entries(e).sort(uF));function fA(e){const t=Y_(e);return Object.assign(Object.values(t),t)}function fre(e){const t=Object.keys(Y_(e));return new Set(t)}function hA(e){var n;if(!e)return e;e=(n=z7(e))!=null?n:e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(new RegExp("(\\d+\\.?\\d*)","u"),r=>`${parseFloat(r)+t}`)}function yv(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${z7(e)})`),t&&n.push("and",`(max-width: ${z7(t)})`),n.join(" ")}function hre(e){var o;if(!e)return null;e.base=(o=e.base)!=null?o:"0px";const t=fA(e),n=Object.entries(e).sort(uF).map(([a,s],l,u)=>{var p;let[,f]=(p=u[l+1])!=null?p:[];return f=parseFloat(f)>0?hA(f):void 0,{_minW:hA(s),breakpoint:a,minW:s,maxW:f,maxWQuery:yv(null,f),minWQuery:yv(s),minMaxQuery:yv(s,f)}}),r=fre(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>r.has(l))},asObject:Y_(e),asArray:fA(e),details:n,media:[null,...t.map(a=>yv(a)).slice(1)],toArrayValue(a){if(!Ks(a))throw new Error("toArrayValue: value must be an object");const s=i.map(l=>{var u;return(u=a[l])!=null?u:null});for(;cre(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const f=i[u];return f!=null&&l!=null&&(s[f]=l),s},{})}}}var Fi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},ud=e=>cF(t=>e(t,"&"),"[role=group]","[data-group]",".group"),zu=e=>cF(t=>e(t,"~ &"),"[data-peer]",".peer"),cF=(e,...t)=>t.map(e).join(", "),_S={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:ud(Fi.hover),_peerHover:zu(Fi.hover),_groupFocus:ud(Fi.focus),_peerFocus:zu(Fi.focus),_groupFocusVisible:ud(Fi.focusVisible),_peerFocusVisible:zu(Fi.focusVisible),_groupActive:ud(Fi.active),_peerActive:zu(Fi.active),_groupDisabled:ud(Fi.disabled),_peerDisabled:zu(Fi.disabled),_groupInvalid:ud(Fi.invalid),_peerInvalid:zu(Fi.invalid),_groupChecked:ud(Fi.checked),_peerChecked:zu(Fi.checked),_groupFocusWithin:ud(Fi.focusWithin),_peerFocusWithin:zu(Fi.focusWithin),_peerPlaceholderShown:zu(Fi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},pre=Object.keys(_S);function pA(e,t){return jn(String(e).replace(/\./g,"-"),void 0,t)}function gre(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=pA(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,x=`${v}.-${b.join(".")}`,E=Ch.negate(s),k=Ch.negate(u);r[x]={value:E,var:l,varRef:k}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const f=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=pA(b,t==null?void 0:t.cssVarPrefix);return E},p=Ks(s)?s:{default:s};n=ql(n,Object.entries(p).reduce((m,[v,b])=>{var _;var x;const E=f(b);if(v==="default")return m[l]=E,m;const k=(_=(x=_S)==null?void 0:x[v])!=null?_:v;return m[k]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function mre(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vre(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var yre=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function bre(e){return vre(e,yre)}function Sre(e){return e.semanticTokens}function xre(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function wre({tokens:e,semanticTokens:t}){var i,o;const n=Object.entries((i=j7(e))!=null?i:{}).map(([a,s])=>[a,{isSemantic:!1,value:s}]),r=Object.entries((o=j7(t,1))!=null?o:{}).map(([a,s])=>[a,{isSemantic:!0,value:s}]);return Object.fromEntries([...n,...r])}function j7(e,t=1/0){return!Ks(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Ks(i)||Array.isArray(i)?Object.entries(j7(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function Cre(e){var t;const n=xre(e),r=bre(n),i=Sre(n),o=wre({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=gre(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:hre(n.breakpoints)}),n}var K_=ql({},r4,xn,jne,i5,Za,Hne,Zne,Vne,sF,Xne,jv,$7,rr,nre,tre,Qne,Jne,Une,ere),_re=Object.assign({},rr,Za,i5,sF,jv),kre=Object.keys(_re),Ere=[...Object.keys(K_),...pre],Pre={...K_,..._S},Tre=e=>e in Pre,Lre=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lh(e[a],t);if(s==null)continue;if(s=Ks(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const f=i==null?void 0:i[u];if(!f){o[a]=s[u];continue}o[f]=o[f]||{},s[u]!=null&&(o[f][a]=s[u])}}return o};function Are(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function Ore(e){return/^var\(--.+\)$/.test(e)}var Mre=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!Ore(t),Rre=(e,t)=>{var a,s;if(t==null)return t;const n=l=>{var u,f;return(f=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:f.varRef},r=l=>{var u;return(u=n(l))!=null?u:l},[i,o]=Are(t);return t=(s=(a=n(i))!=null?a:r(o))!=null?s:r(t),t};function Ire(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var p,m;var s;const l=Lh(o,r),u=Lre(l)(r);let f={};for(let v in u){const b=u[v];let x=Lh(b,r);v in n&&(v=n[v]),Mre(v,x)&&(x=Rre(r,x));let E=t[v];if(E===!0&&(E={property:v}),Ks(x)){f[v]=(p=f[v])!=null?p:{},f[v]=ql({},f[v],i(x,!0));continue}let k=(m=(s=E==null?void 0:E.transform)==null?void 0:s.call(E,x,r,l))!=null?m:x;k=E!=null&&E.processResult?i(k,!0):k;const _=Lh(E==null?void 0:E.property,r);if(!a&&(E==null?void 0:E.static)){const T=Lh(E.static,r);f=ql({},f,T)}if(_&&Array.isArray(_)){for(const T of _)f[T]=k;continue}if(_){_==="&"&&Ks(k)?f=ql({},f,k):f[_]=k;continue}if(Ks(k)){f=ql({},f,k);continue}f[v]=k}return f};return i}var dF=e=>t=>Ire({theme:t,pseudos:_S,configs:K_})(e);function ar(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function Dre(e,t){if(Array.isArray(e))return e;if(Ks(e))return t(e);if(e!=null)return[e]}function Nre(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function Bre(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},f=Dre(o,t.toArrayValue);if(!f)return u;const p=f.length,m=p===1,v=!!r.parts;for(let b=0;b<p;b++){const x=t.details[b],E=t.details[Nre(f,b)],k=yv(x.minW,E==null?void 0:E._minW),_=Lh((s=r[i])==null?void 0:s[f[b]],a);if(!!_){if(v){(l=r.parts)==null||l.forEach(T=>{ql(u,{[T]:m?_[T]:{[k]:_[T]}})});continue}if(!v){m?ql(u,_):u[k]=_;continue}u[k]=_}}return u}}function $re(e){return t=>{var a;const{variant:n,size:r,theme:i}=t,o=Bre(i);return ql({},Lh((a=e.baseStyle)!=null?a:{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function Fre(e,t,n){var o;var r,i;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function _n(e){return mre(e,["styleConfig","size","variant","colorScheme"])}function zre(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 jre(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 Hre=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},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(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(jre(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=zre(i);try{o.insertRule(r,o.cssRules.length)}catch(a){}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ji="-ms-",o5="-moz-",wn="-webkit-",fF="comm",X_="rule",Z_="decl",Vre="@import",hF="@keyframes",Ure=Math.abs,kS=String.fromCharCode,Wre=Object.assign;function Gre(e,t){return Vi(e,0)^45?(((t<<2^Vi(e,0))<<2^Vi(e,1))<<2^Vi(e,2))<<2^Vi(e,3):0}function pF(e){return e.trim()}function qre(e,t){return(e=t.exec(e))?e[0]:e}function Tn(e,t,n){return e.replace(t,n)}function H7(e,t){return e.indexOf(t)}function Vi(e,t){return e.charCodeAt(t)|0}function T2(e,t,n){return e.slice(t,n)}function jl(e){return e.length}function Q_(e){return e.length}function Y3(e,t){return t.push(e),e}function Yre(e,t){return e.map(t).join("")}var ES=1,qg=1,gF=0,ra=0,ni=0,f1="";function PS(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ES,column:qg,length:a,return:""}}function Gm(e,t){return Wre(PS("",null,null,"",null,null,0),e,{length:-e.length},t)}function Kre(){return ni}function Xre(){return ni=ra>0?Vi(f1,--ra):0,qg--,ni===10&&(qg=1,ES--),ni}function La(){return ni=ra<gF?Vi(f1,ra++):0,qg++,ni===10&&(qg=1,ES++),ni}function Jl(){return Vi(f1,ra)}function i4(){return ra}function cy(e,t){return T2(f1,e,t)}function L2(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 mF(e){return ES=qg=1,gF=jl(f1=e),ra=0,[]}function vF(e){return f1="",e}function o4(e){return pF(cy(ra-1,V7(e===91?e+2:e===40?e+1:e)))}function Zre(e){for(;(ni=Jl())&&ni<33;)La();return L2(e)>2||L2(ni)>3?"":" "}function Qre(e,t){for(;--t&&La()&&!(ni<48||ni>102||ni>57&&ni<65||ni>70&&ni<97););return cy(e,i4()+(t<6&&Jl()==32&&La()==32))}function V7(e){for(;La();)switch(ni){case e:return ra;case 34:case 39:e!==34&&e!==39&&V7(ni);break;case 40:e===41&&V7(e);break;case 92:La();break}return ra}function Jre(e,t){for(;La()&&e+ni!==47+10;)if(e+ni===42+42&&Jl()===47)break;return"/*"+cy(t,ra-1)+"*"+kS(e===47?e:La())}function eie(e){for(;!L2(Jl());)La();return cy(e,ra)}function tie(e){return vF(a4("",null,null,null,[""],e=mF(e),0,[0],e))}function a4(e,t,n,r,i,o,a,s,l){for(var u=0,f=0,p=a,m=0,v=0,b=0,x=1,E=1,k=1,_=0,T="",A=i,R=o,I=r,D=T;E;)switch(b=_,_=La()){case 40:if(b!=108&&Vi(D,p-1)==58){H7(D+=Tn(o4(_),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:D+=o4(_);break;case 9:case 10:case 13:case 32:D+=Zre(b);break;case 92:D+=Qre(i4()-1,7);continue;case 47:switch(Jl()){case 42:case 47:Y3(nie(Jre(La(),i4()),t,n),l);break;default:D+="/"}break;case 123*x:s[u++]=jl(D)*k;case 125*x:case 59:case 0:switch(_){case 0:case 125:E=0;case 59+f:v>0&&jl(D)-p&&Y3(v>32?mA(D+";",r,n,p-1):mA(Tn(D," ","")+";",r,n,p-2),l);break;case 59:D+=";";default:if(Y3(I=gA(D,t,n,u,f,i,s,T,A=[],R=[],p),o),_===123)if(f===0)a4(D,t,I,I,A,o,p,s,R);else switch(m===99&&Vi(D,3)===110?100:m){case 100:case 109:case 115:a4(e,I,I,r&&Y3(gA(e,I,I,0,0,i,s,T,i,A=[],p),R),i,R,p,s,r?A:R);break;default:a4(D,I,I,I,[""],R,0,s,R)}}u=f=v=0,x=k=1,T=D="",p=a;break;case 58:p=1+jl(D),v=b;default:if(x<1){if(_==123)--x;else if(_==125&&x++==0&&Xre()==125)continue}switch(D+=kS(_),_*x){case 38:k=f>0?1:(D+="\f",-1);break;case 44:s[u++]=(jl(D)-1)*k,k=1;break;case 64:Jl()===45&&(D+=o4(La())),m=Jl(),f=p=jl(T=D+=eie(i4())),_++;break;case 45:b===45&&jl(D)==2&&(x=0)}}return o}function gA(e,t,n,r,i,o,a,s,l,u,f){for(var p=i-1,m=i===0?o:[""],v=Q_(m),b=0,x=0,E=0;b<r;++b)for(var k=0,_=T2(e,p+1,p=Ure(x=a[b])),T=e;k<v;++k)(T=pF(x>0?m[k]+" "+_:Tn(_,/&\f/g,m[k])))&&(l[E++]=T);return PS(e,t,n,i===0?X_:s,l,u,f)}function nie(e,t,n){return PS(e,t,n,fF,kS(Kre()),T2(e,2,-2),0)}function mA(e,t,n,r){return PS(e,t,n,Z_,T2(e,0,r),T2(e,r+1,-1),r)}function bg(e,t){for(var n="",r=Q_(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function rie(e,t,n,r){switch(e.type){case Vre:case Z_:return e.return=e.return||e.value;case fF:return"";case hF:return e.return=e.value+"{"+bg(e.children,r)+"}";case X_:e.value=e.props.join(",")}return jl(n=bg(e.children,r))?e.return=e.value+"{"+n+"}":""}function iie(e){var t=Q_(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function oie(e){return function(t){t.root||(t=t.return)&&e(t)}}var vA=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function yF(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var aie=function(t,n,r){for(var i=0,o=0;i=o,o=Jl(),i===38&&o===12&&(n[r]=1),!L2(o);)La();return cy(t,ra)},sie=function(t,n){var r=-1,i=44;do switch(L2(i)){case 0:i===38&&Jl()===12&&(n[r]=1),t[r]+=aie(ra-1,n,r);break;case 2:t[r]+=o4(i);break;case 4:if(i===44){t[++r]=Jl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=kS(i)}while(i=La());return t},lie=function(t,n){return vF(sie(mF(t),n))},yA=new WeakMap,uie=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!yA.get(r))&&!i){yA.set(t,!0);for(var o=[],a=lie(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var f=0;f<s.length;f++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},cie=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function bF(e,t){switch(Gre(e,t)){case 5103:return wn+"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 wn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return wn+e+o5+e+Ji+e+e;case 6828:case 4268:return wn+e+Ji+e+e;case 6165:return wn+e+Ji+"flex-"+e+e;case 5187:return wn+e+Tn(e,/(\w+).+(:[^]+)/,wn+"box-$1$2"+Ji+"flex-$1$2")+e;case 5443:return wn+e+Ji+"flex-item-"+Tn(e,/flex-|-self/,"")+e;case 4675:return wn+e+Ji+"flex-line-pack"+Tn(e,/align-content|flex-|-self/,"")+e;case 5548:return wn+e+Ji+Tn(e,"shrink","negative")+e;case 5292:return wn+e+Ji+Tn(e,"basis","preferred-size")+e;case 6060:return wn+"box-"+Tn(e,"-grow","")+wn+e+Ji+Tn(e,"grow","positive")+e;case 4554:return wn+Tn(e,/([^-])(transform)/g,"$1"+wn+"$2")+e;case 6187:return Tn(Tn(Tn(e,/(zoom-|grab)/,wn+"$1"),/(image-set)/,wn+"$1"),e,"")+e;case 5495:case 3959:return Tn(e,/(image-set\([^]*)/,wn+"$1$`$1");case 4968:return Tn(Tn(e,/(.+:)(flex-)?(.*)/,wn+"box-pack:$3"+Ji+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+wn+e+e;case 4095:case 3583:case 4068:case 2532:return Tn(e,/(.+)-inline(.+)/,wn+"$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(jl(e)-1-t>6)switch(Vi(e,t+1)){case 109:if(Vi(e,t+4)!==45)break;case 102:return Tn(e,/(.+:)(.+)-([^]+)/,"$1"+wn+"$2-$3$1"+o5+(Vi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~H7(e,"stretch")?bF(Tn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Vi(e,t+1)!==115)break;case 6444:switch(Vi(e,jl(e)-3-(~H7(e,"!important")&&10))){case 107:return Tn(e,":",":"+wn)+e;case 101:return Tn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+wn+(Vi(e,14)===45?"inline-":"")+"box$3$1"+wn+"$2$3$1"+Ji+"$2box$3")+e}break;case 5936:switch(Vi(e,t+11)){case 114:return wn+e+Ji+Tn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return wn+e+Ji+Tn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return wn+e+Ji+Tn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return wn+e+Ji+e+e}return e}var die=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Z_:t.return=bF(t.value,t.length);break;case hF:return bg([Gm(t,{value:Tn(t.value,"@","@"+wn)})],i);case X_:if(t.length)return Yre(t.props,function(o){switch(qre(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bg([Gm(t,{props:[Tn(o,/:(read-\w+)/,":"+o5+"$1")]})],i);case"::placeholder":return bg([Gm(t,{props:[Tn(o,/:(plac\w+)/,":"+wn+"input-$1")]}),Gm(t,{props:[Tn(o,/:(plac\w+)/,":"+o5+"$1")]}),Gm(t,{props:[Tn(o,/:(plac\w+)/,Ji+"input-$1")]})],i)}return""})}},fie=[die],SF=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var E=x.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=t.stylisPlugins||fie,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var E=x.getAttribute("data-emotion").split(" "),k=1;k<E.length;k++)o[E[k]]=!0;s.push(x)});var l,u=[uie,cie];{var f,p=[rie,oie(function(x){f.insert(x)})],m=iie(u.concat(i,p)),v=function(E){return bg(tie(E),m)};l=function(E,k,_,T){f=_,v(E?E+"{"+k.styles+"}":k.styles),T&&(b.inserted[k.name]=!0)}}var b={key:n,sheet:new Hre({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return b.sheet.hydrate(s),b};function Dn(){return Dn=Object.assign?Object.assign.bind():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},Dn.apply(this,arguments)}var xF={exports:{}},Nn={};/** @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 Ai=typeof Symbol=="function"&&Symbol.for,J_=Ai?Symbol.for("react.element"):60103,ek=Ai?Symbol.for("react.portal"):60106,TS=Ai?Symbol.for("react.fragment"):60107,LS=Ai?Symbol.for("react.strict_mode"):60108,AS=Ai?Symbol.for("react.profiler"):60114,OS=Ai?Symbol.for("react.provider"):60109,MS=Ai?Symbol.for("react.context"):60110,tk=Ai?Symbol.for("react.async_mode"):60111,RS=Ai?Symbol.for("react.concurrent_mode"):60111,IS=Ai?Symbol.for("react.forward_ref"):60112,DS=Ai?Symbol.for("react.suspense"):60113,hie=Ai?Symbol.for("react.suspense_list"):60120,NS=Ai?Symbol.for("react.memo"):60115,BS=Ai?Symbol.for("react.lazy"):60116,pie=Ai?Symbol.for("react.block"):60121,gie=Ai?Symbol.for("react.fundamental"):60117,mie=Ai?Symbol.for("react.responder"):60118,vie=Ai?Symbol.for("react.scope"):60119;function Ba(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case J_:switch(e=e.type,e){case tk:case RS:case TS:case AS:case LS:case DS:return e;default:switch(e=e&&e.$$typeof,e){case MS:case IS:case BS:case NS:case OS:return e;default:return t}}case ek:return t}}}function wF(e){return Ba(e)===RS}Nn.AsyncMode=tk;Nn.ConcurrentMode=RS;Nn.ContextConsumer=MS;Nn.ContextProvider=OS;Nn.Element=J_;Nn.ForwardRef=IS;Nn.Fragment=TS;Nn.Lazy=BS;Nn.Memo=NS;Nn.Portal=ek;Nn.Profiler=AS;Nn.StrictMode=LS;Nn.Suspense=DS;Nn.isAsyncMode=function(e){return wF(e)||Ba(e)===tk};Nn.isConcurrentMode=wF;Nn.isContextConsumer=function(e){return Ba(e)===MS};Nn.isContextProvider=function(e){return Ba(e)===OS};Nn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===J_};Nn.isForwardRef=function(e){return Ba(e)===IS};Nn.isFragment=function(e){return Ba(e)===TS};Nn.isLazy=function(e){return Ba(e)===BS};Nn.isMemo=function(e){return Ba(e)===NS};Nn.isPortal=function(e){return Ba(e)===ek};Nn.isProfiler=function(e){return Ba(e)===AS};Nn.isStrictMode=function(e){return Ba(e)===LS};Nn.isSuspense=function(e){return Ba(e)===DS};Nn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===TS||e===RS||e===AS||e===LS||e===DS||e===hie||typeof e=="object"&&e!==null&&(e.$$typeof===BS||e.$$typeof===NS||e.$$typeof===OS||e.$$typeof===MS||e.$$typeof===IS||e.$$typeof===gie||e.$$typeof===mie||e.$$typeof===vie||e.$$typeof===pie)};Nn.typeOf=Ba;(function(e){e.exports=Nn})(xF);var CF=xF.exports,yie={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bie={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_F={};_F[CF.ForwardRef]=yie;_F[CF.Memo]=bie;var Sie=!0;function xie(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var kF=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||Sie===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},EF=function(t,n,r){kF(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function wie(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=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(i){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 Cie={animationIterationCount: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,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},_ie=/[A-Z]|^ms/g,kie=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PF=function(t){return t.charCodeAt(1)===45},bA=function(t){return t!=null&&typeof t!="boolean"},u6=yF(function(e){return PF(e)?e:e.replace(_ie,"-$&").toLowerCase()}),SA=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kie,function(r,i,o){return Hl={name:i,styles:o,next:Hl},i})}return Cie[t]!==1&&!PF(t)&&typeof n=="number"&&n!==0?n+"px":n};function A2(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Hl={name:n.name,styles:n.styles,next:Hl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Hl={name:r.name,styles:r.styles,next:Hl},r=r.next;var i=n.styles+";";return i}return Eie(e,t,n)}case"function":{if(e!==void 0){var o=Hl,a=n(e);return Hl=o,A2(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function Eie(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=A2(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":bA(a)&&(r+=u6(o)+":"+SA(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)bA(a[s])&&(r+=u6(o)+":"+SA(o,a[s])+";");else{var l=A2(e,t,a);switch(o){case"animation":case"animationName":{r+=u6(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var xA=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Hl,nk=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Hl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=A2(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=A2(r,n,t[s]),i&&(o+=a[s]);xA.lastIndex=0;for(var l="",u;(u=xA.exec(o))!==null;)l+="-"+u[1];var f=wie(o)+l;return{name:f,styles:o,next:Hl}},Pie=function(t){return t()},TF=jC["useInsertionEffect"]?jC["useInsertionEffect"]:!1,Tie=TF||Pie,wA=TF||C.exports.useLayoutEffect,LF=C.exports.createContext(typeof HTMLElement<"u"?SF({key:"css"}):null),Lie=LF.Provider,AF=function(t){return C.exports.forwardRef(function(n,r){var i=C.exports.useContext(LF);return t(n,i,r)})},O2=C.exports.createContext({}),Aie=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Dn({},t,n)},Oie=vA(function(e){return vA(function(t){return Aie(e,t)})}),Mie=function(t){var n=C.exports.useContext(O2);return t.theme!==n&&(n=Oie(n)(t.theme)),C.exports.createElement(O2.Provider,{value:n},t.children)},$S=AF(function(e,t){var n=e.styles,r=nk([n],void 0,C.exports.useContext(O2)),i=C.exports.useRef();return wA(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),wA(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&EF(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function Rie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return nk(t)}var uf=function(){var t=Rie.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},OF=1/60*1e3,Iie=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},MF=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(Iie())},OF)};function Die(e){var t=[],n=[],r=0,i=!1,o=new WeakSet,a={schedule:function(s,l,u){l===void 0&&(l=!1),u===void 0&&(u=!1);var f=u&&i,p=f?t:n;return l&&o.add(s),p.indexOf(s)===-1&&(p.push(s),f&&i&&(r=t.length)),s},cancel:function(s){var l=n.indexOf(s);l!==-1&&n.splice(l,1),o.delete(s)},process:function(s){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var u=0;u<r;u++){var f=t[u];f(s),o.has(f)&&(a.schedule(f),e())}i=!1}};return a}var Nie=40,U7=!0,M2=!1,W7=!1,Hv={delta:0,timestamp:0},FS=["read","update","preRender","render","postRender"],rk=FS.reduce(function(e,t){return e[t]=Die(function(){return M2=!0}),e},{}),Bie=FS.reduce(function(e,t){var n=rk[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),M2||zie(),n.schedule(r,i,o)},e},{}),$ie=FS.reduce(function(e,t){return e[t]=rk[t].cancel,e},{}),Fie=function(e){return rk[e].process(Hv)},RF=function(e){M2=!1,Hv.delta=U7?OF:Math.max(Math.min(e-Hv.timestamp,Nie),1),Hv.timestamp=e,W7=!0,FS.forEach(Fie),W7=!1,M2&&(U7=!1,MF(RF))},zie=function(){M2=!0,U7=!0,W7||MF(RF)},CA=function(){return Hv};function jie(e){return typeof e=="function"}function Hie(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function Vie(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Uie=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},IF=Uie(Vie);function DF(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var NF=e=>DF(e,t=>t!=null);function Wie(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Gie=Wie();function BF(e,...t){return jie(e)?e(...t):e}function qie(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Yie(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var Kie=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Xie=yF(function(e){return Kie.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Zie=Xie,Qie=function(t){return t!=="theme"},_A=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Zie:Qie},kA=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},Jie=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return kF(n,r,i),Tie(function(){return EF(n,r,i)}),null},eoe=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=kA(t,n,r),l=s||_A(i),u=!l("as");return function(){var f=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)p.push.apply(p,f);else{p.push(f[0][0]);for(var m=f.length,v=1;v<m;v++)p.push(f[v],f[0][v])}var b=AF(function(x,E,k){var _=u&&x.as||i,T="",A=[],R=x;if(x.theme==null){R={};for(var I in x)R[I]=x[I];R.theme=C.exports.useContext(O2)}typeof x.className=="string"?T=xie(E.registered,A,x.className):x.className!=null&&(T=x.className+" ");var D=nk(p.concat(A),E.registered,R);T+=E.key+"-"+D.name,a!==void 0&&(T+=" "+a);var B=u&&s===void 0?_A(_):l,z={};for(var j in x)u&&j==="as"||B(j)&&(z[j]=x[j]);return z.className=T,z.ref=k,C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Jie,{cache:E,serialized:D,isStringTag:typeof _=="string"}),C.exports.createElement(_,z))});return b.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=i,b.__emotion_styles=p,b.__emotion_forwardProp=s,Object.defineProperty(b,"toString",{value:function(){return"."+a}}),b.withComponent=function(x,E){return e(x,Dn({},n,E,{shouldForwardProp:kA(b,E,!0)})).apply(void 0,p)},b}},toe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],G7=eoe.bind();toe.forEach(function(e){G7[e]=G7(e)});function Ln(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...f){r();for(const p of f)t[p]=l(p);return Ln(e,t)}function o(...f){for(const p of f)p in t||(t[p]=l(p));return Ln(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(f){const v=`chakra-${(["container","root"].includes(f!=null?f:"")?[e]:[e,f]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>f}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var noe=Ln("accordion").parts("root","container","button","panel").extend("icon"),roe=Ln("alert").parts("title","description","container").extend("icon","spinner"),ioe=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),ooe=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var aoe=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var soe=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),loe=Ln("editable").parts("preview","input","textarea"),uoe=Ln("form").parts("container","requiredIndicator","helperText"),coe=Ln("formError").parts("text","icon"),doe=Ln("input").parts("addon","field","element"),foe=Ln("list").parts("container","item","icon"),hoe=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),poe=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),goe=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var moe=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),voe=Ln("progress").parts("label","filledTrack","track"),yoe=Ln("radio").parts("container","control","label"),boe=Ln("select").parts("field","icon"),Soe=Ln("slider").parts("container","track","thumb","filledTrack","mark"),xoe=Ln("stat").parts("container","label","helpText","number","icon"),woe=Ln("switch").parts("container","track","thumb"),Coe=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),_oe=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),koe=Ln("tag").parts("container","label","closeButton"),Eoe=Ln("card").parts("container","header","body","footer");function Wi(e,t){Poe(e)&&(e="100%");var n=Toe(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function K3(e){return Math.min(1,Math.max(0,e))}function Poe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Toe(e){return typeof e=="string"&&e.indexOf("%")!==-1}function $F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function X3(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ah(e){return e.length===1?"0"+e:String(e)}function Loe(e,t,n){return{r:Wi(e,255)*255,g:Wi(t,255)*255,b:Wi(n,255)*255}}function EA(e,t,n){e=Wi(e,255),t=Wi(t,255),n=Wi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function c6(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 Aoe(e,t,n){var r,i,o;if(e=Wi(e,360),t=Wi(t,100),n=Wi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=c6(s,a,e+1/3),i=c6(s,a,e),o=c6(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function PA(e,t,n){e=Wi(e,255),t=Wi(t,255),n=Wi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function Ooe(e,t,n){e=Wi(e,360)*6,t=Wi(t,100),n=Wi(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,a,o,o,s,n][l],f=[s,n,n,a,o,o][l],p=[o,o,s,n,n,a][l];return{r:u*255,g:f*255,b:p*255}}function TA(e,t,n,r){var i=[Ah(Math.round(e).toString(16)),Ah(Math.round(t).toString(16)),Ah(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Moe(e,t,n,r,i){var o=[Ah(Math.round(e).toString(16)),Ah(Math.round(t).toString(16)),Ah(Math.round(n).toString(16)),Ah(Roe(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Roe(e){return Math.round(parseFloat(e)*255).toString(16)}function LA(e){return _a(e)/255}function _a(e){return parseInt(e,16)}function Ioe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var q7={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Doe(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=$oe(e)),typeof e=="object"&&(ju(e.r)&&ju(e.g)&&ju(e.b)?(t=Loe(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ju(e.h)&&ju(e.s)&&ju(e.v)?(r=X3(e.s),i=X3(e.v),t=Ooe(e.h,r,i),a=!0,s="hsv"):ju(e.h)&&ju(e.s)&&ju(e.l)&&(r=X3(e.s),o=X3(e.l),t=Aoe(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=$F(n),{ok:a,format:e.format||s,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}}var Noe="[-\\+]?\\d+%?",Boe="[-\\+]?\\d*\\.\\d+%?",Td="(?:".concat(Boe,")|(?:").concat(Noe,")"),d6="[\\s|\\(]+(".concat(Td,")[,|\\s]+(").concat(Td,")[,|\\s]+(").concat(Td,")\\s*\\)?"),f6="[\\s|\\(]+(".concat(Td,")[,|\\s]+(").concat(Td,")[,|\\s]+(").concat(Td,")[,|\\s]+(").concat(Td,")\\s*\\)?"),$s={CSS_UNIT:new RegExp(Td),rgb:new RegExp("rgb"+d6),rgba:new RegExp("rgba"+f6),hsl:new RegExp("hsl"+d6),hsla:new RegExp("hsla"+f6),hsv:new RegExp("hsv"+d6),hsva:new RegExp("hsva"+f6),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 $oe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(q7[e])e=q7[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=$s.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=$s.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=$s.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=$s.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=$s.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=$s.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=$s.hex8.exec(e),n?{r:_a(n[1]),g:_a(n[2]),b:_a(n[3]),a:LA(n[4]),format:t?"name":"hex8"}:(n=$s.hex6.exec(e),n?{r:_a(n[1]),g:_a(n[2]),b:_a(n[3]),format:t?"name":"hex"}:(n=$s.hex4.exec(e),n?{r:_a(n[1]+n[1]),g:_a(n[2]+n[2]),b:_a(n[3]+n[3]),a:LA(n[4]+n[4]),format:t?"name":"hex8"}:(n=$s.hex3.exec(e),n?{r:_a(n[1]+n[1]),g:_a(n[2]+n[2]),b:_a(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ju(e){return Boolean($s.CSS_UNIT.exec(String(e)))}var dy=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Ioe(t)),this.originalInput=t;var i=Doe(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=$F(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=PA(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=PA(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=EA(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=EA(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),TA(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Moe(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Wi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Wi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+TA(this.r,this.g,this.b,!1),n=0,r=Object.entries(q7);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=K3(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.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)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=K3(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=K3(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=K3(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function FF(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(FF(e));return e.count=t,n}var r=Foe(e.hue,e.seed),i=zoe(r,e),o=joe(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new dy(a)}function Foe(e,t){var n=Voe(e),r=a5(n,t);return r<0&&(r=360+r),r}function zoe(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return a5([0,100],t.seed);var n=zF(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return a5([r,i],t.seed)}function joe(e,t,n){var r=Hoe(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return a5([r,i],n.seed)}function Hoe(e,t){for(var n=zF(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Voe(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=HF.find(function(a){return a.name===e});if(n){var r=jF(n);if(r.hueRange)return r.hueRange}var i=new dy(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function zF(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=HF;t<n.length;t++){var r=n[t],i=jF(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function a5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function jF(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var HF=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function Uoe(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Woe=e=>Object.keys(e).length===0,wo=(e,t,n)=>{const r=Uoe(e,`colors.${t}`,t),{isValid:i}=new dy(r);return i?r:n},Goe=e=>t=>{const n=wo(t,e);return new dy(n).isDark()?"dark":"light"},qoe=e=>t=>Goe(e)(t)==="dark",Yg=(e,t)=>n=>{const r=wo(n,e);return new dy(r).setAlpha(t).toRgbString()};function AA(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
45deg,
${t} 25%,
transparent 25%,
transparent 50%,
${t} 50%,
${t} 75%,
transparent 75%,
transparent
)`,backgroundSize:`${e} ${e}`}}function Yoe(e){const t=FF().toHexString();return!e||Woe(e)?t:e.string&&e.colors?Xoe(e.string,e.colors):e.string&&!e.colors?Koe(e.string):e.colors&&!e.string?Zoe(e.colors):t}function Koe(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Xoe(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function Zoe(e){return e[Math.floor(Math.random()*e.length)]}function Tt(e,t){return n=>n.colorMode==="dark"?t:e}function ik(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Qoe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function VF(e){return Qoe(e)&&e.reference?e.reference:String(e)}var zS=(e,...t)=>t.map(VF).join(` ${e} `).replace(/calc/g,""),OA=(...e)=>`calc(${zS("+",...e)})`,MA=(...e)=>`calc(${zS("-",...e)})`,Y7=(...e)=>`calc(${zS("*",...e)})`,RA=(...e)=>`calc(${zS("/",...e)})`,IA=e=>{const t=VF(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Y7(t,-1)},qu=Object.assign(e=>({add:(...t)=>qu(OA(e,...t)),subtract:(...t)=>qu(MA(e,...t)),multiply:(...t)=>qu(Y7(e,...t)),divide:(...t)=>qu(RA(e,...t)),negate:()=>qu(IA(e)),toString:()=>e.toString()}),{add:OA,subtract:MA,multiply:Y7,divide:RA,negate:IA});function Joe(e){return!Number.isInteger(parseFloat(e.toString()))}function eae(e,t="-"){return e.replace(/\s+/g,t)}function UF(e){const t=eae(e.toString());return t.includes("\\.")?e:Joe(e)?t.replace(".","\\."):e}function tae(e,t=""){return[t,UF(e)].filter(Boolean).join("-")}function nae(e,t){return`var(${UF(e)}${t?`, ${t}`:""})`}function rae(e,t=""){return`--${tae(e,t)}`}function yi(e,t){const n=rae(e,t==null?void 0:t.prefix);return{variable:n,reference:nae(n,iae(t==null?void 0:t.fallback))}}function iae(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:oae,defineMultiStyleConfig:aae}=ar(noe.keys),sae={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lae={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},uae={pt:"2",px:"4",pb:"5"},cae={fontSize:"1.25em"},dae=oae({container:sae,button:lae,panel:uae,icon:cae}),fae=aae({baseStyle:dae}),{definePartsStyle:fy,defineMultiStyleConfig:hae}=ar(roe.keys),Aa=jn("alert-fg"),oc=jn("alert-bg"),pae=fy({container:{bg:oc.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Aa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Aa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function ok(e){const{theme:t,colorScheme:n}=e,r=Yg(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var gae=fy(e=>{const{colorScheme:t}=e,n=ok(e);return{container:{[Aa.variable]:`colors.${t}.500`,[oc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[oc.variable]:n.dark}}}}),mae=fy(e=>{const{colorScheme:t}=e,n=ok(e);return{container:{[Aa.variable]:`colors.${t}.500`,[oc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[oc.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Aa.reference}}}),vae=fy(e=>{const{colorScheme:t}=e,n=ok(e);return{container:{[Aa.variable]:`colors.${t}.500`,[oc.variable]:n.light,_dark:{[Aa.variable]:`colors.${t}.200`,[oc.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Aa.reference}}}),yae=fy(e=>{const{colorScheme:t}=e;return{container:{[Aa.variable]:"colors.white",[oc.variable]:`colors.${t}.500`,_dark:{[Aa.variable]:"colors.gray.900",[oc.variable]:`colors.${t}.200`},color:Aa.reference}}}),bae={subtle:gae,"left-accent":mae,"top-accent":vae,solid:yae},Sae=hae({baseStyle:pae,variants:bae,defaultProps:{variant:"subtle",colorScheme:"blue"}}),WF={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},xae={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},wae={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Cae={...WF,...xae,container:wae},GF=Cae,_ae=e=>typeof e=="function";function ko(e,...t){return _ae(e)?e(...t):e}var{definePartsStyle:qF,defineMultiStyleConfig:kae}=ar(ioe.keys),Sg=jn("avatar-border-color"),h6=jn("avatar-bg"),Eae={borderRadius:"full",border:"0.2em solid",[Sg.variable]:"white",_dark:{[Sg.variable]:"colors.gray.800"},borderColor:Sg.reference},Pae={[h6.variable]:"colors.gray.200",_dark:{[h6.variable]:"colors.whiteAlpha.400"},bgColor:h6.reference},DA=jn("avatar-background"),Tae=e=>{const{name:t,theme:n}=e,r=t?Yoe({string:t}):"colors.gray.400",i=qoe(r)(n);let o="white";return i||(o="gray.800"),{bg:DA.reference,"&:not([data-loaded])":{[DA.variable]:r},color:o,[Sg.variable]:"colors.white",_dark:{[Sg.variable]:"colors.gray.800"},borderColor:Sg.reference,verticalAlign:"top"}},Lae=qF(e=>({badge:ko(Eae,e),excessLabel:ko(Pae,e),container:ko(Tae,e)}));function cd(e){const t=e!=="100%"?GF[e]:void 0;return qF({container:{width:e,height:e,fontSize:`calc(${t!=null?t:e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t!=null?t:e} / 2.5)`,lineHeight:e!=="100%"?t!=null?t:e:void 0}})}var Aae={"2xs":cd(4),xs:cd(6),sm:cd(8),md:cd(12),lg:cd(16),xl:cd(24),"2xl":cd(32),full:cd("100%")},Oae=kae({baseStyle:Lae,sizes:Aae,defaultProps:{size:"md"}}),Mae={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},xg=jn("badge-bg"),Yl=jn("badge-color"),Rae=e=>{const{colorScheme:t,theme:n}=e,r=Yg(`${t}.500`,.6)(n);return{[xg.variable]:`colors.${t}.500`,[Yl.variable]:"colors.white",_dark:{[xg.variable]:r,[Yl.variable]:"colors.whiteAlpha.800"},bg:xg.reference,color:Yl.reference}},Iae=e=>{const{colorScheme:t,theme:n}=e,r=Yg(`${t}.200`,.16)(n);return{[xg.variable]:`colors.${t}.100`,[Yl.variable]:`colors.${t}.800`,_dark:{[xg.variable]:r,[Yl.variable]:`colors.${t}.200`},bg:xg.reference,color:Yl.reference}},Dae=e=>{const{colorScheme:t,theme:n}=e,r=Yg(`${t}.200`,.8)(n);return{[Yl.variable]:`colors.${t}.500`,_dark:{[Yl.variable]:r},color:Yl.reference,boxShadow:`inset 0 0 0px 1px ${Yl.reference}`}},Nae={solid:Rae,subtle:Iae,outline:Dae},Vv={baseStyle:Mae,variants:Nae,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Bae,definePartsStyle:$ae}=ar(ooe.keys),Fae={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},zae=$ae({link:Fae}),jae=Bae({baseStyle:zae}),Hae={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},YF=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Tt("inherit","whiteAlpha.900")(e),_hover:{bg:Tt("gray.100","whiteAlpha.200")(e)},_active:{bg:Tt("gray.200","whiteAlpha.300")(e)}};const r=Yg(`${t}.200`,.12)(n),i=Yg(`${t}.200`,.24)(n);return{color:Tt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Tt(`${t}.50`,r)(e)},_active:{bg:Tt(`${t}.100`,i)(e)}}},Vae=e=>{const{colorScheme:t}=e,n=Tt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...ko(YF,e)}},Uae={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Wae=e=>{var s;const{colorScheme:t}=e;if(t==="gray"){const l=Tt("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:Tt("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:Tt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=(s=Uae[t])!=null?s:{},a=Tt(n,`${t}.200`)(e);return{bg:a,color:Tt(r,"gray.800")(e),_hover:{bg:Tt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Tt(o,`${t}.400`)(e)}}},Gae=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Tt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Tt(`${t}.700`,`${t}.500`)(e)}}},qae={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Yae={ghost:YF,outline:Vae,solid:Wae,link:Gae,unstyled:qae},Kae={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},Xae={baseStyle:Hae,variants:Yae,sizes:Kae,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Bh,defineMultiStyleConfig:Zae}=ar(Eoe.keys),s5=jn("card-bg"),wg=jn("card-padding"),Qae=Bh({container:{[s5.variable]:"chakra-body-bg",backgroundColor:s5.reference,color:"chakra-body-text"},body:{padding:wg.reference,flex:"1 1 0%"},header:{padding:wg.reference},footer:{padding:wg.reference}}),Jae={sm:Bh({container:{borderRadius:"base",[wg.variable]:"space.3"}}),md:Bh({container:{borderRadius:"md",[wg.variable]:"space.5"}}),lg:Bh({container:{borderRadius:"xl",[wg.variable]:"space.7"}})},ese={elevated:Bh({container:{boxShadow:"base",_dark:{[s5.variable]:"colors.gray.700"}}}),outline:Bh({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Bh({container:{[s5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},tse=Zae({baseStyle:Qae,variants:ese,sizes:Jae,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:s4,defineMultiStyleConfig:nse}=ar(aoe.keys),Uv=jn("checkbox-size"),rse=e=>{const{colorScheme:t}=e;return{w:Uv.reference,h:Uv.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Tt(`${t}.500`,`${t}.200`)(e),borderColor:Tt(`${t}.500`,`${t}.200`)(e),color:Tt("white","gray.900")(e),_hover:{bg:Tt(`${t}.600`,`${t}.300`)(e),borderColor:Tt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Tt("gray.200","transparent")(e),bg:Tt("gray.200","whiteAlpha.300")(e),color:Tt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Tt(`${t}.500`,`${t}.200`)(e),borderColor:Tt(`${t}.500`,`${t}.200`)(e),color:Tt("white","gray.900")(e)},_disabled:{bg:Tt("gray.100","whiteAlpha.100")(e),borderColor:Tt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Tt("red.500","red.300")(e)}}},ise={_disabled:{cursor:"not-allowed"}},ose={userSelect:"none",_disabled:{opacity:.4}},ase={transitionProperty:"transform",transitionDuration:"normal"},sse=s4(e=>({icon:ase,container:ise,control:ko(rse,e),label:ose})),lse={sm:s4({control:{[Uv.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:s4({control:{[Uv.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:s4({control:{[Uv.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},l5=nse({baseStyle:sse,sizes:lse,defaultProps:{size:"md",colorScheme:"blue"}}),Wv=yi("close-button-size"),qm=yi("close-button-bg"),use={w:[Wv.reference],h:[Wv.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[qm.variable]:"colors.blackAlpha.100",_dark:{[qm.variable]:"colors.whiteAlpha.100"}},_active:{[qm.variable]:"colors.blackAlpha.200",_dark:{[qm.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:qm.reference},cse={lg:{[Wv.variable]:"sizes.10",fontSize:"md"},md:{[Wv.variable]:"sizes.8",fontSize:"xs"},sm:{[Wv.variable]:"sizes.6",fontSize:"2xs"}},dse={baseStyle:use,sizes:cse,defaultProps:{size:"md"}},{variants:fse,defaultProps:hse}=Vv,pse={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},gse={baseStyle:pse,variants:fse,defaultProps:hse},mse={w:"100%",mx:"auto",maxW:"prose",px:"4"},vse={baseStyle:mse},yse={opacity:.6,borderColor:"inherit"},bse={borderStyle:"solid"},Sse={borderStyle:"dashed"},xse={solid:bse,dashed:Sse},wse={baseStyle:yse,variants:xse,defaultProps:{variant:"solid"}},{definePartsStyle:K7,defineMultiStyleConfig:Cse}=ar(soe.keys),p6=jn("drawer-bg"),g6=jn("drawer-box-shadow");function w0(e){return K7(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var _se={bg:"blackAlpha.600",zIndex:"overlay"},kse={display:"flex",zIndex:"modal",justifyContent:"center"},Ese=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[p6.variable]:"colors.white",[g6.variable]:"shadows.lg",_dark:{[p6.variable]:"colors.gray.700",[g6.variable]:"shadows.dark-lg"},bg:p6.reference,boxShadow:g6.reference}},Pse={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tse={position:"absolute",top:"2",insetEnd:"3"},Lse={px:"6",py:"2",flex:"1",overflow:"auto"},Ase={px:"6",py:"4"},Ose=K7(e=>({overlay:_se,dialogContainer:kse,dialog:ko(Ese,e),header:Pse,closeButton:Tse,body:Lse,footer:Ase})),Mse={xs:w0("xs"),sm:w0("md"),md:w0("lg"),lg:w0("2xl"),xl:w0("4xl"),full:w0("full")},Rse=Cse({baseStyle:Ose,sizes:Mse,defaultProps:{size:"xs"}}),{definePartsStyle:Ise,defineMultiStyleConfig:Dse}=ar(loe.keys),Nse={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Bse={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},$se={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fse=Ise({preview:Nse,input:Bse,textarea:$se}),zse=Dse({baseStyle:Fse}),{definePartsStyle:jse,defineMultiStyleConfig:Hse}=ar(uoe.keys),Cg=jn("form-control-color"),Vse={marginStart:"1",[Cg.variable]:"colors.red.500",_dark:{[Cg.variable]:"colors.red.300"},color:Cg.reference},Use={mt:"2",[Cg.variable]:"colors.gray.600",_dark:{[Cg.variable]:"colors.whiteAlpha.600"},color:Cg.reference,lineHeight:"normal",fontSize:"sm"},Wse=jse({container:{width:"100%",position:"relative"},requiredIndicator:Vse,helperText:Use}),Gse=Hse({baseStyle:Wse}),{definePartsStyle:qse,defineMultiStyleConfig:Yse}=ar(coe.keys),_g=jn("form-error-color"),Kse={[_g.variable]:"colors.red.500",_dark:{[_g.variable]:"colors.red.300"},color:_g.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Xse={marginEnd:"0.5em",[_g.variable]:"colors.red.500",_dark:{[_g.variable]:"colors.red.300"},color:_g.reference},Zse=qse({text:Kse,icon:Xse}),Qse=Yse({baseStyle:Zse}),Jse={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},ele={baseStyle:Jse},tle={fontFamily:"heading",fontWeight:"bold"},nle={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},rle={baseStyle:tle,sizes:nle,defaultProps:{size:"xl"}},{definePartsStyle:Xu,defineMultiStyleConfig:ile}=ar(doe.keys),ole=Xu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),dd={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},ale={lg:Xu({field:dd.lg,addon:dd.lg}),md:Xu({field:dd.md,addon:dd.md}),sm:Xu({field:dd.sm,addon:dd.sm}),xs:Xu({field:dd.xs,addon:dd.xs})};function ak(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Tt("blue.500","blue.300")(e),errorBorderColor:n||Tt("red.500","red.300")(e)}}var sle=Xu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ak(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Tt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r),boxShadow:`0 0 0 1px ${wo(t,r)}`},_focusVisible:{zIndex:1,borderColor:wo(t,n),boxShadow:`0 0 0 1px ${wo(t,n)}`}},addon:{border:"1px solid",borderColor:Tt("inherit","whiteAlpha.50")(e),bg:Tt("gray.100","whiteAlpha.300")(e)}}}),lle=Xu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ak(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Tt("gray.100","whiteAlpha.50")(e),_hover:{bg:Tt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r)},_focusVisible:{bg:"transparent",borderColor:wo(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Tt("gray.100","whiteAlpha.50")(e)}}}),ule=Xu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ak(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wo(t,r),boxShadow:`0px 1px 0px 0px ${wo(t,r)}`},_focusVisible:{borderColor:wo(t,n),boxShadow:`0px 1px 0px 0px ${wo(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cle=Xu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dle={outline:sle,filled:lle,flushed:ule,unstyled:cle},Cn=ile({baseStyle:ole,sizes:ale,variants:dle,defaultProps:{size:"md",variant:"outline"}}),m6=jn("kbd-bg"),fle={[m6.variable]:"colors.gray.100",_dark:{[m6.variable]:"colors.whiteAlpha.100"},bg:m6.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hle={baseStyle:fle},ple={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gle={baseStyle:ple},{defineMultiStyleConfig:mle,definePartsStyle:vle}=ar(foe.keys),yle={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},ble=vle({icon:yle}),Sle=mle({baseStyle:ble}),{defineMultiStyleConfig:xle,definePartsStyle:wle}=ar(hoe.keys),zl=jn("menu-bg"),v6=jn("menu-shadow"),Cle={[zl.variable]:"#fff",[v6.variable]:"shadows.sm",_dark:{[zl.variable]:"colors.gray.700",[v6.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:zl.reference,boxShadow:v6.reference},_le={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[zl.variable]:"colors.gray.100",_dark:{[zl.variable]:"colors.whiteAlpha.100"}},_active:{[zl.variable]:"colors.gray.200",_dark:{[zl.variable]:"colors.whiteAlpha.200"}},_expanded:{[zl.variable]:"colors.gray.100",_dark:{[zl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:zl.reference},kle={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ele={opacity:.6},Ple={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tle={transitionProperty:"common",transitionDuration:"normal"},Lle=wle({button:Tle,list:Cle,item:_le,groupTitle:kle,command:Ele,divider:Ple}),Ale=xle({baseStyle:Lle}),{defineMultiStyleConfig:Ole,definePartsStyle:X7}=ar(poe.keys),Mle={bg:"blackAlpha.600",zIndex:"modal"},Rle=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ile=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Tt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Tt("lg","dark-lg")(e)}},Dle={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Nle={position:"absolute",top:"2",insetEnd:"3"},Ble=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},$le={px:"6",py:"4"},Fle=X7(e=>({overlay:Mle,dialogContainer:ko(Rle,e),dialog:ko(Ile,e),header:Dle,closeButton:Nle,body:ko(Ble,e),footer:$le}));function Ds(e){return X7(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var zle={xs:Ds("xs"),sm:Ds("sm"),md:Ds("md"),lg:Ds("lg"),xl:Ds("xl"),"2xl":Ds("2xl"),"3xl":Ds("3xl"),"4xl":Ds("4xl"),"5xl":Ds("5xl"),"6xl":Ds("6xl"),full:Ds("full")},jle=Ole({baseStyle:Fle,sizes:zle,defaultProps:{size:"md"}}),Hle={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},KF=Hle,{defineMultiStyleConfig:Vle,definePartsStyle:XF}=ar(goe.keys),sk=yi("number-input-stepper-width"),ZF=yi("number-input-input-padding"),Ule=qu(sk).add("0.5rem").toString(),y6=yi("number-input-bg"),b6=yi("number-input-color"),S6=yi("number-input-border-color"),Wle={[sk.variable]:"sizes.6",[ZF.variable]:Ule},Gle=e=>{var n;var t;return(n=(t=ko(Cn.baseStyle,e))==null?void 0:t.field)!=null?n:{}},qle={width:sk.reference},Yle={borderStart:"1px solid",borderStartColor:S6.reference,color:b6.reference,bg:y6.reference,[b6.variable]:"colors.chakra-body-text",[S6.variable]:"colors.chakra-border-color",_dark:{[b6.variable]:"colors.whiteAlpha.800",[S6.variable]:"colors.whiteAlpha.300"},_active:{[y6.variable]:"colors.gray.200",_dark:{[y6.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Kle=XF(e=>{var t;return{root:Wle,field:(t=ko(Gle,e))!=null?t:{},stepperGroup:qle,stepper:Yle}});function Z3(e){var s;var t,n;const r=(t=Cn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=(s=(n=r.field)==null?void 0:n.fontSize)!=null?s:"md",a=KF.fontSizes[o];return XF({field:{...r.field,paddingInlineEnd:ZF.reference,verticalAlign:"top"},stepper:{fontSize:qu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Xle={xs:Z3("xs"),sm:Z3("sm"),md:Z3("md"),lg:Z3("lg")},Zle=Vle({baseStyle:Kle,sizes:Xle,variants:Cn.variants,defaultProps:Cn.defaultProps}),NA,Qle={...(NA=Cn.baseStyle)==null?void 0:NA.field,textAlign:"center"},Jle={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},BA,jN,eue={outline:e=>{var r;var t,n;return(r=(n=ko((t=Cn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var r;var t,n;return(r=(n=ko((t=Cn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var r;var t,n;return(r=(n=ko((t=Cn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(jN=(BA=Cn.variants)==null?void 0:BA.unstyled.field)!=null?jN:{}},tue={baseStyle:Qle,sizes:Jle,variants:eue,defaultProps:Cn.defaultProps},{defineMultiStyleConfig:nue,definePartsStyle:rue}=ar(moe.keys),Q3=yi("popper-bg"),iue=yi("popper-arrow-bg"),$A=yi("popper-arrow-shadow-color"),oue={zIndex:10},aue={[Q3.variable]:"colors.white",bg:Q3.reference,[iue.variable]:Q3.reference,[$A.variable]:"colors.gray.200",_dark:{[Q3.variable]:"colors.gray.700",[$A.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sue={px:3,py:2,borderBottomWidth:"1px"},lue={px:3,py:2},uue={px:3,py:2,borderTopWidth:"1px"},cue={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},due=rue({popper:oue,content:aue,header:sue,body:lue,footer:uue,closeButton:cue}),fue=nue({baseStyle:due}),{defineMultiStyleConfig:hue,definePartsStyle:bv}=ar(voe.keys),pue=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Tt(AA(),AA("1rem","rgba(0,0,0,0.1)"))(e),a=Tt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
to right,
transparent 0%,
${wo(n,a)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},gue={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mue=e=>({bg:Tt("gray.100","whiteAlpha.300")(e)}),vue=e=>({transitionProperty:"common",transitionDuration:"slow",...pue(e)}),yue=bv(e=>({label:gue,filledTrack:vue(e),track:mue(e)})),bue={xs:bv({track:{h:"1"}}),sm:bv({track:{h:"2"}}),md:bv({track:{h:"3"}}),lg:bv({track:{h:"4"}})},Sue=hue({sizes:bue,baseStyle:yue,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xue,definePartsStyle:l4}=ar(yoe.keys),wue=e=>{var t;const n=(t=ko(l5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Cue=l4(e=>{var t,n,r,i;return{label:(n=(t=l5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=l5).baseStyle)==null?void 0:i.call(r,e).container,control:wue(e)}}),_ue={md:l4({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:l4({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:l4({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},kue=xue({baseStyle:Cue,sizes:_ue,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Eue,definePartsStyle:Pue}=ar(boe.keys),J3=jn("select-bg"),FA,Tue={...(FA=Cn.baseStyle)==null?void 0:FA.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:J3.reference,[J3.variable]:"colors.white",_dark:{[J3.variable]:"colors.gray.700"},"> option, > optgroup":{bg:J3.reference}},Lue={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Aue=Pue({field:Tue,icon:Lue}),eb={paddingInlineEnd:"8"},zA,jA,HA,VA,UA,WA,GA,qA,Oue={lg:{...(zA=Cn.sizes)==null?void 0:zA.lg,field:{...(jA=Cn.sizes)==null?void 0:jA.lg.field,...eb}},md:{...(HA=Cn.sizes)==null?void 0:HA.md,field:{...(VA=Cn.sizes)==null?void 0:VA.md.field,...eb}},sm:{...(UA=Cn.sizes)==null?void 0:UA.sm,field:{...(WA=Cn.sizes)==null?void 0:WA.sm.field,...eb}},xs:{...(GA=Cn.sizes)==null?void 0:GA.xs,field:{...(qA=Cn.sizes)==null?void 0:qA.xs.field,...eb},icon:{insetEnd:"1"}}},Mue=Eue({baseStyle:Aue,sizes:Oue,variants:Cn.variants,defaultProps:Cn.defaultProps}),x6=jn("skeleton-start-color"),w6=jn("skeleton-end-color"),Rue={[x6.variable]:"colors.gray.100",[w6.variable]:"colors.gray.400",_dark:{[x6.variable]:"colors.gray.800",[w6.variable]:"colors.gray.600"},background:x6.reference,borderColor:w6.reference,opacity:.7,borderRadius:"sm"},Iue={baseStyle:Rue},C6=jn("skip-link-bg"),Due={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[C6.variable]:"colors.white",_dark:{[C6.variable]:"colors.gray.700"},bg:C6.reference}},Nue={baseStyle:Due},{defineMultiStyleConfig:Bue,definePartsStyle:jS}=ar(Soe.keys),R2=jn("slider-thumb-size"),I2=jn("slider-track-size"),Cd=jn("slider-bg"),$ue=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...ik({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Fue=e=>({...ik({orientation:e.orientation,horizontal:{h:I2.reference},vertical:{w:I2.reference}}),overflow:"hidden",borderRadius:"sm",[Cd.variable]:"colors.gray.200",_dark:{[Cd.variable]:"colors.whiteAlpha.200"},_disabled:{[Cd.variable]:"colors.gray.300",_dark:{[Cd.variable]:"colors.whiteAlpha.300"}},bg:Cd.reference}),zue=e=>{const{orientation:t}=e;return{...ik({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:R2.reference,h:R2.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},jue=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Cd.variable]:`colors.${t}.500`,_dark:{[Cd.variable]:`colors.${t}.200`},bg:Cd.reference}},Hue=jS(e=>({container:$ue(e),track:Fue(e),thumb:zue(e),filledTrack:jue(e)})),Vue=jS({container:{[R2.variable]:"sizes.4",[I2.variable]:"sizes.1"}}),Uue=jS({container:{[R2.variable]:"sizes.3.5",[I2.variable]:"sizes.1"}}),Wue=jS({container:{[R2.variable]:"sizes.2.5",[I2.variable]:"sizes.0.5"}}),Gue={lg:Vue,md:Uue,sm:Wue},que=Bue({baseStyle:Hue,sizes:Gue,defaultProps:{size:"md",colorScheme:"blue"}}),_h=yi("spinner-size"),Yue={width:[_h.reference],height:[_h.reference]},Kue={xs:{[_h.variable]:"sizes.3"},sm:{[_h.variable]:"sizes.4"},md:{[_h.variable]:"sizes.6"},lg:{[_h.variable]:"sizes.8"},xl:{[_h.variable]:"sizes.12"}},Xue={baseStyle:Yue,sizes:Kue,defaultProps:{size:"md"}},{defineMultiStyleConfig:Zue,definePartsStyle:QF}=ar(xoe.keys),Que={fontWeight:"medium"},Jue={opacity:.8,marginBottom:"2"},ece={verticalAlign:"baseline",fontWeight:"semibold"},tce={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},nce=QF({container:{},label:Que,helpText:Jue,number:ece,icon:tce}),rce={md:QF({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ice=Zue({baseStyle:nce,sizes:rce,defaultProps:{size:"md"}}),{defineMultiStyleConfig:oce,definePartsStyle:u4}=ar(woe.keys),Gv=yi("switch-track-width"),$h=yi("switch-track-height"),_6=yi("switch-track-diff"),ace=qu.subtract(Gv,$h),Z7=yi("switch-thumb-x"),Ym=yi("switch-bg"),sce=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Gv.reference],height:[$h.reference],transitionProperty:"common",transitionDuration:"fast",[Ym.variable]:"colors.gray.300",_dark:{[Ym.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ym.variable]:`colors.${t}.500`,_dark:{[Ym.variable]:`colors.${t}.200`}},bg:Ym.reference}},lce={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$h.reference],height:[$h.reference],_checked:{transform:`translateX(${Z7.reference})`}},uce=u4(e=>({container:{[_6.variable]:ace,[Z7.variable]:_6.reference,_rtl:{[Z7.variable]:qu(_6).negate().toString()}},track:sce(e),thumb:lce})),cce={sm:u4({container:{[Gv.variable]:"1.375rem",[$h.variable]:"sizes.3"}}),md:u4({container:{[Gv.variable]:"1.875rem",[$h.variable]:"sizes.4"}}),lg:u4({container:{[Gv.variable]:"2.875rem",[$h.variable]:"sizes.6"}})},dce=oce({baseStyle:uce,sizes:cce,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:fce,definePartsStyle:kg}=ar(Coe.keys),hce=kg({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),u5={"&[data-is-numeric=true]":{textAlign:"end"}},pce=kg(e=>{const{colorScheme:t}=e;return{th:{color:Tt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Tt(`${t}.100`,`${t}.700`)(e),...u5},td:{borderBottom:"1px",borderColor:Tt(`${t}.100`,`${t}.700`)(e),...u5},caption:{color:Tt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),gce=kg(e=>{const{colorScheme:t}=e;return{th:{color:Tt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Tt(`${t}.100`,`${t}.700`)(e),...u5},td:{borderBottom:"1px",borderColor:Tt(`${t}.100`,`${t}.700`)(e),...u5},caption:{color:Tt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Tt(`${t}.100`,`${t}.700`)(e)},td:{background:Tt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),mce={simple:pce,striped:gce,unstyled:{}},vce={sm:kg({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:kg({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:kg({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},yce=fce({baseStyle:hce,variants:mce,sizes:vce,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Ko=jn("tabs-color"),Vs=jn("tabs-bg"),tb=jn("tabs-border-color"),{defineMultiStyleConfig:bce,definePartsStyle:eu}=ar(_oe.keys),Sce=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},xce=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},wce=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Cce={p:4},_ce=eu(e=>({root:Sce(e),tab:xce(e),tablist:wce(e),tabpanel:Cce})),kce={sm:eu({tab:{py:1,px:4,fontSize:"sm"}}),md:eu({tab:{fontSize:"md",py:2,px:4}}),lg:eu({tab:{fontSize:"lg",py:3,px:4}})},Ece=eu(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Ko.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Vs.variable]:"colors.gray.200",_dark:{[Vs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Ko.reference,bg:Vs.reference}}}),Pce=eu(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[tb.reference]:"transparent",_selected:{[Ko.variable]:`colors.${t}.600`,[tb.variable]:"colors.white",_dark:{[Ko.variable]:`colors.${t}.300`,[tb.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:tb.reference},color:Ko.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Tce=eu(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Vs.variable]:"colors.gray.50",_dark:{[Vs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Vs.variable]:"colors.white",[Ko.variable]:`colors.${t}.600`,_dark:{[Vs.variable]:"colors.gray.800",[Ko.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Ko.reference,bg:Vs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Lce=eu(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:wo(n,`${t}.700`),bg:wo(n,`${t}.100`)}}}}),Ace=eu(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Ko.variable]:"colors.gray.600",_dark:{[Ko.variable]:"inherit"},_selected:{[Ko.variable]:"colors.white",[Vs.variable]:`colors.${t}.600`,_dark:{[Ko.variable]:"colors.gray.800",[Vs.variable]:`colors.${t}.300`}},color:Ko.reference,bg:Vs.reference}}}),Oce=eu({}),Mce={line:Ece,enclosed:Pce,"enclosed-colored":Tce,"soft-rounded":Lce,"solid-rounded":Ace,unstyled:Oce},Rce=bce({baseStyle:_ce,sizes:kce,variants:Mce,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Ice,definePartsStyle:Fh}=ar(koe.keys),Dce={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Nce={lineHeight:1.2,overflow:"visible"},Bce={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},$ce=Fh({container:Dce,label:Nce,closeButton:Bce}),Fce={sm:Fh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Fh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Fh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},zce={subtle:Fh(e=>{var t;return{container:(t=Vv.variants)==null?void 0:t.subtle(e)}}),solid:Fh(e=>{var t;return{container:(t=Vv.variants)==null?void 0:t.solid(e)}}),outline:Fh(e=>{var t;return{container:(t=Vv.variants)==null?void 0:t.outline(e)}})},jce=Ice({variants:zce,baseStyle:$ce,sizes:Fce,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),YA,Hce={...(YA=Cn.baseStyle)==null?void 0:YA.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},KA,HN,Vce={outline:e=>{var n;var t;return(n=(t=Cn.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var n;var t;return(n=(t=Cn.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var n;var t;return(n=(t=Cn.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(HN=(KA=Cn.variants)==null?void 0:KA.unstyled.field)!=null?HN:{}},XA,ZA,QA,JA,VN,UN,WN,GN,Uce={xs:(VN=(XA=Cn.sizes)==null?void 0:XA.xs.field)!=null?VN:{},sm:(UN=(ZA=Cn.sizes)==null?void 0:ZA.sm.field)!=null?UN:{},md:(WN=(QA=Cn.sizes)==null?void 0:QA.md.field)!=null?WN:{},lg:(GN=(JA=Cn.sizes)==null?void 0:JA.lg.field)!=null?GN:{}},Wce={baseStyle:Hce,sizes:Uce,variants:Vce,defaultProps:{size:"md",variant:"outline"}},nb=yi("tooltip-bg"),k6=yi("tooltip-fg"),Gce=yi("popper-arrow-bg"),qce={bg:nb.reference,color:k6.reference,[nb.variable]:"colors.gray.700",[k6.variable]:"colors.whiteAlpha.900",_dark:{[nb.variable]:"colors.gray.300",[k6.variable]:"colors.gray.900"},[Gce.variable]:nb.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Yce={baseStyle:qce},Kce={Accordion:fae,Alert:Sae,Avatar:Oae,Badge:Vv,Breadcrumb:jae,Button:Xae,Checkbox:l5,CloseButton:dse,Code:gse,Container:vse,Divider:wse,Drawer:Rse,Editable:zse,Form:Gse,FormError:Qse,FormLabel:ele,Heading:rle,Input:Cn,Kbd:hle,Link:gle,List:Sle,Menu:Ale,Modal:jle,NumberInput:Zle,PinInput:tue,Popover:fue,Progress:Sue,Radio:kue,Select:Mue,Skeleton:Iue,SkipLink:Nue,Slider:que,Spinner:Xue,Stat:ice,Switch:dce,Table:yce,Tabs:Rce,Tag:jce,Textarea:Wce,Tooltip:Yce,Card:tse},Xce={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Zce=Xce,Qce={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Jce=Qce,ede={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},tde=ede,nde={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},rde=nde,ide={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},ode=ide,ade={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},sde={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},lde={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},ude={property:ade,easing:sde,duration:lde},cde=ude,dde={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},fde=dde,hde={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pde=hde,gde={breakpoints:Jce,zIndices:fde,radii:rde,blur:pde,colors:tde,...KF,sizes:GF,shadows:ode,space:WF,borders:Zce,transition:cde},mde={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},vde={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},yde="ltr",bde={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Sde={semanticTokens:mde,direction:yde,...gde,components:Kce,styles:vde,config:bde},xde=typeof Element<"u",wde=typeof Map=="function",Cde=typeof Set=="function",_de=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function c4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!c4(e[r],t[r]))return!1;return!0}var o;if(wde&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!c4(r.value[1],t.get(r.value[0])))return!1;return!0}if(Cde&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(_de&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(xde&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!c4(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var kde=function(t,n){try{return c4(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function h1(){const e=C.exports.useContext(O2);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function JF(){const e=uy(),t=h1();return{...e,theme:t}}function Ede(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function Pde(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function Tde(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{var p,m;if(e==="breakpoints")return Ede(o,l,(p=a[u])!=null?p:l);const f=`${e}.${l}`;return Pde(o,f,(m=a[u])!=null?m:l)});return Array.isArray(t)?s:s[0]}}function Lde(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>Cre(n),[n]);return K(Mie,{theme:i,children:[y(Ade,{root:t}),r]})}function Ade({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return y($S,{styles:n=>({[t]:n.__cssVars})})}Yie({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function Ode(){const{colorMode:e}=uy();return y($S,{styles:t=>{const n=IF(t,"styles.global"),r=BF(n,{theme:t,colorMode:e});return r?dF(r)(t):void 0}})}var Mde=new Set([...Ere,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Rde=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Ide(e){return Rde.has(e)||!Mde.has(e)}var Dde=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=DF(a,(p,m)=>Tre(m)),l=BF(e,t),u=Object.assign({},i,l,NF(s),o),f=dF(u)(t.theme);return r?[f,r]:f};function E6(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=Ide);const i=Dde({baseStyle:n}),o=G7(e,r)(i);return oe.forwardRef(function(l,u){const{colorMode:f,forced:p}=uy();return oe.createElement(o,{ref:u,"data-theme":p?f:void 0,...l})})}function Oe(e){return C.exports.forwardRef(e)}function ez(e,t={}){var f;const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=JF(),a=e?IF(i,`components.${e}`):void 0,s=n||a,l=ql({theme:i,colorMode:o},(f=s==null?void 0:s.defaultProps)!=null?f:{},NF(Hie(r,["children"]))),u=C.exports.useRef({});if(s){const m=$re(s)(l);kde(u.current,m)||(u.current=m)}return u.current}function Lo(e,t={}){return ez(e,t)}function qi(e,t={}){return ez(e,t)}function Nde(){const e=new Map;return new Proxy(E6,{apply(t,n,r){return E6(...r)},get(t,n){return e.has(n)||e.set(n,E6(n)),e.get(n)}})}var _e=Nde();function Bde(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function An(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const f=new Error(o!=null?o:Bde(r,i));throw f.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,f,s),f}return u}return[a.Provider,s,a]}function $de(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Gn(...e){return t=>{e.forEach(n=>{$de(n,t)})}}function Fde(...e){return C.exports.useMemo(()=>Gn(...e),e)}function eO(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var zde=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function tO(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function nO(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Q7=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,c5=e=>e,jde=class{constructor(){sn(this,"descendants",new Map);sn(this,"register",e=>{if(e!=null)return zde(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});sn(this,"unregister",e=>{this.descendants.delete(e);const t=eO(Array.from(this.descendants.keys()));this.assignIndex(t)});sn(this,"destroy",()=>{this.descendants.clear()});sn(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});sn(this,"count",()=>this.descendants.size);sn(this,"enabledCount",()=>this.enabledValues().length);sn(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));sn(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));sn(this,"item",e=>{if(this.count()!==0)return this.values()[e]});sn(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});sn(this,"first",()=>this.item(0));sn(this,"firstEnabled",()=>this.enabledItem(0));sn(this,"last",()=>this.item(this.descendants.size-1));sn(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});sn(this,"indexOf",e=>{var n;var t;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1});sn(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));sn(this,"next",(e,t=!0)=>{const n=tO(e,this.count(),t);return this.item(n)});sn(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=tO(r,this.enabledCount(),t);return this.enabledItem(i)});sn(this,"prev",(e,t=!0)=>{const n=nO(e,this.count()-1,t);return this.item(n)});sn(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=nO(r,this.enabledCount()-1,t);return this.enabledItem(i)});sn(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=eO(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function Hde(){const e=C.exports.useRef(new jde);return Q7(()=>()=>e.current.destroy()),e.current}var[Vde,tz]=An({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Ude(e){const t=tz(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);Q7(()=>()=>{!i.current||t.unregister(i.current)},[]),Q7(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=c5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Gn(o,i)}}function nz(){return[c5(Vde),()=>c5(tz()),()=>Hde(),i=>Ude(i)]}var Yr=(...e)=>e.filter(Boolean).join(" "),rO={path:K("g",{stroke:"currentColor",strokeWidth:"1.5",children:[y("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),y("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),y("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},$a=Oe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,f=Yr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:f,__css:p},v=r!=null?r:rO.viewBox;if(n&&typeof n!="string")return oe.createElement(_e.svg,{as:n,...m,...u});const b=a!=null?a:rO.path;return oe.createElement(_e.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});$a.displayName="Icon";function bt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Oe((s,l)=>y($a,{ref:l,viewBox:t,...i,...s,children:o.length?o:y("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function br(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function HS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=br(r),a=br(i),[s,l]=C.exports.useState(n),u=t!==void 0,f=u?t:s,p=br(m=>{const b=typeof m=="function"?m(f):m;!a(f,b)||(u||l(b),o(b))},[u,o,f,a]);return[f,p]}const lk=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),VS=C.exports.createContext({});function Wde(){return C.exports.useContext(VS).visualElement}const p1=C.exports.createContext(null),sp=typeof document<"u",d5=sp?C.exports.useLayoutEffect:C.exports.useEffect,rz=C.exports.createContext({strict:!1});function Gde(e,t,n,r){const i=Wde(),o=C.exports.useContext(rz),a=C.exports.useContext(p1),s=C.exports.useContext(lk).reducedMotion,l=C.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return d5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),d5(()=>()=>u&&u.notify("Unmount"),[]),u}function J0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qde(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):J0(n)&&(n.current=r))},[t])}function D2(e){return typeof e=="string"||Array.isArray(e)}function US(e){return typeof e=="object"&&typeof e.start=="function"}const Yde=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function WS(e){return US(e.animate)||Yde.some(t=>D2(e[t]))}function iz(e){return Boolean(WS(e)||e.variants)}function Kde(e,t){if(WS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||D2(n)?n:void 0,animate:D2(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xde(e){const{initial:t,animate:n}=Kde(e,C.exports.useContext(VS));return C.exports.useMemo(()=>({initial:t,animate:n}),[iO(t),iO(n)])}function iO(e){return Array.isArray(e)?e.join(" "):e}const Hu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),N2={measureLayout:Hu(["layout","layoutId","drag"]),animation:Hu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Hu(["exit"]),drag:Hu(["drag","dragControls"]),focus:Hu(["whileFocus"]),hover:Hu(["whileHover","onHoverStart","onHoverEnd"]),tap:Hu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Hu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Hu(["whileInView","onViewportEnter","onViewportLeave"])};function Zde(e){for(const t in e)t==="projectionNodeConstructor"?N2.projectionNodeConstructor=e[t]:N2[t].Component=e[t]}function GS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const qv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qde=1;function Jde(){return GS(()=>{if(qv.hasEverUpdated)return Qde++})}const uk=C.exports.createContext({});class efe extends oe.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const oz=C.exports.createContext({}),tfe=Symbol.for("motionComponentSymbol");function nfe({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Zde(e);function a(l,u){const f={...C.exports.useContext(lk),...l,layoutId:rfe(l)},{isStatic:p}=f;let m=null;const v=Xde(l),b=p?void 0:Jde(),x=i(l,p);if(!p&&sp){v.visualElement=Gde(o,x,f,t);const E=C.exports.useContext(rz).strict,k=C.exports.useContext(oz);v.visualElement&&(m=v.visualElement.loadFeatures(f,E,e,b,n||N2.projectionNodeConstructor,k))}return K(efe,{visualElement:v.visualElement,props:f,children:[m,y(VS.Provider,{value:v,children:r(o,l,b,qde(x,v.visualElement,u),x,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[tfe]=o,s}function rfe({layoutId:e}){const t=C.exports.useContext(uk).id;return t&&e!==void 0?t+"-"+e:e}function ife(e){function t(r,i={}){return nfe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const ofe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ck(e){return typeof e!="string"||e.includes("-")?!1:!!(ofe.indexOf(e)>-1||/[A-Z]/.test(e))}const f5={};function afe(e){Object.assign(f5,e)}const h5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],g1=new Set(h5);function az(e,{layout:t,layoutId:n}){return g1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!f5[e]||e==="opacity")}const lu=e=>!!(e!=null&&e.getVelocity),sfe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lfe=(e,t)=>h5.indexOf(e)-h5.indexOf(t);function ufe({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(lfe);for(const s of t)a+=`${sfe[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function sz(e){return e.startsWith("--")}const cfe=(e,t)=>t&&typeof e=="number"?t.transform(e):e,lz=(e,t)=>n=>Math.max(Math.min(n,t),e),Yv=e=>e%1?Number(e.toFixed(5)):e,B2=/(-)?([\d]*\.?[\d])+/g,J7=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dfe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function hy(e){return typeof e=="string"}const lp={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kv=Object.assign(Object.assign({},lp),{transform:lz(0,1)}),rb=Object.assign(Object.assign({},lp),{default:1}),py=e=>({test:t=>hy(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pd=py("deg"),tu=py("%"),Ot=py("px"),ffe=py("vh"),hfe=py("vw"),oO=Object.assign(Object.assign({},tu),{parse:e=>tu.parse(e)/100,transform:e=>tu.transform(e*100)}),dk=(e,t)=>n=>Boolean(hy(n)&&dfe.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),uz=(e,t,n)=>r=>{if(!hy(r))return r;const[i,o,a,s]=r.match(B2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Oh={test:dk("hsl","hue"),parse:uz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+tu.transform(Yv(t))+", "+tu.transform(Yv(n))+", "+Yv(Kv.transform(r))+")"},pfe=lz(0,255),P6=Object.assign(Object.assign({},lp),{transform:e=>Math.round(pfe(e))}),Ld={test:dk("rgb","red"),parse:uz("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+P6.transform(e)+", "+P6.transform(t)+", "+P6.transform(n)+", "+Yv(Kv.transform(r))+")"};function gfe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const e9={test:dk("#"),parse:gfe,transform:Ld.transform},bo={test:e=>Ld.test(e)||e9.test(e)||Oh.test(e),parse:e=>Ld.test(e)?Ld.parse(e):Oh.test(e)?Oh.parse(e):e9.parse(e),transform:e=>hy(e)?e:e.hasOwnProperty("red")?Ld.transform(e):Oh.transform(e)},cz="${c}",dz="${n}";function mfe(e){var t,n,r,i;return isNaN(e)&&hy(e)&&((n=(t=e.match(B2))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(J7))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function fz(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(J7);r&&(n=r.length,e=e.replace(J7,cz),t.push(...r.map(bo.parse)));const i=e.match(B2);return i&&(e=e.replace(B2,dz),t.push(...i.map(lp.parse))),{values:t,numColors:n,tokenised:e}}function hz(e){return fz(e).values}function pz(e){const{values:t,numColors:n,tokenised:r}=fz(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?cz:dz,s<n?bo.transform(o[s]):Yv(o[s]));return a}}const vfe=e=>typeof e=="number"?0:e;function yfe(e){const t=hz(e);return pz(e)(t.map(vfe))}const ac={test:mfe,parse:hz,createTransformer:pz,getAnimatableNone:yfe},bfe=new Set(["brightness","contrast","saturate","opacity"]);function Sfe(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(B2)||[];if(!r)return e;const i=n.replace(r,"");let o=bfe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xfe=/([a-z-]*)\(.*?\)/g,t9=Object.assign(Object.assign({},ac),{getAnimatableNone:e=>{const t=e.match(xfe);return t?t.map(Sfe).join(" "):e}}),aO={...lp,transform:Math.round},gz={borderWidth:Ot,borderTopWidth:Ot,borderRightWidth:Ot,borderBottomWidth:Ot,borderLeftWidth:Ot,borderRadius:Ot,radius:Ot,borderTopLeftRadius:Ot,borderTopRightRadius:Ot,borderBottomRightRadius:Ot,borderBottomLeftRadius:Ot,width:Ot,maxWidth:Ot,height:Ot,maxHeight:Ot,size:Ot,top:Ot,right:Ot,bottom:Ot,left:Ot,padding:Ot,paddingTop:Ot,paddingRight:Ot,paddingBottom:Ot,paddingLeft:Ot,margin:Ot,marginTop:Ot,marginRight:Ot,marginBottom:Ot,marginLeft:Ot,rotate:pd,rotateX:pd,rotateY:pd,rotateZ:pd,scale:rb,scaleX:rb,scaleY:rb,scaleZ:rb,skew:pd,skewX:pd,skewY:pd,distance:Ot,translateX:Ot,translateY:Ot,translateZ:Ot,x:Ot,y:Ot,z:Ot,perspective:Ot,transformPerspective:Ot,opacity:Kv,originX:oO,originY:oO,originZ:Ot,zIndex:aO,fillOpacity:Kv,strokeOpacity:Kv,numOctaves:aO};function fk(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,f=!1,p=!0;for(const m in t){const v=t[m];if(sz(m)){o[m]=v;continue}const b=gz[m],x=cfe(v,b);if(g1.has(m)){if(u=!0,a[m]=x,s.push(m),!p)continue;v!==(b.default||0)&&(p=!1)}else m.startsWith("origin")?(f=!0,l[m]=x):i[m]=x}if(t.transform||(u||r?i.transform=ufe(e,n,p,r):i.transform&&(i.transform="none")),f){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const hk=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function mz(e,t,n){for(const r in t)!lu(t[r])&&!az(r,n)&&(e[r]=t[r])}function wfe({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=hk();return fk(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Cfe(e,t,n){const r=e.style||{},i={};return mz(i,r,e),Object.assign(i,wfe(e,t,n)),e.transformValues?e.transformValues(i):i}function _fe(e,t,n){const r={},i=Cfe(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const kfe=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Efe=["whileTap","onTap","onTapStart","onTapCancel"],Pfe=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Tfe=["whileInView","onViewportEnter","onViewportLeave","viewport"],Lfe=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Tfe,...Efe,...kfe,...Pfe]);function p5(e){return Lfe.has(e)}let vz=e=>!p5(e);function Afe(e){!e||(vz=t=>t.startsWith("on")?!p5(t):e(t))}try{Afe(require("@emotion/is-prop-valid").default)}catch(e){}function Ofe(e,t,n){const r={};for(const i in e)(vz(i)||n===!0&&p5(i)||!t&&!p5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function sO(e,t,n){return typeof e=="string"?e:Ot.transform(t+n*e)}function Mfe(e,t,n){const r=sO(t,e.x,e.width),i=sO(n,e.y,e.height);return`${r} ${i}`}const Rfe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ife={offset:"strokeDashoffset",array:"strokeDasharray"};function Dfe(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Rfe:Ife;e[o.offset]=Ot.transform(-r);const a=Ot.transform(t),s=Ot.transform(n);e[o.array]=`${a} ${s}`}function pk(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,f){fk(e,l,u,f),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Mfe(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Dfe(p,o,a,s,!1)}const yz=()=>({...hk(),attrs:{}});function Nfe(e,t){const n=C.exports.useMemo(()=>{const r=yz();return pk(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};mz(r,e.style,e),n.style={...r,...n.style}}return n}function Bfe(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(ck(n)?Nfe:_fe)(r,a,s),p={...Ofe(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const bz=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Sz(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const xz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function wz(e,t,n,r){Sz(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(xz.has(i)?i:bz(i),t.attrs[i])}function gk(e){const{style:t}=e,n={};for(const r in t)(lu(t[r])||az(r,e))&&(n[r]=t[r]);return n}function Cz(e){const t=gk(e);for(const n in e)if(lu(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function mk(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const $2=e=>Array.isArray(e),$fe=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),_z=e=>$2(e)?e[e.length-1]||0:e;function d4(e){const t=lu(e)?e.get():e;return $fe(t)?t.toValue():t}function Ffe({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:zfe(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const kz=e=>(t,n)=>{const r=C.exports.useContext(VS),i=C.exports.useContext(p1),o=()=>Ffe(e,t,r,i);return n?o():GS(o)};function zfe(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=d4(o[m]);let{initial:a,animate:s}=e;const l=WS(e),u=iz(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const p=f?s:a;return p&&typeof p!="boolean"&&!US(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const b=mk(e,v);if(!b)return;const{transitionEnd:x,transition:E,...k}=b;for(const _ in k){let T=k[_];if(Array.isArray(T)){const A=f?T.length-1:0;T=T[A]}T!==null&&(i[_]=T)}for(const _ in x)i[_]=x[_]}),i}const jfe={useVisualState:kz({scrapeMotionValuesFromProps:Cz,createRenderState:yz,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(i){n.dimensions={x:0,y:0,width:0,height:0}}pk(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),wz(t,n)}})},Hfe={useVisualState:kz({scrapeMotionValuesFromProps:gk,createRenderState:hk})};function Vfe(e,{forwardMotionProps:t=!1},n,r,i){return{...ck(e)?jfe:Hfe,preloadedFeatures:n,useRender:Bfe(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Jn||(Jn={}));function qS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function n9(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return qS(i,t,n,r)},[e,t,n,r])}function Ufe({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Jn.Focus,!0)},i=()=>{n&&n.setActive(Jn.Focus,!1)};n9(t,"focus",e?r:void 0),n9(t,"blur",e?i:void 0)}function Ez(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Pz(e){return!!e.touches}function Wfe(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Gfe={pageX:0,pageY:0};function qfe(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Gfe;return{x:r[t+"X"],y:r[t+"Y"]}}function Yfe(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function vk(e,t="page"){return{point:Pz(e)?qfe(e,t):Yfe(e,t)}}const Tz=(e,t=!1)=>{const n=r=>e(r,vk(r));return t?Wfe(n):n},Kfe=()=>sp&&window.onpointerdown===null,Xfe=()=>sp&&window.ontouchstart===null,Zfe=()=>sp&&window.onmousedown===null,Qfe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jfe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Lz(e){return Kfe()?e:Xfe()?Jfe[e]:Zfe()?Qfe[e]:e}function Eg(e,t,n,r){return qS(e,Lz(t),Tz(n,t==="pointerdown"),r)}function g5(e,t,n,r){return n9(e,Lz(t),n&&Tz(n,t==="pointerdown"),r)}function Az(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const lO=Az("dragHorizontal"),uO=Az("dragVertical");function Oz(e){let t=!1;if(e==="y")t=uO();else if(e==="x")t=lO();else{const n=lO(),r=uO();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Mz(){const e=Oz(!0);return e?(e(),!1):!0}function cO(e,t,n){return(r,i)=>{!Ez(r)||Mz()||(e.animationState&&e.animationState.setActive(Jn.Hover,t),n&&n(r,i))}}function ehe({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){g5(r,"pointerenter",e||n?cO(r,!0,e):void 0,{passive:!e}),g5(r,"pointerleave",t||n?cO(r,!1,t):void 0,{passive:!t})}const Rz=(e,t)=>t?e===t?!0:Rz(e,t.parentElement):!1;function yk(e){return C.exports.useEffect(()=>()=>e(),[])}function Iz(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var the=function(){},m5=function(){};const v5=(e,t,n)=>Math.min(Math.max(n,e),t),T6=.001,nhe=.01,dO=10,rhe=.05,ihe=1;function ohe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;the(e<=dO*1e3);let a=1-t;a=v5(rhe,ihe,a),e=v5(nhe,dO,e/1e3),a<1?(i=u=>{const f=u*a,p=f*e,m=f-n,v=r9(u,a),b=Math.exp(-p);return T6-m/v*b},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-p),x=r9(Math.pow(u,2),a);return(-i(u)+T6>0?-1:1)*((m-v)*b)/x}):(i=u=>{const f=Math.exp(-u*e),p=(u-n)*e+1;return-T6+f*p},o=u=>{const f=Math.exp(-u*e),p=(n-u)*(e*e);return f*p});const s=5/e,l=she(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const ahe=12;function she(e,t,n){let r=n;for(let i=1;i<ahe;i++)r=r-e(r)/t(r);return r}function r9(e,t){return e*Math.sqrt(1-t*t)}const lhe=["duration","bounce"],uhe=["stiffness","damping","mass"];function fO(e,t){return t.some(n=>e[n]!==void 0)}function che(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!fO(e,uhe)&&fO(e,lhe)){const n=ohe(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function bk(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=Iz(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:f,duration:p,isResolvedFromDuration:m}=che(o),v=hO,b=hO;function x(){const E=f?-(f/1e3):0,k=n-t,_=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),_<1){const A=r9(T,_);v=R=>{const I=Math.exp(-_*T*R);return n-I*((E+_*T*k)/A*Math.sin(A*R)+k*Math.cos(A*R))},b=R=>{const I=Math.exp(-_*T*R);return _*T*I*(Math.sin(A*R)*(E+_*T*k)/A+k*Math.cos(A*R))-I*(Math.cos(A*R)*(E+_*T*k)-A*k*Math.sin(A*R))}}else if(_===1)v=A=>n-Math.exp(-T*A)*(k+(E+T*k)*A);else{const A=T*Math.sqrt(_*_-1);v=R=>{const I=Math.exp(-_*T*R),D=Math.min(A*R,300);return n-I*((E+_*T*k)*Math.sinh(D)+A*k*Math.cosh(D))/A}}}return x(),{next:E=>{const k=v(E);if(m)a.done=E>=p;else{const _=b(E)*1e3,T=Math.abs(_)<=r,A=Math.abs(n-k)<=i;a.done=T&&A}return a.value=a.done?n:k,a},flipTarget:()=>{f=-f,[t,n]=[n,t],x()}}}bk.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const hO=e=>0,F2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Dr=(e,t,n)=>-n*e+n*t+e;function L6(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 pO({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=L6(l,s,e+1/3),o=L6(l,s,e),a=L6(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const dhe=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},fhe=[e9,Ld,Oh],gO=e=>fhe.find(t=>t.test(e)),Dz=(e,t)=>{let n=gO(e),r=gO(t),i=n.parse(e),o=r.parse(t);n===Oh&&(i=pO(i),n=Ld),r===Oh&&(o=pO(o),r=Ld);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=dhe(i[l],o[l],s));return a.alpha=Dr(i.alpha,o.alpha,s),n.transform(a)}},i9=e=>typeof e=="number",hhe=(e,t)=>n=>t(e(n)),YS=(...e)=>e.reduce(hhe);function Nz(e,t){return i9(e)?n=>Dr(e,t,n):bo.test(e)?Dz(e,t):$z(e,t)}const Bz=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>Nz(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},phe=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Nz(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function mO(e){const t=ac.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const $z=(e,t)=>{const n=ac.createTransformer(t),r=mO(e),i=mO(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?YS(Bz(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},ghe=(e,t)=>n=>Dr(e,t,n);function mhe(e){if(typeof e=="number")return ghe;if(typeof e=="string")return bo.test(e)?Dz:$z;if(Array.isArray(e))return Bz;if(typeof e=="object")return phe}function vhe(e,t,n){const r=[],i=n||mhe(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=YS(l,s)}r.push(s)}return r}function yhe([e,t],[n]){return r=>n(F2(e,t,r))}function bhe(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=F2(e[o],e[o+1],i);return t[o](s)}}function Fz(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;m5(o===t.length),m5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=vhe(t,r,i),s=o===2?yhe(e,a):bhe(e,a);return n?l=>s(v5(e[0],e[o-1],l)):s}const KS=e=>t=>1-e(1-t),Sk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,She=e=>t=>Math.pow(t,e),zz=e=>t=>t*t*((e+1)*t-e),xhe=e=>{const t=zz(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},jz=1.525,whe=4/11,Che=8/11,_he=9/10,xk=e=>e,wk=She(2),khe=KS(wk),Hz=Sk(wk),Vz=e=>1-Math.sin(Math.acos(e)),Ck=KS(Vz),Ehe=Sk(Ck),_k=zz(jz),Phe=KS(_k),The=Sk(_k),Lhe=xhe(jz),Ahe=4356/361,Ohe=35442/1805,Mhe=16061/1805,y5=e=>{if(e===1||e===0)return e;const t=e*e;return e<whe?7.5625*t:e<Che?9.075*t-9.9*e+3.4:e<_he?Ahe*t-Ohe*e+Mhe:10.8*e*e-20.52*e+10.72},Rhe=KS(y5),Ihe=e=>e<.5?.5*(1-y5(1-e*2)):.5*y5(e*2-1)+.5;function Dhe(e,t){return e.map(()=>t||Hz).splice(0,e.length-1)}function Nhe(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Bhe(e,t){return e.map(n=>n*t)}function f4({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Bhe(r&&r.length===a.length?r:Nhe(a),i);function l(){return Fz(s,a,{ease:Array.isArray(n)?n:Dhe(a,n)})}let u=l();return{next:f=>(o.value=u(f),o.done=f>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function $he({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:f=>{const p=-s*Math.exp(-f/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const vO={keyframes:f4,spring:bk,decay:$he};function Fhe(e){if(Array.isArray(e.to))return f4;if(vO[e.type])return vO[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?f4:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?bk:f4}const Uz=1/60*1e3,zhe=typeof performance<"u"?()=>performance.now():()=>Date.now(),Wz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(zhe()),Uz);function jhe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,f=!1)=>{const p=f&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const f=t[u];f(l),a.has(f)&&(s.schedule(f),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Hhe=40;let o9=!0,z2=!1,a9=!1;const Pg={delta:0,timestamp:0},gy=["read","update","preRender","render","postRender"],XS=gy.reduce((e,t)=>(e[t]=jhe(()=>z2=!0),e),{}),Vhe=gy.reduce((e,t)=>{const n=XS[t];return e[t]=(r,i=!1,o=!1)=>(z2||Ghe(),n.schedule(r,i,o)),e},{}),Uhe=gy.reduce((e,t)=>(e[t]=XS[t].cancel,e),{});gy.reduce((e,t)=>(e[t]=()=>XS[t].process(Pg),e),{});const Whe=e=>XS[e].process(Pg),Gz=e=>{z2=!1,Pg.delta=o9?Uz:Math.max(Math.min(e-Pg.timestamp,Hhe),1),Pg.timestamp=e,a9=!0,gy.forEach(Whe),a9=!1,z2&&(o9=!1,Wz(Gz))},Ghe=()=>{z2=!0,o9=!0,a9||Wz(Gz)},qhe=()=>Pg;function qz(e,t,n=0){return e-t-n}function Yhe(e,t,n=0,r=!0){return r?qz(t+-e,t,n):t-(e-t)+n}function Khe(e,t,n,r){return r?e>=t+n:e<=-n}const Xhe=e=>{const t=({delta:n})=>e(n);return{start:()=>Vhe.update(t,!0),stop:()=>Uhe.update(t)}};function Yz(e){var t,n,{from:r,autoplay:i=!0,driver:o=Xhe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:f,onStop:p,onComplete:m,onRepeat:v,onUpdate:b}=e,x=Iz(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=x,k,_=0,T=x.duration,A,R=!1,I=!0,D;const B=Fhe(x);!((n=(t=B).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=Fz([0,100],[r,E],{clamp:!1}),r=0,E=100);const z=B(Object.assign(Object.assign({},x),{from:r,to:E}));function j(){_++,l==="reverse"?(I=_%2===0,a=Yhe(a,T,u,I)):(a=qz(a,T,u),l==="mirror"&&z.flipTarget()),R=!1,v&&v()}function Y(){k.stop(),m&&m()}function te($){if(I||($=-$),a+=$,!R){const V=z.next(Math.max(0,a));A=V.value,D&&(A=D(A)),R=I?V.done:a<=0}b==null||b(A),R&&(_===0&&(T!=null||(T=a)),_<s?Khe(a,T,u,I)&&j():Y())}function G(){f==null||f(),k=o(te),k.start()}return i&&G(),{stop:()=>{p==null||p(),k.stop()}}}function Kz(e,t){return t?e*(1e3/t):0}function Zhe({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:f,onUpdate:p,onComplete:m,onStop:v}){let b;function x(T){return n!==void 0&&T<n||r!==void 0&&T>r}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function k(T){b==null||b.stop(),b=Yz(Object.assign(Object.assign({},T),{driver:f,onUpdate:A=>{var R;p==null||p(A),(R=T.onUpdate)===null||R===void 0||R.call(T,A)},onComplete:m,onStop:v}))}function _(T){k(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(x(e))_({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const A=E(T),R=A===n?-1:1;let I,D;const B=z=>{I=D,D=z,t=Kz(z-I,qhe().delta),(R===1&&z>A||R===-1&&z<A)&&_({from:z,to:A,velocity:t})};k({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:x(T)?B:void 0})}return{stop:()=>b==null?void 0:b.stop()}}const s9=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),yO=e=>s9(e)&&e.hasOwnProperty("z"),ib=(e,t)=>Math.abs(e-t);function kk(e,t){if(i9(e)&&i9(t))return ib(e,t);if(s9(e)&&s9(t)){const n=ib(e.x,t.x),r=ib(e.y,t.y),i=yO(e)&&yO(t)?ib(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const Xz=(e,t)=>1-3*t+3*e,Zz=(e,t)=>3*t-6*e,Qz=e=>3*e,b5=(e,t,n)=>((Xz(t,n)*e+Zz(t,n))*e+Qz(t))*e,Jz=(e,t,n)=>3*Xz(t,n)*e*e+2*Zz(t,n)*e+Qz(t),Qhe=1e-7,Jhe=10;function epe(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=b5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Qhe&&++s<Jhe);return a}const tpe=8,npe=.001;function rpe(e,t,n,r){for(let i=0;i<tpe;++i){const o=Jz(t,n,r);if(o===0)return t;const a=b5(t,n,r)-e;t-=a/o}return t}const h4=11,ob=1/(h4-1);function ipe(e,t,n,r){if(e===t&&n===r)return xk;const i=new Float32Array(h4);for(let a=0;a<h4;++a)i[a]=b5(a*ob,e,n);function o(a){let s=0,l=1;const u=h4-1;for(;l!==u&&i[l]<=a;++l)s+=ob;--l;const f=(a-i[l])/(i[l+1]-i[l]),p=s+f*ob,m=Jz(p,e,n);return m>=npe?rpe(a,p,e,n):m===0?p:epe(a,s,s+ob,e,n)}return a=>a===0||a===1?a:b5(o(a),t,r)}function ope({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function f(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Jn.Tap,!1),!Mz()}function p(b,x){!f()||(Rz(i.current,b.target)?e&&e(b,x):n&&n(b,x))}function m(b,x){!f()||n&&n(b,x)}function v(b,x){u(),!a.current&&(a.current=!0,s.current=YS(Eg(window,"pointerup",p,l),Eg(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Jn.Tap,!0),t&&t(b,x))}g5(i,"pointerdown",o?v:void 0,l),yk(u)}const ape="production",ej=typeof process>"u"||process.env===void 0?ape:"production",bO=new Set;function tj(e,t,n){e||bO.has(t)||(console.warn(t),n&&console.warn(n),bO.add(t))}const l9=new WeakMap,A6=new WeakMap,spe=e=>{const t=l9.get(e.target);t&&t(e)},lpe=e=>{e.forEach(spe)};function upe({root:e,...t}){const n=e||document;A6.has(n)||A6.set(n,{});const r=A6.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lpe,{root:e,...t})),r[i]}function cpe(e,t,n){const r=upe(t);return l9.set(e,n),r.observe(e),()=>{l9.delete(e),r.unobserve(e)}}function dpe({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?ppe:hpe)(a,o.current,e,i)}const fpe={some:0,all:1};function hpe(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:fpe[o]},l=u=>{const{isIntersecting:f}=u;if(t.isInView===f||(t.isInView=f,a&&!f&&t.hasEnteredView))return;f&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Jn.InView,f);const p=n.getProps(),m=f?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return cpe(n.current,s,l)},[e,r,i,o])}function ppe(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(ej!=="production"&&tj(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Jn.InView,!0)}))},[e])}const Ad=e=>t=>(e(t),null),gpe={inView:Ad(dpe),tap:Ad(ope),focus:Ad(Ufe),hover:Ad(ehe)};function Ek(){const e=C.exports.useContext(p1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function mpe(){return vpe(C.exports.useContext(p1))}function vpe(e){return e===null?!0:e.isPresent}function nj(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 S5=e=>e*1e3,ype={linear:xk,easeIn:wk,easeInOut:Hz,easeOut:khe,circIn:Vz,circInOut:Ehe,circOut:Ck,backIn:_k,backInOut:The,backOut:Phe,anticipate:Lhe,bounceIn:Rhe,bounceInOut:Ihe,bounceOut:y5},SO=e=>{if(Array.isArray(e)){m5(e.length===4);const[t,n,r,i]=e;return ipe(t,n,r,i)}else if(typeof e=="string")return ype[e];return e},bpe=e=>Array.isArray(e)&&typeof e[0]!="number",xO=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ac.test(t)&&!t.startsWith("url(")),lh=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),ab=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),O6=()=>({type:"keyframes",ease:"linear",duration:.3}),Spe=e=>({type:"keyframes",duration:.8,values:e}),wO={x:lh,y:lh,z:lh,rotate:lh,rotateX:lh,rotateY:lh,rotateZ:lh,scaleX:ab,scaleY:ab,scale:ab,opacity:O6,backgroundColor:O6,color:O6,default:ab},xpe=(e,t)=>{let n;return $2(t)?n=Spe:n=wO[e]||wO.default,{to:t,...n(t)}},wpe={...gz,color:bo,backgroundColor:bo,outlineColor:bo,fill:bo,stroke:bo,borderColor:bo,borderTopColor:bo,borderRightColor:bo,borderBottomColor:bo,borderLeftColor:bo,filter:t9,WebkitFilter:t9},Pk=e=>wpe[e];function Tk(e,t){var n;let r=Pk(e);return r!==t9&&(r=ac),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Cpe={current:!1},rj=1/60*1e3,_pe=typeof performance<"u"?()=>performance.now():()=>Date.now(),ij=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(_pe()),rj);function kpe(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,f=!1)=>{const p=f&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const f=t[u];f(l),a.has(f)&&(s.schedule(f),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Epe=40;let u9=!0,j2=!1,c9=!1;const Tg={delta:0,timestamp:0},my=["read","update","preRender","render","postRender"],ZS=my.reduce((e,t)=>(e[t]=kpe(()=>j2=!0),e),{}),Xs=my.reduce((e,t)=>{const n=ZS[t];return e[t]=(r,i=!1,o=!1)=>(j2||Tpe(),n.schedule(r,i,o)),e},{}),Zh=my.reduce((e,t)=>(e[t]=ZS[t].cancel,e),{}),M6=my.reduce((e,t)=>(e[t]=()=>ZS[t].process(Tg),e),{}),Ppe=e=>ZS[e].process(Tg),oj=e=>{j2=!1,Tg.delta=u9?rj:Math.max(Math.min(e-Tg.timestamp,Epe),1),Tg.timestamp=e,c9=!0,my.forEach(Ppe),c9=!1,j2&&(u9=!1,ij(oj))},Tpe=()=>{j2=!0,u9=!0,c9||ij(oj)},d9=()=>Tg;function aj(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zh.read(r),e(o-t))};return Xs.read(r,!0),()=>Zh.read(r)}function Lpe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Ape({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=S5(o.duration)),o.repeatDelay&&(a.repeatDelay=S5(o.repeatDelay)),e&&(a.ease=bpe(e)?e.map(SO):SO(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function Ope(e,t){var n,r;return(r=(n=(Lk(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Mpe(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Rpe(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Mpe(t),Lpe(e)||(e={...e,...xpe(n,t.to)}),{...t,...Ape(e)}}function Ipe(e,t,n,r,i){const o=Lk(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=xO(e,n);a==="none"&&s&&typeof n=="string"?a=Tk(e,n):CO(a)&&typeof n=="string"?a=_O(n):!Array.isArray(n)&&CO(n)&&typeof a=="string"&&(n=_O(a));const l=xO(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?Zhe({...p,...o}):Yz({...Rpe(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function f(){const p=_z(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?f:u}function CO(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function _O(e){return typeof e=="number"?0:Tk("",e)}function Lk(e,t){return e[t]||e.default||e}function Ak(e,t,n,r={}){return Cpe.current&&(r={type:!1}),t.start(i=>{let o;const a=Ipe(e,t,n,r,i),s=Ope(r,e),l=()=>o=a();let u;return s?u=aj(l,S5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Dpe=e=>/^\-?\d*\.?\d+$/.test(e),Npe=e=>/^0[^.\s]+$/.test(e);function Ok(e,t){e.indexOf(t)===-1&&e.push(t)}function Mk(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Xv{constructor(){this.subscriptions=[]}add(t){return Ok(this.subscriptions,t),()=>Mk(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Bpe=e=>!isNaN(parseFloat(e));class $pe{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Xv,this.velocityUpdateSubscribers=new Xv,this.renderSubscribers=new Xv,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=d9();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Xs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Xs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Bpe(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Kz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function Kg(e){return new $pe(e)}const sj=e=>t=>t.test(e),Fpe={test:e=>e==="auto",parse:e=>e},lj=[lp,Ot,tu,pd,hfe,ffe,Fpe],Km=e=>lj.find(sj(e)),zpe=[...lj,bo,ac],jpe=e=>zpe.find(sj(e));function Hpe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Vpe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function QS(e,t,n){const r=e.getProps();return mk(r,t,n!==void 0?n:r.custom,Hpe(e),Vpe(e))}function Upe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Kg(n))}function Wpe(e,t){const n=QS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=_z(o[a]);Upe(e,a,s)}}function Gpe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let f=null;Array.isArray(u)&&(f=u[0]),f===null&&(f=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),f!=null&&(typeof f=="string"&&(Dpe(f)||Npe(f))?f=parseFloat(f):!jpe(f)&&ac.test(u)&&(f=Tk(l,u)),e.addValue(l,Kg(f)),n[l]===void 0&&(n[l]=f),f!==null&&e.setBaseTarget(l,f))}}function qpe(e,t){return t?(t[e]||t.default||t).from:void 0}function Ype(e,t,n){var r;const i={};for(const o in e){const a=qpe(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function x5(e){return Boolean(lu(e)&&e.add)}function Kpe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>f9(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=f9(e,t,n);else{const i=typeof t=="function"?QS(e,t,n.custom):t;r=uj(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function f9(e,t,n={}){var r;const i=QS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>uj(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:m}=o;return Xpe(e,t,f+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,f]=l==="beforeChildren"?[a,s]:[s,a];return u().then(f)}else return Promise.all([a(),s(n.delay)])}function uj(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const f=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),b=l[m];if(!v||b===void 0||p&&Qpe(p,m))continue;let x={delay:n,...a};e.shouldReduceMotion&&g1.has(m)&&(x={...x,type:!1,delay:0});let E=Ak(m,v,b,x);x5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),f.push(E)}return Promise.all(f).then(()=>{s&&Wpe(e,s)})}function Xpe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Zpe).forEach((u,f)=>{a.push(f9(u,t,{...o,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Zpe(e,t){return e.sortNodePosition(t)}function Qpe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const Rk=[Jn.Animate,Jn.InView,Jn.Focus,Jn.Hover,Jn.Tap,Jn.Drag,Jn.Exit],Jpe=[...Rk].reverse(),e0e=Rk.length;function t0e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kpe(e,n,r)))}function n0e(e){let t=t0e(e);const n=i0e();let r=!0;const i=(l,u)=>{const f=QS(e,u);if(f){const{transition:p,transitionEnd:m,...v}=f;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var f;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let x={},E=1/0;for(let _=0;_<e0e;_++){const T=Jpe[_],A=n[T],R=(f=p[T])!==null&&f!==void 0?f:m[T],I=D2(R),D=T===u?A.isActive:null;D===!1&&(E=_);let B=R===m[T]&&R!==p[T]&&I;if(B&&r&&e.manuallyAnimateOnMount&&(B=!1),A.protectedKeys={...x},!A.isActive&&D===null||!R&&!A.prevProp||US(R)||typeof R=="boolean")continue;const z=r0e(A.prevProp,R);let j=z||T===u&&A.isActive&&!B&&I||_>E&&I;const Y=Array.isArray(R)?R:[R];let te=Y.reduce(i,{});D===!1&&(te={});const{prevResolvedValues:G={}}=A,$={...G,...te},V=J=>{j=!0,b.delete(J),A.needsAnimating[J]=!0};for(const J in $){const Z=te[J],U=G[J];x.hasOwnProperty(J)||(Z!==U?$2(Z)&&$2(U)?!nj(Z,U)||z?V(J):A.protectedKeys[J]=!0:Z!==void 0?V(J):b.add(J):Z!==void 0&&b.has(J)?V(J):A.protectedKeys[J]=!0)}A.prevProp=R,A.prevResolvedValues=te,A.isActive&&(x={...x,...te}),r&&e.blockInitialAnimation&&(j=!1),j&&!B&&v.push(...Y.map(J=>({animation:J,options:{type:T,...l}})))}if(b.size){const _={};b.forEach(T=>{const A=e.getBaseTarget(T);A!==void 0&&(_[T]=A)}),v.push({animation:_})}let k=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,k?t(v):Promise.resolve()}function s(l,u,f){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var b;return(b=v.animationState)===null||b===void 0?void 0:b.setActive(l,u)}),n[l].isActive=u;const m=a(f,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function r0e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nj(t,e):!1}function uh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i0e(){return{[Jn.Animate]:uh(!0),[Jn.InView]:uh(),[Jn.Hover]:uh(),[Jn.Tap]:uh(),[Jn.Drag]:uh(),[Jn.Focus]:uh(),[Jn.Exit]:uh()}}const o0e={animation:Ad(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=n0e(e)),US(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Ad(e=>{const{custom:t,visualElement:n}=e,[r,i]=Ek(),o=C.exports.useContext(p1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class cj{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=I6(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=kk(u.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=u,{timestamp:v}=d9();this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;f||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=R6(f,this.transformPagePoint),Ez(u)&&u.buttons===0){this.handlePointerUp(u,f);return}Xs.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=I6(R6(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},Pz(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=vk(t),o=R6(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=d9();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,I6(o,this.history)),this.removeListeners=YS(Eg(window,"pointermove",this.handlePointerMove),Eg(window,"pointerup",this.handlePointerUp),Eg(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zh.update(this.updatePoint)}}function R6(e,t){return t?{point:t(e.point)}:e}function kO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function I6({point:e},t){return{point:e,delta:kO(e,dj(t)),offset:kO(e,a0e(t)),velocity:s0e(t,.1)}}function a0e(e){return e[0]}function dj(e){return e[e.length-1]}function s0e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=dj(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>S5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ra(e){return e.max-e.min}function EO(e,t=0,n=.01){return kk(e,t)<n}function PO(e,t,n,r=.5){e.origin=r,e.originPoint=Dr(t.min,t.max,e.origin),e.scale=Ra(n)/Ra(t),(EO(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Dr(n.min,n.max,e.origin)-e.originPoint,(EO(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Zv(e,t,n,r){PO(e.x,t.x,n.x,r==null?void 0:r.originX),PO(e.y,t.y,n.y,r==null?void 0:r.originY)}function TO(e,t,n){e.min=n.min+t.min,e.max=e.min+Ra(t)}function l0e(e,t,n){TO(e.x,t.x,n.x),TO(e.y,t.y,n.y)}function LO(e,t,n){e.min=t.min-n.min,e.max=e.min+Ra(t)}function Qv(e,t,n){LO(e.x,t.x,n.x),LO(e.y,t.y,n.y)}function u0e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Dr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Dr(n,e,r.max):Math.min(e,n)),e}function AO(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 c0e(e,{top:t,left:n,bottom:r,right:i}){return{x:AO(e.x,n,i),y:AO(e.y,t,r)}}function OO(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 d0e(e,t){return{x:OO(e.x,t.x),y:OO(e.y,t.y)}}function f0e(e,t){let n=.5;const r=Ra(e),i=Ra(t);return i>r?n=F2(t.min,t.max-r,e.min):r>i&&(n=F2(e.min,e.max-i,t.min)),v5(0,1,n)}function h0e(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 h9=.35;function p0e(e=h9){return e===!1?e=0:e===!0&&(e=h9),{x:MO(e,"left","right"),y:MO(e,"top","bottom")}}function MO(e,t,n){return{min:RO(e,t),max:RO(e,n)}}function RO(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const IO=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jv=()=>({x:IO(),y:IO()}),DO=()=>({min:0,max:0}),fi=()=>({x:DO(),y:DO()});function $l(e){return[e("x"),e("y")]}function fj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function g0e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function m0e(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}}function D6(e){return e===void 0||e===1}function p9({scale:e,scaleX:t,scaleY:n}){return!D6(e)||!D6(t)||!D6(n)}function vh(e){return p9(e)||hj(e)||e.z||e.rotate||e.rotateX||e.rotateY}function hj(e){return NO(e.x)||NO(e.y)}function NO(e){return e&&e!=="0%"}function w5(e,t,n){const r=e-n,i=t*r;return n+i}function BO(e,t,n,r,i){return i!==void 0&&(e=w5(e,i,r)),w5(e,n,r)+t}function g9(e,t=0,n=1,r,i){e.min=BO(e.min,t,n,r,i),e.max=BO(e.max,t,n,r,i)}function pj(e,{x:t,y:n}){g9(e.x,t.translate,t.scale,t.originPoint),g9(e.y,n.translate,n.scale,n.originPoint)}function v0e(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&eg(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,pj(e,l)),r&&vh(s.latestValues)&&eg(e,s.latestValues))}function bd(e,t){e.min=e.min+t,e.max=e.max+t}function $O(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Dr(e.min,e.max,o);g9(e,t[n],t[r],a,t.scale)}const y0e=["x","scaleX","originX"],b0e=["y","scaleY","originY"];function eg(e,t){$O(e.x,t,y0e),$O(e.y,t,b0e)}function gj(e,t){return fj(m0e(e.getBoundingClientRect(),t))}function S0e(e,t,n){const r=gj(e,n),{scroll:i}=t;return i&&(bd(r.x,i.offset.x),bd(r.y,i.offset.y)),r}const x0e=new WeakMap;class w0e{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fi(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(vk(s,"page").point)},i=(s,l)=>{var u;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Oz(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$l(v=>{var b,x;let E=this.getAxisMotionValue(v).get()||0;if(tu.test(E)){const k=(x=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||x===void 0?void 0:x.layoutBox[v];k&&(E=Ra(k)*(parseFloat(E)/100))}this.originPoint[v]=E}),m==null||m(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(f&&this.currentDirection===null){this.currentDirection=C0e(v),this.currentDirection!==null&&(p==null||p(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m==null||m(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new cj(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!sb(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=u0e(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&J0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=c0e(r.layoutBox,t):this.constraints=!1,this.elastic=p0e(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$l(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=h0e(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!J0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=S0e(r,i.root,this.visualElement.getTransformPagePoint());let a=d0e(i.layout.layoutBox,o);if(n){const s=n(g0e(a));this.hasMutatedConstraints=!!s,s&&(a=fj(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=$l(f=>{var p;if(!sb(f,n,this.currentDirection))return;let m=(p=l==null?void 0:l[f])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,x={type:"inertia",velocity:r?t[f]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(f,x)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ak(t,r,0,n)}stopAnimation(){$l(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){$l(n=>{const{drag:r}=this.getProps();if(!sb(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Dr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!J0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};$l(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=f0e({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),$l(s=>{if(!sb(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:f}=this.constraints[s];l.set(Dr(u,f,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;x0e.set(this.visualElement,this);const n=this.visualElement.current,r=Eg(n,"pointerdown",u=>{const{drag:f,dragListener:p=!0}=this.getProps();f&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();J0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=qS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&($l(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=h9,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function sb(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function C0e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function _0e(e){const{dragControls:t,visualElement:n}=e,r=GS(()=>new w0e(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function k0e({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(lk),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(f,p)=>{a.current=null,n&&n(f,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(f){a.current=new cj(f,l,{transformPagePoint:s})}g5(i,"pointerdown",o&&u),yk(()=>a.current&&a.current.end())}const E0e={pan:Ad(k0e),drag:Ad(_0e)};function m9(e){return typeof e=="string"&&e.startsWith("var(--")}const mj=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function P0e(e){const t=mj.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function v9(e,t,n=1){const[r,i]=P0e(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():m9(i)?v9(i,t,n+1):i}function T0e(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!m9(o))return;const a=v9(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!m9(o))continue;const a=v9(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const L0e=new Set(["width","height","top","left","right","bottom","x","y"]),vj=e=>L0e.has(e),A0e=e=>Object.keys(e).some(vj),yj=(e,t)=>{e.set(t,!1),e.set(t)},FO=e=>e===lp||e===Ot;var zO;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(zO||(zO={}));const jO=(e,t)=>parseFloat(e.split(", ")[t]),HO=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return jO(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?jO(o[1],e):0}},O0e=new Set(["x","y","z"]),M0e=h5.filter(e=>!O0e.has(e));function R0e(e){const t=[];return M0e.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const VO={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:HO(4,13),y:HO(5,14)},I0e=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=VO[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const f=t.getValue(u);yj(f,s[u]),e[u]=VO[u](l,o)}),e},D0e=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vj);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let f=n[l],p=Km(f);const m=t[l];let v;if($2(m)){const b=m.length,x=m[0]===null?1:0;f=m[x],p=Km(f);for(let E=x;E<b;E++)v?m5(Km(m[E])===v):v=Km(m[E])}else v=Km(m);if(p!==v)if(FO(p)&&FO(v)){const b=u.get();typeof b=="string"&&u.set(parseFloat(b)),typeof m=="string"?t[l]=parseFloat(m):Array.isArray(m)&&v===Ot&&(t[l]=m.map(parseFloat))}else(p==null?void 0:p.transform)&&(v==null?void 0:v.transform)&&(f===0||m===0)?f===0?u.set(v.transform(f)):t[l]=p.transform(m):(a||(o=R0e(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],yj(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=I0e(t,e,s);return o.length&&o.forEach(([f,p])=>{e.getValue(f).set(p)}),e.render(),sp&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function N0e(e,t,n,r){return A0e(t)?D0e(e,t,n,r):{target:t,transitionEnd:r}}const B0e=(e,t,n,r)=>{const i=T0e(e,t,r);return t=i.target,r=i.transitionEnd,N0e(e,t,n,r)},y9={current:null},bj={current:!1};function $0e(){if(bj.current=!0,!!sp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>y9.current=e.matches;e.addListener(t),t()}else y9.current=!1}function F0e(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(lu(o))e.addValue(i,o),x5(r)&&r.add(i);else if(lu(a))e.addValue(i,Kg(o)),x5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,Kg(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Sj=Object.keys(N2),z0e=Sj.length,UO=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class j0e{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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.scheduleRender=()=>Xs.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=WS(n),this.isVariantNode=iz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const f in u){const p=u[f];a[f]!==void 0&&lu(p)&&(p.set(a[f],!1),x5(l)&&l.add(f))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),bj.current||$0e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:y9.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Zh.update(this.notifyUpdate),Zh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=g1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Xs.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<z0e;l++){const u=Sj[l],{isEnabled:f,Component:p}=N2[u];f(t)&&p&&s.push(C.exports.createElement(p,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:f,dragConstraints:p,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(f)||p&&J0(p),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;n<UO.length;n++){const r=UO[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=F0e(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var n,r;if(t)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((r=this.parent)===null||r===void 0?void 0:r.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<H0e;o++){const a=xj[o],s=this.props[a];(D2(s)||s===!1)&&(i[a]=s)}return i}addVariantChild(t){var n;const r=this.getClosestVariantNode();if(r)return(n=r.variantChildren)===null||n===void 0||n.add(t),()=>r.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||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=Kg(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=mk(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!lu(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xv),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const xj=["initial",...Rk],H0e=xj.length;class wj extends j0e{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=Ype(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Gpe(this,r,a);const s=B0e(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function V0e(e){return window.getComputedStyle(e)}class U0e extends wj{readValueFromInstance(t,n){if(g1.has(n)){const r=Pk(n);return r&&r.default||0}else{const r=V0e(t),i=(sz(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gj(t,n)}build(t,n,r,i){fk(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return gk(t)}renderInstance(t,n,r,i){Sz(t,n,r,i)}}class W0e extends wj{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return g1.has(n)?((r=Pk(n))===null||r===void 0?void 0:r.default)||0:(n=xz.has(n)?n:bz(n),t.getAttribute(n))}measureInstanceViewportBox(){return fi()}scrapeMotionValuesFromProps(t){return Cz(t)}build(t,n,r,i){pk(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){wz(t,n,r,i)}}const G0e=(e,t)=>ck(e)?new W0e(t,{enableHardwareAcceleration:!1}):new U0e(t,{enableHardwareAcceleration:!0});function WO(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xm={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ot.test(e))e=parseFloat(e);else return e;const n=WO(e,t.target.x),r=WO(e,t.target.y);return`${n}% ${r}%`}},GO="_$css",q0e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(mj,v=>(o.push(v),GO)));const a=ac.parse(e);if(a.length>5)return r;const s=ac.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,f=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=f;const p=Dr(u,f,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(GO,()=>{const b=o[v];return v++,b})}return m}};class Y0e extends oe.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;afe(X0e),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),qv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Xs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function K0e(e){const[t,n]=Ek(),r=C.exports.useContext(uk);return y(Y0e,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(oz),isPresent:t,safeToRemove:n})}const X0e={borderRadius:{...Xm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xm,borderTopRightRadius:Xm,borderBottomLeftRadius:Xm,borderBottomRightRadius:Xm,boxShadow:q0e},Z0e={measureLayout:K0e};function Q0e(e,t,n={}){const r=lu(e)?e:Kg(e);return Ak("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Cj=["TopLeft","TopRight","BottomLeft","BottomRight"],J0e=Cj.length,qO=e=>typeof e=="string"?parseFloat(e):e,YO=e=>typeof e=="number"||Ot.test(e);function ege(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Dr(0,(a=n.opacity)!==null&&a!==void 0?a:1,tge(r)),e.opacityExit=Dr((s=t.opacity)!==null&&s!==void 0?s:1,0,nge(r))):o&&(e.opacity=Dr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let f=0;f<J0e;f++){const p=`border${Cj[f]}Radius`;let m=KO(t,p),v=KO(n,p);if(m===void 0&&v===void 0)continue;m||(m=0),v||(v=0),m===0||v===0||YO(m)===YO(v)?(e[p]=Math.max(Dr(qO(m),qO(v),r),0),(tu.test(v)||tu.test(m))&&(e[p]+="%")):e[p]=v}(t.rotate||n.rotate)&&(e.rotate=Dr(t.rotate||0,n.rotate||0,r))}function KO(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const tge=_j(0,.5,Ck),nge=_j(.5,.95,xk);function _j(e,t,n){return r=>r<e?0:r>t?1:n(F2(e,t,r))}function XO(e,t){e.min=t.min,e.max=t.max}function Ns(e,t){XO(e.x,t.x),XO(e.y,t.y)}function ZO(e,t,n,r,i){return e-=t,e=w5(e,1/n,r),i!==void 0&&(e=w5(e,1/i,r)),e}function rge(e,t=0,n=1,r=.5,i,o=e,a=e){if(tu.test(t)&&(t=parseFloat(t),t=Dr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Dr(o.min,o.max,r);e===o&&(s-=t),e.min=ZO(e.min,t,n,s,i),e.max=ZO(e.max,t,n,s,i)}function QO(e,t,[n,r,i],o,a){rge(e,t[n],t[r],t[i],t.scale,o,a)}const ige=["x","scaleX","originX"],oge=["y","scaleY","originY"];function JO(e,t,n,r){QO(e.x,t,ige,n==null?void 0:n.x,r==null?void 0:r.x),QO(e.y,t,oge,n==null?void 0:n.y,r==null?void 0:r.y)}function eM(e){return e.translate===0&&e.scale===1}function kj(e){return eM(e.x)&&eM(e.y)}function Ej(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function tM(e){return Ra(e.x)/Ra(e.y)}function age(e,t,n=.1){return kk(e,t)<=n}class sge{constructor(){this.members=[]}add(t){Ok(this.members,t),t.scheduleRender()}remove(t){if(Mk(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function nM(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:f}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const lge=(e,t)=>e.depth-t.depth;class uge{constructor(){this.children=[],this.isDirty=!1}add(t){Ok(this.children,t),this.isDirty=!0}remove(t){Mk(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lge),this.isDirty=!1,this.children.forEach(t)}}const rM=["","X","Y","Z"],iM=1e3;let cge=0;function Pj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=cge++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(gge),this.nodes.forEach(mge)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new uge)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Xv),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l==null||l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:u,layout:f,visualElement:p}=this.options;if(p&&!p.current&&p.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),s&&(f||u)&&(this.isLayoutDirty=!0),e){let m;const v=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=aj(v,250),qv.hasAnimatedSinceResize&&(qv.hasAnimatedSinceResize=!1,this.nodes.forEach(aM))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:x})=>{var E,k,_,T,A;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(k=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&k!==void 0?k:xge,{onLayoutAnimationStart:I,onLayoutAnimationComplete:D}=p.getProps(),B=!this.targetLayout||!Ej(this.targetLayout,x)||b,z=!v&&b;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||z||v&&(B||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,z);const j={...Lk(R,"layout"),onPlay:I,onComplete:D};p.shouldReduceMotion&&(j.delay=0,j.type=!1),this.startAnimation(j)}else!v&&this.animationProgress===0&&aM(this),this.isLead()&&((A=(T=this.options).onExitComplete)===null||A===void 0||A.call(T));this.targetLayout=x})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Zh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(vge),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const b=this.path[v];b.shouldResetTransform=!0,b.updateScroll("snapshot")}const{layoutId:f,layout:p}=this.options;if(f===void 0&&!p)return;const m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=m==null?void 0:m(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oM);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(wge),this.potentialNodes.clear()),this.nodes.forEach(pge),this.nodes.forEach(dge),this.nodes.forEach(fge),this.clearAllSnapshots(),M6.update(),M6.preRender(),M6.render())}clearAllSnapshots(){this.nodes.forEach(hge),this.sharedNodes.forEach(yge)}scheduleUpdateProjection(){Xs.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Xs.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=fi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(a=this.options.visualElement)===null||a===void 0||a.notify("LayoutMeasure",this.layout.layoutBox,s==null?void 0:s.layoutBox)}updateScroll(a="measure"){let s=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!kj(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,f=u==null?void 0:u(this.latestValues,""),p=f!==this.prevTransformTemplateValue;s&&(l||vh(this.latestValues)||p)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){var s;const l=this.measurePageBox();let u=this.removeElementScroll(l);a&&(u=this.removeTransform(u)),Cge(u);const f=(s=this.options.visualElement)===null||s===void 0?void 0:s.readValue("position"),p=f==="fixed"||f==="sticky"?f:"static";return{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id,position:p}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return fi();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(bd(s.x,l.offset.x),bd(s.y,l.offset.y)),s}removeElementScroll(a){const s=fi();Ns(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:p}=u;if(u!==this.root&&f&&p.layoutScroll){if(f.isRoot){Ns(s,a);const{scroll:m}=this.root;m&&(bd(s.x,-m.offset.x),bd(s.y,-m.offset.y))}bd(s.x,f.offset.x),bd(s.y,f.offset.y)}}return s}applyTransform(a,s=!1){const l=fi();Ns(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&eg(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),vh(f.latestValues)&&eg(l,f.latestValues)}return vh(this.latestValues)&&eg(l,this.latestValues),l}removeTransform(a){var s;const l=fi();Ns(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!vh(f.latestValues))continue;p9(f.latestValues)&&f.updateSnapshot();const p=fi(),m=f.measurePageBox();Ns(p,m),JO(l,f.latestValues,(s=f.snapshot)===null||s===void 0?void 0:s.layoutBox,p)}return vh(this.latestValues)&&JO(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}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}resolveTargetDelta(){var a;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),!this.isProjectionDirty)return;const{layout:s,layoutId:l}=this.options;if(!(!this.layout||!(s||l))){if(!this.targetDelta&&!this.relativeTarget){const u=this.getClosestProjectingParent();u&&u.layout?(this.relativeParent=u,this.relativeTarget=fi(),this.relativeTargetOrigin=fi(),Qv(this.relativeTargetOrigin,this.layout.layoutBox,u.layout.layoutBox),Ns(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=fi(),this.targetWithTransforms=fi()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?l0e(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ns(this.target,this.layout.layoutBox),pj(this.target,this.targetDelta)):Ns(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target?(this.relativeParent=u,this.relativeTarget=fi(),this.relativeTargetOrigin=fi(),Qv(this.relativeTargetOrigin,this.target,u.target),Ns(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||p9(this.parent.latestValues)||hj(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;if(!this.isProjectionDirty)return;this.isProjectionDirty=!1;const{layout:s,layoutId:l}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||l))return;const u=this.getLead();Ns(this.layoutCorrected,this.layout.layoutBox),v0e(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:f}=u;if(!f)return;this.projectionDelta||(this.projectionDelta=Jv(),this.projectionDeltaWithTransform=Jv());const p=this.treeScale.x,m=this.treeScale.y,v=this.projectionTransform;Zv(this.projectionDelta,this.layoutCorrected,f,this.latestValues),this.projectionTransform=nM(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==p||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,u;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l,u;const f=this.snapshot,p=(f==null?void 0:f.latestValues)||{},m={...this.latestValues},v=Jv();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const b=fi(),x=(f==null?void 0:f.source)!==((l=this.layout)===null||l===void 0?void 0:l.source),E=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,k=Boolean(x&&!E&&this.options.crossfade===!0&&!this.path.some(Sge));this.animationProgress=0,this.mixTargetDelta=_=>{var T;const A=_/1e3;sM(v.x,a.x,A),sM(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Qv(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bge(this.relativeTarget,this.relativeTargetOrigin,b,A)),x&&(this.animationValues=m,ege(m,p,this.latestValues,A,k,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xs.update(()=>{qv.hasAnimatedSinceResize=!0,this.currentAnimation=Q0e(0,iM,{...a,onUpdate:u=>{var f;this.mixTargetDelta(u),(f=a.onUpdate)===null||f===void 0||f.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,iM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:f}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Tj(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||fi();const p=Ra(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=Ra(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}Ns(s,l),eg(s,f),Zv(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(a,s){var l,u,f;this.sharedNodes.has(a)||this.sharedNodes.set(a,new sge),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let f=0;f<rM.length;f++){const p="rotate"+rM[f];l[p]&&(u[p]=l[p],a.setStaticValue(p,0))}a==null||a.render();for(const f in u)a.setStaticValue(f,u[f]);a.scheduleRender()}getProjectionStyles(a={}){var s,l,u;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const p=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=d4(a.pointerEvents)||"",f.transform=p?p(this.latestValues,""):"none",f;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=d4(a.pointerEvents)||""),this.hasProjected&&!vh(this.latestValues)&&(E.transform=p?p({},""):"none",this.hasProjected=!1),E}const v=m.animationValues||m.latestValues;this.applyTransformsToTarget(),f.transform=nM(this.projectionDeltaWithTransform,this.treeScale,v),p&&(f.transform=p(v,f.transform));const{x:b,y:x}=this.projectionDelta;f.transformOrigin=`${b.origin*100}% ${x.origin*100}% 0`,m.animationValues?f.opacity=m===this?(u=(l=v.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:f.opacity=m===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const E in f5){if(v[E]===void 0)continue;const{correct:k,applyTo:_}=f5[E],T=k(v[E],m);if(_){const A=_.length;for(let R=0;R<A;R++)f[_[R]]=T}else f[E]=T}return this.options.layoutId&&(f.pointerEvents=m===this?d4(a.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(oM),this.root.sharedNodes.clear()}}}function dge(e){e.updateLayout()}function fge(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?$l(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],x=Ra(b);b.min=o[v].min,b.max=b.min+x}):Tj(s,i.layoutBox,o)&&$l(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],x=Ra(o[v]);b.max=b.min+x});const u=Jv();Zv(u,o,i.layoutBox);const f=Jv();l?Zv(f,e.applyTransform(a,!0),i.measuredBox):Zv(f,o,i.layoutBox);const p=!kj(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:x}=v;if(b&&x){const E=fi();Qv(E,i.layoutBox,b.layoutBox);const k=fi();Qv(k,o,x.layoutBox),Ej(E,k)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:f,layoutDelta:u,hasLayoutChanged:p,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function hge(e){e.clearSnapshot()}function oM(e){e.clearMeasurements()}function pge(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function aM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function gge(e){e.resolveTargetDelta()}function mge(e){e.calcProjection()}function vge(e){e.resetRotation()}function yge(e){e.removeLeadSnapshot()}function sM(e,t,n){e.translate=Dr(t.translate,0,n),e.scale=Dr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lM(e,t,n,r){e.min=Dr(t.min,n.min,r),e.max=Dr(t.max,n.max,r)}function bge(e,t,n,r){lM(e.x,t.x,n.x,r),lM(e.y,t.y,n.y,r)}function Sge(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xge={duration:.45,ease:[.4,0,.1,1]};function wge(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function uM(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Cge(e){uM(e.x),uM(e.y)}function Tj(e,t,n){return e==="position"||e==="preserve-aspect"&&!age(tM(t),tM(n),.2)}const _ge=Pj({attachResizeListener:(e,t)=>qS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),N6={current:void 0},kge=Pj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!N6.current){const e=new _ge(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),N6.current=e}return N6.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Ege={...o0e,...gpe,...E0e,...Z0e},gu=ife((e,t)=>Vfe(e,t,Ege,G0e,kge));function Lj(){const e=C.exports.useRef(!1);return d5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Pge(){const e=Lj(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Xs.postRender(r),[r]),t]}class Tge extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Lge({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${s}px !important;
left: ${l}px !important;
}
`),()=>{document.head.removeChild(u)}},[t]),y(Tge,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const B6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=GS(Age),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:f=>{s.set(f,!0);for(const p of s.values())if(!p)return;r&&r()},register:f=>(s.set(f,!1),()=>s.delete(f))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((f,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=y(Lge,{isPresent:n,children:e})),y(p1.Provider,{value:u,children:e})};function Age(){return new Map}const $0=e=>e.key||"";function Oge(e,t){e.forEach(n=>{const r=$0(n);t.set(r,n)})}function Mge(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const cf=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",tj(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Pge();const l=C.exports.useContext(uk).forceRender;l&&(s=l);const u=Lj(),f=Mge(e);let p=f;const m=new Set,v=C.exports.useRef(p),b=C.exports.useRef(new Map).current,x=C.exports.useRef(!0);if(d5(()=>{x.current=!1,Oge(f,b),v.current=p}),yk(()=>{x.current=!0,b.clear(),m.clear()}),x.current)return y(fn,{children:p.map(T=>y(B6,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},$0(T)))});p=[...p];const E=v.current.map($0),k=f.map($0),_=E.length;for(let T=0;T<_;T++){const A=E[T];k.indexOf(A)===-1&&m.add(A)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(k.indexOf(T)!==-1)return;const A=b.get(T);if(!A)return;const R=E.indexOf(T),I=()=>{b.delete(T),m.delete(T);const D=v.current.findIndex(B=>B.key===T);if(v.current.splice(D,1),!m.size){if(v.current=f,u.current===!1)return;s(),r&&r()}};p.splice(R,0,y(B6,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a,children:A},$0(A)))}),p=p.map(T=>{const A=T.key;return m.has(A)?T:y(B6,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},$0(T))}),ej!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),y(fn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var Ul=function(){return Ul=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ul.apply(this,arguments)};function Aj(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function m1(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(p){a(p)}}function l(f){try{u(r.throw(f))}catch(p){a(p)}}function u(f){f.done?o(f.value):i(f.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function v1(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function cM(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function b9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var vy=(...e)=>e.filter(Boolean).join(" ");function Rge(){return!1}var Ige=e=>{const{condition:t,message:n}=e;t&&Rge()&&console.warn(n)},Mh={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Zm={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function S9(e){var n;switch((n=e==null?void 0:e.direction)!=null?n:"right"){case"right":return Zm.slideRight;case"left":return Zm.slideLeft;case"bottom":return Zm.slideDown;case"top":return Zm.slideUp;default:return Zm.slideRight}}var zh={enter:{duration:.2,ease:Mh.easeOut},exit:{duration:.1,ease:Mh.easeIn}},Zs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},Dge=e=>e!=null&&parseInt(e.toString(),10)>0,dM={exit:{height:{duration:.2,ease:Mh.ease},opacity:{duration:.3,ease:Mh.ease}},enter:{height:{duration:.3,ease:Mh.ease},opacity:{duration:.4,ease:Mh.ease}}},Nge={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:Dge(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:Zs.exit(dM.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(o=n==null?void 0:n.enter)!=null?o:Zs.enter(dM.enter,i)}}},Oj=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:f,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),Ige({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,x={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:f==null?void 0:f.enter,exit:r?f==null?void 0:f.exit:{...f==null?void 0:f.exit,display:b?"block":"none"}}},E=r?n:!0,k=n||r?"enter":"exit";return y(cf,{initial:!1,custom:x,children:E&&oe.createElement(gu.div,{ref:t,...p,className:vy("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:x,variants:Nge,initial:r?"exit":!1,animate:k,exit:"exit"})})});Oj.displayName="Collapse";var Bge={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Zs.enter(zh.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Zs.exit(zh.exit,n),transitionEnd:t==null?void 0:t.exit}}},Mj={initial:"exit",animate:"enter",exit:"exit",variants:Bge},$ge=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,f=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return y(cf,{custom:m,children:p&&oe.createElement(gu.div,{ref:n,className:vy("chakra-fade",o),custom:m,...Mj,animate:f,...u})})});$ge.displayName="Fade";var Fge={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:Zs.exit(zh.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Zs.enter(zh.enter,n),transitionEnd:e==null?void 0:e.enter}}},Rj={initial:"exit",animate:"enter",exit:"exit",variants:Fge},zge=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:f,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:f};return y(cf,{custom:b,children:m&&oe.createElement(gu.div,{ref:n,className:vy("chakra-offset-slide",s),...Rj,animate:v,custom:b,...p})})});zge.displayName="ScaleFade";var fM={exit:{duration:.15,ease:Mh.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},jge={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=S9({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:Zs.exit(fM.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=S9({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:Zs.enter(fM.enter,r),transitionEnd:t==null?void 0:t.enter}}},Ij=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:f,motionProps:p,...m}=t,v=S9({direction:r}),b=Object.assign({position:"fixed"},v.position,i),x=o?a&&o:!0,E=a||o?"enter":"exit",k={transitionEnd:u,transition:l,direction:r,delay:f};return y(cf,{custom:k,children:x&&oe.createElement(gu.div,{...m,ref:n,initial:"exit",className:vy("chakra-slide",s),animate:E,exit:"exit",custom:k,variants:jge,style:b,...p})})});Ij.displayName="Slide";var Hge={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:Zs.exit(zh.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:Zs.enter(zh.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var s;const a={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:Zs.exit(zh.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},x9={initial:"initial",animate:"enter",exit:"exit",variants:Hge},Vge=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:f,delay:p,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",x={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:f,delay:p};return y(cf,{custom:x,children:v&&oe.createElement(gu.div,{ref:n,className:vy("chakra-offset-slide",a),custom:x,...x9,animate:b,...m})})});Vge.displayName="SlideFade";var yy=(...e)=>e.filter(Boolean).join(" ");function Uge(){return!1}var JS=e=>{const{condition:t,message:n}=e;t&&Uge()&&console.warn(n)};function $6(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Wge,ex]=An({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[Gge,Ik]=An({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[qge,_ze,Yge,Kge]=nz(),tg=Oe(function(t,n){const{getButtonProps:r}=Ik(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...ex().button};return oe.createElement(_e.button,{...i,className:yy("chakra-accordion__button",t.className),__css:a})});tg.displayName="AccordionButton";function Xge(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Jge(e),e1e(e);const s=Yge(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[f,p]=HS({value:r,defaultValue(){return i?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:f,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(f)?f.includes(v):f===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(f)){const k=E?f.concat(v):f.filter(_=>_!==v);p(k)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Zge,Dk]=An({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Qge(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=Dk(),s=C.exports.useRef(null),l=C.exports.useId(),u=r!=null?r:l,f=`accordion-button-${u}`,p=`accordion-panel-${u}`;t1e(e);const{register:m,index:v,descendants:b}=Kge({disabled:t&&!n}),{isOpen:x,onChange:E}=o(v===-1?null:v);n1e({isOpen:x,isDisabled:t});const k=()=>{E==null||E(!0)},_=()=>{E==null||E(!1)},T=C.exports.useCallback(()=>{E==null||E(!x),a(v)},[v,a,x,E]),A=C.exports.useCallback(B=>{const j={ArrowDown:()=>{const Y=b.nextEnabled(v);Y==null||Y.node.focus()},ArrowUp:()=>{const Y=b.prevEnabled(v);Y==null||Y.node.focus()},Home:()=>{const Y=b.firstEnabled();Y==null||Y.node.focus()},End:()=>{const Y=b.lastEnabled();Y==null||Y.node.focus()}}[B.key];j&&(B.preventDefault(),j(B))},[b,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),I=C.exports.useCallback(function(z={},j=null){return{...z,type:"button",ref:Gn(m,s,j),id:f,disabled:!!t,"aria-expanded":!!x,"aria-controls":p,onClick:$6(z.onClick,T),onFocus:$6(z.onFocus,R),onKeyDown:$6(z.onKeyDown,A)}},[f,t,x,T,R,A,p,m]),D=C.exports.useCallback(function(z={},j=null){return{...z,ref:j,role:"region",id:p,"aria-labelledby":f,hidden:!x}},[f,x,p]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:k,onClose:_,getButtonProps:I,getPanelProps:D,htmlProps:i}}function Jge(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;JS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function e1e(e){JS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function t1e(e){JS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.
`})}function n1e(e){JS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function ng(e){const{isOpen:t,isDisabled:n}=Ik(),{reduceMotion:r}=Dk(),i=yy("chakra-accordion__icon",e.className),o=ex(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return y($a,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:y("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}ng.displayName="AccordionIcon";var rg=Oe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Qge(t),l={...ex().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return oe.createElement(Gge,{value:u},oe.createElement(_e.div,{ref:n,...o,className:yy("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});rg.displayName="AccordionItem";var ig=Oe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=Dk(),{getPanelProps:s,isOpen:l}=Ik(),u=s(o,n),f=yy("chakra-accordion__panel",r),p=ex();a||delete u.hidden;const m=oe.createElement(_e.div,{...u,__css:p.panel,className:f});return a?m:y(Oj,{in:l,...i,children:m})});ig.displayName="AccordionPanel";var Nk=Oe(function({children:t,reduceMotion:n,...r},i){const o=qi("Accordion",r),a=_n(r),{htmlProps:s,descendants:l,...u}=Xge(a),f=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return oe.createElement(qge,{value:l},oe.createElement(Zge,{value:f},oe.createElement(Wge,{value:o},oe.createElement(_e.div,{ref:i,...s,className:yy("chakra-accordion",r.className),__css:o.root},t))))});Nk.displayName="Accordion";var r1e=(...e)=>e.filter(Boolean).join(" "),i1e=uf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),by=Oe((e,t)=>{const n=Lo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=_n(e),u=r1e("chakra-spinner",s),f={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${i1e} ${o} linear infinite`,...n};return oe.createElement(_e.div,{ref:t,__css:f,className:u,...l},r&&oe.createElement(_e.span,{srOnly:!0},r))});by.displayName="Spinner";var tx=(...e)=>e.filter(Boolean).join(" ");function o1e(e){return y($a,{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function a1e(e){return y($a,{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function hM(e){return y($a,{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[s1e,l1e]=An({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[u1e,Bk]=An({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),Dj={info:{icon:a1e,colorScheme:"blue"},warning:{icon:hM,colorScheme:"orange"},success:{icon:o1e,colorScheme:"green"},error:{icon:hM,colorScheme:"red"},loading:{icon:by,colorScheme:"blue"}};function c1e(e){return Dj[e].colorScheme}function d1e(e){return Dj[e].icon}var Nj=Oe(function(t,n){var u;const{status:r="info",addRole:i=!0,...o}=_n(t),a=(u=t.colorScheme)!=null?u:c1e(r),s=qi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return oe.createElement(s1e,{value:{status:r}},oe.createElement(u1e,{value:s},oe.createElement(_e.div,{role:i?"alert":void 0,ref:n,...o,className:tx("chakra-alert",t.className),__css:l})))});Nj.displayName="Alert";var Bj=Oe(function(t,n){const i={display:"inline",...Bk().description};return oe.createElement(_e.div,{ref:n,...t,className:tx("chakra-alert__desc",t.className),__css:i})});Bj.displayName="AlertDescription";function $j(e){const{status:t}=l1e(),n=d1e(t),r=Bk(),i=t==="loading"?r.spinner:r.icon;return oe.createElement(_e.span,{display:"inherit",...e,className:tx("chakra-alert__icon",e.className),__css:i},e.children||y(n,{h:"100%",w:"100%"}))}$j.displayName="AlertIcon";var Fj=Oe(function(t,n){const r=Bk();return oe.createElement(_e.div,{ref:n,...t,className:tx("chakra-alert__title",t.className),__css:r.title})});Fj.displayName="AlertTitle";function f1e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function h1e(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,f]=C.exports.useState("pending");C.exports.useEffect(()=>{f(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const b=new Image;b.src=n,a&&(b.crossOrigin=a),r&&(b.srcset=r),s&&(b.sizes=s),t&&(b.loading=t),b.onload=x=>{v(),f("loaded"),i==null||i(x)},b.onerror=x=>{v(),f("failed"),o==null||o(x)},p.current=b},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Ys(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var p1e=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",C5=Oe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return y("img",{width:r,height:i,ref:n,alt:o,...a})});C5.displayName="NativeImage";var nx=Oe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:f,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,x=r!==void 0||i!==void 0,E=u!=null||f||!x,k=h1e({...t,ignoreFallback:E}),_=p1e(k,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:f1e(b,["onError","onLoad"])};return _?i||oe.createElement(_e.img,{as:C5,className:"chakra-image__placeholder",src:r,...T}):oe.createElement(_e.img,{as:C5,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});nx.displayName="Image";Oe((e,t)=>oe.createElement(_e.img,{ref:t,as:C5,className:"chakra-image",...e}));function rx(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var ix=(...e)=>e.filter(Boolean).join(" "),pM=e=>e?"":void 0,[g1e,m1e]=An({strict:!1,name:"ButtonGroupContext"});function w9(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=ix("chakra-button__icon",n);return oe.createElement(_e.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}w9.displayName="ButtonIcon";function C9(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=y(by,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=ix("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",f=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return oe.createElement(_e.div,{className:l,...s,__css:f},i)}C9.displayName="ButtonSpinner";function v1e(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var ds=Oe((e,t)=>{const n=m1e(),r=Lo("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:f,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:x,as:E,...k}=_n(e),_=C.exports.useMemo(()=>{const I={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:T,type:A}=v1e(E),R={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return oe.createElement(_e.button,{disabled:i||o,ref:Fde(t,T),as:E,type:m!=null?m:A,"data-active":pM(a),"data-loading":pM(o),__css:_,className:ix("chakra-button",x),...k},o&&b==="start"&&y(C9,{className:"chakra-button__spinner--start",label:f,placement:"start",spacing:p,children:v}),o?f||oe.createElement(_e.span,{opacity:0},y(gM,{...R})):y(gM,{...R}),o&&b==="end"&&y(C9,{className:"chakra-button__spinner--end",label:f,placement:"end",spacing:p,children:v}))});ds.displayName="Button";function gM(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return K(fn,{children:[t&&y(w9,{marginEnd:i,children:t}),r,n&&y(w9,{marginStart:i,children:n})]})}var io=Oe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...f}=t,p=ix("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},oe.createElement(g1e,{value:m},oe.createElement(_e.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...f}))});io.displayName="ButtonGroup";var fs=Oe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return y(ds,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});fs.displayName="IconButton";var y1=(...e)=>e.filter(Boolean).join(" "),lb=e=>e?"":void 0,F6=e=>e?!0:void 0;function mM(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[y1e,zj]=An({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[b1e,b1]=An({strict:!1,name:"FormControlContext"});function S1e(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,f=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,x]=C.exports.useState(!1),[E,k]=C.exports.useState(!1),_=C.exports.useCallback((D={},B=null)=>({id:p,...D,ref:Gn(B,z=>{!z||x(!0)})}),[p]),T=C.exports.useCallback((D={},B=null)=>{var z,j;return{...D,ref:B,"data-focus":lb(E),"data-disabled":lb(i),"data-invalid":lb(r),"data-readonly":lb(o),id:(z=D.id)!=null?z:u,htmlFor:(j=D.htmlFor)!=null?j:l}},[l,i,E,r,o,u]),A=C.exports.useCallback((D={},B=null)=>({id:f,...D,ref:Gn(B,z=>{!z||v(!0)}),"aria-live":"polite"}),[f]),R=C.exports.useCallback((D={},B=null)=>({...D,...a,ref:B,role:"group"}),[a]),I=C.exports.useCallback((D={},B=null)=>({...D,ref:B,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>k(!0),onBlur:()=>k(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:x,id:l,labelId:u,feedbackId:f,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:A,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:I}}var Ir=Oe(function(t,n){const r=qi("Form",t),i=_n(t),{getRootProps:o,htmlProps:a,...s}=S1e(i),l=y1("chakra-form-control",t.className);return oe.createElement(b1e,{value:s},oe.createElement(y1e,{value:r},oe.createElement(_e.div,{...o({},n),className:l,__css:r.container})))});Ir.displayName="FormControl";var Uo=Oe(function(t,n){const r=b1(),i=zj(),o=y1("chakra-form__helper-text",t.className);return oe.createElement(_e.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});Uo.displayName="FormHelperText";function $k(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=Fk(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":F6(n),"aria-required":F6(i),"aria-readonly":F6(r)}}function Fk(e){var b,x,E;const t=b1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:f,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return(t==null?void 0:t.hasFeedbackText)&&(t==null?void 0:t.isInvalid)&&v.push(t.feedbackId),t!=null&&t.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n!=null?n:t==null?void 0:t.id,isDisabled:(b=r!=null?r:u)!=null?b:t==null?void 0:t.isDisabled,isReadOnly:(x=i!=null?i:l)!=null?x:t==null?void 0:t.isReadOnly,isRequired:(E=o!=null?o:a)!=null?E:t==null?void 0:t.isRequired,isInvalid:s!=null?s:t==null?void 0:t.isInvalid,onFocus:mM(t==null?void 0:t.onFocus,f),onBlur:mM(t==null?void 0:t.onBlur,p)}}var[x1e,w1e]=An({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),Wo=Oe((e,t)=>{const n=qi("FormError",e),r=_n(e),i=b1();return i!=null&&i.isInvalid?oe.createElement(x1e,{value:n},oe.createElement(_e.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:y1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Wo.displayName="FormErrorMessage";var C1e=Oe((e,t)=>{const n=w1e(),r=b1();if(!(r!=null&&r.isInvalid))return null;const i=y1("chakra-form__error-icon",e.className);return y($a,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:y("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});C1e.displayName="FormErrorIcon";var ti=Oe(function(t,n){var m;const r=Lo("FormLabel",t),i=_n(t),{className:o,children:a,requiredIndicator:s=y(jj,{}),optionalIndicator:l=null,...u}=i,f=b1(),p=(m=f==null?void 0:f.getLabelProps(u,n))!=null?m:{ref:n,...u};return oe.createElement(_e.label,{...p,className:y1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,f!=null&&f.isRequired?s:l)});ti.displayName="FormLabel";var jj=Oe(function(t,n){const r=b1(),i=zj();if(!(r!=null&&r.isRequired))return null;const o=y1("chakra-form__required-indicator",t.className);return oe.createElement(_e.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});jj.displayName="RequiredIndicator";function Kd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var zk={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},_1e=_e("span",{baseStyle:zk});_1e.displayName="VisuallyHidden";var k1e=_e("input",{baseStyle:zk});k1e.displayName="VisuallyHiddenInput";var vM=!1,ox=null,Xg=!1,_9=new Set,E1e=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function P1e(e){return!(e.metaKey||!E1e&&e.altKey||e.ctrlKey)}function jk(e,t){_9.forEach(n=>n(e,t))}function yM(e){Xg=!0,P1e(e)&&(ox="keyboard",jk("keyboard",e))}function C0(e){ox="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xg=!0,jk("pointer",e))}function T1e(e){e.target===window||e.target===document||(Xg||(ox="keyboard",jk("keyboard",e)),Xg=!1)}function L1e(){Xg=!1}function bM(){return ox!=="pointer"}function A1e(){if(typeof window>"u"||vM)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Xg=!0,e.apply(this,n)},document.addEventListener("keydown",yM,!0),document.addEventListener("keyup",yM,!0),window.addEventListener("focus",T1e,!0),window.addEventListener("blur",L1e,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",C0,!0),document.addEventListener("pointermove",C0,!0),document.addEventListener("pointerup",C0,!0)):(document.addEventListener("mousedown",C0,!0),document.addEventListener("mousemove",C0,!0),document.addEventListener("mouseup",C0,!0)),vM=!0}function O1e(e){A1e(),e(bM());const t=()=>e(bM());return _9.add(t),()=>{_9.delete(t)}}var[kze,M1e]=An({name:"CheckboxGroupContext",strict:!1}),R1e=(...e)=>e.filter(Boolean).join(" "),vo=e=>e?"":void 0;function Ka(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function I1e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function D1e(e){return oe.createElement(_e.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},y("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function N1e(e){return oe.createElement(_e.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},y("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function B1e(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?N1e:D1e;return n||t?oe.createElement(_e.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},y(i,{...r})):null}function $1e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Hj(e={}){const t=Fk(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:f,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:b,name:x,value:E,tabIndex:k=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":A,...R}=e,I=$1e(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=br(v),B=br(s),z=br(l),[j,Y]=C.exports.useState(!1),[te,G]=C.exports.useState(!1),[$,V]=C.exports.useState(!1),[J,Z]=C.exports.useState(!1);C.exports.useEffect(()=>O1e(Y),[]);const U=C.exports.useRef(null),[X,le]=C.exports.useState(!0),[fe,Se]=C.exports.useState(!!f),Ae=p!==void 0,be=Ae?p:fe,ke=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}Ae||Se(be?Le.target.checked:b?!0:Le.target.checked),D==null||D(Le)},[r,n,be,Ae,b,D]);Ys(()=>{U.current&&(U.current.indeterminate=Boolean(b))},[b]),Kd(()=>{n&&G(!1)},[n,G]),Ys(()=>{const Le=U.current;!(Le!=null&&Le.form)||(Le.form.onreset=()=>{Se(!!f)})},[]);const De=n&&!m,Je=C.exports.useCallback(Le=>{Le.key===" "&&Z(!0)},[Z]),Ye=C.exports.useCallback(Le=>{Le.key===" "&&Z(!1)},[Z]);Ys(()=>{if(!U.current)return;U.current.checked!==be&&Se(U.current.checked)},[U.current]);const mt=C.exports.useCallback((Le={},ut=null)=>{const Rt=ot=>{te&&ot.preventDefault(),Z(!0)};return{...Le,ref:ut,"data-active":vo(J),"data-hover":vo($),"data-checked":vo(be),"data-focus":vo(te),"data-focus-visible":vo(te&&j),"data-indeterminate":vo(b),"data-disabled":vo(n),"data-invalid":vo(o),"data-readonly":vo(r),"aria-hidden":!0,onMouseDown:Ka(Le.onMouseDown,Rt),onMouseUp:Ka(Le.onMouseUp,()=>Z(!1)),onMouseEnter:Ka(Le.onMouseEnter,()=>V(!0)),onMouseLeave:Ka(Le.onMouseLeave,()=>V(!1))}},[J,be,n,te,j,$,b,o,r]),_t=C.exports.useCallback((Le={},ut=null)=>({...I,...Le,ref:Gn(ut,Rt=>{!Rt||le(Rt.tagName==="LABEL")}),onClick:Ka(Le.onClick,()=>{var Rt;X||((Rt=U.current)==null||Rt.click(),requestAnimationFrame(()=>{var ot;(ot=U.current)==null||ot.focus()}))}),"data-disabled":vo(n),"data-checked":vo(be),"data-invalid":vo(o)}),[I,n,be,o,X]),dt=C.exports.useCallback((Le={},ut=null)=>({...Le,ref:Gn(U,ut),type:"checkbox",name:x,value:E,id:a,tabIndex:k,onChange:Ka(Le.onChange,ke),onBlur:Ka(Le.onBlur,B,()=>G(!1)),onFocus:Ka(Le.onFocus,z,()=>G(!0)),onKeyDown:Ka(Le.onKeyDown,Je),onKeyUp:Ka(Le.onKeyUp,Ye),required:i,checked:be,disabled:De,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":A?Boolean(A):o,"aria-describedby":u,"aria-disabled":n,style:zk}),[x,E,a,ke,B,z,Je,Ye,i,be,De,r,_,T,A,o,u,n,k]),vt=C.exports.useCallback((Le={},ut=null)=>({...Le,ref:ut,onMouseDown:Ka(Le.onMouseDown,SM),onTouchStart:Ka(Le.onTouchStart,SM),"data-disabled":vo(n),"data-checked":vo(be),"data-invalid":vo(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:te,isChecked:be,isActive:J,isHovered:$,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:mt,getInputProps:dt,getLabelProps:vt,htmlProps:I}}function SM(e){e.preventDefault(),e.stopPropagation()}var F1e={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},z1e={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},j1e=uf({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),H1e=uf({from:{opacity:0},to:{opacity:1}}),V1e=uf({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Vj=Oe(function(t,n){const r=M1e(),i={...r,...t},o=qi("Checkbox",i),a=_n(t),{spacing:s="0.5rem",className:l,children:u,iconColor:f,iconSize:p,icon:m=y(B1e,{}),isChecked:v,isDisabled:b=r==null?void 0:r.isDisabled,onChange:x,inputProps:E,...k}=a;let _=v;(r==null?void 0:r.value)&&a.value&&(_=r.value.includes(a.value));let T=x;(r==null?void 0:r.onChange)&&a.value&&(T=I1e(r.onChange,x));const{state:A,getInputProps:R,getCheckboxProps:I,getLabelProps:D,getRootProps:B}=Hj({...k,isDisabled:b,isChecked:_,onChange:T}),z=C.exports.useMemo(()=>({animation:A.isIndeterminate?`${H1e} 20ms linear, ${V1e} 200ms linear`:`${j1e} 200ms linear`,fontSize:p,color:f,...o.icon}),[f,p,,A.isIndeterminate,o.icon]),j=C.exports.cloneElement(m,{__css:z,isIndeterminate:A.isIndeterminate,isChecked:A.isChecked});return oe.createElement(_e.label,{__css:{...z1e,...o.container},className:R1e("chakra-checkbox",l),...B()},y("input",{className:"chakra-checkbox__input",...R(E,n)}),oe.createElement(_e.span,{__css:{...F1e,...o.control},className:"chakra-checkbox__control",...I()},j),u&&oe.createElement(_e.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});Vj.displayName="Checkbox";function U1e(e){return y($a,{focusable:"false","aria-hidden":!0,...e,children:y("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var ax=Oe(function(t,n){const r=Lo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=_n(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return oe.createElement(_e.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||y(U1e,{width:"1em",height:"1em"}))});ax.displayName="CloseButton";function W1e(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function Hk(e,t){let n=W1e(e);const r=10**(t!=null?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function k9(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function _5(e,t,n){return(e-t)*100/(n-t)}function Uj(e,t,n){return(n-t)*e+t}function E9(e,t,n){const r=Math.round((e-t)/n)*n+t,i=k9(n);return Hk(r,i)}function Lg(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function G1e(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,u=br(t),[f,p]=C.exports.useState(()=>{var j;return r==null?"":(j=z6(r,o,n))!=null?j:""}),m=typeof i<"u",v=m?i:f,b=Wj(gd(v),o),x=n!=null?n:b,E=C.exports.useCallback(j=>{j!==v&&(m||p(j.toString()),u==null||u(j.toString(),gd(j)))},[u,m,v]),k=C.exports.useCallback(j=>{let Y=j;return l&&(Y=Lg(Y,a,s)),Hk(Y,x)},[x,l,s,a]),_=C.exports.useCallback((j=o)=>{let Y;v===""?Y=gd(j):Y=gd(v)+j,Y=k(Y),E(Y)},[k,o,E,v]),T=C.exports.useCallback((j=o)=>{let Y;v===""?Y=gd(-j):Y=gd(v)-j,Y=k(Y),E(Y)},[k,o,E,v]),A=C.exports.useCallback(()=>{var Y;let j;r==null?j="":j=(Y=z6(r,o,n))!=null?Y:a,E(j)},[r,n,o,E,a]),R=C.exports.useCallback(j=>{var te;const Y=(te=z6(j,o,x))!=null?te:a;E(Y)},[x,o,E,a]),I=gd(v);return{isOutOfRange:I>s||I<a,isAtMax:I===s,isAtMin:I===a,precision:x,value:v,valueAsNumber:I,update:E,reset:A,increment:_,decrement:T,clamp:k,cast:R,setValue:p}}function gd(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function Wj(e,t){return Math.max(k9(t),k9(e))}function z6(e,t,n){const r=gd(e);if(Number.isNaN(r))return;const i=Wj(r,t);return Hk(r,n!=null?n:i)}var Gj=`
:root {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root {
--chakra-vh: 100dvh;
}
}
`,q1e=()=>y($S,{styles:Gj}),Y1e=()=>y($S,{styles:`
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
font-family: system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
touch-action: manipulation;
}
body {
position: relative;
min-height: 100%;
font-feature-settings: 'kern';
}
*,
*::before,
*::after {
border-width: 0;
border-style: solid;
box-sizing: border-box;
}
main {
display: block;
}
hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bold;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
details {
display: block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
body,
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
button {
background: transparent;
padding: 0;
}
fieldset {
margin: 0;
padding: 0;
}
ol,
ul {
margin: 0;
padding: 0;
}
textarea {
resize: vertical;
}
button,
[role="button"] {
cursor: pointer;
}
button::-moz-focus-inner {
border: 0 !important;
}
table {
border-collapse: collapse;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
button,
input,
optgroup,
select,
textarea {
padding: 0;
line-height: inherit;
color: inherit;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
}
img,
video {
max-width: 100%;
height: auto;
}
[data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
outline: none;
box-shadow: none;
}
select::-ms-expand {
display: none;
}
${Gj}
`});function jh(e,t,n,r){const i=br(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e!=null?e:document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e!=null?e:document;o==null||o.removeEventListener(t,i,r)}}function K1e(e){return"current"in e}var qj=()=>typeof window<"u";function X1e(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Z1e=e=>qj()&&e.test(navigator.vendor),Q1e=e=>qj()&&e.test(X1e()),J1e=()=>Q1e(/mac|iphone|ipad|ipod/i),eme=()=>J1e()&&Z1e(/apple/i);function tme(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var a;var o;return(a=(o=t.current)==null?void 0:o.ownerDocument)!=null?a:document};jh(i,"pointerdown",o=>{if(!eme()||!r)return;const a=o.target,l=(n!=null?n:[t]).some(u=>{const f=K1e(u)?u.current:u;return(f==null?void 0:f.contains(a))||f===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var nme=Gie?C.exports.useLayoutEffect:C.exports.useEffect;function xM(e,t=[]){const n=C.exports.useRef(e);return nme(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function rme(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ime(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Qh(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=xM(n),a=xM(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,f]=rme(r,s),p=ime(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),b=C.exports.useCallback(()=>{(f?m:v)()},[f,v,m]);return{isOpen:!!f,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(x={})=>({...x,"aria-expanded":f,"aria-controls":p,onClick:qie(x.onClick,b)}),getDisclosureProps:(x={})=>({...x,hidden:!f,id:p})}}function Vk(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var Uk=Oe(function(t,n){const{htmlSize:r,...i}=t,o=qi("Input",i),a=_n(i),s=$k(a),l=Yr("chakra-input",t.className);return oe.createElement(_e.input,{size:r,...s,__css:o.field,ref:n,className:l})});Uk.displayName="Input";Uk.id="Input";var[ome,Yj]=An({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),ame=Oe(function(t,n){const r=qi("Input",t),{children:i,className:o,...a}=_n(t),s=Yr("chakra-input__group",o),l={},u=rx(i),f=r.field;u.forEach(m=>{var v,b;!r||(f&&m.type.id==="InputLeftElement"&&(l.paddingStart=(v=f.height)!=null?v:f.h),f&&m.type.id==="InputRightElement"&&(l.paddingEnd=(b=f.height)!=null?b:f.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,b;const x=Vk({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((b=m.props)==null?void 0:b.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,x):C.exports.cloneElement(m,Object.assign(x,l,m.props))});return oe.createElement(_e.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},y(ome,{value:r,children:p}))});ame.displayName="InputGroup";var sme={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},lme=_e("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),Wk=Oe(function(t,n){var s;const{placement:r="left",...i}=t,o=(s=sme[r])!=null?s:{},a=Yj();return y(lme,{ref:n,...i,__css:{...a.addon,...o}})});Wk.displayName="InputAddon";var Kj=Oe(function(t,n){return y(Wk,{ref:n,placement:"left",...t,className:Yr("chakra-input__left-addon",t.className)})});Kj.displayName="InputLeftAddon";Kj.id="InputLeftAddon";var Xj=Oe(function(t,n){return y(Wk,{ref:n,placement:"right",...t,className:Yr("chakra-input__right-addon",t.className)})});Xj.displayName="InputRightAddon";Xj.id="InputRightAddon";var ume=_e("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),sx=Oe(function(t,n){var u,f;const{placement:r="left",...i}=t,o=Yj(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(u=a==null?void 0:a.height)!=null?u:a==null?void 0:a.h,height:(f=a==null?void 0:a.height)!=null?f:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...o.element};return y(ume,{ref:n,__css:l,...i})});sx.id="InputElement";sx.displayName="InputElement";var Zj=Oe(function(t,n){const{className:r,...i}=t,o=Yr("chakra-input__left-element",r);return y(sx,{ref:n,placement:"left",className:o,...i})});Zj.id="InputLeftElement";Zj.displayName="InputLeftElement";var Qj=Oe(function(t,n){const{className:r,...i}=t,o=Yr("chakra-input__right-element",r);return y(sx,{ref:n,placement:"right",className:o,...i})});Qj.id="InputRightElement";Qj.displayName="InputRightElement";function cme(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Xd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):cme(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var dme=Oe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Yr("chakra-aspect-ratio",i);return oe.createElement(_e.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Xd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});dme.displayName="AspectRatio";var fme=Oe(function(t,n){const r=Lo("Badge",t),{className:i,...o}=_n(t);return oe.createElement(_e.span,{ref:n,className:Yr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});fme.displayName="Badge";var rl=_e("div");rl.displayName="Box";var Jj=Oe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return y(rl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Jj.displayName="Square";var hme=Oe(function(t,n){const{size:r,...i}=t;return y(Jj,{size:r,ref:n,borderRadius:"9999px",...i})});hme.displayName="Circle";var eH=_e("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});eH.displayName="Center";var pme={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Oe(function(t,n){const{axis:r="both",...i}=t;return oe.createElement(_e.div,{ref:n,__css:pme[r],...i,position:"absolute"})});var gme=Oe(function(t,n){const r=Lo("Code",t),{className:i,...o}=_n(t);return oe.createElement(_e.code,{ref:n,className:Yr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});gme.displayName="Code";var mme=Oe(function(t,n){const{className:r,centerContent:i,...o}=_n(t),a=Lo("Container",t);return oe.createElement(_e.div,{ref:n,className:Yr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});mme.displayName="Container";var vme=Oe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...f}=Lo("Divider",t),{className:p,orientation:m="horizontal",__css:v,...b}=_n(t),x={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return oe.createElement(_e.hr,{ref:n,"aria-orientation":m,...b,__css:{...f,border:"0",borderColor:u,borderStyle:l,...x[m],...v},className:Yr("chakra-divider",p)})});vme.displayName="Divider";var at=Oe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...f}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return oe.createElement(_e.div,{ref:n,__css:p,...f})});at.displayName="Flex";var tH=Oe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:f,templateRows:p,autoColumns:m,templateColumns:v,...b}=t,x={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:f,gridTemplateRows:p,gridTemplateColumns:v};return oe.createElement(_e.div,{ref:n,__css:x,...b})});tH.displayName="Grid";function wM(e){return Xd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var yme=Oe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...f}=t,p=Vk({gridArea:r,gridColumn:wM(i),gridRow:wM(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return oe.createElement(_e.div,{ref:n,__css:p,...f})});yme.displayName="GridItem";var Hh=Oe(function(t,n){const r=Lo("Heading",t),{className:i,...o}=_n(t);return oe.createElement(_e.h2,{ref:n,className:Yr("chakra-heading",t.className),...o,__css:r})});Hh.displayName="Heading";Oe(function(t,n){const r=Lo("Mark",t),i=_n(t);return y(rl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var bme=Oe(function(t,n){const r=Lo("Kbd",t),{className:i,...o}=_n(t);return oe.createElement(_e.kbd,{ref:n,className:Yr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});bme.displayName="Kbd";var Vh=Oe(function(t,n){const r=Lo("Link",t),{className:i,isExternal:o,...a}=_n(t);return oe.createElement(_e.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Yr("chakra-link",i),...a,__css:r})});Vh.displayName="Link";Oe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return oe.createElement(_e.a,{...s,ref:n,className:Yr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Oe(function(t,n){const{className:r,...i}=t;return oe.createElement(_e.div,{ref:n,position:"relative",...i,className:Yr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Sme,nH]=An({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),Gk=Oe(function(t,n){const r=qi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=_n(t),u=rx(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return oe.createElement(Sme,{value:r},oe.createElement(_e.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});Gk.displayName="List";var xme=Oe((e,t)=>{const{as:n,...r}=e;return y(Gk,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});xme.displayName="OrderedList";var wme=Oe(function(t,n){const{as:r,...i}=t;return y(Gk,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});wme.displayName="UnorderedList";var Cme=Oe(function(t,n){const r=nH();return oe.createElement(_e.li,{ref:n,...t,__css:r.item})});Cme.displayName="ListItem";var _me=Oe(function(t,n){const r=nH();return y($a,{ref:n,role:"presentation",...t,__css:r.icon})});_me.displayName="ListIcon";var kme=Oe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=h1(),f=s?Pme(s,u):Tme(r);return y(tH,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:f,...l})});kme.displayName="SimpleGrid";function Eme(e){return typeof e=="number"?`${e}px`:e}function Pme(e,t){return Xd(e,n=>{const r=Tde("sizes",n,Eme(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Tme(e){return Xd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var rH=_e("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});rH.displayName="Spacer";var P9="& > *:not(style) ~ *:not(style)";function Lme(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[P9]:Xd(n,i=>r[i])}}function Ame(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Xd(n,i=>r[i])}}var iH=e=>oe.createElement(_e.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});iH.displayName="StackItem";var qk=Oe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:f,shouldWrapChildren:p,...m}=e,v=n?"row":r!=null?r:"column",b=C.exports.useMemo(()=>Lme({direction:v,spacing:a}),[v,a]),x=C.exports.useMemo(()=>Ame({spacing:a,direction:v}),[a,v]),E=!!u,k=!p&&!E,_=C.exports.useMemo(()=>{const A=rx(l);return k?A:A.map((R,I)=>{const D=typeof R.key<"u"?R.key:I,B=I+1===A.length,j=p?y(iH,{children:R},D):R;if(!E)return j;const Y=C.exports.cloneElement(u,{__css:x}),te=B?null:Y;return K(C.exports.Fragment,{children:[j,te]},D)})},[u,x,E,k,p,l]),T=Yr("chakra-stack",f);return oe.createElement(_e.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[P9]:b[P9]},...m},_)});qk.displayName="Stack";var Sy=Oe((e,t)=>y(qk,{align:"center",...e,direction:"row",ref:t}));Sy.displayName="HStack";var pi=Oe((e,t)=>y(qk,{align:"center",...e,direction:"column",ref:t}));pi.displayName="VStack";var yr=Oe(function(t,n){const r=Lo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=_n(t),u=Vk({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return oe.createElement(_e.p,{ref:n,className:Yr("chakra-text",t.className),...u,...l,__css:r})});yr.displayName="Text";function CM(e){return typeof e=="number"?`${e}px`:e}var Ome=Oe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:f,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:x=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":k=>Xd(x,_=>CM(N7("space",_)(k))),"--chakra-wrap-y-spacing":k=>Xd(E,_=>CM(N7("space",_)(k))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),b=C.exports.useMemo(()=>p?C.exports.Children.map(a,(x,E)=>y(oH,{children:x},E)):a,[a,p]);return oe.createElement(_e.div,{ref:n,className:Yr("chakra-wrap",f),overflow:"hidden",...m},oe.createElement(_e.ul,{className:"chakra-wrap__list",__css:v},b))});Ome.displayName="Wrap";var oH=Oe(function(t,n){const{className:r,...i}=t;return oe.createElement(_e.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Yr("chakra-wrap__listitem",r),...i})});oH.displayName="WrapItem";var Mme={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},aH=Mme,_0=()=>{},Rme={document:aH,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:_0,removeEventListener:_0,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:_0,removeListener:_0}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:_0,setInterval:()=>0,clearInterval:_0},Ime=Rme,Dme={window:Ime,document:aH},sH=typeof window<"u"?{window,document}:Dme,lH=C.exports.createContext(sH);lH.displayName="EnvironmentContext";function uH(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,u=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:u}:sH},[r,n]);return K(lH.Provider,{value:s,children:[t,!n&&o&&y("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}uH.displayName="EnvironmentProvider";var Nme=e=>e?"":void 0;function Bme(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function j6(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function $me(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:f,tabIndex:p,onMouseOver:m,onMouseLeave:v,...b}=e,[x,E]=C.exports.useState(!0),[k,_]=C.exports.useState(!1),T=Bme(),A=Z=>{!Z||Z.tagName!=="BUTTON"&&E(!1)},R=x?p:p||0,I=n&&!r,D=C.exports.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l==null||l(Z)},[n,l]),B=C.exports.useCallback(Z=>{k&&j6(Z)&&(Z.preventDefault(),Z.stopPropagation(),_(!1),T.remove(document,"keyup",B,!1))},[k,T]),z=C.exports.useCallback(Z=>{if(u==null||u(Z),n||Z.defaultPrevented||Z.metaKey||!j6(Z.nativeEvent)||x)return;const U=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),_(!0)),U&&(Z.preventDefault(),Z.currentTarget.click()),T.add(document,"keyup",B,!1)},[n,x,u,i,o,T,B]),j=C.exports.useCallback(Z=>{if(f==null||f(Z),n||Z.defaultPrevented||Z.metaKey||!j6(Z.nativeEvent)||x)return;o&&Z.key===" "&&(Z.preventDefault(),_(!1),Z.currentTarget.click())},[o,x,n,f]),Y=C.exports.useCallback(Z=>{Z.button===0&&(_(!1),T.remove(document,"mouseup",Y,!1))},[T]),te=C.exports.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}x||_(!0),Z.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a==null||a(Z)},[n,x,a,T,Y]),G=C.exports.useCallback(Z=>{Z.button===0&&(x||_(!1),s==null||s(Z))},[s,x]),$=C.exports.useCallback(Z=>{if(n){Z.preventDefault();return}m==null||m(Z)},[n,m]),V=C.exports.useCallback(Z=>{k&&(Z.preventDefault(),_(!1)),v==null||v(Z)},[k,v]),J=Gn(t,A);return x?{...b,ref:J,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:f,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Nme(k),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:R,onClick:D,onMouseDown:te,onMouseUp:G,onKeyUp:j,onKeyDown:z,onMouseOver:$,onMouseLeave:V}}function cH(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function dH(e){var n;if(!cH(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}function Fme(e){var n;var t;return(n=(t=fH(e))==null?void 0:t.defaultView)!=null?n:window}function fH(e){return cH(e)?e.ownerDocument:document}function zme(e){return fH(e).activeElement}var hH=e=>e.hasAttribute("tabindex"),jme=e=>hH(e)&&e.tabIndex===-1;function Hme(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function pH(e){return e.parentElement&&pH(e.parentElement)?!0:e.hidden}function Vme(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function gH(e){if(!dH(e)||pH(e)||Hme(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Vme(e)?!0:hH(e)}function Ume(e){return e?dH(e)&&gH(e)&&!jme(e):!1}var Wme=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Gme=Wme.join(),qme=e=>e.offsetWidth>0&&e.offsetHeight>0;function mH(e){const t=Array.from(e.querySelectorAll(Gme));return t.unshift(e),t.filter(n=>gH(n)&&qme(n))}function Yme(e){const t=e.current;if(!t)return!1;const n=zme(t);return!n||t.contains(n)?!1:!!Ume(n)}function Kme(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;Kd(()=>{if(!o||Yme(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Xme={preventScroll:!0,shouldFocus:!1};function Zme(e,t=Xme){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Qme(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Ys(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const f=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=mH(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);Kd(()=>{f()},[f]),jh(a,"transitionend",f)}function Qme(e){return"current"in e}var ta="top",hs="bottom",ps="right",na="left",Yk="auto",xy=[ta,hs,ps,na],Zg="start",H2="end",Jme="clippingParents",vH="viewport",Qm="popper",eve="reference",_M=xy.reduce(function(e,t){return e.concat([t+"-"+Zg,t+"-"+H2])},[]),yH=[].concat(xy,[Yk]).reduce(function(e,t){return e.concat([t,t+"-"+Zg,t+"-"+H2])},[]),tve="beforeRead",nve="read",rve="afterRead",ive="beforeMain",ove="main",ave="afterMain",sve="beforeWrite",lve="write",uve="afterWrite",cve=[tve,nve,rve,ive,ove,ave,sve,lve,uve];function uu(e){return e?(e.nodeName||"").toLowerCase():null}function ms(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jh(e){var t=ms(e).Element;return e instanceof t||e instanceof Element}function ls(e){var t=ms(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Kk(e){if(typeof ShadowRoot>"u")return!1;var t=ms(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function dve(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ls(o)||!uu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function fve(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!ls(i)||!uu(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const hve={name:"applyStyles",enabled:!0,phase:"write",fn:dve,effect:fve,requires:["computeStyles"]};function nu(e){return e.split("-")[0]}var Uh=Math.max,k5=Math.min,Qg=Math.round;function T9(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function bH(){return!/^((?!chrome|android).)*safari/i.test(T9())}function Jg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ls(e)&&(i=e.offsetWidth>0&&Qg(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Qg(r.height)/e.offsetHeight||1);var a=Jh(e)?ms(e):window,s=a.visualViewport,l=!bH()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:f,right:u+p,bottom:f+m,left:u,x:u,y:f}}function Xk(e){var t=Jg(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function SH(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Kk(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function sc(e){return ms(e).getComputedStyle(e)}function pve(e){return["table","td","th"].indexOf(uu(e))>=0}function df(e){return((Jh(e)?e.ownerDocument:e.document)||window.document).documentElement}function lx(e){return uu(e)==="html"?e:e.assignedSlot||e.parentNode||(Kk(e)?e.host:null)||df(e)}function kM(e){return!ls(e)||sc(e).position==="fixed"?null:e.offsetParent}function gve(e){var t=/firefox/i.test(T9()),n=/Trident/i.test(T9());if(n&&ls(e)){var r=sc(e);if(r.position==="fixed")return null}var i=lx(e);for(Kk(i)&&(i=i.host);ls(i)&&["html","body"].indexOf(uu(i))<0;){var o=sc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function wy(e){for(var t=ms(e),n=kM(e);n&&pve(n)&&sc(n).position==="static";)n=kM(n);return n&&(uu(n)==="html"||uu(n)==="body"&&sc(n).position==="static")?t:n||gve(e)||t}function Zk(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function e2(e,t,n){return Uh(e,k5(t,n))}function mve(e,t,n){var r=e2(e,t,n);return r>n?n:r}function xH(){return{top:0,right:0,bottom:0,left:0}}function wH(e){return Object.assign({},xH(),e)}function CH(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var vve=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,wH(typeof t!="number"?t:CH(t,xy))};function yve(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=nu(n.placement),l=Zk(s),u=[na,ps].indexOf(s)>=0,f=u?"height":"width";if(!(!o||!a)){var p=vve(i.padding,n),m=Xk(o),v=l==="y"?ta:na,b=l==="y"?hs:ps,x=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],E=a[l]-n.rects.reference[l],k=wy(o),_=k?l==="y"?k.clientHeight||0:k.clientWidth||0:0,T=x/2-E/2,A=p[v],R=_-m[f]-p[b],I=_/2-m[f]/2+T,D=e2(A,I,R),B=l;n.modifiersData[r]=(t={},t[B]=D,t.centerOffset=D-I,t)}}function bve(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!SH(t.elements.popper,i)||(t.elements.arrow=i))}const Sve={name:"arrow",enabled:!0,phase:"main",fn:yve,effect:bve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function e1(e){return e.split("-")[1]}var xve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wve(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Qg(t*i)/i||0,y:Qg(n*i)/i||0}}function EM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,x=b===void 0?0:b,E=typeof f=="function"?f({x:v,y:x}):{x:v,y:x};v=E.x,x=E.y;var k=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=na,A=ta,R=window;if(u){var I=wy(n),D="clientHeight",B="clientWidth";if(I===ms(n)&&(I=df(n),sc(I).position!=="static"&&s==="absolute"&&(D="scrollHeight",B="scrollWidth")),I=I,i===ta||(i===na||i===ps)&&o===H2){A=hs;var z=p&&I===R&&R.visualViewport?R.visualViewport.height:I[D];x-=z-r.height,x*=l?1:-1}if(i===na||(i===ta||i===hs)&&o===H2){T=ps;var j=p&&I===R&&R.visualViewport?R.visualViewport.width:I[B];v-=j-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&xve),te=f===!0?wve({x:v,y:x}):{x:v,y:x};if(v=te.x,x=te.y,l){var G;return Object.assign({},Y,(G={},G[A]=_?"0":"",G[T]=k?"0":"",G.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+x+"px)":"translate3d("+v+"px, "+x+"px, 0)",G))}return Object.assign({},Y,(t={},t[A]=_?x+"px":"",t[T]=k?v+"px":"",t.transform="",t))}function Cve(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:nu(t.placement),variation:e1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,EM(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,EM(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _ve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cve,data:{}};var ub={passive:!0};function kve(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ms(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,ub)}),s&&l.addEventListener("resize",n.update,ub),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,ub)}),s&&l.removeEventListener("resize",n.update,ub)}}const Eve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kve,data:{}};var Pve={left:"right",right:"left",bottom:"top",top:"bottom"};function p4(e){return e.replace(/left|right|bottom|top/g,function(t){return Pve[t]})}var Tve={start:"end",end:"start"};function PM(e){return e.replace(/start|end/g,function(t){return Tve[t]})}function Qk(e){var t=ms(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Jk(e){return Jg(df(e)).left+Qk(e).scrollLeft}function Lve(e,t){var n=ms(e),r=df(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=bH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Jk(e),y:l}}function Ave(e){var t,n=df(e),r=Qk(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Uh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Uh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Jk(e),l=-r.scrollTop;return sc(i||n).direction==="rtl"&&(s+=Uh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function eE(e){var t=sc(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function _H(e){return["html","body","#document"].indexOf(uu(e))>=0?e.ownerDocument.body:ls(e)&&eE(e)?e:_H(lx(e))}function t2(e,t){var n;t===void 0&&(t=[]);var r=_H(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ms(r),a=i?[o].concat(o.visualViewport||[],eE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(t2(lx(a)))}function L9(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ove(e,t){var n=Jg(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function TM(e,t,n){return t===vH?L9(Lve(e,n)):Jh(t)?Ove(t,n):L9(Ave(df(e)))}function Mve(e){var t=t2(lx(e)),n=["absolute","fixed"].indexOf(sc(e).position)>=0,r=n&&ls(e)?wy(e):e;return Jh(r)?t.filter(function(i){return Jh(i)&&SH(i,r)&&uu(i)!=="body"}):[]}function Rve(e,t,n,r){var i=t==="clippingParents"?Mve(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var f=TM(e,u,r);return l.top=Uh(f.top,l.top),l.right=k5(f.right,l.right),l.bottom=k5(f.bottom,l.bottom),l.left=Uh(f.left,l.left),l},TM(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function kH(e){var t=e.reference,n=e.element,r=e.placement,i=r?nu(r):null,o=r?e1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case ta:l={x:a,y:t.y-n.height};break;case hs:l={x:a,y:t.y+t.height};break;case ps:l={x:t.x+t.width,y:s};break;case na:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Zk(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case Zg:l[u]=l[u]-(t[f]/2-n[f]/2);break;case H2:l[u]=l[u]+(t[f]/2-n[f]/2);break}}return l}function V2(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?Jme:s,u=n.rootBoundary,f=u===void 0?vH:u,p=n.elementContext,m=p===void 0?Qm:p,v=n.altBoundary,b=v===void 0?!1:v,x=n.padding,E=x===void 0?0:x,k=wH(typeof E!="number"?E:CH(E,xy)),_=m===Qm?eve:Qm,T=e.rects.popper,A=e.elements[b?_:m],R=Rve(Jh(A)?A:A.contextElement||df(e.elements.popper),l,f,a),I=Jg(e.elements.reference),D=kH({reference:I,element:T,strategy:"absolute",placement:i}),B=L9(Object.assign({},T,D)),z=m===Qm?B:I,j={top:R.top-z.top+k.top,bottom:z.bottom-R.bottom+k.bottom,left:R.left-z.left+k.left,right:z.right-R.right+k.right},Y=e.modifiersData.offset;if(m===Qm&&Y){var te=Y[i];Object.keys(j).forEach(function(G){var $=[ps,hs].indexOf(G)>=0?1:-1,V=[ta,hs].indexOf(G)>=0?"y":"x";j[G]+=te[V]*$})}return j}function Ive(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?yH:l,f=e1(r),p=f?s?_M:_M.filter(function(b){return e1(b)===f}):xy,m=p.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=p);var v=m.reduce(function(b,x){return b[x]=V2(e,{placement:x,boundary:i,rootBoundary:o,padding:a})[nu(x)],b},{});return Object.keys(v).sort(function(b,x){return v[b]-v[x]})}function Dve(e){if(nu(e)===Yk)return[];var t=p4(e);return[PM(e),t,PM(t)]}function Nve(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,x=n.allowedAutoPlacements,E=t.options.placement,k=nu(E),_=k===E,T=l||(_||!b?[p4(E)]:Dve(E)),A=[E].concat(T).reduce(function(be,ke){return be.concat(nu(ke)===Yk?Ive(t,{placement:ke,boundary:f,rootBoundary:p,padding:u,flipVariations:b,allowedAutoPlacements:x}):ke)},[]),R=t.rects.reference,I=t.rects.popper,D=new Map,B=!0,z=A[0],j=0;j<A.length;j++){var Y=A[j],te=nu(Y),G=e1(Y)===Zg,$=[ta,hs].indexOf(te)>=0,V=$?"width":"height",J=V2(t,{placement:Y,boundary:f,rootBoundary:p,altBoundary:m,padding:u}),Z=$?G?ps:na:G?hs:ta;R[V]>I[V]&&(Z=p4(Z));var U=p4(Z),X=[];if(o&&X.push(J[te]<=0),s&&X.push(J[Z]<=0,J[U]<=0),X.every(function(be){return be})){z=Y,B=!1;break}D.set(Y,X)}if(B)for(var le=b?3:1,fe=function(ke){var De=A.find(function(Je){var Ye=D.get(Je);if(Ye)return Ye.slice(0,ke).every(function(mt){return mt})});if(De)return z=De,"break"},Se=le;Se>0;Se--){var Ae=fe(Se);if(Ae==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const Bve={name:"flip",enabled:!0,phase:"main",fn:Nve,requiresIfExists:["offset"],data:{_skip:!1}};function LM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function AM(e){return[ta,ps,hs,na].some(function(t){return e[t]>=0})}function $ve(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=V2(t,{elementContext:"reference"}),s=V2(t,{altBoundary:!0}),l=LM(a,r),u=LM(s,i,o),f=AM(l),p=AM(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const Fve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$ve};function zve(e,t,n){var r=nu(e),i=[na,ta].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[na,ps].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function jve(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=yH.reduce(function(f,p){return f[p]=zve(p,t.rects,o),f},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Hve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jve};function Vve(e){var t=e.state,n=e.name;t.modifiersData[n]=kH({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Uve={name:"popperOffsets",enabled:!0,phase:"read",fn:Vve,data:{}};function Wve(e){return e==="x"?"y":"x"}function Gve(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,x=b===void 0?0:b,E=V2(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:f}),k=nu(t.placement),_=e1(t.placement),T=!_,A=Zk(k),R=Wve(A),I=t.modifiersData.popperOffsets,D=t.rects.reference,B=t.rects.popper,z=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,j=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(!!I){if(o){var G,$=A==="y"?ta:na,V=A==="y"?hs:ps,J=A==="y"?"height":"width",Z=I[A],U=Z+E[$],X=Z-E[V],le=v?-B[J]/2:0,fe=_===Zg?D[J]:B[J],Se=_===Zg?-B[J]:-D[J],Ae=t.elements.arrow,be=v&&Ae?Xk(Ae):{width:0,height:0},ke=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:xH(),De=ke[$],Je=ke[V],Ye=e2(0,D[J],be[J]),mt=T?D[J]/2-le-Ye-De-j.mainAxis:fe-Ye-De-j.mainAxis,_t=T?-D[J]/2+le+Ye+Je+j.mainAxis:Se+Ye+Je+j.mainAxis,dt=t.elements.arrow&&wy(t.elements.arrow),vt=dt?A==="y"?dt.clientTop||0:dt.clientLeft||0:0,xt=(G=Y==null?void 0:Y[A])!=null?G:0,Le=Z+mt-xt-vt,ut=Z+_t-xt,Rt=e2(v?k5(U,Le):U,Z,v?Uh(X,ut):X);I[A]=Rt,te[A]=Rt-Z}if(s){var ot,Ct=A==="x"?ta:na,ln=A==="x"?hs:ps,ue=I[R],Ie=R==="y"?"height":"width",We=ue+E[Ct],Xe=ue-E[ln],Ce=[ta,na].indexOf(k)!==-1,Ne=(ot=Y==null?void 0:Y[R])!=null?ot:0,kt=Ce?We:ue-D[Ie]-B[Ie]-Ne+j.altAxis,Nt=Ce?ue+D[Ie]+B[Ie]-Ne-j.altAxis:Xe,Te=v&&Ce?mve(kt,ue,Nt):e2(v?kt:We,ue,v?Nt:Xe);I[R]=Te,te[R]=Te-ue}t.modifiersData[r]=te}}const qve={name:"preventOverflow",enabled:!0,phase:"main",fn:Gve,requiresIfExists:["offset"]};function Yve(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kve(e){return e===ms(e)||!ls(e)?Qk(e):Yve(e)}function Xve(e){var t=e.getBoundingClientRect(),n=Qg(t.width)/e.offsetWidth||1,r=Qg(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Zve(e,t,n){n===void 0&&(n=!1);var r=ls(t),i=ls(t)&&Xve(t),o=df(t),a=Jg(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((uu(t)!=="body"||eE(o))&&(s=Kve(t)),ls(t)?(l=Jg(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Jk(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Qve(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Jve(e){var t=Qve(e);return cve.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function e2e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function t2e(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var OM={placement:"bottom",modifiers:[],strategy:"absolute"};function MM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function n2e(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?OM:i;return function(s,l,u){u===void 0&&(u=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},OM,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],m=!1,v={state:f,setOptions:function(k){var _=typeof k=="function"?k(f.options):k;x(),f.options=Object.assign({},o,f.options,_),f.scrollParents={reference:Jh(s)?t2(s):s.contextElement?t2(s.contextElement):[],popper:t2(l)};var T=Jve(t2e([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(A){return A.enabled}),b(),v.update()},forceUpdate:function(){if(!m){var k=f.elements,_=k.reference,T=k.popper;if(!!MM(_,T)){f.rects={reference:Zve(_,wy(T),f.options.strategy==="fixed"),popper:Xk(T)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(j){return f.modifiersData[j.name]=Object.assign({},j.data)});for(var A=0;A<f.orderedModifiers.length;A++){if(f.reset===!0){f.reset=!1,A=-1;continue}var R=f.orderedModifiers[A],I=R.fn,D=R.options,B=D===void 0?{}:D,z=R.name;typeof I=="function"&&(f=I({state:f,options:B,name:z,instance:v})||f)}}}},update:e2e(function(){return new Promise(function(E){v.forceUpdate(),E(f)})}),destroy:function(){x(),m=!0}};if(!MM(s,l))return v;v.setOptions(u).then(function(E){!m&&u.onFirstUpdate&&u.onFirstUpdate(E)});function b(){f.orderedModifiers.forEach(function(E){var k=E.name,_=E.options,T=_===void 0?{}:_,A=E.effect;if(typeof A=="function"){var R=A({state:f,name:k,instance:v,options:T}),I=function(){};p.push(R||I)}})}function x(){p.forEach(function(E){return E()}),p=[]}return v}}var r2e=[Eve,Uve,_ve,hve,Hve,Bve,qve,Sve,Fve],i2e=n2e({defaultModifiers:r2e}),k0=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),ri={arrowShadowColor:k0("--popper-arrow-shadow-color"),arrowSize:k0("--popper-arrow-size","8px"),arrowSizeHalf:k0("--popper-arrow-size-half"),arrowBg:k0("--popper-arrow-bg"),transformOrigin:k0("--popper-transform-origin"),arrowOffset:k0("--popper-arrow-offset")};function o2e(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var a2e={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},s2e=e=>a2e[e],RM={scroll:!0,resize:!0};function l2e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...RM,...e}}:t={enabled:e,options:RM},t}var u2e={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},c2e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{IM(e)},effect:({state:e})=>()=>{IM(e)}},IM=e=>{e.elements.popper.style.setProperty(ri.transformOrigin.var,s2e(e.placement))},d2e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{f2e(e)}},f2e=e=>{var t;if(!e.placement)return;const n=h2e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:ri.arrowSize.varRef,height:ri.arrowSize.varRef,zIndex:-1});const r={[ri.arrowSizeHalf.var]:`calc(${ri.arrowSize.varRef} / 2)`,[ri.arrowOffset.var]:`calc(${ri.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},h2e=e=>{if(e.startsWith("top"))return{property:"bottom",value:ri.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:ri.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:ri.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:ri.arrowOffset.varRef}},p2e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{DM(e)},effect:({state:e})=>()=>{DM(e)}},DM=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:ri.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:o2e(e.placement)})},g2e={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},m2e={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function v2e(e,t="ltr"){var i;var n;const r=((n=g2e[e])==null?void 0:n[t])||e;return t==="ltr"?r:(i=m2e[e])!=null?i:r}function EH(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:f="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),x=C.exports.useRef(null),E=C.exports.useRef(null),k=v2e(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var j;!t||!b.current||!x.current||((j=_.current)==null||j.call(_),E.current=i2e(b.current,x.current,{placement:k,modifiers:[p2e,d2e,c2e,{...u2e,enabled:!!m},{name:"eventListeners",...l2e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s!=null?s:[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:f}},...n!=null?n:[]],strategy:i}),E.current.forceUpdate(),_.current=E.current.destroy)},[k,t,n,m,a,o,s,l,u,p,f,i]);C.exports.useEffect(()=>()=>{var j;!b.current&&!x.current&&((j=E.current)==null||j.destroy(),E.current=null)},[]);const A=C.exports.useCallback(j=>{b.current=j,T()},[T]),R=C.exports.useCallback((j={},Y=null)=>({...j,ref:Gn(A,Y)}),[A]),I=C.exports.useCallback(j=>{x.current=j,T()},[T]),D=C.exports.useCallback((j={},Y=null)=>({...j,ref:Gn(I,Y),style:{...j.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),B=C.exports.useCallback((j={},Y=null)=>{const{size:te,shadowColor:G,bg:$,style:V,...J}=j;return{...J,ref:Y,"data-popper-arrow":"",style:y2e(j)}},[]),z=C.exports.useCallback((j={},Y=null)=>({...j,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var j;(j=E.current)==null||j.update()},forceUpdate(){var j;(j=E.current)==null||j.forceUpdate()},transformOrigin:ri.transformOrigin.varRef,referenceRef:A,popperRef:I,getPopperProps:D,getArrowProps:B,getArrowInnerProps:z,getReferenceProps:R}}function y2e(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function PH(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=br(n),a=br(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,f=r!==void 0,p=C.exports.useId(),m=i!=null?i:`disclosure-${p}`,v=C.exports.useCallback(()=>{f||l(!1),a==null||a()},[f,a]),b=C.exports.useCallback(()=>{f||l(!0),o==null||o()},[f,o]),x=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var A;(A=_.onClick)==null||A.call(_,T),x()}}}function k(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:x,isControlled:f,getButtonProps:E,getDisclosureProps:k}}function b2e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),jh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Fme(n.current),f=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(f)}}}function TH(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[S2e,x2e]=An({strict:!1,name:"PortalManagerContext"});function LH(e){const{children:t,zIndex:n}=e;return y(S2e,{value:{zIndex:n},children:t})}LH.displayName="PortalManager";var[AH,w2e]=An({strict:!1,name:"PortalContext"}),tE="chakra-portal",C2e=".chakra-portal",_2e=e=>y("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),k2e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=w2e(),l=x2e();Ys(()=>{if(!r)return;const f=r.ownerDocument,p=t&&s!=null?s:f.body;if(!p)return;o.current=f.createElement("div"),o.current.className=tE,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?y(_2e,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?pu.exports.createPortal(y(AH,{value:o.current,children:u}),o.current):y("span",{ref:f=>{f&&i(f)}})},E2e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i!=null?i:typeof window<"u"?document.body:void 0,a=C.exports.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=tE),l},[i]),[,s]=C.exports.useState({});return Ys(()=>s({}),[]),Ys(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?pu.exports.createPortal(y(AH,{value:r?a:null,children:t}),a):null};function up(e){const{containerRef:t,...n}=e;return t?y(E2e,{containerRef:t,...n}):y(k2e,{...n})}up.defaultProps={appendToParentPortal:!0};up.className=tE;up.selector=C2e;up.displayName="Portal";var P2e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},E0=new WeakMap,cb=new WeakMap,db={},H6=0,OH=function(e){return e&&(e.host||OH(e.parentNode))},T2e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OH(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},L2e=function(e,t,n,r){var i=T2e(t,Array.isArray(e)?e:[e]);db[n]||(db[n]=new WeakMap);var o=db[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))f(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",x=(E0.get(m)||0)+1,E=(o.get(m)||0)+1;E0.set(m,x),o.set(m,E),a.push(m),x===1&&b&&cb.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return f(t),s.clear(),H6++,function(){a.forEach(function(p){var m=E0.get(p)-1,v=o.get(p)-1;E0.set(p,m),o.set(p,v),m||(cb.has(p)||p.removeAttribute(r),cb.delete(p)),v||p.removeAttribute(n)}),H6--,H6||(E0=new WeakMap,E0=new WeakMap,cb=new WeakMap,db={})}},MH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||P2e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),L2e(r,i,n,"aria-hidden")):function(){return null}};function nE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Fn={exports:{}},A2e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",O2e=A2e,M2e=O2e;function RH(){}function IH(){}IH.resetWarningCache=RH;var R2e=function(){function e(r,i,o,a,s,l){if(l!==M2e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:IH,resetWarningCache:RH};return n.PropTypes=n,n};Fn.exports=R2e();var A9="data-focus-lock",DH="data-focus-lock-disabled",I2e="data-no-focus-lock",D2e="data-autofocus-inside",N2e="data-no-autofocus";function B2e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $2e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function NH(e,t){return $2e(t||null,function(n){return e.forEach(function(r){return B2e(r,n)})})}var V6={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function BH(e){return e}function $H(e,t){t===void 0&&(t=BH);var n=[],r=!1,i={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(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var f=a;a=[],f.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return i}function rE(e,t){return t===void 0&&(t=BH),$H(e,t)}function FH(e){e===void 0&&(e={});var t=$H(null);return t.options=Ul({async:!0,ssr:!1},e),t}var zH=function(e){var t=e.sideCar,n=Aj(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(r,{...Ul({},n)})};zH.isSideCarExport=!0;function F2e(e,t){return e.useMedium(t),zH}var jH=rE({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),HH=rE(),z2e=rE(),j2e=FH({async:!0}),H2e=[],iE=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),f=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,x=t.autoFocus;t.allowTextSelection;var E=t.group,k=t.className,_=t.whiteList,T=t.hasPositiveIndices,A=t.shards,R=A===void 0?H2e:A,I=t.as,D=I===void 0?"div":I,B=t.lockProps,z=B===void 0?{}:B,j=t.sideCar,Y=t.returnFocus,te=t.focusOptions,G=t.onActivation,$=t.onDeactivation,V=C.exports.useState({}),J=V[0],Z=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&G&&G(s.current),l.current=!0},[G]),U=C.exports.useCallback(function(){l.current=!1,$&&$(s.current)},[$]);C.exports.useEffect(function(){p||(u.current=null)},[]);var X=C.exports.useCallback(function(Je){var Ye=u.current;if(Ye&&Ye.focus){var mt=typeof Y=="function"?Y(Ye):Y;if(mt){var _t=typeof mt=="object"?mt:void 0;u.current=null,Je?Promise.resolve().then(function(){return Ye.focus(_t)}):Ye.focus(_t)}}},[Y]),le=C.exports.useCallback(function(Je){l.current&&jH.useMedium(Je)},[]),fe=HH.useMedium,Se=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),Ae=Dn((r={},r[DH]=p&&"disabled",r[A9]=E,r),z),be=m!==!0,ke=be&&m!=="tail",De=NH([n,Se]);return K(fn,{children:[be&&[y("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:V6},"guard-first"),T?y("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:V6},"guard-nearest"):null],!p&&y(j,{id:J,sideCar:j2e,observed:o,disabled:p,persistentFocus:v,crossFrame:b,autoFocus:x,whiteList:_,shards:R,onActivation:Z,onDeactivation:U,returnFocus:X,focusOptions:te}),y(D,{ref:De,...Ae,className:k,onBlur:fe,onFocus:le,children:f}),ke&&y("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:V6})]})});iE.propTypes={};iE.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const VH=iE;function O9(e,t){return O9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},O9(e,t)}function oE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O9(e,t)}function UH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V2e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){oE(f,u);function f(){return u.apply(this,arguments)||this}f.peek=function(){return a};var p=f.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return y(i,{...this.props})},f}(C.exports.PureComponent);return UH(l,"displayName","SideEffect("+n(i)+")"),l}}var mu=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},M9=function(e){return Array.isArray(e)?e:[e]},U2e=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},WH=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},GH=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},W2e=function(e,t){return!e||GH(e)||!U2e(e)&&t(WH(e))},qH=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=W2e(t,qH.bind(void 0,e));return e.set(t,r),r},G2e=function(e,t){return e&&!GH(e)?K2e(e)?t(WH(e)):!1:!0},YH=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=G2e(t,YH.bind(void 0,e));return e.set(t,r),r},KH=function(e){return e.dataset},q2e=function(e){return e.tagName==="BUTTON"},XH=function(e){return e.tagName==="INPUT"},ZH=function(e){return XH(e)&&e.type==="radio"},Y2e=function(e){return!((XH(e)||q2e(e))&&(e.type==="hidden"||e.disabled))},K2e=function(e){var t=e.getAttribute(N2e);return![!0,"true",""].includes(t)},aE=function(e){var t;return Boolean(e&&((t=KH(e))===null||t===void 0?void 0:t.focusGuard))},E5=function(e){return!aE(e)},X2e=function(e){return Boolean(e)},Z2e=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},QH=function(e,t,n){return mu(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(Z2e)},Q2e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],sE=Q2e.join(","),J2e="".concat(sE,", [data-focus-guard]"),JH=function(e,t){var n;return mu(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?J2e:sE)?[i]:[],JH(i))},[])},lE=function(e,t){return e.reduce(function(n,r){return n.concat(JH(r,t),r.parentNode?mu(r.parentNode.querySelectorAll(sE)).filter(function(i){return i===r}):[])},[])},eye=function(e){var t=e.querySelectorAll("[".concat(D2e,"]"));return mu(t).map(function(n){return lE([n])}).reduce(function(n,r){return n.concat(r)},[])},uE=function(e,t){return mu(e).filter(function(n){return qH(t,n)}).filter(function(n){return Y2e(n)})},NM=function(e,t){return t===void 0&&(t=new Map),mu(e).filter(function(n){return YH(t,n)})},R9=function(e,t,n){return QH(uE(lE(e,n),t),!0,n)},BM=function(e,t){return QH(uE(lE(e),t),!1)},tye=function(e,t){return uE(eye(e),t)},U2=function(e,t){return e.shadowRoot?U2(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:mu(e.children).some(function(n){return U2(n,t)})},nye=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},eV=function(e){return e.parentNode?eV(e.parentNode):e},cE=function(e){var t=M9(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(A9);return n.push.apply(n,i?nye(mu(eV(r).querySelectorAll("[".concat(A9,'="').concat(i,'"]:not([').concat(DH,'="disabled"])')))):[r]),n},[])},tV=function(e){return e.activeElement?e.activeElement.shadowRoot?tV(e.activeElement.shadowRoot):e.activeElement:void 0},dE=function(){return document.activeElement?document.activeElement.shadowRoot?tV(document.activeElement.shadowRoot):document.activeElement:void 0},rye=function(e){return e===document.activeElement},iye=function(e){return Boolean(mu(e.querySelectorAll("iframe")).some(function(t){return rye(t)}))},nV=function(e){var t=document&&dE();return!t||t.dataset&&t.dataset.focusGuard?!1:cE(e).some(function(n){return U2(n,t)||iye(n)})},oye=function(){var e=document&&dE();return e?mu(document.querySelectorAll("[".concat(I2e,"]"))).some(function(t){return U2(t,e)}):!1},aye=function(e,t){return t.filter(ZH).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},fE=function(e,t){return ZH(e)&&e.name?aye(e,t):e},sye=function(e){var t=new Set;return e.forEach(function(n){return t.add(fE(n,e))}),e.filter(function(n){return t.has(n)})},$M=function(e){return e[0]&&e.length>1?fE(e[0],e):e[0]},FM=function(e,t){return e.length>1?e.indexOf(fE(e[t],e)):t},rV="NEW_FOCUS",lye=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=aE(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,f=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),b=sye(t),x=n!==void 0?b.indexOf(n):-1,E=x-(r?b.indexOf(r):l),k=FM(e,0),_=FM(e,i-1);if(l===-1||f===-1)return rV;if(!p&&f>=0)return f;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return k;if(p&&Math.abs(E)>1)return f;if(l<=m)return _;if(l>v)return k;if(p)return Math.abs(p)>1?f:(i+f+p)%i}},uye=function(e){return function(t){var n,r=(n=KH(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},cye=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=NM(r.filter(uye(n)));return i&&i.length?$M(i):$M(NM(t))},I9=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&I9(e.parentNode.host||e.parentNode,t),t},U6=function(e,t){for(var n=I9(e),r=I9(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},iV=function(e,t,n){var r=M9(e),i=M9(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=U6(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=U6(o,l);u&&(!a||U2(u,a)?a=u:a=U6(u,a))})}),a},dye=function(e,t){return e.reduce(function(n,r){return n.concat(tye(r,t))},[])},fye=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(X2e)},hye=function(e,t){var n=document&&dE(),r=cE(e).filter(E5),i=iV(n||e,e,r),o=new Map,a=BM(r,o),s=R9(r,o).filter(function(m){var v=m.node;return E5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=BM([i],o).map(function(m){var v=m.node;return v}),u=fye(l,s),f=u.map(function(m){var v=m.node;return v}),p=lye(f,l,n,t);return p===rV?{node:cye(a,f,dye(r,o))}:p===void 0?p:u[p]}},pye=function(e){var t=cE(e).filter(E5),n=iV(e,e,t),r=new Map,i=R9([n],r,!0),o=R9(t,r).filter(function(a){var s=a.node;return E5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:aE(s)}})},gye=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},W6=0,G6=!1,mye=function(e,t,n){n===void 0&&(n={});var r=hye(e,t);if(!G6&&r){if(W6>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),G6=!0,setTimeout(function(){G6=!1},1);return}W6++,gye(r.node,n.focusOptions),W6--}};const oV=mye;function aV(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var vye=function(){return document&&document.activeElement===document.body},yye=function(){return vye()||oye()},Ag=null,og=null,Og=null,W2=!1,bye=function(){return!0},Sye=function(t){return(Ag.whiteList||bye)(t)},xye=function(t,n){Og={observerNode:t,portaledElement:n}},wye=function(t){return Og&&Og.portaledElement===t};function zM(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var Cye=function(t){return t&&"current"in t?t.current:t},_ye=function(t){return t?Boolean(W2):W2==="meanwhile"},kye=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Eye=function(t,n){return n.some(function(r){return kye(t,r,r)})},P5=function(){var t=!1;if(Ag){var n=Ag,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||Og&&Og.portaledElement,f=document&&document.activeElement;if(u){var p=[u].concat(a.map(Cye).filter(Boolean));if((!f||Sye(f))&&(i||_ye(s)||!yye()||!og&&o)&&(u&&!(nV(p)||f&&Eye(f,p)||wye(f))&&(document&&!og&&f&&!o?(f.blur&&f.blur(),document.body.focus()):(t=oV(p,og,{focusOptions:l}),Og={})),W2=!1,og=document&&document.activeElement),document){var m=document&&document.activeElement,v=pye(p),b=v.map(function(x){var E=x.node;return E}).indexOf(m);b>-1&&(v.filter(function(x){var E=x.guard,k=x.node;return E&&k.dataset.focusAutoGuard}).forEach(function(x){var E=x.node;return E.removeAttribute("tabIndex")}),zM(b,v.length,1,v),zM(b,-1,-1,v))}}}return t},sV=function(t){P5()&&t&&(t.stopPropagation(),t.preventDefault())},hE=function(){return aV(P5)},Pye=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||xye(r,n)},Tye=function(){return null},lV=function(){W2="just",setTimeout(function(){W2="meanwhile"},0)},Lye=function(){document.addEventListener("focusin",sV),document.addEventListener("focusout",hE),window.addEventListener("blur",lV)},Aye=function(){document.removeEventListener("focusin",sV),document.removeEventListener("focusout",hE),window.removeEventListener("blur",lV)};function Oye(e){return e.filter(function(t){var n=t.disabled;return!n})}function Mye(e){var t=e.slice(-1)[0];t&&!Ag&&Lye();var n=Ag,r=n&&t&&t.id===n.id;Ag=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(og=null,(!r||n.observed!==t.observed)&&t.onActivation(),P5(),aV(P5)):(Aye(),og=null)}jH.assignSyncMedium(Pye);HH.assignMedium(hE);z2e.assignMedium(function(e){return e({moveFocusInside:oV,focusInside:nV})});const Rye=V2e(Oye,Mye)(Tye);var uV=C.exports.forwardRef(function(t,n){return y(VH,{sideCar:Rye,ref:n,...t})}),cV=VH.propTypes||{};cV.sideCar;nE(cV,["sideCar"]);uV.propTypes={};const Iye=uV;var dV=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,f=C.exports.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&mH(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n==null?void 0:n.current)==null||v.focus()},[n]);return y(Iye,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:f,onDeactivation:p,returnFocus:i&&!n,children:o})};dV.displayName="FocusLock";var g4="right-scroll-bar-position",m4="width-before-scroll-bar",Dye="with-scroll-bars-hidden",Nye="--removed-body-scroll-bar-size",fV=FH(),q6=function(){},ux=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:q6,onWheelCapture:q6,onTouchMoveCapture:q6}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,k=E===void 0?"div":E,_=Aj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,A=NH([n,t]),R=Ul(Ul({},_),i);return K(fn,{children:[f&&y(T,{sideCar:fV,removeScrollBar:u,shards:p,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!x,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),Ul(Ul({},R),{ref:A})):y(k,{...Ul({},R,{className:l,ref:A}),children:s})]})});ux.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ux.classNames={fullWidth:m4,zeroRight:g4};var Bye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $ye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bye();return t&&e.setAttribute("nonce",t),e}function Fye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jye=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$ye())&&(Fye(t,n),zye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hye=function(){var e=jye();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},hV=function(){var e=Hye(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Vye={left:0,top:0,right:0,gap:0},Y6=function(e){return parseInt(e||"",10)||0},Uye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Y6(n),Y6(r),Y6(i)]},Wye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vye;var t=Uye(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])}},Gye=hV(),qye=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(Dye,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(g4,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(m4,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(g4," .").concat(g4,` {
right: 0 `).concat(r,`;
}
.`).concat(m4," .").concat(m4,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(Nye,": ").concat(s,`px;
}
`)},Yye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return Wye(i)},[i]);return y(Gye,{styles:qye(o,!t,i,n?"":"!important")})},D9=!1;if(typeof window<"u")try{var fb=Object.defineProperty({},"passive",{get:function(){return D9=!0,!0}});window.addEventListener("test",fb,fb),window.removeEventListener("test",fb,fb)}catch(e){D9=!1}var P0=D9?{passive:!1}:!1,Kye=function(e){return e.tagName==="TEXTAREA"},pV=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Kye(e)&&n[t]==="visible")},Xye=function(e){return pV(e,"overflowY")},Zye=function(e){return pV(e,"overflowX")},jM=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=gV(e,n);if(r){var i=mV(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Qye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Jye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gV=function(e,t){return e==="v"?Xye(t):Zye(t)},mV=function(e,t){return e==="v"?Qye(t):Jye(t)},e3e=function(e,t){return e==="h"&&t==="rtl"?-1:1},t3e=function(e,t,n,r,i){var o=e3e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,f=a>0,p=0,m=0;do{var v=mV(e,s),b=v[0],x=v[1],E=v[2],k=x-E-o*b;(b||k)&&gV(e,s)&&(p+=k,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(i&&p===0||!i&&a>p)||!f&&(i&&m===0||!i&&-a>m))&&(u=!0),u},hb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},HM=function(e){return[e.deltaX,e.deltaY]},VM=function(e){return e&&"current"in e?e.current:e},n3e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},r3e=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},i3e=0,T0=[];function o3e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(i3e++)[0],o=C.exports.useState(function(){return hV()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=b9([e.lockRef.current],(e.shards||[]).map(VM),!0).filter(Boolean);return x.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(x,E){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var k=hb(x),_=n.current,T="deltaX"in x?x.deltaX:_[0]-k[0],A="deltaY"in x?x.deltaY:_[1]-k[1],R,I=x.target,D=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in x&&D==="h"&&I.type==="range")return!1;var B=jM(D,I);if(!B)return!0;if(B?R=D:(R=D==="v"?"h":"v",B=jM(D,I)),!B)return!1;if(!r.current&&"changedTouches"in x&&(T||A)&&(r.current=R),!R)return!0;var z=r.current||R;return t3e(z,E,x,z==="h"?T:A,!0)},[]),l=C.exports.useCallback(function(x){var E=x;if(!(!T0.length||T0[T0.length-1]!==o)){var k="deltaY"in E?HM(E):hb(E),_=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&n3e(R.delta,k)})[0];if(_&&_.should){E.cancelable&&E.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(VM).filter(Boolean).filter(function(R){return R.contains(E.target)}),A=T.length>0?s(E,T[0]):!a.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(x,E,k,_){var T={name:x,delta:E,target:k,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(A){return A!==T})},1)},[]),f=C.exports.useCallback(function(x){n.current=hb(x),r.current=void 0},[]),p=C.exports.useCallback(function(x){u(x.type,HM(x),x.target,s(x,e.lockRef.current))},[]),m=C.exports.useCallback(function(x){u(x.type,hb(x),x.target,s(x,e.lockRef.current))},[]);C.exports.useEffect(function(){return T0.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,P0),document.addEventListener("touchmove",l,P0),document.addEventListener("touchstart",f,P0),function(){T0=T0.filter(function(x){return x!==o}),document.removeEventListener("wheel",l,P0),document.removeEventListener("touchmove",l,P0),document.removeEventListener("touchstart",f,P0)}},[]);var v=e.removeScrollBar,b=e.inert;return K(fn,{children:[b?y(o,{styles:r3e(i)}):null,v?y(Yye,{gapMode:"margin"}):null]})}const a3e=F2e(fV,o3e);var vV=C.exports.forwardRef(function(e,t){return y(ux,{...Ul({},e,{ref:t,sideCar:a3e})})});vV.classNames=ux.classNames;const yV=vV;var cp=(...e)=>e.filter(Boolean).join(" ");function Sv(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var s3e=class{constructor(){sn(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},N9=new s3e;function l3e(e,t){C.exports.useEffect(()=>(t&&N9.add(e),()=>{N9.remove(e)}),[t,e])}function u3e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),f=C.exports.useRef(null),[p,m,v]=d3e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");c3e(u,t&&a),l3e(u,t);const b=C.exports.useRef(null),x=C.exports.useCallback(B=>{b.current=B.target},[]),E=C.exports.useCallback(B=>{B.key==="Escape"&&(B.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[k,_]=C.exports.useState(!1),[T,A]=C.exports.useState(!1),R=C.exports.useCallback((B={},z=null)=>({role:"dialog",...B,ref:Gn(z,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":k?m:void 0,"aria-describedby":T?v:void 0,onClick:Sv(B.onClick,j=>j.stopPropagation())}),[v,T,p,m,k]),I=C.exports.useCallback(B=>{B.stopPropagation(),b.current===B.target&&(!N9.isTopModal(u)||(i&&(n==null||n()),s==null||s()))},[n,i,s]),D=C.exports.useCallback((B={},z=null)=>({...B,ref:Gn(z,f),onClick:Sv(B.onClick,I),onKeyDown:Sv(B.onKeyDown,E),onMouseDown:Sv(B.onMouseDown,x)}),[E,x,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:A,setHeaderMounted:_,dialogRef:u,overlayRef:f,getDialogProps:R,getDialogContainerProps:D}}function c3e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return MH(e.current)},[t,e,n])}function d3e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[f3e,dp]=An({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[h3e,Zd]=An({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),Qd=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:f,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=qi("Modal",e),E={...u3e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:f,motionPreset:p,lockFocusAcrossFrames:m};return y(h3e,{value:E,children:y(f3e,{value:b,children:y(cf,{onExitComplete:v,children:E.isOpen&&y(up,{...t,children:n})})})})};Qd.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Qd.displayName="Modal";var t1=Oe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=Zd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=cp("chakra-modal__body",n),s=dp();return oe.createElement(_e.div,{ref:t,className:a,id:i,...r,__css:s.body})});t1.displayName="ModalBody";var Cy=Oe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=Zd(),a=cp("chakra-modal__close-btn",r),s=dp();return y(ax,{ref:t,__css:s.closeButton,className:a,onClick:Sv(n,l=>{l.stopPropagation(),o()}),...i})});Cy.displayName="ModalCloseButton";function bV(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:f}=Zd(),[p,m]=Ek();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),y(dV,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:f,children:y(yV,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var p3e={slideInBottom:{...x9,custom:{offsetY:16,reverse:!0}},slideInRight:{...x9,custom:{offsetX:16,reverse:!0}},scale:{...Rj,custom:{initialScale:.95,reverse:!0}},none:{}},g3e=_e(gu.section),m3e=e=>p3e[e||"none"],SV=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=m3e(n),...i}=e;return y(g3e,{ref:t,...r,...i})});SV.displayName="ModalTransition";var ep=Oe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=Zd(),u=s(a,t),f=l(i),p=cp("chakra-modal__content",n),m=dp(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},b={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:x}=Zd();return oe.createElement(bV,null,oe.createElement(_e.div,{...f,className:"chakra-modal__content-container",tabIndex:-1,__css:b},y(SV,{preset:x,motionProps:o,className:p,...u,__css:v,children:r})))});ep.displayName="ModalContent";var cx=Oe((e,t)=>{const{className:n,...r}=e,i=cp("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dp().footer};return oe.createElement(_e.footer,{ref:t,...r,__css:a,className:i})});cx.displayName="ModalFooter";var S1=Oe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=Zd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=cp("chakra-modal__header",n),l={flex:0,...dp().header};return oe.createElement(_e.header,{ref:t,className:a,id:i,...r,__css:l})});S1.displayName="ModalHeader";var v3e=_e(gu.div),Jd=Oe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=cp("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dp().overlay},{motionPreset:u}=Zd();return y(v3e,{...i||(u==="none"?{}:Mj),__css:l,ref:t,className:a,...o})});Jd.displayName="ModalOverlay";function xV(e){const{leastDestructiveRef:t,...n}=e;return y(Qd,{...n,initialFocusRef:t})}var wV=Oe((e,t)=>y(ep,{ref:t,role:"alertdialog",...e})),[Eze,y3e]=An(),b3e=_e(Ij),S3e=Oe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=Zd(),f=s(a,t),p=l(o),m=cp("chakra-modal__content",n),v=dp(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},x={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=y3e();return oe.createElement(bV,null,oe.createElement(_e.div,{...p,className:"chakra-modal__content-container",__css:x},y(b3e,{motionProps:i,direction:E,in:u,className:m,...f,__css:b,children:r})))});S3e.displayName="DrawerContent";function x3e(e,t){const n=br(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var CV=(...e)=>e.filter(Boolean).join(" "),K6=e=>e?!0:void 0;function Rl(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var w3e=e=>y($a,{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),C3e=e=>y($a,{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function UM(e,t,n,r){C.exports.useEffect(()=>{var s;if(!e.current||!r)return;const i=(s=e.current.ownerDocument.defaultView)!=null?s:window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(l=>{for(const u of l)u.type==="attributes"&&u.attributeName&&o.includes(u.attributeName)&&n(u)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var _3e=50,WM=300;function k3e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);x3e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?_3e:null);const f=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},WM)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},WM)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:f,down:p,stop:m,isSpinning:n}}var E3e=/^[Ee0-9+\-.]$/;function P3e(e){return E3e.test(e)}function T3e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function L3e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:f,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:x,precision:E,name:k,"aria-describedby":_,"aria-label":T,"aria-labelledby":A,onFocus:R,onBlur:I,onInvalid:D,getAriaValueText:B,isValidCharacter:z,format:j,parse:Y,...te}=e,G=br(R),$=br(I),V=br(D),J=br(z!=null?z:P3e),Z=br(B),U=G1e(e),{update:X,increment:le,decrement:fe}=U,[Se,Ae]=C.exports.useState(!1),be=!(s||l),ke=C.exports.useRef(null),De=C.exports.useRef(null),Je=C.exports.useRef(null),Ye=C.exports.useRef(null),mt=C.exports.useCallback(Te=>Te.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(Te=>{var Et;return(Et=Y==null?void 0:Y(Te))!=null?Et:Te},[Y]),dt=C.exports.useCallback(Te=>{var Et;return((Et=j==null?void 0:j(Te))!=null?Et:Te).toString()},[j]);Kd(()=>{(U.valueAsNumber>o||U.valueAsNumber<i)&&(V==null||V("rangeOverflow",dt(U.value),U.valueAsNumber))},[U.valueAsNumber,U.value,dt,V]),Ys(()=>{if(!ke.current)return;if(ke.current.value!=U.value){const Et=_t(ke.current.value);U.setValue(mt(Et))}},[_t,mt]);const vt=C.exports.useCallback((Te=a)=>{be&&le(Te)},[le,be,a]),xt=C.exports.useCallback((Te=a)=>{be&&fe(Te)},[fe,be,a]),Le=k3e(vt,xt);UM(Je,"disabled",Le.stop,Le.isSpinning),UM(Ye,"disabled",Le.stop,Le.isSpinning);const ut=C.exports.useCallback(Te=>{if(Te.nativeEvent.isComposing)return;const Ut=_t(Te.currentTarget.value);X(mt(Ut)),De.current={start:Te.currentTarget.selectionStart,end:Te.currentTarget.selectionEnd}},[X,mt,_t]),Rt=C.exports.useCallback(Te=>{var Ut,Ve;var Et;G==null||G(Te),De.current&&(Te.target.selectionStart=(Ut=De.current.start)!=null?Ut:(Et=Te.currentTarget.value)==null?void 0:Et.length,Te.currentTarget.selectionEnd=(Ve=De.current.end)!=null?Ve:Te.currentTarget.selectionStart)},[G]),ot=C.exports.useCallback(Te=>{if(Te.nativeEvent.isComposing)return;T3e(Te,J)||Te.preventDefault();const Et=Ct(Te)*a,Ut=Te.key,ft={ArrowUp:()=>vt(Et),ArrowDown:()=>xt(Et),Home:()=>X(i),End:()=>X(o)}[Ut];ft&&(Te.preventDefault(),ft(Te))},[J,a,vt,xt,X,i,o]),Ct=Te=>{let Et=1;return(Te.metaKey||Te.ctrlKey)&&(Et=.1),Te.shiftKey&&(Et=10),Et},ln=C.exports.useMemo(()=>{const Te=Z==null?void 0:Z(U.value);if(Te!=null)return Te;const Et=U.value.toString();return Et||void 0},[U.value,Z]),ue=C.exports.useCallback(()=>{let Te=U.value;if(U.value==="")return;/^[eE]/.test(U.value.toString())?U.setValue(""):(U.valueAsNumber<i&&(Te=i),U.valueAsNumber>o&&(Te=o),U.cast(Te))},[U,o,i]),Ie=C.exports.useCallback(()=>{Ae(!1),n&&ue()},[n,Ae,ue]),We=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Te;(Te=ke.current)==null||Te.focus()})},[t]),Xe=C.exports.useCallback(Te=>{Te.preventDefault(),Le.up(),We()},[We,Le]),Ce=C.exports.useCallback(Te=>{Te.preventDefault(),Le.down(),We()},[We,Le]);jh(()=>ke.current,"wheel",Te=>{var ze;var Et;const Ve=((ze=(Et=ke.current)==null?void 0:Et.ownerDocument)!=null?ze:document).activeElement===ke.current;if(!v||!Ve)return;Te.preventDefault();const ft=Ct(Te)*a,un=Math.sign(Te.deltaY);un===-1?vt(ft):un===1&&xt(ft)},{passive:!1});const Ne=C.exports.useCallback((Te={},Et=null)=>{const Ut=l||r&&U.isAtMax;return{...Te,ref:Gn(Et,Je),role:"button",tabIndex:-1,onPointerDown:Rl(Te.onPointerDown,Ve=>{Ve.button!==0||Ut||Xe(Ve)}),onPointerLeave:Rl(Te.onPointerLeave,Le.stop),onPointerUp:Rl(Te.onPointerUp,Le.stop),disabled:Ut,"aria-disabled":K6(Ut)}},[U.isAtMax,r,Xe,Le.stop,l]),kt=C.exports.useCallback((Te={},Et=null)=>{const Ut=l||r&&U.isAtMin;return{...Te,ref:Gn(Et,Ye),role:"button",tabIndex:-1,onPointerDown:Rl(Te.onPointerDown,Ve=>{Ve.button!==0||Ut||Ce(Ve)}),onPointerLeave:Rl(Te.onPointerLeave,Le.stop),onPointerUp:Rl(Te.onPointerUp,Le.stop),disabled:Ut,"aria-disabled":K6(Ut)}},[U.isAtMin,r,Ce,Le.stop,l]),Nt=C.exports.useCallback((Te={},Et=null)=>{var Ut,Ve,ft,un;return{name:k,inputMode:m,type:"text",pattern:p,"aria-labelledby":A,"aria-label":T,"aria-describedby":_,id:b,disabled:l,...Te,readOnly:(Ut=Te.readOnly)!=null?Ut:s,"aria-readonly":(Ve=Te.readOnly)!=null?Ve:s,"aria-required":(ft=Te.required)!=null?ft:u,required:(un=Te.required)!=null?un:u,ref:Gn(ke,Et),value:dt(U.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(U.valueAsNumber)?void 0:U.valueAsNumber,"aria-invalid":K6(f!=null?f:U.isOutOfRange),"aria-valuetext":ln,autoComplete:"off",autoCorrect:"off",onChange:Rl(Te.onChange,ut),onKeyDown:Rl(Te.onKeyDown,ot),onFocus:Rl(Te.onFocus,Rt,()=>Ae(!0)),onBlur:Rl(Te.onBlur,$,Ie)}},[k,m,p,A,T,dt,_,b,l,u,s,f,U.value,U.valueAsNumber,U.isOutOfRange,i,o,ln,ut,ot,Rt,$,Ie]);return{value:dt(U.value),valueAsNumber:U.valueAsNumber,isFocused:Se,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ne,getDecrementButtonProps:kt,getInputProps:Nt,htmlProps:te}}var[A3e,dx]=An({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[O3e,pE]=An({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),gE=Oe(function(t,n){const r=qi("NumberInput",t),i=_n(t),o=Fk(i),{htmlProps:a,...s}=L3e(o),l=C.exports.useMemo(()=>s,[s]);return oe.createElement(O3e,{value:l},oe.createElement(A3e,{value:r},oe.createElement(_e.div,{...a,ref:n,className:CV("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});gE.displayName="NumberInput";var _V=Oe(function(t,n){const r=dx();return oe.createElement(_e.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});_V.displayName="NumberInputStepper";var mE=Oe(function(t,n){const{getInputProps:r}=pE(),i=r(t,n),o=dx();return oe.createElement(_e.input,{...i,className:CV("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});mE.displayName="NumberInputField";var kV=_e("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),vE=Oe(function(t,n){var a;const r=dx(),{getDecrementButtonProps:i}=pE(),o=i(t,n);return y(kV,{...o,__css:r.stepper,children:(a=t.children)!=null?a:y(w3e,{})})});vE.displayName="NumberDecrementStepper";var yE=Oe(function(t,n){var a;const{getIncrementButtonProps:r}=pE(),i=r(t,n),o=dx();return y(kV,{...i,__css:o.stepper,children:(a=t.children)!=null?a:y(C3e,{})})});yE.displayName="NumberIncrementStepper";var _y=(...e)=>e.filter(Boolean).join(" ");function M3e(e,...t){return R3e(e)?e(...t):e}var R3e=e=>typeof e=="function";function Il(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function I3e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[D3e,fp]=An({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[N3e,ky]=An({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),L0={click:"click",hover:"hover"};function B3e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=L0.click,openDelay:f=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...x}=e,{isOpen:E,onClose:k,onOpen:_,onToggle:T}=PH(e),A=C.exports.useRef(null),R=C.exports.useRef(null),I=C.exports.useRef(null),D=C.exports.useRef(!1),B=C.exports.useRef(!1);E&&(B.current=!0);const[z,j]=C.exports.useState(!1),[Y,te]=C.exports.useState(!1),G=C.exports.useId(),$=i!=null?i:G,[V,J,Z,U]=["popover-trigger","popover-content","popover-header","popover-body"].map(ut=>`${ut}-${$}`),{referenceRef:X,getArrowProps:le,getPopperProps:fe,getArrowInnerProps:Se,forceUpdate:Ae}=EH({...x,enabled:E||!!b}),be=b2e({isOpen:E,ref:I});tme({enabled:E,ref:R}),Kme(I,{focusRef:R,visible:E,shouldFocus:o&&u===L0.click}),Zme(I,{focusRef:r,visible:E,shouldFocus:a&&u===L0.click});const ke=TH({wasSelected:B.current,enabled:m,mode:v,isSelected:be.present}),De=C.exports.useCallback((ut={},Rt=null)=>{const ot={...ut,style:{...ut.style,transformOrigin:ri.transformOrigin.varRef,[ri.arrowSize.var]:s?`${s}px`:void 0,[ri.arrowShadowColor.var]:l},ref:Gn(I,Rt),children:ke?ut.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:Il(ut.onKeyDown,Ct=>{n&&Ct.key==="Escape"&&k()}),onBlur:Il(ut.onBlur,Ct=>{const ln=GM(Ct),ue=X6(I.current,ln),Ie=X6(R.current,ln);E&&t&&(!ue&&!Ie)&&k()}),"aria-labelledby":z?Z:void 0,"aria-describedby":Y?U:void 0};return u===L0.hover&&(ot.role="tooltip",ot.onMouseEnter=Il(ut.onMouseEnter,()=>{D.current=!0}),ot.onMouseLeave=Il(ut.onMouseLeave,Ct=>{Ct.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>k(),p))})),ot},[ke,J,z,Z,Y,U,u,n,k,E,t,p,l,s]),Je=C.exports.useCallback((ut={},Rt=null)=>fe({...ut,style:{visibility:E?"visible":"hidden",...ut.style}},Rt),[E,fe]),Ye=C.exports.useCallback((ut,Rt=null)=>({...ut,ref:Gn(Rt,A,X)}),[A,X]),mt=C.exports.useRef(),_t=C.exports.useRef(),dt=C.exports.useCallback(ut=>{A.current==null&&X(ut)},[X]),vt=C.exports.useCallback((ut={},Rt=null)=>{const ot={...ut,ref:Gn(R,Rt,dt),id:V,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===L0.click&&(ot.onClick=Il(ut.onClick,T)),u===L0.hover&&(ot.onFocus=Il(ut.onFocus,()=>{mt.current===void 0&&_()}),ot.onBlur=Il(ut.onBlur,Ct=>{const ln=GM(Ct),ue=!X6(I.current,ln);E&&t&&ue&&k()}),ot.onKeyDown=Il(ut.onKeyDown,Ct=>{Ct.key==="Escape"&&k()}),ot.onMouseEnter=Il(ut.onMouseEnter,()=>{D.current=!0,mt.current=window.setTimeout(()=>_(),f)}),ot.onMouseLeave=Il(ut.onMouseLeave,()=>{D.current=!1,mt.current&&(clearTimeout(mt.current),mt.current=void 0),_t.current=window.setTimeout(()=>{D.current===!1&&k()},p)})),ot},[V,E,J,u,dt,T,_,t,k,f,p]);C.exports.useEffect(()=>()=>{mt.current&&clearTimeout(mt.current),_t.current&&clearTimeout(_t.current)},[]);const xt=C.exports.useCallback((ut={},Rt=null)=>({...ut,id:Z,ref:Gn(Rt,ot=>{j(!!ot)})}),[Z]),Le=C.exports.useCallback((ut={},Rt=null)=>({...ut,id:U,ref:Gn(Rt,ot=>{te(!!ot)})}),[U]);return{forceUpdate:Ae,isOpen:E,onAnimationComplete:be.onComplete,onClose:k,getAnchorProps:Ye,getArrowProps:le,getArrowInnerProps:Se,getPopoverPositionerProps:Je,getPopoverProps:De,getTriggerProps:vt,getHeaderProps:xt,getBodyProps:Le}}function X6(e,t){return e===t||(e==null?void 0:e.contains(t))}function GM(e){var n;const t=e.currentTarget.ownerDocument.activeElement;return(n=e.relatedTarget)!=null?n:t}function bE(e){const t=qi("Popover",e),{children:n,...r}=_n(e),i=h1(),o=B3e({...r,direction:i.direction});return y(D3e,{value:o,children:y(N3e,{value:t,children:M3e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}bE.displayName="Popover";function SE(e){var l;const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fp(),a=ky(),s=(l=t!=null?t:n)!=null?l:r;return oe.createElement(_e.div,{...i(),className:"chakra-popover__arrow-positioner"},oe.createElement(_e.div,{className:_y("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}SE.displayName="PopoverArrow";var $3e=Oe(function(t,n){const{getBodyProps:r}=fp(),i=ky();return oe.createElement(_e.div,{...r(t,n),className:_y("chakra-popover__body",t.className),__css:i.body})});$3e.displayName="PopoverBody";var F3e=Oe(function(t,n){const{onClose:r}=fp(),i=ky();return y(ax,{size:"sm",onClick:r,className:_y("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});F3e.displayName="PopoverCloseButton";function z3e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var j3e={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},H3e=_e(gu.section),EV=Oe(function(t,n){const{variants:r=j3e,...i}=t,{isOpen:o}=fp();return oe.createElement(H3e,{ref:n,variants:z3e(r),initial:!1,animate:o?"enter":"exit",...i})});EV.displayName="PopoverTransition";var xE=Oe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fp(),u=ky(),f={position:"relative",display:"flex",flexDirection:"column",...u.content};return oe.createElement(_e.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},y(EV,{...i,...a(o,n),onAnimationComplete:I3e(l,o.onAnimationComplete),className:_y("chakra-popover__content",t.className),__css:f}))});xE.displayName="PopoverContent";var V3e=Oe(function(t,n){const{getHeaderProps:r}=fp(),i=ky();return oe.createElement(_e.header,{...r(t,n),className:_y("chakra-popover__header",t.className),__css:i.header})});V3e.displayName="PopoverHeader";function wE(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fp();return C.exports.cloneElement(t,n(t.props,t.ref))}wE.displayName="PopoverTrigger";function U3e(e,t,n){return(e-t)*100/(n-t)}var W3e=uf({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),G3e=uf({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),q3e=uf({"0%":{left:"-40%"},"100%":{left:"100%"}}),Y3e=uf({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function PV(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=U3e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var TV=e=>{const{size:t,isIndeterminate:n,...r}=e;return oe.createElement(_e.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${G3e} 2s linear infinite`:void 0},...r})};TV.displayName="Shape";var B9=e=>oe.createElement(_e.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});B9.displayName="Circle";var K3e=Oe((e,t)=>{var A;const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:f="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,x=PV({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:((A=x.percent)!=null?A:0)*2.64,k=E==null?void 0:`${E} ${264-E}`,_=v?{css:{animation:`${W3e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:k,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return oe.createElement(_e.div,{ref:t,className:"chakra-progress",...x.bind,...b,__css:T},K(TV,{size:n,isIndeterminate:v,children:[y(B9,{stroke:m,strokeWidth:f,className:"chakra-progress__track"}),y(B9,{stroke:p,strokeWidth:f,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:x.value===0&&!v?0:void 0,..._})]}),u)});K3e.displayName="CircularProgress";var[X3e,Z3e]=An({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),Q3e=Oe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=PV({value:i,min:n,max:r,isIndeterminate:o,role:a}),f={height:"100%",...Z3e().filledTrack};return oe.createElement(_e.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:f})}),LV=Oe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:f,"aria-label":p,"aria-labelledby":m,title:v,role:b,...x}=_n(e),E=qi("Progress",e),k=u!=null?u:(n=E.track)==null?void 0:n.borderRadius,_={animation:`${Y3e} 1s linear infinite`},R={...!f&&a&&s&&_,...f&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${q3e} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...E.track};return oe.createElement(_e.div,{ref:t,borderRadius:k,__css:I,...x},K(X3e,{value:E,children:[y(Q3e,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:f,css:R,borderRadius:k,title:v,role:b}),l]}))});LV.displayName="Progress";var J3e=_e("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});J3e.displayName="CircularProgressLabel";var ebe=(...e)=>e.filter(Boolean).join(" "),tbe=e=>e?"":void 0;function nbe(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var AV=Oe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return oe.createElement(_e.select,{...a,ref:n,className:ebe("chakra-select",o)},i&&y("option",{value:"",children:i}),r)});AV.displayName="SelectField";var OV=Oe((e,t)=>{var n;const r=qi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:f,minHeight:p,iconColor:m,iconSize:v,...b}=_n(e),[x,E]=nbe(b,kre),k=$k(E),_={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return oe.createElement(_e.div,{className:"chakra-select__wrapper",__css:_,...x,...i},y(AV,{ref:t,height:u!=null?u:l,minH:f!=null?f:p,placeholder:o,...k,__css:T,children:e.children}),y(MV,{"data-disabled":tbe(k.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});OV.displayName="Select";var rbe=e=>y("svg",{viewBox:"0 0 24 24",...e,children:y("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),ibe=_e("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),MV=e=>{const{children:t=y(rbe,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return y(ibe,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};MV.displayName="SelectIcon";function obe(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function abe(e){const t=lbe(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function RV(e){return!!e.touches}function sbe(e){return RV(e)&&e.touches.length>1}function lbe(e){var t;return(t=e.view)!=null?t:window}function ube(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function cbe(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function IV(e,t="page"){return RV(e)?ube(e,t):cbe(e,t)}function dbe(e){return t=>{const n=abe(t);(!n||n&&t.button===0)&&e(t)}}function fbe(e,t=!1){function n(i){e(i,{point:IV(i)})}return t?dbe(n):n}function v4(e,t,n,r){return obe(e,t,fbe(n,t==="pointerdown"),r)}function DV(e){const t=C.exports.useRef(null);return t.current=e,t}var hbe=class{constructor(e,t,n){sn(this,"history",[]);sn(this,"startEvent",null);sn(this,"lastEvent",null);sn(this,"lastEventInfo",null);sn(this,"handlers",{});sn(this,"removeListeners",()=>{});sn(this,"threshold",3);sn(this,"win");sn(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=Z6(this.lastEventInfo,this.history),t=this.startEvent!==null,n=vbe(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=CA();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i==null||i(this.lastEvent,e),this.startEvent=this.lastEvent),o==null||o(this.lastEvent,e)});sn(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,Bie.update(this.updatePoint,!0)});sn(this,"onPointerUp",(e,t)=>{const n=Z6(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i==null||i(e,n),this.end(),!(!r||!this.startEvent)&&(r==null||r(e,n))});var a;if(this.win=(a=e.view)!=null?a:window,sbe(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:IV(e)},{timestamp:i}=CA();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,Z6(r,this.history)),this.removeListeners=mbe(v4(this.win,"pointermove",this.onPointerMove),v4(this.win,"pointerup",this.onPointerUp),v4(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),$ie.update(this.updatePoint)}};function qM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Z6(e,t){return{point:e.point,delta:qM(e.point,t[t.length-1]),offset:qM(e.point,t[0]),velocity:gbe(t,.1)}}var pbe=e=>e*1e3;function gbe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pbe(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function mbe(...e){return t=>e.reduce((n,r)=>r(n),t)}function Q6(e,t){return Math.abs(e-t)}function YM(e){return"x"in e&&"y"in e}function vbe(e,t){if(typeof e=="number"&&typeof t=="number")return Q6(e,t);if(YM(e)&&YM(t)){const n=Q6(e.x,t.x),r=Q6(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function NV(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),f=DV({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i==null||i(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(f.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new hbe(v,f.current,s)}return v4(p,"pointerdown",m)},[e,l,f,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function ybe(e,t){var i;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=(i=e.ownerDocument.defaultView)!=null?i:window,r=new n.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[a]=o;let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,l=f.blockSize}else s=e.offsetWidth,l=e.offsetHeight;t({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var bbe=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Sbe(e,t){var o;var n;if(!e||!e.parentElement)return;const r=(o=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?o:window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function BV({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return bbe(()=>{const a=e(),s=a.map((l,u)=>ybe(l,f=>{r(p=>[...p.slice(0,u),f,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Sbe(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function xbe(e){return typeof e=="object"&&e!==null&&"current"in e}function wbe(e){const[t]=BV({observeMutation:!1,getNodes(){return[xbe(e)?e.current:e]}});return t}var Cbe=Object.getOwnPropertyNames,_be=(e,t)=>function(){return e&&(t=(0,e[Cbe(e)[0]])(e=0)),t},ff=_be({"../../../react-shim.js"(){}});ff();ff();ff();var es=e=>e?"":void 0,Mg=e=>e?!0:void 0,hf=(...e)=>e.filter(Boolean).join(" ");ff();function Rg(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}ff();ff();function kbe(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function xv(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var y4={width:0,height:0},pb=e=>e||y4;function $V(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=x=>{var k;const E=(k=r[x])!=null?k:y4;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...xv({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((x,E)=>pb(x).height>pb(E).height?x:E,y4):r.reduce((x,E)=>pb(x).width>pb(E).width?x:E,y4),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...xv({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...xv({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,f=[0,i?100-n[0]:n[0]],p=u?f:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),b={...l,...xv({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:b,rootStyle:s,getThumbStyle:o}}function FV(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Ebe(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:f,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:x,"aria-valuetext":E,"aria-label":k,"aria-labelledby":_,name:T,focusThumbOnChange:A=!0,minStepsBetweenThumbs:R=0,...I}=e,D=br(m),B=br(v),z=br(x),j=FV({isReversed:a,direction:s,orientation:l}),[Y,te]=HS({value:i,defaultValue:o!=null?o:[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[G,$]=C.exports.useState(!1),[V,J]=C.exports.useState(!1),[Z,U]=C.exports.useState(-1),X=!(f||p),le=C.exports.useRef(Y),fe=Y.map(ze=>Lg(ze,t,n)),Se=R*b,Ae=Pbe(fe,t,n,Se),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=fe,be.current.valueBounds=Ae;const ke=fe.map(ze=>n-ze+t),Je=(j?ke:fe).map(ze=>_5(ze,t,n)),Ye=l==="vertical",mt=C.exports.useRef(null),_t=C.exports.useRef(null),dt=BV({getNodes(){const ze=_t.current,St=ze==null?void 0:ze.querySelectorAll("[role=slider]");return St?Array.from(St):[]}}),vt=C.exports.useId(),xt=u!=null?u:vt,Le=kbe(xt),ut=C.exports.useCallback(ze=>{var ia;var St;if(!mt.current)return;be.current.eventSource="pointer";const ct=mt.current.getBoundingClientRect(),{clientX:Vt,clientY:hn}=(ia=(St=ze.touches)==null?void 0:St[0])!=null?ia:ze,Er=Ye?ct.bottom-hn:Vt-ct.left,dr=Ye?ct.height:ct.width;let Kr=Er/dr;return j&&(Kr=1-Kr),Uj(Kr,t,n)},[Ye,j,n,t]),Rt=(n-t)/10,ot=b||(n-t)/100,Ct=C.exports.useMemo(()=>({setValueAtIndex(ze,St){if(!X)return;const ct=be.current.valueBounds[ze];St=parseFloat(E9(St,ct.min,ot)),St=Lg(St,ct.min,ct.max);const Vt=[...be.current.value];Vt[ze]=St,te(Vt)},setActiveIndex:U,stepUp(ze,St=ot){const ct=be.current.value[ze],Vt=j?ct-St:ct+St;Ct.setValueAtIndex(ze,Vt)},stepDown(ze,St=ot){const ct=be.current.value[ze],Vt=j?ct+St:ct-St;Ct.setValueAtIndex(ze,Vt)},reset(){te(le.current)}}),[ot,j,te,X]),ln=C.exports.useCallback(ze=>{const St=ze.key,Vt={ArrowRight:()=>Ct.stepUp(Z),ArrowUp:()=>Ct.stepUp(Z),ArrowLeft:()=>Ct.stepDown(Z),ArrowDown:()=>Ct.stepDown(Z),PageUp:()=>Ct.stepUp(Z,Rt),PageDown:()=>Ct.stepDown(Z,Rt),Home:()=>{const{min:hn}=Ae[Z];Ct.setValueAtIndex(Z,hn)},End:()=>{const{max:hn}=Ae[Z];Ct.setValueAtIndex(Z,hn)}}[St];Vt&&(ze.preventDefault(),ze.stopPropagation(),Vt(ze),be.current.eventSource="keyboard")},[Ct,Z,Rt,Ae]),{getThumbStyle:ue,rootStyle:Ie,trackStyle:We,innerTrackStyle:Xe}=C.exports.useMemo(()=>$V({isReversed:j,orientation:l,thumbRects:dt,thumbPercents:Je}),[j,l,Je,dt]),Ce=C.exports.useCallback(ze=>{var St;const ct=ze!=null?ze:Z;if(ct!==-1&&A){const Vt=Le.getThumb(ct),hn=(St=_t.current)==null?void 0:St.ownerDocument.getElementById(Vt);hn&&setTimeout(()=>hn.focus())}},[A,Z,Le]);Kd(()=>{be.current.eventSource==="keyboard"&&(B==null||B(be.current.value))},[fe,B]);const Ne=ze=>{const St=ut(ze)||0,ct=be.current.value.map(Kr=>Math.abs(Kr-St)),Vt=Math.min(...ct);let hn=ct.indexOf(Vt);const Er=ct.filter(Kr=>Kr===Vt);Er.length>1&&St>be.current.value[hn]&&(hn=hn+Er.length-1),U(hn),Ct.setValueAtIndex(hn,St),Ce(hn)},kt=ze=>{if(Z==-1)return;const St=ut(ze)||0;U(Z),Ct.setValueAtIndex(Z,St),Ce(Z)};NV(_t,{onPanSessionStart(ze){!X||($(!0),Ne(ze),D==null||D(be.current.value))},onPanSessionEnd(){!X||($(!1),B==null||B(be.current.value))},onPan(ze){!X||kt(ze)}});const Nt=C.exports.useCallback((ze={},St=null)=>({...ze,...I,id:Le.root,ref:Gn(St,_t),tabIndex:-1,"aria-disabled":Mg(f),"data-focused":es(V),style:{...ze.style,...Ie}}),[I,f,V,Ie,Le]),Te=C.exports.useCallback((ze={},St=null)=>({...ze,ref:Gn(St,mt),id:Le.track,"data-disabled":es(f),style:{...ze.style,...We}}),[f,We,Le]),Et=C.exports.useCallback((ze={},St=null)=>({...ze,ref:St,id:Le.innerTrack,style:{...ze.style,...Xe}}),[Xe,Le]),Ut=C.exports.useCallback((ze,St=null)=>{var dr;const{index:ct,...Vt}=ze,hn=fe[ct];if(hn==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${ct}\`. The \`value\` or \`defaultValue\` length is : ${fe.length}`);const Er=Ae[ct];return{...Vt,ref:St,role:"slider",tabIndex:X?0:void 0,id:Le.getThumb(ct),"data-active":es(G&&Z===ct),"aria-valuetext":(dr=z==null?void 0:z(hn))!=null?dr:E==null?void 0:E[ct],"aria-valuemin":Er.min,"aria-valuemax":Er.max,"aria-valuenow":hn,"aria-orientation":l,"aria-disabled":Mg(f),"aria-readonly":Mg(p),"aria-label":k==null?void 0:k[ct],"aria-labelledby":k!=null&&k[ct]||_==null?void 0:_[ct],style:{...ze.style,...ue(ct)},onKeyDown:Rg(ze.onKeyDown,ln),onFocus:Rg(ze.onFocus,()=>{J(!0),U(ct)}),onBlur:Rg(ze.onBlur,()=>{J(!1),U(-1)})}},[Le,fe,Ae,X,G,Z,z,E,l,f,p,k,_,ue,ln,J]),Ve=C.exports.useCallback((ze={},St=null)=>({...ze,ref:St,id:Le.output,htmlFor:fe.map((ct,Vt)=>Le.getThumb(Vt)).join(" "),"aria-live":"off"}),[Le,fe]),ft=C.exports.useCallback((ze,St=null)=>{const{value:ct,...Vt}=ze,hn=!(ct<t||ct>n),Er=ct>=fe[0]&&ct<=fe[fe.length-1];let dr=_5(ct,t,n);dr=j?100-dr:dr;const Kr={position:"absolute",pointerEvents:"none",...xv({orientation:l,vertical:{bottom:`${dr}%`},horizontal:{left:`${dr}%`}})};return{...Vt,ref:St,id:Le.getMarker(ze.value),role:"presentation","aria-hidden":!0,"data-disabled":es(f),"data-invalid":es(!hn),"data-highlighted":es(Er),style:{...ze.style,...Kr}}},[f,j,n,t,l,fe,Le]),un=C.exports.useCallback((ze,St=null)=>{const{index:ct,...Vt}=ze;return{...Vt,ref:St,id:Le.getInput(ct),type:"hidden",value:fe[ct],name:Array.isArray(T)?T[ct]:`${T}-${ct}`}},[T,fe,Le]);return{state:{value:fe,isFocused:V,isDragging:G,getThumbPercent:ze=>Je[ze],getThumbMinValue:ze=>Ae[ze].min,getThumbMaxValue:ze=>Ae[ze].max},actions:Ct,getRootProps:Nt,getTrackProps:Te,getInnerTrackProps:Et,getThumbProps:Ut,getMarkerProps:ft,getInputProps:un,getOutputProps:Ve}}function Pbe(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Tbe,fx]=An({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[Lbe,CE]=An({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),zV=Oe(function(t,n){const r=qi("Slider",t),i=_n(t),{direction:o}=h1();i.direction=o;const{getRootProps:a,...s}=Ebe(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return oe.createElement(Tbe,{value:l},oe.createElement(Lbe,{value:r},oe.createElement(_e.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});zV.defaultProps={orientation:"horizontal"};zV.displayName="RangeSlider";var Abe=Oe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=fx(),a=CE(),s=r(t,n);return oe.createElement(_e.div,{...s,className:hf("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&y("input",{...i({index:t.index})}))});Abe.displayName="RangeSliderThumb";var Obe=Oe(function(t,n){const{getTrackProps:r}=fx(),i=CE(),o=r(t,n);return oe.createElement(_e.div,{...o,className:hf("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Obe.displayName="RangeSliderTrack";var Mbe=Oe(function(t,n){const{getInnerTrackProps:r}=fx(),i=CE(),o=r(t,n);return oe.createElement(_e.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Mbe.displayName="RangeSliderFilledTrack";var Rbe=Oe(function(t,n){const{getMarkerProps:r}=fx(),i=r(t,n);return oe.createElement(_e.div,{...i,className:hf("chakra-slider__marker",t.className)})});Rbe.displayName="RangeSliderMark";ff();ff();function Ibe(e){var Ut;const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:f,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:x,"aria-valuetext":E,"aria-label":k,"aria-labelledby":_,name:T,focusThumbOnChange:A=!0,...R}=e,I=br(m),D=br(v),B=br(x),z=FV({isReversed:a,direction:s,orientation:l}),[j,Y]=HS({value:i,defaultValue:o!=null?o:Nbe(t,n),onChange:r}),[te,G]=C.exports.useState(!1),[$,V]=C.exports.useState(!1),J=!(f||p),Z=(n-t)/10,U=b||(n-t)/100,X=Lg(j,t,n),le=n-X+t,Se=_5(z?le:X,t,n),Ae=l==="vertical",be=DV({min:t,max:n,step:b,isDisabled:f,value:X,isInteractive:J,isReversed:z,isVertical:Ae,eventSource:null,focusThumbOnChange:A,orientation:l}),ke=C.exports.useRef(null),De=C.exports.useRef(null),Je=C.exports.useRef(null),Ye=C.exports.useId(),mt=u!=null?u:Ye,[_t,dt]=[`slider-thumb-${mt}`,`slider-track-${mt}`],vt=C.exports.useCallback(Ve=>{var Kr;var ft;if(!ke.current)return;const un=be.current;un.eventSource="pointer";const ze=ke.current.getBoundingClientRect(),{clientX:St,clientY:ct}=(Kr=(ft=Ve.touches)==null?void 0:ft[0])!=null?Kr:Ve,Vt=Ae?ze.bottom-ct:St-ze.left,hn=Ae?ze.height:ze.width;let Er=Vt/hn;z&&(Er=1-Er);let dr=Uj(Er,un.min,un.max);return un.step&&(dr=parseFloat(E9(dr,un.min,un.step))),dr=Lg(dr,un.min,un.max),dr},[Ae,z,be]),xt=C.exports.useCallback(Ve=>{const ft=be.current;!ft.isInteractive||(Ve=parseFloat(E9(Ve,ft.min,U)),Ve=Lg(Ve,ft.min,ft.max),Y(Ve))},[U,Y,be]),Le=C.exports.useMemo(()=>({stepUp(Ve=U){const ft=z?X-Ve:X+Ve;xt(ft)},stepDown(Ve=U){const ft=z?X+Ve:X-Ve;xt(ft)},reset(){xt(o||0)},stepTo(Ve){xt(Ve)}}),[xt,z,X,U,o]),ut=C.exports.useCallback(Ve=>{const ft=be.current,ze={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(Z),PageDown:()=>Le.stepDown(Z),Home:()=>xt(ft.min),End:()=>xt(ft.max)}[Ve.key];ze&&(Ve.preventDefault(),Ve.stopPropagation(),ze(Ve),ft.eventSource="keyboard")},[Le,xt,Z,be]),Rt=(Ut=B==null?void 0:B(X))!=null?Ut:E,ot=wbe(De),{getThumbStyle:Ct,rootStyle:ln,trackStyle:ue,innerTrackStyle:Ie}=C.exports.useMemo(()=>{const Ve=be.current,ft=ot!=null?ot:{width:0,height:0};return $V({isReversed:z,orientation:Ve.orientation,thumbRects:[ft],thumbPercents:[Se]})},[z,ot,Se,be]),We=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ft;return(ft=De.current)==null?void 0:ft.focus()})},[be]);Kd(()=>{const Ve=be.current;We(),Ve.eventSource==="keyboard"&&(D==null||D(Ve.value))},[X,D]);function Xe(Ve){const ft=vt(Ve);ft!=null&&ft!==be.current.value&&Y(ft)}NV(Je,{onPanSessionStart(Ve){const ft=be.current;!ft.isInteractive||(G(!0),We(),Xe(Ve),I==null||I(ft.value))},onPanSessionEnd(){const Ve=be.current;!Ve.isInteractive||(G(!1),D==null||D(Ve.value))},onPan(Ve){!be.current.isInteractive||Xe(Ve)}});const Ce=C.exports.useCallback((Ve={},ft=null)=>({...Ve,...R,ref:Gn(ft,Je),tabIndex:-1,"aria-disabled":Mg(f),"data-focused":es($),style:{...Ve.style,...ln}}),[R,f,$,ln]),Ne=C.exports.useCallback((Ve={},ft=null)=>({...Ve,ref:Gn(ft,ke),id:dt,"data-disabled":es(f),style:{...Ve.style,...ue}}),[f,dt,ue]),kt=C.exports.useCallback((Ve={},ft=null)=>({...Ve,ref:ft,style:{...Ve.style,...Ie}}),[Ie]),Nt=C.exports.useCallback((Ve={},ft=null)=>({...Ve,ref:Gn(ft,De),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":es(te),"aria-valuetext":Rt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":Mg(f),"aria-readonly":Mg(p),"aria-label":k,"aria-labelledby":k?void 0:_,style:{...Ve.style,...Ct(0)},onKeyDown:Rg(Ve.onKeyDown,ut),onFocus:Rg(Ve.onFocus,()=>V(!0)),onBlur:Rg(Ve.onBlur,()=>V(!1))}),[J,_t,te,Rt,t,n,X,l,f,p,k,_,Ct,ut]),Te=C.exports.useCallback((Ve,ft=null)=>{const un=!(Ve.value<t||Ve.value>n),ze=X>=Ve.value,St=_5(Ve.value,t,n),ct={position:"absolute",pointerEvents:"none",...Dbe({orientation:l,vertical:{bottom:z?`${100-St}%`:`${St}%`},horizontal:{left:z?`${100-St}%`:`${St}%`}})};return{...Ve,ref:ft,role:"presentation","aria-hidden":!0,"data-disabled":es(f),"data-invalid":es(!un),"data-highlighted":es(ze),style:{...Ve.style,...ct}}},[f,z,n,t,l,X]),Et=C.exports.useCallback((Ve={},ft=null)=>({...Ve,ref:ft,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:$,isDragging:te},actions:Le,getRootProps:Ce,getTrackProps:Ne,getInnerTrackProps:kt,getThumbProps:Nt,getMarkerProps:Te,getInputProps:Et}}function Dbe(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Nbe(e,t){return t<e?e:e+(t-e)/2}var[Bbe,hx]=An({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[$be,px]=An({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),_E=Oe((e,t)=>{const n=qi("Slider",e),r=_n(e),{direction:i}=h1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Ibe(r),l=a(),u=o({},t);return oe.createElement(Bbe,{value:s},oe.createElement($be,{value:n},oe.createElement(_e.div,{...l,className:hf("chakra-slider",e.className),__css:n.container},e.children,y("input",{...u}))))});_E.defaultProps={orientation:"horizontal"};_E.displayName="Slider";var jV=Oe((e,t)=>{const{getThumbProps:n}=hx(),r=px(),i=n(e,t);return oe.createElement(_e.div,{...i,className:hf("chakra-slider__thumb",e.className),__css:r.thumb})});jV.displayName="SliderThumb";var HV=Oe((e,t)=>{const{getTrackProps:n}=hx(),r=px(),i=n(e,t);return oe.createElement(_e.div,{...i,className:hf("chakra-slider__track",e.className),__css:r.track})});HV.displayName="SliderTrack";var VV=Oe((e,t)=>{const{getInnerTrackProps:n}=hx(),r=px(),i=n(e,t);return oe.createElement(_e.div,{...i,className:hf("chakra-slider__filled-track",e.className),__css:r.filledTrack})});VV.displayName="SliderFilledTrack";var $9=Oe((e,t)=>{const{getMarkerProps:n}=hx(),r=px(),i=n(e,t);return oe.createElement(_e.div,{...i,className:hf("chakra-slider__marker",e.className),__css:r.mark})});$9.displayName="SliderMark";var Fbe=(...e)=>e.filter(Boolean).join(" "),KM=e=>e?"":void 0,kE=Oe(function(t,n){const r=qi("Switch",t),{spacing:i="0.5rem",children:o,...a}=_n(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:f,getLabelProps:p}=Hj(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return oe.createElement(_e.label,{...f(),className:Fbe("chakra-switch",t.className),__css:m},y("input",{className:"chakra-switch__input",...l({},n)}),oe.createElement(_e.span,{...u(),className:"chakra-switch__track",__css:v},oe.createElement(_e.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":KM(s.isChecked),"data-hover":KM(s.isHovered)})),o&&oe.createElement(_e.span,{className:"chakra-switch__label",...p(),__css:b},o))});kE.displayName="Switch";var x1=(...e)=>e.filter(Boolean).join(" ");function F9(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[zbe,UV,jbe,Hbe]=nz();function Vbe(e){var _;const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[f,p]=C.exports.useState(t!=null?t:0),[m,v]=HS({defaultValue:t!=null?t:0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const b=jbe(),x=C.exports.useId();return{id:`tabs-${(_=e.id)!=null?_:x}`,selectedIndex:m,focusedIndex:f,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Ube,Ey]=An({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function Wbe(e){const{focusedIndex:t,orientation:n,direction:r}=Ey(),i=UV(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},f=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",k={[b]:()=>p&&l(),[x]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:f}[v];k&&(a.preventDefault(),k(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:F9(e.onKeyDown,o)}}function Gbe(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=Ey(),{index:u,register:f}=Hbe({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=$me({...r,ref:Gn(f,e.ref),isDisabled:t,isFocusable:n,onClick:F9(e.onClick,m)}),x="button";return{...b,id:WV(a,u),role:"tab",tabIndex:p?0:-1,type:x,"aria-selected":p,"aria-controls":GV(a,u),onFocus:t?void 0:F9(e.onFocus,v)}}var[qbe,Ybe]=An({});function Kbe(e){const t=Ey(),{id:n,selectedIndex:r}=t,o=rx(e.children).map((a,s)=>C.exports.createElement(qbe,{key:s,value:{isSelected:s===r,id:GV(n,s),tabId:WV(n,s),selectedIndex:r}},a));return{...e,children:o}}function Xbe(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Ey(),{isSelected:o,id:a,tabId:s}=Ybe(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=TH({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function Zbe(){const e=Ey(),t=UV(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Ys(()=>{if(n==null)return;const f=t.item(n);if(f==null)return;i&&s({left:f.node.offsetLeft,width:f.node.offsetWidth}),o&&s({top:f.node.offsetTop,height:f.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function WV(e,t){return`${e}--tab-${t}`}function GV(e,t){return`${e}--tabpanel-${t}`}var[Qbe,Py]=An({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),qV=Oe(function(t,n){const r=qi("Tabs",t),{children:i,className:o,...a}=_n(t),{htmlProps:s,descendants:l,...u}=Vbe(a),f=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return oe.createElement(zbe,{value:l},oe.createElement(Ube,{value:f},oe.createElement(Qbe,{value:r},oe.createElement(_e.div,{className:x1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});qV.displayName="Tabs";var Jbe=Oe(function(t,n){const r=Zbe(),i={...t.style,...r},o=Py();return oe.createElement(_e.div,{ref:n,...t,className:x1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Jbe.displayName="TabIndicator";var e4e=Oe(function(t,n){const r=Wbe({...t,ref:n}),o={display:"flex",...Py().tablist};return oe.createElement(_e.div,{...r,className:x1("chakra-tabs__tablist",t.className),__css:o})});e4e.displayName="TabList";var YV=Oe(function(t,n){const r=Xbe({...t,ref:n}),i=Py();return oe.createElement(_e.div,{outline:"0",...r,className:x1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});YV.displayName="TabPanel";var KV=Oe(function(t,n){const r=Kbe(t),i=Py();return oe.createElement(_e.div,{...r,width:"100%",ref:n,className:x1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});KV.displayName="TabPanels";var XV=Oe(function(t,n){const r=Py(),i=Gbe({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return oe.createElement(_e.button,{...i,className:x1("chakra-tabs__tab",t.className),__css:o})});XV.displayName="Tab";var t4e=(...e)=>e.filter(Boolean).join(" ");function n4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var r4e=["h","minH","height","minHeight"],ZV=Oe((e,t)=>{const n=Lo("Textarea",e),{className:r,rows:i,...o}=_n(e),a=$k(o),s=i?n4e(n,r4e):n;return oe.createElement(_e.textarea,{ref:t,rows:i,...a,className:t4e("chakra-textarea",r),__css:s})});ZV.displayName="Textarea";function i4e(e,t){const n=br(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function z9(e,...t){return o4e(e)?e(...t):e}var o4e=e=>typeof e=="function";function a4e(e,t){var o;const n=e!=null?e:"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(o=i==null?void 0:i[t])!=null?o:n}var s4e=(e,t)=>e.find(n=>n.id===t);function XM(e,t){const n=QV(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function QV(e,t){for(const[n,r]of Object.entries(e))if(s4e(r,t))return n}function l4e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function u4e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var c4e={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Wl=d4e(c4e);function d4e(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=f4e(i,o),{position:s,id:l}=a;return r(u=>{var m,v;const p=s.includes("top")?[a,...(m=u[s])!=null?m:[]]:[...(v=u[s])!=null?v:[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=XM(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:JV(o)}),s})},closeAll:({positions:i}={})=>{r(o=>{const a=["bottom","bottom-right","bottom-left","top","top-left","top-right"];return(i!=null?i:a).reduce((l,u)=>(l[u]=o[u].map(f=>({...f,requestClose:!0})),l),{...o})})},close:i=>{r(o=>{const a=QV(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(XM(Wl.getState(),i).position)}}var ZM=0;function f4e(e,t={}){var i,o;ZM+=1;const n=(i=t.id)!=null?i:ZM,r=(o=t.position)!=null?o:"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Wl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var h4e=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return oe.createElement(Nj,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},y($j,{children:l}),oe.createElement(_e.div,{flex:"1",maxWidth:"100%"},i&&y(Fj,{id:u==null?void 0:u.title,children:i}),s&&y(Bj,{id:u==null?void 0:u.description,display:"block",children:s})),o&&y(ax,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function JV(e={}){const{render:t,toastComponent:n=h4e}=e;return i=>typeof t=="function"?t({...i,...e}):y(n,{...i,...e})}function p4e(e,t){const n=i=>{var o;return{...t,...i,position:a4e((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=JV(o);return Wl.notify(a,o)};return r.update=(i,o)=>{Wl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...z9(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...z9(o.error,s)}))},r.closeAll=Wl.closeAll,r.close=Wl.close,r.isActive=Wl.isActive,r}function Ty(e){const{theme:t}=JF();return C.exports.useMemo(()=>p4e(t.direction,e),[e,t.direction])}var g4e={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},eU=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=g4e,toastSpacing:f="0.5rem"}=e,[p,m]=C.exports.useState(s),v=mpe();Kd(()=>{v||r==null||r()},[v]),Kd(()=>{m(s)},[s]);const b=()=>m(null),x=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),i4e(E,p);const k=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:f,...l}),[l,f]),_=C.exports.useMemo(()=>l4e(a),[a]);return oe.createElement(gu.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:x,custom:{position:a},style:_},oe.createElement(_e.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:k},z9(n,{id:t,onClose:E})))});eU.displayName="ToastComponent";var m4e=e=>{const t=C.exports.useSyncExternalStore(Wl.subscribe,Wl.getState,Wl.getState),{children:n,motionVariants:r,component:i=eU,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return y("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:u4e(l),children:y(cf,{initial:!1,children:u.map(f=>y(i,{motionVariants:r,...f},f.id))})},l)});return K(fn,{children:[n,y(up,{...o,children:s})]})};function v4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function y4e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var b4e={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Jm(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var T5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},j9=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function S4e(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:f,id:p,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:x,arrowPadding:E,modifiers:k,isDisabled:_,gutter:T,offset:A,direction:R,...I}=e,{isOpen:D,onOpen:B,onClose:z}=PH({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:j,getPopperProps:Y,getArrowInnerProps:te,getArrowProps:G}=EH({enabled:D,placement:f,arrowPadding:E,modifiers:k,gutter:T,offset:A,direction:R}),$=C.exports.useId(),J=`tooltip-${p!=null?p:$}`,Z=C.exports.useRef(null),U=C.exports.useRef(),X=C.exports.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=void 0)},[]),le=C.exports.useRef(),fe=C.exports.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=void 0)},[]),Se=C.exports.useCallback(()=>{fe(),z()},[z,fe]),Ae=x4e(Z,Se),be=C.exports.useCallback(()=>{if(!_&&!U.current){Ae();const vt=j9(Z);U.current=vt.setTimeout(B,t)}},[Ae,_,B,t]),ke=C.exports.useCallback(()=>{X();const vt=j9(Z);le.current=vt.setTimeout(Se,n)},[n,Se,X]),De=C.exports.useCallback(()=>{D&&r&&ke()},[r,ke,D]),Je=C.exports.useCallback(()=>{D&&a&&ke()},[a,ke,D]),Ye=C.exports.useCallback(vt=>{D&&vt.key==="Escape"&&ke()},[D,ke]);jh(()=>T5(Z),"keydown",s?Ye:void 0),jh(()=>T5(Z),"scroll",()=>{D&&o&&Se()}),C.exports.useEffect(()=>{!_||(X(),D&&z())},[_,D,z,X]),C.exports.useEffect(()=>()=>{X(),fe()},[X,fe]),jh(()=>Z.current,"pointerleave",ke);const mt=C.exports.useCallback((vt={},xt=null)=>({...vt,ref:Gn(Z,xt,j),onPointerEnter:Jm(vt.onPointerEnter,ut=>{ut.pointerType!=="touch"&&be()}),onClick:Jm(vt.onClick,De),onPointerDown:Jm(vt.onPointerDown,Je),onFocus:Jm(vt.onFocus,be),onBlur:Jm(vt.onBlur,ke),"aria-describedby":D?J:void 0}),[be,ke,Je,D,J,De,j]),_t=C.exports.useCallback((vt={},xt=null)=>Y({...vt,style:{...vt.style,[ri.arrowSize.var]:b?`${b}px`:void 0,[ri.arrowShadowColor.var]:x}},xt),[Y,b,x]),dt=C.exports.useCallback((vt={},xt=null)=>{const Le={...vt.style,position:"relative",transformOrigin:ri.transformOrigin.varRef};return{ref:xt,...I,...vt,id:J,role:"tooltip",style:Le}},[I,J]);return{isOpen:D,show:be,hide:ke,getTriggerProps:mt,getTooltipProps:dt,getTooltipPositionerProps:_t,getArrowProps:G,getArrowInnerProps:te}}var J6="chakra-ui:close-tooltip";function x4e(e,t){return C.exports.useEffect(()=>{const n=T5(e);return n.addEventListener(J6,t),()=>n.removeEventListener(J6,t)},[t,e]),()=>{const n=T5(e),r=j9(e);n.dispatchEvent(new r.CustomEvent(J6))}}var w4e=_e(gu.div),so=Oe((e,t)=>{var z,j;const n=Lo("Tooltip",e),r=_n(e),i=h1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:f,portalProps:p,background:m,backgroundColor:v,bgColor:b,motionProps:x,...E}=r,k=(j=(z=m!=null?m:v)!=null?z:f)!=null?j:b;if(k){n.bg=k;const Y=Fre(i,"colors",k);n[ri.arrowBg.var]=Y}const _=S4e({...E,direction:i.direction}),T=typeof o=="string"||s;let A;if(T)A=oe.createElement(_e.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const Y=C.exports.Children.only(o);A=C.exports.cloneElement(Y,_.getTriggerProps(Y.props,Y.ref))}const R=!!l,I=_.getTooltipProps({},t),D=R?v4e(I,["role","id"]):I,B=y4e(I,["role","id"]);return a?K(fn,{children:[A,y(cf,{children:_.isOpen&&oe.createElement(up,{...p},oe.createElement(_e.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},K(w4e,{variants:b4e,initial:"exit",animate:"enter",exit:"exit",...x,...D,__css:n,children:[a,R&&oe.createElement(_e.span,{srOnly:!0,...B},l),u&&oe.createElement(_e.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},oe.createElement(_e.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):y(fn,{children:o})});so.displayName="Tooltip";var C4e=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=y(uH,{environment:a,children:t});return y(Lde,{theme:o,cssVarsRoot:s,children:K(nF,{colorModeManager:n,options:o.config,children:[i?y(Y1e,{}):y(q1e,{}),y(Ode,{}),r?y(LH,{zIndex:r,children:l}):l]})})};function _4e({children:e,theme:t=Sde,toastOptions:n,...r}){return K(C4e,{theme:t,...r,children:[e,y(m4e,{...n})]})}function Us(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ef(e){return!!e&&!!e[ur]}function lc(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===R4e}(e)||Array.isArray(e)||!!e[iR]||!!(!((t=e.constructor)===null||t===void 0)&&t[iR])||EE(e)||PE(e))}function tp(e,t,n){n===void 0&&(n=!1),w1(e)===0?(n?Object.keys:Dg)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function w1(e){var t=e[ur];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:EE(e)?2:PE(e)?3:0}function Ig(e,t){return w1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function k4e(e,t){return w1(e)===2?e.get(t):e[t]}function tU(e,t,n){var r=w1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function nU(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function EE(e){return O4e&&e instanceof Map}function PE(e){return M4e&&e instanceof Set}function yh(e){return e.o||e.t}function TE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=iU(e);delete t[ur];for(var n=Dg(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function LE(e,t){return t===void 0&&(t=!1),AE(e)||ef(e)||!lc(e)||(w1(e)>1&&(e.set=e.add=e.clear=e.delete=E4e),Object.freeze(e),t&&tp(e,function(n,r){return LE(r,!0)},!0)),e}function E4e(){Us(2)}function AE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ru(e){var t=W9[e];return t||Us(18,e),t}function P4e(e,t){W9[e]||(W9[e]=t)}function H9(){return G2}function eC(e,t){t&&(ru("Patches"),e.u=[],e.s=[],e.v=t)}function L5(e){V9(e),e.p.forEach(T4e),e.p=null}function V9(e){e===G2&&(G2=e.l)}function QM(e){return G2={p:[],l:G2,h:e,m:!0,_:0}}function T4e(e){var t=e[ur];t.i===0||t.i===1?t.j():t.O=!0}function tC(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||ru("ES5").S(t,e,r),r?(n[ur].P&&(L5(t),Us(4)),lc(e)&&(e=A5(t,e),t.l||O5(t,e)),t.u&&ru("Patches").M(n[ur].t,e,t.u,t.s)):e=A5(t,n,[]),L5(t),t.u&&t.v(t.u,t.s),e!==rU?e:void 0}function A5(e,t,n){if(AE(t))return t;var r=t[ur];if(!r)return tp(t,function(o,a){return JM(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return O5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=TE(r.k):r.o;tp(r.i===3?new Set(i):i,function(o,a){return JM(e,r,i,o,a,n)}),O5(e,i,!1),n&&e.u&&ru("Patches").R(r,n,e.u,e.s)}return r.o}function JM(e,t,n,r,i,o){if(ef(i)){var a=A5(e,i,o&&t&&t.i!==3&&!Ig(t.D,r)?o.concat(r):void 0);if(tU(n,r,a),!ef(a))return;e.m=!1}if(lc(i)&&!AE(i)){if(!e.h.F&&e._<1)return;A5(e,i),t&&t.A.l||O5(e,i)}}function O5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&LE(t,n)}function nC(e,t){var n=e[ur];return(n?yh(n):e)[t]}function eR(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function _d(e){e.P||(e.P=!0,e.l&&_d(e.l))}function rC(e){e.o||(e.o=TE(e.t))}function U9(e,t,n){var r=EE(t)?ru("MapSet").N(t,n):PE(t)?ru("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:H9(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=q2;a&&(l=[s],u=wv);var f=Proxy.revocable(l,u),p=f.revoke,m=f.proxy;return s.k=m,s.j=p,m}(t,n):ru("ES5").J(t,n);return(n?n.A:H9()).p.push(r),r}function L4e(e){return ef(e)||Us(22,e),function t(n){if(!lc(n))return n;var r,i=n[ur],o=w1(n);if(i){if(!i.P&&(i.i<4||!ru("ES5").K(i)))return i.t;i.I=!0,r=tR(n,o),i.I=!1}else r=tR(n,o);return tp(r,function(a,s){i&&k4e(i.t,a)===s||tU(r,a,t(s))}),o===3?new Set(r):r}(e)}function tR(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return TE(e)}function A4e(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[ur];return q2.get(l,o)},set:function(l){var u=this[ur];q2.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][ur];if(!s.P)switch(s.i){case 5:r(s)&&_d(s);break;case 4:n(s)&&_d(s)}}}function n(o){for(var a=o.t,s=o.k,l=Dg(s),u=l.length-1;u>=0;u--){var f=l[u];if(f!==ur){var p=a[f];if(p===void 0&&!Ig(a,f))return!0;var m=s[f],v=m&&m[ur];if(v?v.t!==p:!nU(m,p))return!0}}var b=!!a[ur];return l.length!==Dg(a).length+(b?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};P4e("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(f,p){if(f){for(var m=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var b=iU(p);delete b[ur];for(var x=Dg(b),E=0;E<x.length;E++){var k=x[E];b[k]=e(k,f||!!b[k].enumerable)}return Object.create(Object.getPrototypeOf(p),b)}(s,o),u={i:s?5:4,A:a?a.A:H9(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,ur,{value:u,writable:!0}),l},S:function(o,a,s){s?ef(a)&&a[ur].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var f=u[ur];if(f){var p=f.t,m=f.k,v=f.D,b=f.i;if(b===4)tp(m,function(T){T!==ur&&(p[T]!==void 0||Ig(p,T)?v[T]||l(m[T]):(v[T]=!0,_d(f)))}),tp(p,function(T){m[T]!==void 0||Ig(m,T)||(v[T]=!1,_d(f))});else if(b===5){if(r(f)&&(_d(f),v.length=!0),m.length<p.length)for(var x=m.length;x<p.length;x++)v[x]=!1;else for(var E=p.length;E<m.length;E++)v[E]=!0;for(var k=Math.min(m.length,p.length),_=0;_<k;_++)m.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&l(m[_])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var nR,G2,OE=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",O4e=typeof Map<"u",M4e=typeof Set<"u",rR=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",rU=OE?Symbol.for("immer-nothing"):((nR={})["immer-nothing"]=!0,nR),iR=OE?Symbol.for("immer-draftable"):"__$immer_draftable",ur=OE?Symbol.for("immer-state"):"__$immer_state",R4e=""+Object.prototype.constructor,Dg=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,iU=Object.getOwnPropertyDescriptors||function(e){var t={};return Dg(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},W9={},q2={get:function(e,t){if(t===ur)return e;var n=yh(e);if(!Ig(n,t))return function(i,o,a){var s,l=eR(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!lc(r)?r:r===nC(e.t,t)?(rC(e),e.o[t]=U9(e.A.h,r,e)):r},has:function(e,t){return t in yh(e)},ownKeys:function(e){return Reflect.ownKeys(yh(e))},set:function(e,t,n){var r=eR(yh(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=nC(yh(e),t),o=i==null?void 0:i[ur];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(nU(n,i)&&(n!==void 0||Ig(e.t,t)))return!0;rC(e),_d(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return nC(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,rC(e),_d(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=yh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Us(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Us(12)}},wv={};tp(q2,function(e,t){wv[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),wv.deleteProperty=function(e,t){return wv.set.call(this,e,t,void 0)},wv.set=function(e,t,n){return q2.set.call(this,e[0],t,n,e[0])};var I4e=function(){function e(n){var r=this;this.g=rR,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(x){var E=this;x===void 0&&(x=s);for(var k=arguments.length,_=Array(k>1?k-1:0),T=1;T<k;T++)_[T-1]=arguments[T];return l.produce(x,function(A){var R;return(R=o).call.apply(R,[E,A].concat(_))})}}var u;if(typeof o!="function"&&Us(6),a!==void 0&&typeof a!="function"&&Us(7),lc(i)){var f=QM(r),p=U9(r,i,void 0),m=!0;try{u=o(p),m=!1}finally{m?L5(f):V9(f)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(x){return eC(f,a),tC(x,f)},function(x){throw L5(f),x}):(eC(f,a),tC(u,f))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===rU&&(u=void 0),r.F&&LE(u,!0),a){var v=[],b=[];ru("Patches").M(i,u,v,b),a(v,b)}return u}Us(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var f=arguments.length,p=Array(f>1?f-1:0),m=1;m<f;m++)p[m-1]=arguments[m];return r.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(p))})};var a,s,l=r.produce(i,o,function(u,f){a=u,s=f});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){lc(n)||Us(8),ef(n)&&(n=L4e(n));var r=QM(this),i=U9(this,n,void 0);return i[ur].C=!0,V9(r),i},t.finishDraft=function(n,r){var i=n&&n[ur],o=i.A;return eC(o,r),tC(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!rR&&Us(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=ru("Patches").$;return ef(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Ia=new I4e,oU=Ia.produce;Ia.produceWithPatches.bind(Ia);Ia.setAutoFreeze.bind(Ia);Ia.setUseProxies.bind(Ia);Ia.applyPatches.bind(Ia);Ia.createDraft.bind(Ia);Ia.finishDraft.bind(Ia);function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){UH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function no(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var sR=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),iC=function(){return Math.random().toString(36).substring(7).split("").join(".")},M5={INIT:"@@redux/INIT"+iC(),REPLACE:"@@redux/REPLACE"+iC(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+iC()}};function D4e(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ME(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(no(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(no(1));return n(ME)(e,t)}if(typeof e!="function")throw new Error(no(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(no(3));return o}function p(x){if(typeof x!="function")throw new Error(no(4));if(l)throw new Error(no(5));var E=!0;return u(),s.push(x),function(){if(!!E){if(l)throw new Error(no(6));E=!1,u();var _=s.indexOf(x);s.splice(_,1),a=null}}}function m(x){if(!D4e(x))throw new Error(no(7));if(typeof x.type>"u")throw new Error(no(8));if(l)throw new Error(no(9));try{l=!0,o=i(o,x)}finally{l=!1}for(var E=a=s,k=0;k<E.length;k++){var _=E[k];_()}return x}function v(x){if(typeof x!="function")throw new Error(no(10));i=x,m({type:M5.REPLACE})}function b(){var x,E=p;return x={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(no(11));function T(){_.next&&_.next(f())}T();var A=E(T);return{unsubscribe:A}}},x[sR]=function(){return this},x}return m({type:M5.INIT}),r={dispatch:m,subscribe:p,getState:f,replaceReducer:v},r[sR]=b,r}function N4e(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:M5.INIT});if(typeof r>"u")throw new Error(no(12));if(typeof n(void 0,{type:M5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(no(13))})}function aU(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{N4e(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var f=!1,p={},m=0;m<o.length;m++){var v=o[m],b=n[v],x=l[v],E=b(x,u);if(typeof E>"u")throw u&&u.type,new Error(no(14));p[v]=E,f=f||E!==x}return f=f||o.length!==Object.keys(l).length,f?p:l}}function R5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function B4e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(no(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=R5.apply(void 0,s)(i.dispatch),aR(aR({},i),{},{dispatch:o})}}}var I5="NOT_FOUND";function $4e(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:I5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function F4e(e,t){var n=[];function r(s){var l=n.findIndex(function(f){return t(s,f.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return I5}function i(s,l){r(s)===I5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var z4e=function(t,n){return t===n};function j4e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function H4e(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?z4e:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=j4e(i),u=a===1?$4e(l):F4e(a,l);function f(){var p=u.get(arguments);if(p===I5){if(p=e.apply(null,arguments),s){var m=u.getEntries(),v=m.find(function(b){return s(b.value,p)});v&&(p=v.value)}u.put(arguments,p)}return p}return f.clearCache=function(){return u.clear()},f}function V4e(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function U4e(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 i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=0,f,p={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(p=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var v=p,b=v.memoizeOptions,x=b===void 0?n:b,E=Array.isArray(x)?x:[x],k=V4e(s),_=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(E)),T=e(function(){for(var R=[],I=k.length,D=0;D<I;D++)R.push(k[D].apply(null,arguments));return f=_.apply(null,R),f});return Object.assign(T,{resultFunc:m,memoizedResultFunc:_,dependencies:k,lastResult:function(){return f},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var lt=U4e(H4e);function sU(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var lU=sU();lU.withExtraArgument=sU;const lR=lU;var W4e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),G4e=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},D5=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},q4e=Object.defineProperty,Y4e=Object.defineProperties,K4e=Object.getOwnPropertyDescriptors,uR=Object.getOwnPropertySymbols,X4e=Object.prototype.hasOwnProperty,Z4e=Object.prototype.propertyIsEnumerable,cR=function(e,t,n){return t in e?q4e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Hd=function(e,t){for(var n in t||(t={}))X4e.call(t,n)&&cR(e,n,t[n]);if(uR)for(var r=0,i=uR(t);r<i.length;r++){var n=i[r];Z4e.call(t,n)&&cR(e,n,t[n])}return e},oC=function(e,t){return Y4e(e,K4e(t))},Q4e=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(u){i(u)}},a=function(l){try{s(n.throw(l))}catch(u){i(u)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},J4e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?R5:R5.apply(null,arguments)};function e5e(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var t5e=function(e){W4e(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,D5([void 0],n[0].concat(this)))):new(t.bind.apply(t,D5([void 0],n.concat(this))))},t}(Array);function G9(e){return lc(e)?oU(e,function(){}):e}function n5e(e){return typeof e=="boolean"}function r5e(){return function(t){return i5e(t)}}function i5e(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new t5e;return n&&(n5e(n)?r.push(lR):r.push(lR.withExtraArgument(n.extraArgument))),r}var o5e=!0;function a5e(e){var t=r5e(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,u=n.preloadedState,f=u===void 0?void 0:u,p=n.enhancers,m=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(e5e(i))v=aU(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=a;typeof b=="function"&&(b=b(t));var x=B4e.apply(void 0,b),E=R5;l&&(E=J4e(Hd({trace:!o5e},typeof l=="object"&&l)));var k=[x];Array.isArray(m)?k=D5([x],m):typeof m=="function"&&(k=m(k));var _=E.apply(void 0,k);return ME(v,f,_)}function Nr(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return Hd(Hd({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function uU(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function s5e(e){return typeof e=="function"}function l5e(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?uU(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(s5e(e))l=function(){return G9(e())};else{var u=G9(e);l=function(){return u}}function f(p,m){p===void 0&&(p=l());var v=D5([o[m.type]],a.filter(function(b){var x=b.matcher;return x(m)}).map(function(b){var x=b.reducer;return x}));return v.filter(function(b){return!!b}).length===0&&(v=[s]),v.reduce(function(b,x){if(x)if(ef(b)){var E=b,k=x(E,m);return k===void 0?b:k}else{if(lc(b))return oU(b,function(_){return x(_,m)});var k=x(b,m);if(k===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return b},p)}return f.getInitialState=l,f}function u5e(e,t){return e+"/"+t}function gx(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:G9(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(f){var p=r[f],m=u5e(t,f),v,b;"reducer"in p?(v=p.reducer,b=p.prepare):v=p,o[f]=v,a[m]=v,s[f]=b?Nr(m,b):Nr(m)});function l(){var f=typeof e.extraReducers=="function"?uU(e.extraReducers):[e.extraReducers],p=f[0],m=p===void 0?{}:p,v=f[1],b=v===void 0?[]:v,x=f[2],E=x===void 0?void 0:x,k=Hd(Hd({},m),a);return l5e(n,function(_){for(var T in k)_.addCase(T,k[T]);for(var A=0,R=b;A<R.length;A++){var I=R[A];_.addMatcher(I.matcher,I.reducer)}E&&_.addDefaultCase(E)})}var u;return{name:t,reducer:function(f,p){return u||(u=l()),u(f,p)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var c5e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",d5e=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=c5e[Math.random()*64|0];return t},f5e=["name","message","stack","code"],aC=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),dR=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),h5e=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=f5e;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}};(function(){function e(t,n,r){var i=Nr(t+"/fulfilled",function(u,f,p,m){return{payload:u,meta:oC(Hd({},m||{}),{arg:p,requestId:f,requestStatus:"fulfilled"})}}),o=Nr(t+"/pending",function(u,f,p){return{payload:void 0,meta:oC(Hd({},p||{}),{arg:f,requestId:u,requestStatus:"pending"})}}),a=Nr(t+"/rejected",function(u,f,p,m,v){return{payload:m,error:(r&&r.serializeError||h5e)(u||"Rejected"),meta:oC(Hd({},v||{}),{arg:p,requestId:f,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(f,p,m){var v=r!=null&&r.idGenerator?r.idGenerator(u):d5e(),b=new s,x,E=new Promise(function(A,R){return b.signal.addEventListener("abort",function(){return R({name:"AbortError",message:x||"Aborted"})})}),k=!1;function _(A){k&&(x=A,b.abort())}var T=function(){return Q4e(this,null,function(){var A,R,I,D,B,z;return G4e(this,function(j){switch(j.label){case 0:return j.trys.push([0,4,,5]),D=(A=r==null?void 0:r.condition)==null?void 0:A.call(r,u,{getState:p,extra:m}),g5e(D)?[4,D]:[3,2];case 1:D=j.sent(),j.label=2;case 2:if(D===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,f(o(v,u,(R=r==null?void 0:r.getPendingMeta)==null?void 0:R.call(r,{requestId:v,arg:u},{getState:p,extra:m}))),[4,Promise.race([E,Promise.resolve(n(u,{dispatch:f,getState:p,extra:m,requestId:v,signal:b.signal,abort:_,rejectWithValue:function(Y,te){return new aC(Y,te)},fulfillWithValue:function(Y,te){return new dR(Y,te)}})).then(function(Y){if(Y instanceof aC)throw Y;return Y instanceof dR?i(Y.payload,v,u,Y.meta):i(Y,v,u)})])];case 3:return I=j.sent(),[3,5];case 4:return B=j.sent(),I=B instanceof aC?a(null,v,u,B.payload,B.meta):a(B,v,u),[3,5];case 5:return z=r&&!r.dispatchConditionRejection&&a.match(I)&&I.meta.condition,z||f(I),[2,I]}})})}();return Object.assign(T,{abort:_,requestId:v,arg:u,unwrap:function(){return T.then(p5e)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function p5e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function g5e(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var RE="listenerMiddleware";Nr(RE+"/add");Nr(RE+"/removeAll");Nr(RE+"/remove");var fR;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);A4e();var IE="persist:",cU="persist/FLUSH",DE="persist/REHYDRATE",dU="persist/PAUSE",fU="persist/PERSIST",hU="persist/PURGE",pU="persist/REGISTER",m5e=-1;function b4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b4=function(n){return typeof n}:b4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},b4(e)}function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function v5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hR(n,!0).forEach(function(r){y5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y5e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b5e(e,t,n,r){r.debug;var i=v5e({},n);return e&&b4(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function S5e(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],i=e.throttle||0,o=e.debounce||0,a="".concat(e.keyPrefix!==void 0?e.keyPrefix:IE).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(D){return D}:typeof e.serialize=="function"?l=e.serialize:l=x5e;var u=e.writeFailHandler||null,f={},p={},m=[],v=null,b=null;let x=0;function E(I){clearTimeout(x),x=setTimeout(()=>{Object.keys(I).forEach(function(D){!T(D)||f[D]!==I[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(f).forEach(function(D){I[D]===void 0&&T(D)&&m.indexOf(D)===-1&&f[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(k,i)),f=I},o)}function k(){if(m.length===0){v&&clearInterval(v),v=null;return}var I=m.shift(),D=r.reduce(function(B,z){return z.in(B,I,f)},f[I]);if(D!==void 0)try{p[I]=l(D)}catch(B){console.error("redux-persist/createPersistoid: error serializing state",B)}else delete p[I];m.length===0&&_()}function _(){Object.keys(p).forEach(function(I){f[I]===void 0&&delete p[I]}),b=s.setItem(a,l(p)).catch(A)}function T(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function A(I){u&&u(I)}var R=function(){for(;m.length!==0;)k();return b||Promise.resolve()};return{update:E,flush:R}}function x5e(e){return JSON.stringify(e)}function w5e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:IE).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=C5e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,f){return f.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function C5e(e){return JSON.parse(e)}function _5e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:IE).concat(e.key);return t.removeItem(n,k5e)}function k5e(e){}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pR(n,!0).forEach(function(r){E5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E5e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P5e(e,t){if(e==null)return{};var n=T5e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function T5e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var L5e=5e3;function A5e(e,t){var n=e.version!==void 0?e.version:m5e;e.debug;var r=e.stateReconciler===void 0?b5e:e.stateReconciler,i=e.getStoredState||w5e,o=e.timeout!==void 0?e.timeout:L5e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(f,p){var m=f||{},v=m._persist,b=P5e(m,["_persist"]),x=b;if(p.type===fU){var E=!1,k=function(B,z){E||(p.rehydrate(e.key,B,z),E=!0)};if(o&&setTimeout(function(){!E&&k(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S5e(e)),v)return Vu({},t(x,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(D){var B=e.migrate||function(z,j){return Promise.resolve(z)};B(D,n).then(function(z){k(z)},function(z){k(void 0,z)})},function(D){k(void 0,D)}),Vu({},t(x,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===hU)return s=!0,p.result(_5e(e)),Vu({},t(x,p),{_persist:v});if(p.type===cU)return p.result(a&&a.flush()),Vu({},t(x,p),{_persist:v});if(p.type===dU)l=!0;else if(p.type===DE){if(s)return Vu({},x,{_persist:Vu({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(x,p),T=p.payload,A=r!==!1&&T!==void 0?r(T,f,_,e):_,R=Vu({},A,{_persist:Vu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(f,p);var I=t(x,p);return I===x?f:u(Vu({},I,{_persist:v}))}}function gR(e){return R5e(e)||M5e(e)||O5e()}function O5e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M5e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function R5e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function mR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function q9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mR(n,!0).forEach(function(r){I5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I5e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gU={registry:[],bootstrapped:!1},D5e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gU,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case pU:return q9({},t,{registry:[].concat(gR(t.registry),[n.key])});case DE:var r=t.registry.indexOf(n.key),i=gR(t.registry);return i.splice(r,1),q9({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N5e(e,t,n){var r=n||!1,i=ME(D5e,gU,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:pU,key:u})},a=function(u,f,p){var m={type:DE,payload:f,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=q9({},i,{purge:function(){var u=[];return e.dispatch({type:hU,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:cU,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:dU})},persist:function(){e.dispatch({type:fU,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var NE={},BE={};BE.__esModule=!0;BE.default=F5e;function S4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?S4=function(n){return typeof n}:S4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},S4(e)}function sC(){}var B5e={getItem:sC,setItem:sC,removeItem:sC};function $5e(e){if((typeof self>"u"?"undefined":S4(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch(r){return!1}return!0}function F5e(e){var t="".concat(e,"Storage");return $5e(t)?self[t]:B5e}NE.__esModule=!0;NE.default=H5e;var z5e=j5e(BE);function j5e(e){return e&&e.__esModule?e:{default:e}}function H5e(e){var t=(0,z5e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var mU=void 0,V5e=U5e(NE);function U5e(e){return e&&e.__esModule?e:{default:e}}var W5e=(0,V5e.default)("local");mU=W5e;var vU={},yU={},np={};Object.defineProperty(np,"__esModule",{value:!0});np.PLACEHOLDER_UNDEFINED=np.PACKAGE_NAME=void 0;np.PACKAGE_NAME="redux-deep-persist";np.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var $E={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})($E);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=np,n=$E,r=function(G){return typeof G=="object"&&G!==null};e.isObjectLike=r;const i=function(G){return typeof G=="number"&&G>-1&&G%1==0&&G<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(G){return(0,e.isLength)(G&&G.length)&&Object.prototype.toString.call(G)==="[object Array]"};const o=function(G){return!!G&&typeof G=="object"&&!(0,e.isArray)(G)};e.isPlainObject=o;const a=function(G){return String(~~G)===G&&Number(G)>=0};e.isIntegerString=a;const s=function(G){return Object.prototype.toString.call(G)==="[object String]"};e.isString=s;const l=function(G){return Object.prototype.toString.call(G)==="[object Date]"};e.isDate=l;const u=function(G){return Object.keys(G).length===0};e.isEmpty=u;const f=Object.prototype.hasOwnProperty,p=function(G,$,V){V||(V=new Set([G])),$||($="");for(const J in G){const Z=$?`${$}.${J}`:J,U=G[J];if((0,e.isObjectLike)(U))return V.has(U)?`${$}.${J}:<Circular>`:(V.add(U),(0,e.getCircularPath)(U,Z,V))}return null};e.getCircularPath=p;const m=function(G){if(!(0,e.isObjectLike)(G))return G;if((0,e.isDate)(G))return new Date(+G);const $=(0,e.isArray)(G)?[]:{};for(const V in G){const J=G[V];$[V]=(0,e._cloneDeep)(J)}return $};e._cloneDeep=m;const v=function(G){const $=(0,e.getCircularPath)(G);if($)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${$}' of object you're trying to persist: ${G}`);return(0,e._cloneDeep)(G)};e.cloneDeep=v;const b=function(G,$){if(G===$)return{};if(!(0,e.isObjectLike)(G)||!(0,e.isObjectLike)($))return $;const V=(0,e.cloneDeep)(G),J=(0,e.cloneDeep)($),Z=Object.keys(V).reduce((X,le)=>(f.call(J,le)||(X[le]=void 0),X),{});if((0,e.isDate)(V)||(0,e.isDate)(J))return V.valueOf()===J.valueOf()?{}:J;const U=Object.keys(J).reduce((X,le)=>{if(!f.call(V,le))return X[le]=J[le],X;const fe=(0,e.difference)(V[le],J[le]);return(0,e.isObjectLike)(fe)&&(0,e.isEmpty)(fe)&&!(0,e.isDate)(fe)?(0,e.isArray)(V)&&!(0,e.isArray)(J)||!(0,e.isArray)(V)&&(0,e.isArray)(J)?J:X:(X[le]=fe,X)},Z);return delete U._persist,U};e.difference=b;const x=function(G,$){return $.reduce((V,J)=>{if(V){const Z=parseInt(J,10),U=(0,e.isIntegerString)(J)&&Z<0?V.length+Z:J;return(0,e.isString)(V)?V.charAt(U):V[U]}},G)};e.path=x;const E=function(G,$){return[...G].reverse().reduce((Z,U,X)=>{const le=(0,e.isIntegerString)(U)?[]:{};return le[U]=X===0?$:Z,le},{})};e.assocPath=E;const k=function(G,$){const V=(0,e.cloneDeep)(G);return $.reduce((J,Z,U)=>(U===$.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[Z],J&&J[Z]),V),V};e.dissocPath=k;const _=function(G,$,...V){if(!V||!V.length)return $;const J=V.shift(),{preservePlaceholder:Z,preserveUndefined:U}=G;if((0,e.isObjectLike)($)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)($[X]))$[X]||($[X]={}),_(G,$[X],J[X]);else if((0,e.isArray)($)){let le=J[X];const fe=Z?t.PLACEHOLDER_UNDEFINED:void 0;U||(le=typeof le<"u"?le:$[parseInt(X,10)]),le=le!==t.PLACEHOLDER_UNDEFINED?le:fe,$[parseInt(X,10)]=le}else{const le=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;$[X]=le}return _(G,$,...V)},T=function(G,$,V){return _({preservePlaceholder:V==null?void 0:V.preservePlaceholder,preserveUndefined:V==null?void 0:V.preserveUndefined},(0,e.cloneDeep)(G),(0,e.cloneDeep)($))};e.mergeDeep=T;const A=function(G,$=[],V,J,Z){if(!(0,e.isObjectLike)(G))return G;for(const U in G){const X=G[U],le=(0,e.isArray)(G),fe=J?J+"."+U:U;X===null&&(V===n.ConfigType.WHITELIST&&$.indexOf(fe)===-1||V===n.ConfigType.BLACKLIST&&$.indexOf(fe)!==-1)&&le&&(G[parseInt(U,10)]=void 0),X===void 0&&Z&&V===n.ConfigType.BLACKLIST&&$.indexOf(fe)===-1&&le&&(G[parseInt(U,10)]=t.PLACEHOLDER_UNDEFINED),A(X,$,V,fe,Z)}},R=function(G,$,V,J){const Z=(0,e.cloneDeep)(G);return A(Z,$,V,"",J),Z};e.preserveUndefined=R;const I=function(G,$,V){return V.indexOf(G)===$};e.unique=I;const D=function(G){return G.reduce(($,V)=>{const J=G.filter(Se=>Se===V),Z=G.filter(Se=>(V+".").indexOf(Se+".")===0),{duplicates:U,subsets:X}=$,le=J.length>1&&U.indexOf(V)===-1,fe=Z.length>1;return{duplicates:[...U,...le?J:[]],subsets:[...X,...fe?Z:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const B=function(G,$,V){const J=V===n.ConfigType.WHITELIST?"whitelist":"blacklist",Z=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,U=`Check your create${V===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
`;if(!(0,e.isString)($)||$.length<1)throw new Error(`${Z} Name (key) of reducer is required. ${U}`);if(!G||!G.length)return;const{duplicates:X,subsets:le}=(0,e.findDuplicatesAndSubsets)(G);if(X.length>1)throw new Error(`${Z} Duplicated paths.
${JSON.stringify(X)}
${U}`);if(le.length>1)throw new Error(`${Z} You are trying to persist an entire property and also some of its subset.
${JSON.stringify(le)}
${U}`)};e.singleTransformValidator=B;const z=function(G){if(!(0,e.isArray)(G))return;const $=(G==null?void 0:G.map(V=>V.deepPersistKey).filter(V=>V))||[];if($.length){const V=$.filter((J,Z)=>$.indexOf(J)!==Z);if(V.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed.
Duplicates: ${JSON.stringify(V)}`)}};e.transformsValidator=z;const j=function({whitelist:G,blacklist:$}){if(G&&G.length&&$&&$.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(G){const{duplicates:V,subsets:J}=(0,e.findDuplicatesAndSubsets)(G);(0,e.throwError)({duplicates:V,subsets:J},"whitelist")}if($){const{duplicates:V,subsets:J}=(0,e.findDuplicatesAndSubsets)($);(0,e.throwError)({duplicates:V,subsets:J},"blacklist")}};e.configValidator=j;const Y=function({duplicates:G,subsets:$},V){if(G.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${V}.
${JSON.stringify(G)}`);if($.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${V}. You must decide if you want to persist an entire path or its specific subset.
${JSON.stringify($)}`)};e.throwError=Y;const te=function(G){return(0,e.isArray)(G)?G.filter(e.unique).reduce(($,V)=>{const J=V.split("."),Z=J[0],U=J.slice(1).join(".")||void 0,X=$.filter(fe=>Object.keys(fe)[0]===Z)[0],le=X?Object.values(X)[0]:void 0;return X||$.push({[Z]:U?[U]:void 0}),X&&!le&&U&&(X[Z]=[U]),X&&le&&U&&le.push(U),$},[]):[]};e.getRootKeysGroup=te})(yU);(function(e){var t=xo&&xo.__rest||function(p,m){var v={};for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&m.indexOf(b)<0&&(v[b]=p[b]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,b=Object.getOwnPropertySymbols(p);x<b.length;x++)m.indexOf(b[x])<0&&Object.prototype.propertyIsEnumerable.call(p,b[x])&&(v[b[x]]=p[b[x]]);return v};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=yU,r=np,i=$E,o=function(p,m,v={}){const b=v.whitelist||null,x=v.blacklist||null;function E(k){return!!(b&&b.indexOf(k)===-1||x&&x.indexOf(k)!==-1)}return{in:(k,_,T)=>!E(_)&&p?p(k,_,T):k,out:(k,_,T)=>!E(_)&&m?m(k,_,T):k,deepPersistKey:b&&b[0]}},a=(p,m,v,{debug:b,whitelist:x,blacklist:E,transforms:k})=>{if(x||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(k);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const A=(0,n.difference)(m,v);(0,n.isEmpty)(A)||(T=(0,n.mergeDeep)(p,A,{preserveUndefined:!0}),b&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(A)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(_[R])){_[R]=(0,n.mergeDeep)(_[R],T[R]);return}_[R]=T[R]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,x;return m.forEach(E=>{const k=E.split(".");x=(0,n.path)(v,k),typeof x>"u"&&(0,n.isIntegerString)(k[k.length-1])&&(x=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(k,x),T=(0,n.isArray)(_)?[]:{};b=(0,n.mergeDeep)(b||T,_,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const b=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,k)=>(0,n.dissocPath)(E,k),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const b=Object.keys(v)[0],x=v[b];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,x):(0,e.createBlacklist)(b,x)})};e.getTransforms=u;const f=p=>{var{key:m,whitelist:v,blacklist:b,storage:x,transforms:E,rootReducer:k}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),A=(0,n.getRootKeysGroup)(b),R=Object.keys(k(void 0,{type:""})),I=T.map(te=>Object.keys(te)[0]),D=A.map(te=>Object.keys(te)[0]),B=R.filter(te=>I.indexOf(te)===-1&&D.indexOf(te)===-1),z=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),j=(0,e.getTransforms)(i.ConfigType.BLACKLIST,A),Y=(0,n.isArray)(v)?B.map(te=>(0,e.createBlacklist)(te)):[];return Object.assign(Object.assign({},_),{key:m,storage:x,transforms:[...z,...j,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=f})(vU);const x4=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G5e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return FE(r)?r:!1},FE=e=>Boolean(typeof e=="string"?G5e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),N5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),q5e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]),zE=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],bU={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1},Y5e=bU,SU=gx({name:"options",initialState:Y5e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=x4(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:f,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=N5(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=x4(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof f=="boolean"&&(e.seamless=f),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:f,seamless:p,hires_fix:m,width:v,height:b,strength:x,fit:E,init_image_path:k,mask_image_path:_}=t.payload.image;n==="img2img"&&(k&&(e.initialImage=k),_&&(e.maskPath=_),x&&(e.img2imgStrength=x),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=N5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=x4(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),f&&(e.perlin=f),typeof f>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...bU}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=zE.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload}}}),{clearInitialImage:xU,resetOptionsState:Pze,resetSeed:Tze,setActiveTab:Go,setAllImageToImageParameters:K5e,setAllParameters:X5e,setAllTextToImageParameters:Z5e,setCfgScale:wU,setCodeformerFidelity:CU,setCurrentTheme:Q5e,setFacetoolStrength:w4,setFacetoolType:C4,setHeight:_U,setHiresFix:jE,setImg2imgStrength:Y9,setInfillMethod:kU,setInitialImage:C1,setIsLightBoxOpen:Qu,setIterations:J5e,setMaskPath:EU,setOptionsPanelScrollPosition:eSe,setParameter:Lze,setPerlin:PU,setPrompt:mx,setSampler:TU,setSeamBlur:vR,setSeamless:LU,setSeamSize:yR,setSeamSteps:bR,setSeamStrength:SR,setSeed:Ly,setSeedWeights:AU,setShouldFitToWidthHeight:OU,setShouldGenerateVariations:tSe,setShouldHoldOptionsPanelOpen:nSe,setShouldLoopback:rSe,setShouldPinOptionsPanel:iSe,setShouldRandomizeSeed:oSe,setShouldRunESRGAN:aSe,setShouldRunFacetool:sSe,setShouldShowImageDetails:MU,setShouldShowOptionsPanel:Ju,setShowAdvancedOptions:Aze,setShowDualDisplay:lSe,setSteps:RU,setThreshold:IU,setTileSize:xR,setUpscalingLevel:K9,setUpscalingStrength:X9,setVariationAmount:uSe,setWidth:DU,setShouldUseCanvasBetaLayout:cSe,setShouldShowExistingModelsInSearch:dSe}=SU.actions,fSe=SU.reducer;var gi={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
*/(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",p=1,m=2,v=4,b=1,x=2,E=1,k=2,_=4,T=8,A=16,R=32,I=64,D=128,B=256,z=512,j=30,Y="...",te=800,G=16,$=1,V=2,J=3,Z=1/0,U=9007199254740991,X=17976931348623157e292,le=0/0,fe=4294967295,Se=fe-1,Ae=fe>>>1,be=[["ary",D],["bind",E],["bindKey",k],["curry",T],["curryRight",A],["flip",z],["partial",R],["partialRight",I],["rearg",B]],ke="[object Arguments]",De="[object Array]",Je="[object AsyncFunction]",Ye="[object Boolean]",mt="[object Date]",_t="[object DOMException]",dt="[object Error]",vt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",ut="[object Number]",Rt="[object Null]",ot="[object Object]",Ct="[object Promise]",ln="[object Proxy]",ue="[object RegExp]",Ie="[object Set]",We="[object String]",Xe="[object Symbol]",Ce="[object Undefined]",Ne="[object WeakMap]",kt="[object WeakSet]",Nt="[object ArrayBuffer]",Te="[object DataView]",Et="[object Float32Array]",Ut="[object Float64Array]",Ve="[object Int8Array]",ft="[object Int16Array]",un="[object Int32Array]",ze="[object Uint8Array]",St="[object Uint8ClampedArray]",ct="[object Uint16Array]",Vt="[object Uint32Array]",hn=/\b__p \+= '';/g,Er=/\b(__p \+=) '' \+/g,dr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kr=/&(?:amp|lt|gt|quot|#39);/g,ia=/[&<>"']/g,O1=RegExp(Kr.source),Fa=RegExp(ia.source),kp=/<%-([\s\S]+?)%>/g,M1=/<%([\s\S]+?)%>/g,wc=/<%=([\s\S]+?)%>/g,Ep=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pp=/^\w*$/,oa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wf=/[\\^$.*+?()[\]{}|]/g,R1=RegExp(wf.source),Cc=/^\s+/,Cf=/\s/,I1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sl=/\{\n\/\* \[wrapped with (.+)\] \*/,_c=/,? & /,D1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,N1=/[()=,{}\[\]\/\s]/,B1=/\\(\\)?/g,$1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ys=/\w*$/,F1=/^[-+]0x[0-9a-f]+$/i,z1=/^0b[01]+$/i,j1=/^\[object .+?Constructor\]$/,H1=/^0o[0-7]+$/i,V1=/^(?:0|[1-9]\d*)$/,U1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ll=/($^)/,W1=/['\n\r\u2028\u2029\\]/g,bs="\\ud800-\\udfff",xu="\\u0300-\\u036f",wu="\\ufe20-\\ufe2f",ul="\\u20d0-\\u20ff",Cu=xu+wu+ul,Tp="\\u2700-\\u27bf",kc="a-z\\xdf-\\xf6\\xf8-\\xff",cl="\\xac\\xb1\\xd7\\xf7",aa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mn="\\u2000-\\u206f",kn=" \\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",sa="A-Z\\xc0-\\xd6\\xd8-\\xde",Br="\\ufe0e\\ufe0f",ai=cl+aa+Mn+kn,la="['\u2019]",dl="["+bs+"]",si="["+ai+"]",Ss="["+Cu+"]",_f="\\d+",_u="["+Tp+"]",xs="["+kc+"]",kf="[^"+bs+ai+_f+Tp+kc+sa+"]",Oi="\\ud83c[\\udffb-\\udfff]",Lp="(?:"+Ss+"|"+Oi+")",Ap="[^"+bs+"]",Ef="(?:\\ud83c[\\udde6-\\uddff]){2}",fl="[\\ud800-\\udbff][\\udc00-\\udfff]",Ao="["+sa+"]",hl="\\u200d",ku="(?:"+xs+"|"+kf+")",G1="(?:"+Ao+"|"+kf+")",Ec="(?:"+la+"(?:d|ll|m|re|s|t|ve))?",Pc="(?:"+la+"(?:D|LL|M|RE|S|T|VE))?",Pf=Lp+"?",Tc="["+Br+"]?",za="(?:"+hl+"(?:"+[Ap,Ef,fl].join("|")+")"+Tc+Pf+")*",Tf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Eu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xt=Tc+Pf+za,Op="(?:"+[_u,Ef,fl].join("|")+")"+Xt,Lc="(?:"+[Ap+Ss+"?",Ss,Ef,fl,dl].join("|")+")",Ac=RegExp(la,"g"),Mp=RegExp(Ss,"g"),ua=RegExp(Oi+"(?="+Oi+")|"+Lc+Xt,"g"),Yn=RegExp([Ao+"?"+xs+"+"+Ec+"(?="+[si,Ao,"$"].join("|")+")",G1+"+"+Pc+"(?="+[si,Ao+ku,"$"].join("|")+")",Ao+"?"+ku+"+"+Ec,Ao+"+"+Pc,Eu,Tf,_f,Op].join("|"),"g"),Lf=RegExp("["+hl+bs+Cu+Br+"]"),Rp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Af=["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"],Ip=-1,mn={};mn[Et]=mn[Ut]=mn[Ve]=mn[ft]=mn[un]=mn[ze]=mn[St]=mn[ct]=mn[Vt]=!0,mn[ke]=mn[De]=mn[Nt]=mn[Ye]=mn[Te]=mn[mt]=mn[dt]=mn[vt]=mn[Le]=mn[ut]=mn[ot]=mn[ue]=mn[Ie]=mn[We]=mn[Ne]=!1;var Zt={};Zt[ke]=Zt[De]=Zt[Nt]=Zt[Te]=Zt[Ye]=Zt[mt]=Zt[Et]=Zt[Ut]=Zt[Ve]=Zt[ft]=Zt[un]=Zt[Le]=Zt[ut]=Zt[ot]=Zt[ue]=Zt[Ie]=Zt[We]=Zt[Xe]=Zt[ze]=Zt[St]=Zt[ct]=Zt[Vt]=!0,Zt[dt]=Zt[vt]=Zt[Ne]=!1;var Dp={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},q1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},q={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,it=parseInt,Gt=typeof xo=="object"&&xo&&xo.Object===Object&&xo,bn=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Gt||bn||Function("return this")(),Bt=t&&!t.nodeType&&t,Qt=Bt&&!0&&e&&!e.nodeType&&e,Xr=Qt&&Qt.exports===Bt,Pr=Xr&&Gt.process,Sn=function(){try{var ie=Qt&&Qt.require&&Qt.require("util").types;return ie||Pr&&Pr.binding&&Pr.binding("util")}catch(we){}}(),li=Sn&&Sn.isArrayBuffer,Oo=Sn&&Sn.isDate,lo=Sn&&Sn.isMap,ja=Sn&&Sn.isRegExp,pl=Sn&&Sn.isSet,Y1=Sn&&Sn.isTypedArray;function Mi(ie,we,ye){switch(ye.length){case 0:return ie.call(we);case 1:return ie.call(we,ye[0]);case 2:return ie.call(we,ye[0],ye[1]);case 3:return ie.call(we,ye[0],ye[1],ye[2])}return ie.apply(we,ye)}function K1(ie,we,ye,nt){for(var It=-1,on=ie==null?0:ie.length;++It<on;){var zt=ie[It];we(nt,zt,ye(zt),ie)}return nt}function Kn(ie,we){for(var ye=-1,nt=ie==null?0:ie.length;++ye<nt&&we(ie[ye],ye,ie)!==!1;);return ie}function Mo(ie,we){for(var ye=ie==null?0:ie.length;ye--&&we(ie[ye],ye,ie)!==!1;);return ie}function Hn(ie,we){for(var ye=-1,nt=ie==null?0:ie.length;++ye<nt;)if(!we(ie[ye],ye,ie))return!1;return!0}function Ro(ie,we){for(var ye=-1,nt=ie==null?0:ie.length,It=0,on=[];++ye<nt;){var zt=ie[ye];we(zt,ye,ie)&&(on[It++]=zt)}return on}function Yi(ie,we){var ye=ie==null?0:ie.length;return!!ye&&Rc(ie,we,0)>-1}function Np(ie,we,ye){for(var nt=-1,It=ie==null?0:ie.length;++nt<It;)if(ye(we,ie[nt]))return!0;return!1}function Vn(ie,we){for(var ye=-1,nt=ie==null?0:ie.length,It=Array(nt);++ye<nt;)It[ye]=we(ie[ye],ye,ie);return It}function Ha(ie,we){for(var ye=-1,nt=we.length,It=ie.length;++ye<nt;)ie[It+ye]=we[ye];return ie}function Of(ie,we,ye,nt){var It=-1,on=ie==null?0:ie.length;for(nt&&on&&(ye=ie[++It]);++It<on;)ye=we(ye,ie[It],It,ie);return ye}function jy(ie,we,ye,nt){var It=ie==null?0:ie.length;for(nt&&It&&(ye=ie[--It]);It--;)ye=we(ye,ie[It],It,ie);return ye}function Oc(ie,we){for(var ye=-1,nt=ie==null?0:ie.length;++ye<nt;)if(we(ie[ye],ye,ie))return!0;return!1}var Hy=gl("length");function Mc(ie){return ie.split("")}function X1(ie){return ie.match(D1)||[]}function Vy(ie,we,ye){var nt;return ye(ie,function(It,on,zt){if(we(It,on,zt))return nt=on,!1}),nt}function Pu(ie,we,ye,nt){for(var It=ie.length,on=ye+(nt?1:-1);nt?on--:++on<It;)if(we(ie[on],on,ie))return on;return-1}function Rc(ie,we,ye){return we===we?Yy(ie,we,ye):Pu(ie,Mf,ye)}function ca(ie,we,ye,nt){for(var It=ye-1,on=ie.length;++It<on;)if(nt(ie[It],we))return It;return-1}function Mf(ie){return ie!==ie}function Rf(ie,we){var ye=ie==null?0:ie.length;return ye?Df(ie,we)/ye:le}function gl(ie){return function(we){return we==null?n:we[ie]}}function If(ie){return function(we){return ie==null?n:ie[we]}}function Bp(ie,we,ye,nt,It){return It(ie,function(on,zt,vn){ye=nt?(nt=!1,on):we(ye,on,zt,vn)}),ye}function Uy(ie,we){var ye=ie.length;for(ie.sort(we);ye--;)ie[ye]=ie[ye].value;return ie}function Df(ie,we){for(var ye,nt=-1,It=ie.length;++nt<It;){var on=we(ie[nt]);on!==n&&(ye=ye===n?on:ye+on)}return ye}function Nf(ie,we){for(var ye=-1,nt=Array(ie);++ye<ie;)nt[ye]=we(ye);return nt}function Ic(ie,we){return Vn(we,function(ye){return[ye,ie[ye]]})}function uo(ie){return ie&&ie.slice(0,J1(ie)+1).replace(Cc,"")}function $r(ie){return function(we){return ie(we)}}function Bf(ie,we){return Vn(we,function(ye){return ie[ye]})}function Dc(ie,we){return ie.has(we)}function da(ie,we){for(var ye=-1,nt=ie.length;++ye<nt&&Rc(we,ie[ye],0)>-1;);return ye}function ws(ie,we){for(var ye=ie.length;ye--&&Rc(we,ie[ye],0)>-1;);return ye}function Z1(ie,we){for(var ye=ie.length,nt=0;ye--;)ie[ye]===we&&++nt;return nt}var Wy=If(Dp),Cs=If(q1);function ml(ie){return"\\"+re[ie]}function $p(ie,we){return ie==null?n:ie[we]}function Tu(ie){return Lf.test(ie)}function Fp(ie){return Rp.test(ie)}function Gy(ie){for(var we,ye=[];!(we=ie.next()).done;)ye.push(we.value);return ye}function zp(ie){var we=-1,ye=Array(ie.size);return ie.forEach(function(nt,It){ye[++we]=[It,nt]}),ye}function jp(ie,we){return function(ye){return ie(we(ye))}}function fa(ie,we){for(var ye=-1,nt=ie.length,It=0,on=[];++ye<nt;){var zt=ie[ye];(zt===we||zt===f)&&(ie[ye]=f,on[It++]=ye)}return on}function $f(ie){var we=-1,ye=Array(ie.size);return ie.forEach(function(nt){ye[++we]=nt}),ye}function qy(ie){var we=-1,ye=Array(ie.size);return ie.forEach(function(nt){ye[++we]=[nt,nt]}),ye}function Yy(ie,we,ye){for(var nt=ye-1,It=ie.length;++nt<It;)if(ie[nt]===we)return nt;return-1}function Q1(ie,we,ye){for(var nt=ye+1;nt--;)if(ie[nt]===we)return nt;return nt}function Va(ie){return Tu(ie)?Nc(ie):Hy(ie)}function Ki(ie){return Tu(ie)?Xy(ie):Mc(ie)}function J1(ie){for(var we=ie.length;we--&&Cf.test(ie.charAt(we)););return we}var Ky=If(q);function Nc(ie){for(var we=ua.lastIndex=0;ua.test(ie);)++we;return we}function Xy(ie){return ie.match(ua)||[]}function Ff(ie){return ie.match(Yn)||[]}var Io=function ie(we){we=we==null?Pt:Ua.defaults(Pt.Object(),we,Ua.pick(Pt,Af));var ye=we.Array,nt=we.Date,It=we.Error,on=we.Function,zt=we.Math,vn=we.Object,zf=we.RegExp,em=we.String,Ri=we.TypeError,Bc=ye.prototype,Lu=on.prototype,En=vn.prototype,sr=we["__core-js_shared__"],fr=Lu.toString,cn=En.hasOwnProperty,jf=0,$c=function(){var c=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Hp=En.toString,Si=fr.call(vn),tm=Pt._,nm=zf("^"+fr.call(cn).replace(wf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fc=Xr?we.Buffer:n,ui=we.Symbol,Ii=we.Uint8Array,zc=Fc?Fc.allocUnsafe:n,jc=jp(vn.getPrototypeOf,vn),Vp=vn.create,rm=En.propertyIsEnumerable,Hf=Bc.splice,im=ui?ui.isConcatSpreadable:n,Hc=ui?ui.iterator:n,vl=ui?ui.toStringTag:n,Vf=function(){try{var c=Yt(vn,"defineProperty");return c({},"",{}),c}catch(g){}}(),Zy=we.clearTimeout!==Pt.clearTimeout&&we.clearTimeout,Qy=nt&&nt.now!==Pt.Date.now&&nt.now,Uf=we.setTimeout!==Pt.setTimeout&&we.setTimeout,Wf=zt.ceil,Au=zt.floor,Vc=vn.getOwnPropertySymbols,Jy=Fc?Fc.isBuffer:n,Up=we.isFinite,e3=Bc.join,t3=jp(vn.keys,vn),Tr=zt.max,ci=zt.min,om=nt.now,n3=we.parseInt,am=zt.random,r3=Bc.reverse,sm=Yt(we,"DataView"),Uc=Yt(we,"Map"),lm=Yt(we,"Promise"),Wc=Yt(we,"Set"),Gc=Yt(we,"WeakMap"),qc=Yt(vn,"create"),Gf=Gc&&new Gc,_s={},sw=ah(sm),lw=ah(Uc),uw=ah(lm),Yc=ah(Wc),um=ah(Gc),Kc=ui?ui.prototype:n,qf=Kc?Kc.valueOf:n,cm=Kc?Kc.toString:n;function F(c){if(Mr(c)&&!jt(c)&&!(c instanceof Jt)){if(c instanceof co)return c;if(cn.call(c,"__wrapped__"))return gT(c)}return new co(c)}var Ou=function(){function c(){}return function(g){if(!gr(g))return{};if(Vp)return Vp(g);c.prototype=g;var w=new c;return c.prototype=n,w}}();function Yf(){}function co(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}F.templateSettings={escape:kp,evaluate:M1,interpolate:wc,variable:"",imports:{_:F}},F.prototype=Yf.prototype,F.prototype.constructor=F,co.prototype=Ou(Yf.prototype),co.prototype.constructor=co;function Jt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fe,this.__views__=[]}function Xi(){var c=new Jt(this.__wrapped__);return c.__actions__=$i(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=$i(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=$i(this.__views__),c}function Di(){if(this.__filtered__){var c=new Jt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function i3(){var c=this.__wrapped__.value(),g=this.__dir__,w=jt(c),O=g<0,N=w?c.length:0,H=xK(0,N,this.__views__),Q=H.start,ne=H.end,de=ne-Q,Ee=O?ne:Q-1,Pe=this.__iteratees__,Re=Pe.length,tt=0,wt=ci(de,this.__takeCount__);if(!w||!O&&N==de&&wt==de)return kl(c,this.__actions__);var Lt=[];e:for(;de--&&tt<wt;){Ee+=g;for(var Kt=-1,At=c[Ee];++Kt<Re;){var en=Pe[Kt],an=en.iteratee,xa=en.type,mo=an(At);if(xa==V)At=mo;else if(!mo){if(xa==$)continue e;break e}}Lt[tt++]=At}return Lt}Jt.prototype=Ou(Yf.prototype),Jt.prototype.constructor=Jt;function yl(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function o3(){this.__data__=qc?qc(null):{},this.size=0}function a3(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function s3(c){var g=this.__data__;if(qc){var w=g[c];return w===l?n:w}return cn.call(g,c)?g[c]:n}function dm(c){var g=this.__data__;return qc?g[c]!==n:cn.call(g,c)}function l3(c,g){var w=this.__data__;return this.size+=this.has(c)?0:1,w[c]=qc&&g===n?l:g,this}yl.prototype.clear=o3,yl.prototype.delete=a3,yl.prototype.get=s3,yl.prototype.has=dm,yl.prototype.set=l3;function ha(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function u3(){this.__data__=[],this.size=0}function c3(c){var g=this.__data__,w=Fr(g,c);if(w<0)return!1;var O=g.length-1;return w==O?g.pop():Hf.call(g,w,1),--this.size,!0}function fm(c){var g=this.__data__,w=Fr(g,c);return w<0?n:g[w][1]}function hm(c){return Fr(this.__data__,c)>-1}function d3(c,g){var w=this.__data__,O=Fr(w,c);return O<0?(++this.size,w.push([c,g])):w[O][1]=g,this}ha.prototype.clear=u3,ha.prototype.delete=c3,ha.prototype.get=fm,ha.prototype.has=hm,ha.prototype.set=d3;function pa(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function Wp(){this.size=0,this.__data__={hash:new yl,map:new(Uc||ha),string:new yl}}function cw(c){var g=Ft(this,c).delete(c);return this.size-=g?1:0,g}function f3(c){return Ft(this,c).get(c)}function pm(c){return Ft(this,c).has(c)}function h3(c,g){var w=Ft(this,c),O=w.size;return w.set(c,g),this.size+=w.size==O?0:1,this}pa.prototype.clear=Wp,pa.prototype.delete=cw,pa.prototype.get=f3,pa.prototype.has=pm,pa.prototype.set=h3;function Wa(c){var g=-1,w=c==null?0:c.length;for(this.__data__=new pa;++g<w;)this.add(c[g])}function ks(c){return this.__data__.set(c,l),this}function dw(c){return this.__data__.has(c)}Wa.prototype.add=Wa.prototype.push=ks,Wa.prototype.has=dw;function Lr(c){var g=this.__data__=new ha(c);this.size=g.size}function p3(){this.__data__=new ha,this.size=0}function Kf(c){var g=this.__data__,w=g.delete(c);return this.size=g.size,w}function Xf(c){return this.__data__.get(c)}function Gp(c){return this.__data__.has(c)}function qp(c,g){var w=this.__data__;if(w instanceof ha){var O=w.__data__;if(!Uc||O.length<i-1)return O.push([c,g]),this.size=++w.size,this;w=this.__data__=new pa(O)}return w.set(c,g),this.size=w.size,this}Lr.prototype.clear=p3,Lr.prototype.delete=Kf,Lr.prototype.get=Xf,Lr.prototype.has=Gp,Lr.prototype.set=qp;function gm(c,g){var w=jt(c),O=!w&&sh(c),N=!w&&!O&&sd(c),H=!w&&!O&&!N&&b0(c),Q=w||O||N||H,ne=Q?Nf(c.length,em):[],de=ne.length;for(var Ee in c)(g||cn.call(c,Ee))&&!(Q&&(Ee=="length"||N&&(Ee=="offset"||Ee=="parent")||H&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Nu(Ee,de)))&&ne.push(Ee);return ne}function Xc(c){var g=c.length;return g?c[Qf(0,g-1)]:n}function xi(c,g){return b3($i(c),Mu(g,0,c.length))}function fw(c){return b3($i(c))}function mm(c,g,w){(w!==n&&!Os(c[g],w)||w===n&&!(g in c))&&ga(c,g,w)}function bl(c,g,w){var O=c[g];(!(cn.call(c,g)&&Os(O,w))||w===n&&!(g in c))&&ga(c,g,w)}function Fr(c,g){for(var w=c.length;w--;)if(Os(c[w][0],g))return w;return-1}function hw(c,g,w,O){return Es(c,function(N,H,Q){g(O,N,w(N),Q)}),O}function st(c,g){return c&&Ga(g,Ei(g),c)}function Zc(c,g){return c&&Ga(g,zo(g),c)}function ga(c,g,w){g=="__proto__"&&Vf?Vf(c,g,{configurable:!0,enumerable:!0,value:w,writable:!0}):c[g]=w}function Yp(c,g){for(var w=-1,O=g.length,N=ye(O),H=c==null;++w<O;)N[w]=H?n:Pw(c,g[w]);return N}function Mu(c,g,w){return c===c&&(w!==n&&(c=c<=w?c:w),g!==n&&(c=c>=g?c:g)),c}function wi(c,g,w,O,N,H){var Q,ne=g&p,de=g&m,Ee=g&v;if(w&&(Q=N?w(c,O,N,H):w(c)),Q!==n)return Q;if(!gr(c))return c;var Pe=jt(c);if(Pe){if(Q=CK(c),!ne)return $i(c,Q)}else{var Re=ki(c),tt=Re==vt||Re==xt;if(sd(c))return Pl(c,ne);if(Re==ot||Re==ke||tt&&!N){if(Q=de||tt?{}:aT(c),!ne)return de?Om(c,Zc(Q,c)):$o(c,st(Q,c))}else{if(!Zt[Re])return N?c:{};Q=_K(c,Re,ne)}}H||(H=new Lr);var wt=H.get(c);if(wt)return wt;H.set(c,Q),DT(c)?c.forEach(function(At){Q.add(wi(At,g,w,At,c,H))}):RT(c)&&c.forEach(function(At,en){Q.set(en,wi(At,g,w,en,c,H))});var Lt=Ee?de?me:ba:de?zo:Ei,Kt=Pe?n:Lt(c);return Kn(Kt||c,function(At,en){Kt&&(en=At,At=c[en]),bl(Q,en,wi(At,g,w,en,c,H))}),Q}function Kp(c){var g=Ei(c);return function(w){return Xp(w,c,g)}}function Xp(c,g,w){var O=w.length;if(c==null)return!O;for(c=vn(c);O--;){var N=w[O],H=g[N],Q=c[N];if(Q===n&&!(N in c)||!H(Q))return!1}return!0}function vm(c,g,w){if(typeof c!="function")throw new Ri(a);return Nm(function(){c.apply(n,w)},g)}function Qc(c,g,w,O){var N=-1,H=Yi,Q=!0,ne=c.length,de=[],Ee=g.length;if(!ne)return de;w&&(g=Vn(g,$r(w))),O?(H=Np,Q=!1):g.length>=i&&(H=Dc,Q=!1,g=new Wa(g));e:for(;++N<ne;){var Pe=c[N],Re=w==null?Pe:w(Pe);if(Pe=O||Pe!==0?Pe:0,Q&&Re===Re){for(var tt=Ee;tt--;)if(g[tt]===Re)continue e;de.push(Pe)}else H(g,Re,O)||de.push(Pe)}return de}var Es=nh(ya),Zp=nh(No,!0);function ym(c,g){var w=!0;return Es(c,function(O,N,H){return w=!!g(O,N,H),w}),w}function Ar(c,g,w){for(var O=-1,N=c.length;++O<N;){var H=c[O],Q=g(H);if(Q!=null&&(ne===n?Q===Q&&!Sa(Q):w(Q,ne)))var ne=Q,de=H}return de}function ma(c,g,w,O){var N=c.length;for(w=Wt(w),w<0&&(w=-w>N?0:N+w),O=O===n||O>N?N:Wt(O),O<0&&(O+=N),O=w>O?0:BT(O);w<O;)c[w++]=g;return c}function va(c,g){var w=[];return Es(c,function(O,N,H){g(O,N,H)&&w.push(O)}),w}function zr(c,g,w,O,N){var H=-1,Q=c.length;for(w||(w=EK),N||(N=[]);++H<Q;){var ne=c[H];g>0&&w(ne)?g>1?zr(ne,g-1,w,O,N):Ha(N,ne):O||(N[N.length]=ne)}return N}var Qp=Tl(),Do=Tl(!0);function ya(c,g){return c&&Qp(c,g,Ei)}function No(c,g){return c&&Do(c,g,Ei)}function Jp(c,g){return Ro(g,function(w){return Bu(c[w])})}function Sl(c,g){g=El(g,c);for(var w=0,O=g.length;c!=null&&w<O;)c=c[Al(g[w++])];return w&&w==O?c:n}function bm(c,g,w){var O=g(c);return jt(c)?O:Ha(O,w(c))}function Ci(c){return c==null?c===n?Ce:Rt:vl&&vl in vn(c)?Qr(c):RK(c)}function e0(c,g){return c>g}function t0(c,g){return c!=null&&cn.call(c,g)}function n0(c,g){return c!=null&&g in vn(c)}function r0(c,g,w){return c>=ci(g,w)&&c<Tr(g,w)}function Jc(c,g,w){for(var O=w?Np:Yi,N=c[0].length,H=c.length,Q=H,ne=ye(H),de=1/0,Ee=[];Q--;){var Pe=c[Q];Q&&g&&(Pe=Vn(Pe,$r(g))),de=ci(Pe.length,de),ne[Q]=!w&&(g||N>=120&&Pe.length>=120)?new Wa(Q&&Pe):n}Pe=c[0];var Re=-1,tt=ne[0];e:for(;++Re<N&&Ee.length<de;){var wt=Pe[Re],Lt=g?g(wt):wt;if(wt=w||wt!==0?wt:0,!(tt?Dc(tt,Lt):O(Ee,Lt,w))){for(Q=H;--Q;){var Kt=ne[Q];if(!(Kt?Dc(Kt,Lt):O(c[Q],Lt,w)))continue e}tt&&tt.push(Lt),Ee.push(wt)}}return Ee}function i0(c,g,w,O){return ya(c,function(N,H,Q){g(O,w(N),H,Q)}),O}function Ps(c,g,w){g=El(g,c),c=cT(c,g);var O=c==null?c:c[Al(qa(g))];return O==null?n:Mi(O,c,w)}function o0(c){return Mr(c)&&Ci(c)==ke}function Sm(c){return Mr(c)&&Ci(c)==Nt}function xm(c){return Mr(c)&&Ci(c)==mt}function ed(c,g,w,O,N){return c===g?!0:c==null||g==null||!Mr(c)&&!Mr(g)?c!==c&&g!==g:wm(c,g,w,O,ed,N)}function wm(c,g,w,O,N,H){var Q=jt(c),ne=jt(g),de=Q?De:ki(c),Ee=ne?De:ki(g);de=de==ke?ot:de,Ee=Ee==ke?ot:Ee;var Pe=de==ot,Re=Ee==ot,tt=de==Ee;if(tt&&sd(c)){if(!sd(g))return!1;Q=!0,Pe=!1}if(tt&&!Pe)return H||(H=new Lr),Q||b0(c)?rt(c,g,w,O,N,H):Un(c,g,de,w,O,N,H);if(!(w&b)){var wt=Pe&&cn.call(c,"__wrapped__"),Lt=Re&&cn.call(g,"__wrapped__");if(wt||Lt){var Kt=wt?c.value():c,At=Lt?g.value():g;return H||(H=new Lr),N(Kt,At,w,O,H)}}return tt?(H||(H=new Lr),Rn(c,g,w,O,N,H)):!1}function pw(c){return Mr(c)&&ki(c)==Le}function td(c,g,w,O){var N=w.length,H=N,Q=!O;if(c==null)return!H;for(c=vn(c);N--;){var ne=w[N];if(Q&&ne[2]?ne[1]!==c[ne[0]]:!(ne[0]in c))return!1}for(;++N<H;){ne=w[N];var de=ne[0],Ee=c[de],Pe=ne[1];if(Q&&ne[2]){if(Ee===n&&!(de in c))return!1}else{var Re=new Lr;if(O)var tt=O(Ee,Pe,de,c,g,Re);if(!(tt===n?ed(Pe,Ee,b|x,O,Re):tt))return!1}}return!0}function a0(c){if(!gr(c)||TK(c))return!1;var g=Bu(c)?nm:j1;return g.test(ah(c))}function hr(c){return Mr(c)&&Ci(c)==ue}function qt(c){return Mr(c)&&ki(c)==Ie}function Zr(c){return Mr(c)&&k3(c.length)&&!!mn[Ci(c)]}function pr(c){return typeof c=="function"?c:c==null?jo:typeof c=="object"?jt(c)?wl(c[0],c[1]):nd(c):YT(c)}function jr(c){if(!Dm(c))return t3(c);var g=[];for(var w in vn(c))cn.call(c,w)&&w!="constructor"&&g.push(w);return g}function fo(c){if(!gr(c))return MK(c);var g=Dm(c),w=[];for(var O in c)O=="constructor"&&(g||!cn.call(c,O))||w.push(O);return w}function xl(c,g){return c<g}function Or(c,g){var w=-1,O=Fo(c)?ye(c.length):[];return Es(c,function(N,H,Q){O[++w]=g(N,H,Q)}),O}function nd(c){var g=Dt(c);return g.length==1&&g[0][2]?lT(g[0][0],g[0][1]):function(w){return w===c||td(w,c,g)}}function wl(c,g){return vw(c)&&sT(g)?lT(Al(c),g):function(w){var O=Pw(w,c);return O===n&&O===g?Tw(w,c):ed(g,O,b|x)}}function Ru(c,g,w,O,N){c!==g&&Qp(g,function(H,Q){if(N||(N=new Lr),gr(H))Cm(c,g,Q,w,Ru,O,N);else{var ne=O?O(bw(c,Q),H,Q+"",c,g,N):n;ne===n&&(ne=H),mm(c,Q,ne)}},zo)}function Cm(c,g,w,O,N,H,Q){var ne=bw(c,w),de=bw(g,w),Ee=Q.get(de);if(Ee){mm(c,w,Ee);return}var Pe=H?H(ne,de,w+"",c,g,Q):n,Re=Pe===n;if(Re){var tt=jt(de),wt=!tt&&sd(de),Lt=!tt&&!wt&&b0(de);Pe=de,tt||wt||Lt?jt(ne)?Pe=ne:Vr(ne)?Pe=$i(ne):wt?(Re=!1,Pe=Pl(de,!0)):Lt?(Re=!1,Pe=m3(de,!0)):Pe=[]:Bm(de)||sh(de)?(Pe=ne,sh(ne)?Pe=$T(ne):(!gr(ne)||Bu(ne))&&(Pe=aT(de))):Re=!1}Re&&(Q.set(de,Pe),N(Pe,de,O,H,Q),Q.delete(de)),mm(c,w,Pe)}function rd(c,g){var w=c.length;if(!!w)return g+=g<0?w:0,Nu(g,w)?c[g]:n}function Ni(c,g,w){g.length?g=Vn(g,function(H){return jt(H)?function(Q){return Sl(Q,H.length===1?H[0]:H)}:H}):g=[jo];var O=-1;g=Vn(g,$r(Me()));var N=Or(c,function(H,Q,ne){var de=Vn(g,function(Ee){return Ee(H)});return{criteria:de,index:++O,value:H}});return Uy(N,function(H,Q){return mw(H,Q,w)})}function _m(c,g){return s0(c,g,function(w,O){return Tw(c,O)})}function s0(c,g,w){for(var O=-1,N=g.length,H={};++O<N;){var Q=g[O],ne=Sl(c,Q);w(ne,Q)&&Iu(H,El(Q,c),ne)}return H}function Ts(c){return function(g){return Sl(g,c)}}function Cl(c,g,w,O){var N=O?ca:Rc,H=-1,Q=g.length,ne=c;for(c===g&&(g=$i(g)),w&&(ne=Vn(c,$r(w)));++H<Q;)for(var de=0,Ee=g[H],Pe=w?w(Ee):Ee;(de=N(ne,Pe,de,O))>-1;)ne!==c&&Hf.call(ne,de,1),Hf.call(c,de,1);return c}function Zf(c,g){for(var w=c?g.length:0,O=w-1;w--;){var N=g[w];if(w==O||N!==H){var H=N;Nu(N)?Hf.call(c,N,1):h0(c,N)}}return c}function Qf(c,g){return c+Au(am()*(g-c+1))}function _l(c,g,w,O){for(var N=-1,H=Tr(Wf((g-c)/(w||1)),0),Q=ye(H);H--;)Q[O?H:++N]=c,c+=w;return Q}function id(c,g){var w="";if(!c||g<1||g>U)return w;do g%2&&(w+=c),g=Au(g/2),g&&(c+=c);while(g);return w}function Mt(c,g){return Sw(uT(c,g,jo),c+"")}function l0(c){return Xc(S0(c))}function Jf(c,g){var w=S0(c);return b3(w,Mu(g,0,w.length))}function Iu(c,g,w,O){if(!gr(c))return c;g=El(g,c);for(var N=-1,H=g.length,Q=H-1,ne=c;ne!=null&&++N<H;){var de=Al(g[N]),Ee=w;if(de==="__proto__"||de==="constructor"||de==="prototype")return c;if(N!=Q){var Pe=ne[de];Ee=O?O(Pe,de,ne):n,Ee===n&&(Ee=gr(Pe)?Pe:Nu(g[N+1])?[]:{})}bl(ne,de,Ee),ne=ne[de]}return c}var eh=Gf?function(c,g){return Gf.set(c,g),c}:jo,u0=Vf?function(c,g){return Vf(c,"toString",{configurable:!0,enumerable:!1,value:Aw(g),writable:!0})}:jo;function _i(c){return b3(S0(c))}function Hr(c,g,w){var O=-1,N=c.length;g<0&&(g=-g>N?0:N+g),w=w>N?N:w,w<0&&(w+=N),N=g>w?0:w-g>>>0,g>>>=0;for(var H=ye(N);++O<N;)H[O]=c[O+g];return H}function Bo(c,g){var w;return Es(c,function(O,N,H){return w=g(O,N,H),!w}),!!w}function di(c,g,w){var O=0,N=c==null?O:c.length;if(typeof g=="number"&&g===g&&N<=Ae){for(;O<N;){var H=O+N>>>1,Q=c[H];Q!==null&&!Sa(Q)&&(w?Q<=g:Q<g)?O=H+1:N=H}return N}return c0(c,g,jo,w)}function c0(c,g,w,O){var N=0,H=c==null?0:c.length;if(H===0)return 0;g=w(g);for(var Q=g!==g,ne=g===null,de=Sa(g),Ee=g===n;N<H;){var Pe=Au((N+H)/2),Re=w(c[Pe]),tt=Re!==n,wt=Re===null,Lt=Re===Re,Kt=Sa(Re);if(Q)var At=O||Lt;else Ee?At=Lt&&(O||tt):ne?At=Lt&&tt&&(O||!wt):de?At=Lt&&tt&&!wt&&(O||!Kt):wt||Kt?At=!1:At=O?Re<=g:Re<g;At?N=Pe+1:H=Pe}return ci(H,Se)}function d0(c,g){for(var w=-1,O=c.length,N=0,H=[];++w<O;){var Q=c[w],ne=g?g(Q):Q;if(!w||!Os(ne,de)){var de=ne;H[N++]=Q===0?0:Q}}return H}function f0(c){return typeof c=="number"?c:Sa(c)?le:+c}function ho(c){if(typeof c=="string")return c;if(jt(c))return Vn(c,ho)+"";if(Sa(c))return cm?cm.call(c):"";var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function Bi(c,g,w){var O=-1,N=Yi,H=c.length,Q=!0,ne=[],de=ne;if(w)Q=!1,N=Np;else if(H>=i){var Ee=g?null:W(c);if(Ee)return $f(Ee);Q=!1,N=Dc,de=new Wa}else de=g?[]:ne;e:for(;++O<H;){var Pe=c[O],Re=g?g(Pe):Pe;if(Pe=w||Pe!==0?Pe:0,Q&&Re===Re){for(var tt=de.length;tt--;)if(de[tt]===Re)continue e;g&&de.push(Re),ne.push(Pe)}else N(de,Re,w)||(de!==ne&&de.push(Re),ne.push(Pe))}return ne}function h0(c,g){return g=El(g,c),c=cT(c,g),c==null||delete c[Al(qa(g))]}function km(c,g,w,O){return Iu(c,g,w(Sl(c,g)),O)}function od(c,g,w,O){for(var N=c.length,H=O?N:-1;(O?H--:++H<N)&&g(c[H],H,c););return w?Hr(c,O?0:H,O?H+1:N):Hr(c,O?H+1:0,O?N:H)}function kl(c,g){var w=c;return w instanceof Jt&&(w=w.value()),Of(g,function(O,N){return N.func.apply(N.thisArg,Ha([O],N.args))},w)}function p0(c,g,w){var O=c.length;if(O<2)return O?Bi(c[0]):[];for(var N=-1,H=ye(O);++N<O;)for(var Q=c[N],ne=-1;++ne<O;)ne!=N&&(H[N]=Qc(H[N]||Q,c[ne],g,w));return Bi(zr(H,1),g,w)}function Em(c,g,w){for(var O=-1,N=c.length,H=g.length,Q={};++O<N;){var ne=O<H?g[O]:n;w(Q,c[O],ne)}return Q}function th(c){return Vr(c)?c:[]}function ad(c){return typeof c=="function"?c:jo}function El(c,g){return jt(c)?c:vw(c,g)?[c]:pT(Pn(c))}var gw=Mt;function Ls(c,g,w){var O=c.length;return w=w===n?O:w,!g&&w>=O?c:Hr(c,g,w)}var Pm=Zy||function(c){return Pt.clearTimeout(c)};function Pl(c,g){if(g)return c.slice();var w=c.length,O=zc?zc(w):new c.constructor(w);return c.copy(O),O}function Tm(c){var g=new c.constructor(c.byteLength);return new Ii(g).set(new Ii(c)),g}function Du(c,g){var w=g?Tm(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.byteLength)}function g3(c){var g=new c.constructor(c.source,ys.exec(c));return g.lastIndex=c.lastIndex,g}function Xn(c){return qf?vn(qf.call(c)):{}}function m3(c,g){var w=g?Tm(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.length)}function Lm(c,g){if(c!==g){var w=c!==n,O=c===null,N=c===c,H=Sa(c),Q=g!==n,ne=g===null,de=g===g,Ee=Sa(g);if(!ne&&!Ee&&!H&&c>g||H&&Q&&de&&!ne&&!Ee||O&&Q&&de||!w&&de||!N)return 1;if(!O&&!H&&!Ee&&c<g||Ee&&w&&N&&!O&&!H||ne&&w&&N||!Q&&N||!de)return-1}return 0}function mw(c,g,w){for(var O=-1,N=c.criteria,H=g.criteria,Q=N.length,ne=w.length;++O<Q;){var de=Lm(N[O],H[O]);if(de){if(O>=ne)return de;var Ee=w[O];return de*(Ee=="desc"?-1:1)}}return c.index-g.index}function v3(c,g,w,O){for(var N=-1,H=c.length,Q=w.length,ne=-1,de=g.length,Ee=Tr(H-Q,0),Pe=ye(de+Ee),Re=!O;++ne<de;)Pe[ne]=g[ne];for(;++N<Q;)(Re||N<H)&&(Pe[w[N]]=c[N]);for(;Ee--;)Pe[ne++]=c[N++];return Pe}function Am(c,g,w,O){for(var N=-1,H=c.length,Q=-1,ne=w.length,de=-1,Ee=g.length,Pe=Tr(H-ne,0),Re=ye(Pe+Ee),tt=!O;++N<Pe;)Re[N]=c[N];for(var wt=N;++de<Ee;)Re[wt+de]=g[de];for(;++Q<ne;)(tt||N<H)&&(Re[wt+w[Q]]=c[N++]);return Re}function $i(c,g){var w=-1,O=c.length;for(g||(g=ye(O));++w<O;)g[w]=c[w];return g}function Ga(c,g,w,O){var N=!w;w||(w={});for(var H=-1,Q=g.length;++H<Q;){var ne=g[H],de=O?O(w[ne],c[ne],ne,w,c):n;de===n&&(de=c[ne]),N?ga(w,ne,de):bl(w,ne,de)}return w}function $o(c,g){return Ga(c,tn(c),g)}function Om(c,g){return Ga(c,As(c),g)}function g0(c,g){return function(w,O){var N=jt(w)?K1:hw,H=g?g():{};return N(w,c,Me(O,2),H)}}function po(c){return Mt(function(g,w){var O=-1,N=w.length,H=N>1?w[N-1]:n,Q=N>2?w[2]:n;for(H=c.length>3&&typeof H=="function"?(N--,H):n,Q&&go(w[0],w[1],Q)&&(H=N<3?n:H,N=1),g=vn(g);++O<N;){var ne=w[O];ne&&c(g,ne,O,H)}return g})}function nh(c,g){return function(w,O){if(w==null)return w;if(!Fo(w))return c(w,O);for(var N=w.length,H=g?N:-1,Q=vn(w);(g?H--:++H<N)&&O(Q[H],H,Q)!==!1;);return w}}function Tl(c){return function(g,w,O){for(var N=-1,H=vn(g),Q=O(g),ne=Q.length;ne--;){var de=Q[c?ne:++N];if(w(H[de],de,H)===!1)break}return g}}function m0(c,g,w){var O=g&E,N=rh(c);function H(){var Q=this&&this!==Pt&&this instanceof H?N:c;return Q.apply(O?w:this,arguments)}return H}function v0(c){return function(g){g=Pn(g);var w=Tu(g)?Ki(g):n,O=w?w[0]:g.charAt(0),N=w?Ls(w,1).join(""):g.slice(1);return O[c]()+N}}function Ll(c){return function(g){return Of(GT(WT(g).replace(Ac,"")),c,"")}}function rh(c){return function(){var g=arguments;switch(g.length){case 0:return new c;case 1:return new c(g[0]);case 2:return new c(g[0],g[1]);case 3:return new c(g[0],g[1],g[2]);case 4:return new c(g[0],g[1],g[2],g[3]);case 5:return new c(g[0],g[1],g[2],g[3],g[4]);case 6:return new c(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new c(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var w=Ou(c.prototype),O=c.apply(w,g);return gr(O)?O:w}}function y3(c,g,w){var O=rh(c);function N(){for(var H=arguments.length,Q=ye(H),ne=H,de=et(N);ne--;)Q[ne]=arguments[ne];var Ee=H<3&&Q[0]!==de&&Q[H-1]!==de?[]:fa(Q,de);if(H-=Ee.length,H<w)return L(c,g,ih,N.placeholder,n,Q,Ee,n,n,w-H);var Pe=this&&this!==Pt&&this instanceof N?O:c;return Mi(Pe,this,Q)}return N}function Mm(c){return function(g,w,O){var N=vn(g);if(!Fo(g)){var H=Me(w,3);g=Ei(g),w=function(ne){return H(N[ne],ne,N)}}var Q=c(g,w,O);return Q>-1?N[H?g[Q]:Q]:n}}function Rm(c){return lr(function(g){var w=g.length,O=w,N=co.prototype.thru;for(c&&g.reverse();O--;){var H=g[O];if(typeof H!="function")throw new Ri(a);if(N&&!Q&&xe(H)=="wrapper")var Q=new co([],!0)}for(O=Q?O:w;++O<w;){H=g[O];var ne=xe(H),de=ne=="wrapper"?ce(H):n;de&&yw(de[0])&&de[1]==(D|T|R|B)&&!de[4].length&&de[9]==1?Q=Q[xe(de[0])].apply(Q,de[3]):Q=H.length==1&&yw(H)?Q[ne]():Q.thru(H)}return function(){var Ee=arguments,Pe=Ee[0];if(Q&&Ee.length==1&&jt(Pe))return Q.plant(Pe).value();for(var Re=0,tt=w?g[Re].apply(this,Ee):Pe;++Re<w;)tt=g[Re].call(this,tt);return tt}})}function ih(c,g,w,O,N,H,Q,ne,de,Ee){var Pe=g&D,Re=g&E,tt=g&k,wt=g&(T|A),Lt=g&z,Kt=tt?n:rh(c);function At(){for(var en=arguments.length,an=ye(en),xa=en;xa--;)an[xa]=arguments[xa];if(wt)var mo=et(At),wa=Z1(an,mo);if(O&&(an=v3(an,O,N,wt)),H&&(an=Am(an,H,Q,wt)),en-=wa,wt&&en<Ee){var Ur=fa(an,mo);return L(c,g,ih,At.placeholder,w,an,Ur,ne,de,Ee-en)}var Ms=Re?w:this,Fu=tt?Ms[c]:c;return en=an.length,ne?an=IK(an,ne):Lt&&en>1&&an.reverse(),Pe&&de<en&&(an.length=de),this&&this!==Pt&&this instanceof At&&(Fu=Kt||rh(Fu)),Fu.apply(Ms,an)}return At}function oh(c,g){return function(w,O){return i0(w,c,g(O),{})}}function y0(c,g){return function(w,O){var N;if(w===n&&O===n)return g;if(w!==n&&(N=w),O!==n){if(N===n)return O;typeof w=="string"||typeof O=="string"?(w=ho(w),O=ho(O)):(w=f0(w),O=f0(O)),N=c(w,O)}return N}}function Im(c){return lr(function(g){return g=Vn(g,$r(Me())),Mt(function(w){var O=this;return c(g,function(N){return Mi(N,O,w)})})})}function d(c,g){g=g===n?" ":ho(g);var w=g.length;if(w<2)return w?id(g,c):g;var O=id(g,Wf(c/Va(g)));return Tu(g)?Ls(Ki(O),0,c).join(""):O.slice(0,c)}function h(c,g,w,O){var N=g&E,H=rh(c);function Q(){for(var ne=-1,de=arguments.length,Ee=-1,Pe=O.length,Re=ye(Pe+de),tt=this&&this!==Pt&&this instanceof Q?H:c;++Ee<Pe;)Re[Ee]=O[Ee];for(;de--;)Re[Ee++]=arguments[++ne];return Mi(tt,N?w:this,Re)}return Q}function S(c){return function(g,w,O){return O&&typeof O!="number"&&go(g,w,O)&&(w=O=n),g=$u(g),w===n?(w=g,g=0):w=$u(w),O=O===n?g<w?1:-1:$u(O),_l(g,w,O,c)}}function P(c){return function(g,w){return typeof g=="string"&&typeof w=="string"||(g=Ya(g),w=Ya(w)),c(g,w)}}function L(c,g,w,O,N,H,Q,ne,de,Ee){var Pe=g&T,Re=Pe?Q:n,tt=Pe?n:Q,wt=Pe?H:n,Lt=Pe?n:H;g|=Pe?R:I,g&=~(Pe?I:R),g&_||(g&=~(E|k));var Kt=[c,g,N,wt,Re,Lt,tt,ne,de,Ee],At=w.apply(n,Kt);return yw(c)&&dT(At,Kt),At.placeholder=O,fT(At,c,g)}function M(c){var g=zt[c];return function(w,O){if(w=Ya(w),O=O==null?0:ci(Wt(O),292),O&&Up(w)){var N=(Pn(w)+"e").split("e"),H=g(N[0]+"e"+(+N[1]+O));return N=(Pn(H)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return g(w)}}var W=Wc&&1/$f(new Wc([,-0]))[1]==Z?function(c){return new Wc(c)}:Rw;function se(c){return function(g){var w=ki(g);return w==Le?zp(g):w==Ie?qy(g):Ic(g,c(g))}}function pe(c,g,w,O,N,H,Q,ne){var de=g&k;if(!de&&typeof c!="function")throw new Ri(a);var Ee=O?O.length:0;if(Ee||(g&=~(R|I),O=N=n),Q=Q===n?Q:Tr(Wt(Q),0),ne=ne===n?ne:Wt(ne),Ee-=N?N.length:0,g&I){var Pe=O,Re=N;O=N=n}var tt=de?n:ce(c),wt=[c,g,w,O,N,Pe,Re,H,Q,ne];if(tt&&OK(wt,tt),c=wt[0],g=wt[1],w=wt[2],O=wt[3],N=wt[4],ne=wt[9]=wt[9]===n?de?0:c.length:Tr(wt[9]-Ee,0),!ne&&g&(T|A)&&(g&=~(T|A)),!g||g==E)var Lt=m0(c,g,w);else g==T||g==A?Lt=y3(c,g,ne):(g==R||g==(E|R))&&!N.length?Lt=h(c,g,w,O):Lt=ih.apply(n,wt);var Kt=tt?eh:dT;return fT(Kt(Lt,wt),c,g)}function je(c,g,w,O){return c===n||Os(c,En[w])&&!cn.call(O,w)?g:c}function ht(c,g,w,O,N,H){return gr(c)&&gr(g)&&(H.set(g,c),Ru(c,g,n,ht,H),H.delete(g)),c}function $t(c){return Bm(c)?n:c}function rt(c,g,w,O,N,H){var Q=w&b,ne=c.length,de=g.length;if(ne!=de&&!(Q&&de>ne))return!1;var Ee=H.get(c),Pe=H.get(g);if(Ee&&Pe)return Ee==g&&Pe==c;var Re=-1,tt=!0,wt=w&x?new Wa:n;for(H.set(c,g),H.set(g,c);++Re<ne;){var Lt=c[Re],Kt=g[Re];if(O)var At=Q?O(Kt,Lt,Re,g,c,H):O(Lt,Kt,Re,c,g,H);if(At!==n){if(At)continue;tt=!1;break}if(wt){if(!Oc(g,function(en,an){if(!Dc(wt,an)&&(Lt===en||N(Lt,en,w,O,H)))return wt.push(an)})){tt=!1;break}}else if(!(Lt===Kt||N(Lt,Kt,w,O,H))){tt=!1;break}}return H.delete(c),H.delete(g),tt}function Un(c,g,w,O,N,H,Q){switch(w){case Te:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case Nt:return!(c.byteLength!=g.byteLength||!H(new Ii(c),new Ii(g)));case Ye:case mt:case ut:return Os(+c,+g);case dt:return c.name==g.name&&c.message==g.message;case ue:case We:return c==g+"";case Le:var ne=zp;case Ie:var de=O&b;if(ne||(ne=$f),c.size!=g.size&&!de)return!1;var Ee=Q.get(c);if(Ee)return Ee==g;O|=x,Q.set(c,g);var Pe=rt(ne(c),ne(g),O,N,H,Q);return Q.delete(c),Pe;case Xe:if(qf)return qf.call(c)==qf.call(g)}return!1}function Rn(c,g,w,O,N,H){var Q=w&b,ne=ba(c),de=ne.length,Ee=ba(g),Pe=Ee.length;if(de!=Pe&&!Q)return!1;for(var Re=de;Re--;){var tt=ne[Re];if(!(Q?tt in g:cn.call(g,tt)))return!1}var wt=H.get(c),Lt=H.get(g);if(wt&&Lt)return wt==g&&Lt==c;var Kt=!0;H.set(c,g),H.set(g,c);for(var At=Q;++Re<de;){tt=ne[Re];var en=c[tt],an=g[tt];if(O)var xa=Q?O(an,en,tt,g,c,H):O(en,an,tt,c,g,H);if(!(xa===n?en===an||N(en,an,w,O,H):xa)){Kt=!1;break}At||(At=tt=="constructor")}if(Kt&&!At){var mo=c.constructor,wa=g.constructor;mo!=wa&&"constructor"in c&&"constructor"in g&&!(typeof mo=="function"&&mo instanceof mo&&typeof wa=="function"&&wa instanceof wa)&&(Kt=!1)}return H.delete(c),H.delete(g),Kt}function lr(c){return Sw(uT(c,n,yT),c+"")}function ba(c){return bm(c,Ei,tn)}function me(c){return bm(c,zo,As)}var ce=Gf?function(c){return Gf.get(c)}:Rw;function xe(c){for(var g=c.name+"",w=_s[g],O=cn.call(_s,g)?w.length:0;O--;){var N=w[O],H=N.func;if(H==null||H==c)return N.name}return g}function et(c){var g=cn.call(F,"placeholder")?F:c;return g.placeholder}function Me(){var c=F.iteratee||Ow;return c=c===Ow?pr:c,arguments.length?c(arguments[0],arguments[1]):c}function Ft(c,g){var w=c.__data__;return PK(g)?w[typeof g=="string"?"string":"hash"]:w.map}function Dt(c){for(var g=Ei(c),w=g.length;w--;){var O=g[w],N=c[O];g[w]=[O,N,sT(N)]}return g}function Yt(c,g){var w=$p(c,g);return a0(w)?w:n}function Qr(c){var g=cn.call(c,vl),w=c[vl];try{c[vl]=n;var O=!0}catch(H){}var N=Hp.call(c);return O&&(g?c[vl]=w:delete c[vl]),N}var tn=Vc?function(c){return c==null?[]:(c=vn(c),Ro(Vc(c),function(g){return rm.call(c,g)}))}:Iw,As=Vc?function(c){for(var g=[];c;)Ha(g,tn(c)),c=jc(c);return g}:Iw,ki=Ci;(sm&&ki(new sm(new ArrayBuffer(1)))!=Te||Uc&&ki(new Uc)!=Le||lm&&ki(lm.resolve())!=Ct||Wc&&ki(new Wc)!=Ie||Gc&&ki(new Gc)!=Ne)&&(ki=function(c){var g=Ci(c),w=g==ot?c.constructor:n,O=w?ah(w):"";if(O)switch(O){case sw:return Te;case lw:return Le;case uw:return Ct;case Yc:return Ie;case um:return Ne}return g});function xK(c,g,w){for(var O=-1,N=w.length;++O<N;){var H=w[O],Q=H.size;switch(H.type){case"drop":c+=Q;break;case"dropRight":g-=Q;break;case"take":g=ci(g,c+Q);break;case"takeRight":c=Tr(c,g-Q);break}}return{start:c,end:g}}function wK(c){var g=c.match(sl);return g?g[1].split(_c):[]}function oT(c,g,w){g=El(g,c);for(var O=-1,N=g.length,H=!1;++O<N;){var Q=Al(g[O]);if(!(H=c!=null&&w(c,Q)))break;c=c[Q]}return H||++O!=N?H:(N=c==null?0:c.length,!!N&&k3(N)&&Nu(Q,N)&&(jt(c)||sh(c)))}function CK(c){var g=c.length,w=new c.constructor(g);return g&&typeof c[0]=="string"&&cn.call(c,"index")&&(w.index=c.index,w.input=c.input),w}function aT(c){return typeof c.constructor=="function"&&!Dm(c)?Ou(jc(c)):{}}function _K(c,g,w){var O=c.constructor;switch(g){case Nt:return Tm(c);case Ye:case mt:return new O(+c);case Te:return Du(c,w);case Et:case Ut:case Ve:case ft:case un:case ze:case St:case ct:case Vt:return m3(c,w);case Le:return new O;case ut:case We:return new O(c);case ue:return g3(c);case Ie:return new O;case Xe:return Xn(c)}}function kK(c,g){var w=g.length;if(!w)return c;var O=w-1;return g[O]=(w>1?"& ":"")+g[O],g=g.join(w>2?", ":" "),c.replace(I1,`{
/* [wrapped with `+g+`] */
`)}function EK(c){return jt(c)||sh(c)||!!(im&&c&&c[im])}function Nu(c,g){var w=typeof c;return g=g==null?U:g,!!g&&(w=="number"||w!="symbol"&&V1.test(c))&&c>-1&&c%1==0&&c<g}function go(c,g,w){if(!gr(w))return!1;var O=typeof g;return(O=="number"?Fo(w)&&Nu(g,w.length):O=="string"&&g in w)?Os(w[g],c):!1}function vw(c,g){if(jt(c))return!1;var w=typeof c;return w=="number"||w=="symbol"||w=="boolean"||c==null||Sa(c)?!0:Pp.test(c)||!Ep.test(c)||g!=null&&c in vn(g)}function PK(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function yw(c){var g=xe(c),w=F[g];if(typeof w!="function"||!(g in Jt.prototype))return!1;if(c===w)return!0;var O=ce(w);return!!O&&c===O[0]}function TK(c){return!!$c&&$c in c}var LK=sr?Bu:Dw;function Dm(c){var g=c&&c.constructor,w=typeof g=="function"&&g.prototype||En;return c===w}function sT(c){return c===c&&!gr(c)}function lT(c,g){return function(w){return w==null?!1:w[c]===g&&(g!==n||c in vn(w))}}function AK(c){var g=C3(c,function(O){return w.size===u&&w.clear(),O}),w=g.cache;return g}function OK(c,g){var w=c[1],O=g[1],N=w|O,H=N<(E|k|D),Q=O==D&&w==T||O==D&&w==B&&c[7].length<=g[8]||O==(D|B)&&g[7].length<=g[8]&&w==T;if(!(H||Q))return c;O&E&&(c[2]=g[2],N|=w&E?0:_);var ne=g[3];if(ne){var de=c[3];c[3]=de?v3(de,ne,g[4]):ne,c[4]=de?fa(c[3],f):g[4]}return ne=g[5],ne&&(de=c[5],c[5]=de?Am(de,ne,g[6]):ne,c[6]=de?fa(c[5],f):g[6]),ne=g[7],ne&&(c[7]=ne),O&D&&(c[8]=c[8]==null?g[8]:ci(c[8],g[8])),c[9]==null&&(c[9]=g[9]),c[0]=g[0],c[1]=N,c}function MK(c){var g=[];if(c!=null)for(var w in vn(c))g.push(w);return g}function RK(c){return Hp.call(c)}function uT(c,g,w){return g=Tr(g===n?c.length-1:g,0),function(){for(var O=arguments,N=-1,H=Tr(O.length-g,0),Q=ye(H);++N<H;)Q[N]=O[g+N];N=-1;for(var ne=ye(g+1);++N<g;)ne[N]=O[N];return ne[g]=w(Q),Mi(c,this,ne)}}function cT(c,g){return g.length<2?c:Sl(c,Hr(g,0,-1))}function IK(c,g){for(var w=c.length,O=ci(g.length,w),N=$i(c);O--;){var H=g[O];c[O]=Nu(H,w)?N[H]:n}return c}function bw(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var dT=hT(eh),Nm=Uf||function(c,g){return Pt.setTimeout(c,g)},Sw=hT(u0);function fT(c,g,w){var O=g+"";return Sw(c,kK(O,DK(wK(O),w)))}function hT(c){var g=0,w=0;return function(){var O=om(),N=G-(O-w);if(w=O,N>0){if(++g>=te)return arguments[0]}else g=0;return c.apply(n,arguments)}}function b3(c,g){var w=-1,O=c.length,N=O-1;for(g=g===n?O:g;++w<g;){var H=Qf(w,N),Q=c[H];c[H]=c[w],c[w]=Q}return c.length=g,c}var pT=AK(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(oa,function(w,O,N,H){g.push(N?H.replace(B1,"$1"):O||w)}),g});function Al(c){if(typeof c=="string"||Sa(c))return c;var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function ah(c){if(c!=null){try{return fr.call(c)}catch(g){}try{return c+""}catch(g){}}return""}function DK(c,g){return Kn(be,function(w){var O="_."+w[0];g&w[1]&&!Yi(c,O)&&c.push(O)}),c.sort()}function gT(c){if(c instanceof Jt)return c.clone();var g=new co(c.__wrapped__,c.__chain__);return g.__actions__=$i(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function NK(c,g,w){(w?go(c,g,w):g===n)?g=1:g=Tr(Wt(g),0);var O=c==null?0:c.length;if(!O||g<1)return[];for(var N=0,H=0,Q=ye(Wf(O/g));N<O;)Q[H++]=Hr(c,N,N+=g);return Q}function BK(c){for(var g=-1,w=c==null?0:c.length,O=0,N=[];++g<w;){var H=c[g];H&&(N[O++]=H)}return N}function $K(){var c=arguments.length;if(!c)return[];for(var g=ye(c-1),w=arguments[0],O=c;O--;)g[O-1]=arguments[O];return Ha(jt(w)?$i(w):[w],zr(g,1))}var FK=Mt(function(c,g){return Vr(c)?Qc(c,zr(g,1,Vr,!0)):[]}),zK=Mt(function(c,g){var w=qa(g);return Vr(w)&&(w=n),Vr(c)?Qc(c,zr(g,1,Vr,!0),Me(w,2)):[]}),jK=Mt(function(c,g){var w=qa(g);return Vr(w)&&(w=n),Vr(c)?Qc(c,zr(g,1,Vr,!0),n,w):[]});function HK(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:Wt(g),Hr(c,g<0?0:g,O)):[]}function VK(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:Wt(g),g=O-g,Hr(c,0,g<0?0:g)):[]}function UK(c,g){return c&&c.length?od(c,Me(g,3),!0,!0):[]}function WK(c,g){return c&&c.length?od(c,Me(g,3),!0):[]}function GK(c,g,w,O){var N=c==null?0:c.length;return N?(w&&typeof w!="number"&&go(c,g,w)&&(w=0,O=N),ma(c,g,w,O)):[]}function mT(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=w==null?0:Wt(w);return N<0&&(N=Tr(O+N,0)),Pu(c,Me(g,3),N)}function vT(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=O-1;return w!==n&&(N=Wt(w),N=w<0?Tr(O+N,0):ci(N,O-1)),Pu(c,Me(g,3),N,!0)}function yT(c){var g=c==null?0:c.length;return g?zr(c,1):[]}function qK(c){var g=c==null?0:c.length;return g?zr(c,Z):[]}function YK(c,g){var w=c==null?0:c.length;return w?(g=g===n?1:Wt(g),zr(c,g)):[]}function KK(c){for(var g=-1,w=c==null?0:c.length,O={};++g<w;){var N=c[g];O[N[0]]=N[1]}return O}function bT(c){return c&&c.length?c[0]:n}function XK(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=w==null?0:Wt(w);return N<0&&(N=Tr(O+N,0)),Rc(c,g,N)}function ZK(c){var g=c==null?0:c.length;return g?Hr(c,0,-1):[]}var QK=Mt(function(c){var g=Vn(c,th);return g.length&&g[0]===c[0]?Jc(g):[]}),JK=Mt(function(c){var g=qa(c),w=Vn(c,th);return g===qa(w)?g=n:w.pop(),w.length&&w[0]===c[0]?Jc(w,Me(g,2)):[]}),eX=Mt(function(c){var g=qa(c),w=Vn(c,th);return g=typeof g=="function"?g:n,g&&w.pop(),w.length&&w[0]===c[0]?Jc(w,n,g):[]});function tX(c,g){return c==null?"":e3.call(c,g)}function qa(c){var g=c==null?0:c.length;return g?c[g-1]:n}function nX(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=O;return w!==n&&(N=Wt(w),N=N<0?Tr(O+N,0):ci(N,O-1)),g===g?Q1(c,g,N):Pu(c,Mf,N,!0)}function rX(c,g){return c&&c.length?rd(c,Wt(g)):n}var iX=Mt(ST);function ST(c,g){return c&&c.length&&g&&g.length?Cl(c,g):c}function oX(c,g,w){return c&&c.length&&g&&g.length?Cl(c,g,Me(w,2)):c}function aX(c,g,w){return c&&c.length&&g&&g.length?Cl(c,g,n,w):c}var sX=lr(function(c,g){var w=c==null?0:c.length,O=Yp(c,g);return Zf(c,Vn(g,function(N){return Nu(N,w)?+N:N}).sort(Lm)),O});function lX(c,g){var w=[];if(!(c&&c.length))return w;var O=-1,N=[],H=c.length;for(g=Me(g,3);++O<H;){var Q=c[O];g(Q,O,c)&&(w.push(Q),N.push(O))}return Zf(c,N),w}function xw(c){return c==null?c:r3.call(c)}function uX(c,g,w){var O=c==null?0:c.length;return O?(w&&typeof w!="number"&&go(c,g,w)?(g=0,w=O):(g=g==null?0:Wt(g),w=w===n?O:Wt(w)),Hr(c,g,w)):[]}function cX(c,g){return di(c,g)}function dX(c,g,w){return c0(c,g,Me(w,2))}function fX(c,g){var w=c==null?0:c.length;if(w){var O=di(c,g);if(O<w&&Os(c[O],g))return O}return-1}function hX(c,g){return di(c,g,!0)}function pX(c,g,w){return c0(c,g,Me(w,2),!0)}function gX(c,g){var w=c==null?0:c.length;if(w){var O=di(c,g,!0)-1;if(Os(c[O],g))return O}return-1}function mX(c){return c&&c.length?d0(c):[]}function vX(c,g){return c&&c.length?d0(c,Me(g,2)):[]}function yX(c){var g=c==null?0:c.length;return g?Hr(c,1,g):[]}function bX(c,g,w){return c&&c.length?(g=w||g===n?1:Wt(g),Hr(c,0,g<0?0:g)):[]}function SX(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:Wt(g),g=O-g,Hr(c,g<0?0:g,O)):[]}function xX(c,g){return c&&c.length?od(c,Me(g,3),!1,!0):[]}function wX(c,g){return c&&c.length?od(c,Me(g,3)):[]}var CX=Mt(function(c){return Bi(zr(c,1,Vr,!0))}),_X=Mt(function(c){var g=qa(c);return Vr(g)&&(g=n),Bi(zr(c,1,Vr,!0),Me(g,2))}),kX=Mt(function(c){var g=qa(c);return g=typeof g=="function"?g:n,Bi(zr(c,1,Vr,!0),n,g)});function EX(c){return c&&c.length?Bi(c):[]}function PX(c,g){return c&&c.length?Bi(c,Me(g,2)):[]}function TX(c,g){return g=typeof g=="function"?g:n,c&&c.length?Bi(c,n,g):[]}function ww(c){if(!(c&&c.length))return[];var g=0;return c=Ro(c,function(w){if(Vr(w))return g=Tr(w.length,g),!0}),Nf(g,function(w){return Vn(c,gl(w))})}function xT(c,g){if(!(c&&c.length))return[];var w=ww(c);return g==null?w:Vn(w,function(O){return Mi(g,n,O)})}var LX=Mt(function(c,g){return Vr(c)?Qc(c,g):[]}),AX=Mt(function(c){return p0(Ro(c,Vr))}),OX=Mt(function(c){var g=qa(c);return Vr(g)&&(g=n),p0(Ro(c,Vr),Me(g,2))}),MX=Mt(function(c){var g=qa(c);return g=typeof g=="function"?g:n,p0(Ro(c,Vr),n,g)}),RX=Mt(ww);function IX(c,g){return Em(c||[],g||[],bl)}function DX(c,g){return Em(c||[],g||[],Iu)}var NX=Mt(function(c){var g=c.length,w=g>1?c[g-1]:n;return w=typeof w=="function"?(c.pop(),w):n,xT(c,w)});function wT(c){var g=F(c);return g.__chain__=!0,g}function BX(c,g){return g(c),c}function S3(c,g){return g(c)}var $X=lr(function(c){var g=c.length,w=g?c[0]:0,O=this.__wrapped__,N=function(H){return Yp(H,c)};return g>1||this.__actions__.length||!(O instanceof Jt)||!Nu(w)?this.thru(N):(O=O.slice(w,+w+(g?1:0)),O.__actions__.push({func:S3,args:[N],thisArg:n}),new co(O,this.__chain__).thru(function(H){return g&&!H.length&&H.push(n),H}))});function FX(){return wT(this)}function zX(){return new co(this.value(),this.__chain__)}function jX(){this.__values__===n&&(this.__values__=NT(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function HX(){return this}function VX(c){for(var g,w=this;w instanceof Yf;){var O=gT(w);O.__index__=0,O.__values__=n,g?N.__wrapped__=O:g=O;var N=O;w=w.__wrapped__}return N.__wrapped__=c,g}function UX(){var c=this.__wrapped__;if(c instanceof Jt){var g=c;return this.__actions__.length&&(g=new Jt(this)),g=g.reverse(),g.__actions__.push({func:S3,args:[xw],thisArg:n}),new co(g,this.__chain__)}return this.thru(xw)}function WX(){return kl(this.__wrapped__,this.__actions__)}var GX=g0(function(c,g,w){cn.call(c,w)?++c[w]:ga(c,w,1)});function qX(c,g,w){var O=jt(c)?Hn:ym;return w&&go(c,g,w)&&(g=n),O(c,Me(g,3))}function YX(c,g){var w=jt(c)?Ro:va;return w(c,Me(g,3))}var KX=Mm(mT),XX=Mm(vT);function ZX(c,g){return zr(x3(c,g),1)}function QX(c,g){return zr(x3(c,g),Z)}function JX(c,g,w){return w=w===n?1:Wt(w),zr(x3(c,g),w)}function CT(c,g){var w=jt(c)?Kn:Es;return w(c,Me(g,3))}function _T(c,g){var w=jt(c)?Mo:Zp;return w(c,Me(g,3))}var eZ=g0(function(c,g,w){cn.call(c,w)?c[w].push(g):ga(c,w,[g])});function tZ(c,g,w,O){c=Fo(c)?c:S0(c),w=w&&!O?Wt(w):0;var N=c.length;return w<0&&(w=Tr(N+w,0)),E3(c)?w<=N&&c.indexOf(g,w)>-1:!!N&&Rc(c,g,w)>-1}var nZ=Mt(function(c,g,w){var O=-1,N=typeof g=="function",H=Fo(c)?ye(c.length):[];return Es(c,function(Q){H[++O]=N?Mi(g,Q,w):Ps(Q,g,w)}),H}),rZ=g0(function(c,g,w){ga(c,w,g)});function x3(c,g){var w=jt(c)?Vn:Or;return w(c,Me(g,3))}function iZ(c,g,w,O){return c==null?[]:(jt(g)||(g=g==null?[]:[g]),w=O?n:w,jt(w)||(w=w==null?[]:[w]),Ni(c,g,w))}var oZ=g0(function(c,g,w){c[w?0:1].push(g)},function(){return[[],[]]});function aZ(c,g,w){var O=jt(c)?Of:Bp,N=arguments.length<3;return O(c,Me(g,4),w,N,Es)}function sZ(c,g,w){var O=jt(c)?jy:Bp,N=arguments.length<3;return O(c,Me(g,4),w,N,Zp)}function lZ(c,g){var w=jt(c)?Ro:va;return w(c,_3(Me(g,3)))}function uZ(c){var g=jt(c)?Xc:l0;return g(c)}function cZ(c,g,w){(w?go(c,g,w):g===n)?g=1:g=Wt(g);var O=jt(c)?xi:Jf;return O(c,g)}function dZ(c){var g=jt(c)?fw:_i;return g(c)}function fZ(c){if(c==null)return 0;if(Fo(c))return E3(c)?Va(c):c.length;var g=ki(c);return g==Le||g==Ie?c.size:jr(c).length}function hZ(c,g,w){var O=jt(c)?Oc:Bo;return w&&go(c,g,w)&&(g=n),O(c,Me(g,3))}var pZ=Mt(function(c,g){if(c==null)return[];var w=g.length;return w>1&&go(c,g[0],g[1])?g=[]:w>2&&go(g[0],g[1],g[2])&&(g=[g[0]]),Ni(c,zr(g,1),[])}),w3=Qy||function(){return Pt.Date.now()};function gZ(c,g){if(typeof g!="function")throw new Ri(a);return c=Wt(c),function(){if(--c<1)return g.apply(this,arguments)}}function kT(c,g,w){return g=w?n:g,g=c&&g==null?c.length:g,pe(c,D,n,n,n,n,g)}function ET(c,g){var w;if(typeof g!="function")throw new Ri(a);return c=Wt(c),function(){return--c>0&&(w=g.apply(this,arguments)),c<=1&&(g=n),w}}var Cw=Mt(function(c,g,w){var O=E;if(w.length){var N=fa(w,et(Cw));O|=R}return pe(c,O,g,w,N)}),PT=Mt(function(c,g,w){var O=E|k;if(w.length){var N=fa(w,et(PT));O|=R}return pe(g,O,c,w,N)});function TT(c,g,w){g=w?n:g;var O=pe(c,T,n,n,n,n,n,g);return O.placeholder=TT.placeholder,O}function LT(c,g,w){g=w?n:g;var O=pe(c,A,n,n,n,n,n,g);return O.placeholder=LT.placeholder,O}function AT(c,g,w){var O,N,H,Q,ne,de,Ee=0,Pe=!1,Re=!1,tt=!0;if(typeof c!="function")throw new Ri(a);g=Ya(g)||0,gr(w)&&(Pe=!!w.leading,Re="maxWait"in w,H=Re?Tr(Ya(w.maxWait)||0,g):H,tt="trailing"in w?!!w.trailing:tt);function wt(Ur){var Ms=O,Fu=N;return O=N=n,Ee=Ur,Q=c.apply(Fu,Ms),Q}function Lt(Ur){return Ee=Ur,ne=Nm(en,g),Pe?wt(Ur):Q}function Kt(Ur){var Ms=Ur-de,Fu=Ur-Ee,KT=g-Ms;return Re?ci(KT,H-Fu):KT}function At(Ur){var Ms=Ur-de,Fu=Ur-Ee;return de===n||Ms>=g||Ms<0||Re&&Fu>=H}function en(){var Ur=w3();if(At(Ur))return an(Ur);ne=Nm(en,Kt(Ur))}function an(Ur){return ne=n,tt&&O?wt(Ur):(O=N=n,Q)}function xa(){ne!==n&&Pm(ne),Ee=0,O=de=N=ne=n}function mo(){return ne===n?Q:an(w3())}function wa(){var Ur=w3(),Ms=At(Ur);if(O=arguments,N=this,de=Ur,Ms){if(ne===n)return Lt(de);if(Re)return Pm(ne),ne=Nm(en,g),wt(de)}return ne===n&&(ne=Nm(en,g)),Q}return wa.cancel=xa,wa.flush=mo,wa}var mZ=Mt(function(c,g){return vm(c,1,g)}),vZ=Mt(function(c,g,w){return vm(c,Ya(g)||0,w)});function yZ(c){return pe(c,z)}function C3(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new Ri(a);var w=function(){var O=arguments,N=g?g.apply(this,O):O[0],H=w.cache;if(H.has(N))return H.get(N);var Q=c.apply(this,O);return w.cache=H.set(N,Q)||H,Q};return w.cache=new(C3.Cache||pa),w}C3.Cache=pa;function _3(c){if(typeof c!="function")throw new Ri(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function bZ(c){return ET(2,c)}var SZ=gw(function(c,g){g=g.length==1&&jt(g[0])?Vn(g[0],$r(Me())):Vn(zr(g,1),$r(Me()));var w=g.length;return Mt(function(O){for(var N=-1,H=ci(O.length,w);++N<H;)O[N]=g[N].call(this,O[N]);return Mi(c,this,O)})}),_w=Mt(function(c,g){var w=fa(g,et(_w));return pe(c,R,n,g,w)}),OT=Mt(function(c,g){var w=fa(g,et(OT));return pe(c,I,n,g,w)}),xZ=lr(function(c,g){return pe(c,B,n,n,n,g)});function wZ(c,g){if(typeof c!="function")throw new Ri(a);return g=g===n?g:Wt(g),Mt(c,g)}function CZ(c,g){if(typeof c!="function")throw new Ri(a);return g=g==null?0:Tr(Wt(g),0),Mt(function(w){var O=w[g],N=Ls(w,0,g);return O&&Ha(N,O),Mi(c,this,N)})}function _Z(c,g,w){var O=!0,N=!0;if(typeof c!="function")throw new Ri(a);return gr(w)&&(O="leading"in w?!!w.leading:O,N="trailing"in w?!!w.trailing:N),AT(c,g,{leading:O,maxWait:g,trailing:N})}function kZ(c){return kT(c,1)}function EZ(c,g){return _w(ad(g),c)}function PZ(){if(!arguments.length)return[];var c=arguments[0];return jt(c)?c:[c]}function TZ(c){return wi(c,v)}function LZ(c,g){return g=typeof g=="function"?g:n,wi(c,v,g)}function AZ(c){return wi(c,p|v)}function OZ(c,g){return g=typeof g=="function"?g:n,wi(c,p|v,g)}function MZ(c,g){return g==null||Xp(c,g,Ei(g))}function Os(c,g){return c===g||c!==c&&g!==g}var RZ=P(e0),IZ=P(function(c,g){return c>=g}),sh=o0(function(){return arguments}())?o0:function(c){return Mr(c)&&cn.call(c,"callee")&&!rm.call(c,"callee")},jt=ye.isArray,DZ=li?$r(li):Sm;function Fo(c){return c!=null&&k3(c.length)&&!Bu(c)}function Vr(c){return Mr(c)&&Fo(c)}function NZ(c){return c===!0||c===!1||Mr(c)&&Ci(c)==Ye}var sd=Jy||Dw,BZ=Oo?$r(Oo):xm;function $Z(c){return Mr(c)&&c.nodeType===1&&!Bm(c)}function FZ(c){if(c==null)return!0;if(Fo(c)&&(jt(c)||typeof c=="string"||typeof c.splice=="function"||sd(c)||b0(c)||sh(c)))return!c.length;var g=ki(c);if(g==Le||g==Ie)return!c.size;if(Dm(c))return!jr(c).length;for(var w in c)if(cn.call(c,w))return!1;return!0}function zZ(c,g){return ed(c,g)}function jZ(c,g,w){w=typeof w=="function"?w:n;var O=w?w(c,g):n;return O===n?ed(c,g,n,w):!!O}function kw(c){if(!Mr(c))return!1;var g=Ci(c);return g==dt||g==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Bm(c)}function HZ(c){return typeof c=="number"&&Up(c)}function Bu(c){if(!gr(c))return!1;var g=Ci(c);return g==vt||g==xt||g==Je||g==ln}function MT(c){return typeof c=="number"&&c==Wt(c)}function k3(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=U}function gr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function Mr(c){return c!=null&&typeof c=="object"}var RT=lo?$r(lo):pw;function VZ(c,g){return c===g||td(c,g,Dt(g))}function UZ(c,g,w){return w=typeof w=="function"?w:n,td(c,g,Dt(g),w)}function WZ(c){return IT(c)&&c!=+c}function GZ(c){if(LK(c))throw new It(o);return a0(c)}function qZ(c){return c===null}function YZ(c){return c==null}function IT(c){return typeof c=="number"||Mr(c)&&Ci(c)==ut}function Bm(c){if(!Mr(c)||Ci(c)!=ot)return!1;var g=jc(c);if(g===null)return!0;var w=cn.call(g,"constructor")&&g.constructor;return typeof w=="function"&&w instanceof w&&fr.call(w)==Si}var Ew=ja?$r(ja):hr;function KZ(c){return MT(c)&&c>=-U&&c<=U}var DT=pl?$r(pl):qt;function E3(c){return typeof c=="string"||!jt(c)&&Mr(c)&&Ci(c)==We}function Sa(c){return typeof c=="symbol"||Mr(c)&&Ci(c)==Xe}var b0=Y1?$r(Y1):Zr;function XZ(c){return c===n}function ZZ(c){return Mr(c)&&ki(c)==Ne}function QZ(c){return Mr(c)&&Ci(c)==kt}var JZ=P(xl),eQ=P(function(c,g){return c<=g});function NT(c){if(!c)return[];if(Fo(c))return E3(c)?Ki(c):$i(c);if(Hc&&c[Hc])return Gy(c[Hc]());var g=ki(c),w=g==Le?zp:g==Ie?$f:S0;return w(c)}function $u(c){if(!c)return c===0?c:0;if(c=Ya(c),c===Z||c===-Z){var g=c<0?-1:1;return g*X}return c===c?c:0}function Wt(c){var g=$u(c),w=g%1;return g===g?w?g-w:g:0}function BT(c){return c?Mu(Wt(c),0,fe):0}function Ya(c){if(typeof c=="number")return c;if(Sa(c))return le;if(gr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=gr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=uo(c);var w=z1.test(c);return w||H1.test(c)?it(c.slice(2),w?2:8):F1.test(c)?le:+c}function $T(c){return Ga(c,zo(c))}function tQ(c){return c?Mu(Wt(c),-U,U):c===0?c:0}function Pn(c){return c==null?"":ho(c)}var nQ=po(function(c,g){if(Dm(g)||Fo(g)){Ga(g,Ei(g),c);return}for(var w in g)cn.call(g,w)&&bl(c,w,g[w])}),FT=po(function(c,g){Ga(g,zo(g),c)}),P3=po(function(c,g,w,O){Ga(g,zo(g),c,O)}),rQ=po(function(c,g,w,O){Ga(g,Ei(g),c,O)}),iQ=lr(Yp);function oQ(c,g){var w=Ou(c);return g==null?w:st(w,g)}var aQ=Mt(function(c,g){c=vn(c);var w=-1,O=g.length,N=O>2?g[2]:n;for(N&&go(g[0],g[1],N)&&(O=1);++w<O;)for(var H=g[w],Q=zo(H),ne=-1,de=Q.length;++ne<de;){var Ee=Q[ne],Pe=c[Ee];(Pe===n||Os(Pe,En[Ee])&&!cn.call(c,Ee))&&(c[Ee]=H[Ee])}return c}),sQ=Mt(function(c){return c.push(n,ht),Mi(zT,n,c)});function lQ(c,g){return Vy(c,Me(g,3),ya)}function uQ(c,g){return Vy(c,Me(g,3),No)}function cQ(c,g){return c==null?c:Qp(c,Me(g,3),zo)}function dQ(c,g){return c==null?c:Do(c,Me(g,3),zo)}function fQ(c,g){return c&&ya(c,Me(g,3))}function hQ(c,g){return c&&No(c,Me(g,3))}function pQ(c){return c==null?[]:Jp(c,Ei(c))}function gQ(c){return c==null?[]:Jp(c,zo(c))}function Pw(c,g,w){var O=c==null?n:Sl(c,g);return O===n?w:O}function mQ(c,g){return c!=null&&oT(c,g,t0)}function Tw(c,g){return c!=null&&oT(c,g,n0)}var vQ=oh(function(c,g,w){g!=null&&typeof g.toString!="function"&&(g=Hp.call(g)),c[g]=w},Aw(jo)),yQ=oh(function(c,g,w){g!=null&&typeof g.toString!="function"&&(g=Hp.call(g)),cn.call(c,g)?c[g].push(w):c[g]=[w]},Me),bQ=Mt(Ps);function Ei(c){return Fo(c)?gm(c):jr(c)}function zo(c){return Fo(c)?gm(c,!0):fo(c)}function SQ(c,g){var w={};return g=Me(g,3),ya(c,function(O,N,H){ga(w,g(O,N,H),O)}),w}function xQ(c,g){var w={};return g=Me(g,3),ya(c,function(O,N,H){ga(w,N,g(O,N,H))}),w}var wQ=po(function(c,g,w){Ru(c,g,w)}),zT=po(function(c,g,w,O){Ru(c,g,w,O)}),CQ=lr(function(c,g){var w={};if(c==null)return w;var O=!1;g=Vn(g,function(H){return H=El(H,c),O||(O=H.length>1),H}),Ga(c,me(c),w),O&&(w=wi(w,p|m|v,$t));for(var N=g.length;N--;)h0(w,g[N]);return w});function _Q(c,g){return jT(c,_3(Me(g)))}var kQ=lr(function(c,g){return c==null?{}:_m(c,g)});function jT(c,g){if(c==null)return{};var w=Vn(me(c),function(O){return[O]});return g=Me(g),s0(c,w,function(O,N){return g(O,N[0])})}function EQ(c,g,w){g=El(g,c);var O=-1,N=g.length;for(N||(N=1,c=n);++O<N;){var H=c==null?n:c[Al(g[O])];H===n&&(O=N,H=w),c=Bu(H)?H.call(c):H}return c}function PQ(c,g,w){return c==null?c:Iu(c,g,w)}function TQ(c,g,w,O){return O=typeof O=="function"?O:n,c==null?c:Iu(c,g,w,O)}var HT=se(Ei),VT=se(zo);function LQ(c,g,w){var O=jt(c),N=O||sd(c)||b0(c);if(g=Me(g,4),w==null){var H=c&&c.constructor;N?w=O?new H:[]:gr(c)?w=Bu(H)?Ou(jc(c)):{}:w={}}return(N?Kn:ya)(c,function(Q,ne,de){return g(w,Q,ne,de)}),w}function AQ(c,g){return c==null?!0:h0(c,g)}function OQ(c,g,w){return c==null?c:km(c,g,ad(w))}function MQ(c,g,w,O){return O=typeof O=="function"?O:n,c==null?c:km(c,g,ad(w),O)}function S0(c){return c==null?[]:Bf(c,Ei(c))}function RQ(c){return c==null?[]:Bf(c,zo(c))}function IQ(c,g,w){return w===n&&(w=g,g=n),w!==n&&(w=Ya(w),w=w===w?w:0),g!==n&&(g=Ya(g),g=g===g?g:0),Mu(Ya(c),g,w)}function DQ(c,g,w){return g=$u(g),w===n?(w=g,g=0):w=$u(w),c=Ya(c),r0(c,g,w)}function NQ(c,g,w){if(w&&typeof w!="boolean"&&go(c,g,w)&&(g=w=n),w===n&&(typeof g=="boolean"?(w=g,g=n):typeof c=="boolean"&&(w=c,c=n)),c===n&&g===n?(c=0,g=1):(c=$u(c),g===n?(g=c,c=0):g=$u(g)),c>g){var O=c;c=g,g=O}if(w||c%1||g%1){var N=am();return ci(c+N*(g-c+ge("1e-"+((N+"").length-1))),g)}return Qf(c,g)}var BQ=Ll(function(c,g,w){return g=g.toLowerCase(),c+(w?UT(g):g)});function UT(c){return Lw(Pn(c).toLowerCase())}function WT(c){return c=Pn(c),c&&c.replace(U1,Wy).replace(Mp,"")}function $Q(c,g,w){c=Pn(c),g=ho(g);var O=c.length;w=w===n?O:Mu(Wt(w),0,O);var N=w;return w-=g.length,w>=0&&c.slice(w,N)==g}function FQ(c){return c=Pn(c),c&&Fa.test(c)?c.replace(ia,Cs):c}function zQ(c){return c=Pn(c),c&&R1.test(c)?c.replace(wf,"\\$&"):c}var jQ=Ll(function(c,g,w){return c+(w?"-":"")+g.toLowerCase()}),HQ=Ll(function(c,g,w){return c+(w?" ":"")+g.toLowerCase()}),VQ=v0("toLowerCase");function UQ(c,g,w){c=Pn(c),g=Wt(g);var O=g?Va(c):0;if(!g||O>=g)return c;var N=(g-O)/2;return d(Au(N),w)+c+d(Wf(N),w)}function WQ(c,g,w){c=Pn(c),g=Wt(g);var O=g?Va(c):0;return g&&O<g?c+d(g-O,w):c}function GQ(c,g,w){c=Pn(c),g=Wt(g);var O=g?Va(c):0;return g&&O<g?d(g-O,w)+c:c}function qQ(c,g,w){return w||g==null?g=0:g&&(g=+g),n3(Pn(c).replace(Cc,""),g||0)}function YQ(c,g,w){return(w?go(c,g,w):g===n)?g=1:g=Wt(g),id(Pn(c),g)}function KQ(){var c=arguments,g=Pn(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var XQ=Ll(function(c,g,w){return c+(w?"_":"")+g.toLowerCase()});function ZQ(c,g,w){return w&&typeof w!="number"&&go(c,g,w)&&(g=w=n),w=w===n?fe:w>>>0,w?(c=Pn(c),c&&(typeof g=="string"||g!=null&&!Ew(g))&&(g=ho(g),!g&&Tu(c))?Ls(Ki(c),0,w):c.split(g,w)):[]}var QQ=Ll(function(c,g,w){return c+(w?" ":"")+Lw(g)});function JQ(c,g,w){return c=Pn(c),w=w==null?0:Mu(Wt(w),0,c.length),g=ho(g),c.slice(w,w+g.length)==g}function eJ(c,g,w){var O=F.templateSettings;w&&go(c,g,w)&&(g=n),c=Pn(c),g=P3({},g,O,je);var N=P3({},g.imports,O.imports,je),H=Ei(N),Q=Bf(N,H),ne,de,Ee=0,Pe=g.interpolate||ll,Re="__p += '",tt=zf((g.escape||ll).source+"|"+Pe.source+"|"+(Pe===wc?$1:ll).source+"|"+(g.evaluate||ll).source+"|$","g"),wt="//# sourceURL="+(cn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ip+"]")+`
`;c.replace(tt,function(At,en,an,xa,mo,wa){return an||(an=xa),Re+=c.slice(Ee,wa).replace(W1,ml),en&&(ne=!0,Re+=`' +
__e(`+en+`) +
'`),mo&&(de=!0,Re+=`';
`+mo+`;
__p += '`),an&&(Re+=`' +
((__t = (`+an+`)) == null ? '' : __t) +
'`),Ee=wa+At.length,At}),Re+=`';
`;var Lt=cn.call(g,"variable")&&g.variable;if(!Lt)Re=`with (obj) {
`+Re+`
}
`;else if(N1.test(Lt))throw new It(s);Re=(de?Re.replace(hn,""):Re).replace(Er,"$1").replace(dr,"$1;"),Re="function("+(Lt||"obj")+`) {
`+(Lt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(de?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Re+`return __p
}`;var Kt=qT(function(){return on(H,wt+"return "+Re).apply(n,Q)});if(Kt.source=Re,kw(Kt))throw Kt;return Kt}function tJ(c){return Pn(c).toLowerCase()}function nJ(c){return Pn(c).toUpperCase()}function rJ(c,g,w){if(c=Pn(c),c&&(w||g===n))return uo(c);if(!c||!(g=ho(g)))return c;var O=Ki(c),N=Ki(g),H=da(O,N),Q=ws(O,N)+1;return Ls(O,H,Q).join("")}function iJ(c,g,w){if(c=Pn(c),c&&(w||g===n))return c.slice(0,J1(c)+1);if(!c||!(g=ho(g)))return c;var O=Ki(c),N=ws(O,Ki(g))+1;return Ls(O,0,N).join("")}function oJ(c,g,w){if(c=Pn(c),c&&(w||g===n))return c.replace(Cc,"");if(!c||!(g=ho(g)))return c;var O=Ki(c),N=da(O,Ki(g));return Ls(O,N).join("")}function aJ(c,g){var w=j,O=Y;if(gr(g)){var N="separator"in g?g.separator:N;w="length"in g?Wt(g.length):w,O="omission"in g?ho(g.omission):O}c=Pn(c);var H=c.length;if(Tu(c)){var Q=Ki(c);H=Q.length}if(w>=H)return c;var ne=w-Va(O);if(ne<1)return O;var de=Q?Ls(Q,0,ne).join(""):c.slice(0,ne);if(N===n)return de+O;if(Q&&(ne+=de.length-ne),Ew(N)){if(c.slice(ne).search(N)){var Ee,Pe=de;for(N.global||(N=zf(N.source,Pn(ys.exec(N))+"g")),N.lastIndex=0;Ee=N.exec(Pe);)var Re=Ee.index;de=de.slice(0,Re===n?ne:Re)}}else if(c.indexOf(ho(N),ne)!=ne){var tt=de.lastIndexOf(N);tt>-1&&(de=de.slice(0,tt))}return de+O}function sJ(c){return c=Pn(c),c&&O1.test(c)?c.replace(Kr,Ky):c}var lJ=Ll(function(c,g,w){return c+(w?" ":"")+g.toUpperCase()}),Lw=v0("toUpperCase");function GT(c,g,w){return c=Pn(c),g=w?n:g,g===n?Fp(c)?Ff(c):X1(c):c.match(g)||[]}var qT=Mt(function(c,g){try{return Mi(c,n,g)}catch(w){return kw(w)?w:new It(w)}}),uJ=lr(function(c,g){return Kn(g,function(w){w=Al(w),ga(c,w,Cw(c[w],c))}),c});function cJ(c){var g=c==null?0:c.length,w=Me();return c=g?Vn(c,function(O){if(typeof O[1]!="function")throw new Ri(a);return[w(O[0]),O[1]]}):[],Mt(function(O){for(var N=-1;++N<g;){var H=c[N];if(Mi(H[0],this,O))return Mi(H[1],this,O)}})}function dJ(c){return Kp(wi(c,p))}function Aw(c){return function(){return c}}function fJ(c,g){return c==null||c!==c?g:c}var hJ=Rm(),pJ=Rm(!0);function jo(c){return c}function Ow(c){return pr(typeof c=="function"?c:wi(c,p))}function gJ(c){return nd(wi(c,p))}function mJ(c,g){return wl(c,wi(g,p))}var vJ=Mt(function(c,g){return function(w){return Ps(w,c,g)}}),yJ=Mt(function(c,g){return function(w){return Ps(c,w,g)}});function Mw(c,g,w){var O=Ei(g),N=Jp(g,O);w==null&&!(gr(g)&&(N.length||!O.length))&&(w=g,g=c,c=this,N=Jp(g,Ei(g)));var H=!(gr(w)&&"chain"in w)||!!w.chain,Q=Bu(c);return Kn(N,function(ne){var de=g[ne];c[ne]=de,Q&&(c.prototype[ne]=function(){var Ee=this.__chain__;if(H||Ee){var Pe=c(this.__wrapped__),Re=Pe.__actions__=$i(this.__actions__);return Re.push({func:de,args:arguments,thisArg:c}),Pe.__chain__=Ee,Pe}return de.apply(c,Ha([this.value()],arguments))})}),c}function bJ(){return Pt._===this&&(Pt._=tm),this}function Rw(){}function SJ(c){return c=Wt(c),Mt(function(g){return rd(g,c)})}var xJ=Im(Vn),wJ=Im(Hn),CJ=Im(Oc);function YT(c){return vw(c)?gl(Al(c)):Ts(c)}function _J(c){return function(g){return c==null?n:Sl(c,g)}}var kJ=S(),EJ=S(!0);function Iw(){return[]}function Dw(){return!1}function PJ(){return{}}function TJ(){return""}function LJ(){return!0}function AJ(c,g){if(c=Wt(c),c<1||c>U)return[];var w=fe,O=ci(c,fe);g=Me(g),c-=fe;for(var N=Nf(O,g);++w<c;)g(w);return N}function OJ(c){return jt(c)?Vn(c,Al):Sa(c)?[c]:$i(pT(Pn(c)))}function MJ(c){var g=++jf;return Pn(c)+g}var RJ=y0(function(c,g){return c+g},0),IJ=M("ceil"),DJ=y0(function(c,g){return c/g},1),NJ=M("floor");function BJ(c){return c&&c.length?Ar(c,jo,e0):n}function $J(c,g){return c&&c.length?Ar(c,Me(g,2),e0):n}function FJ(c){return Rf(c,jo)}function zJ(c,g){return Rf(c,Me(g,2))}function jJ(c){return c&&c.length?Ar(c,jo,xl):n}function HJ(c,g){return c&&c.length?Ar(c,Me(g,2),xl):n}var VJ=y0(function(c,g){return c*g},1),UJ=M("round"),WJ=y0(function(c,g){return c-g},0);function GJ(c){return c&&c.length?Df(c,jo):0}function qJ(c,g){return c&&c.length?Df(c,Me(g,2)):0}return F.after=gZ,F.ary=kT,F.assign=nQ,F.assignIn=FT,F.assignInWith=P3,F.assignWith=rQ,F.at=iQ,F.before=ET,F.bind=Cw,F.bindAll=uJ,F.bindKey=PT,F.castArray=PZ,F.chain=wT,F.chunk=NK,F.compact=BK,F.concat=$K,F.cond=cJ,F.conforms=dJ,F.constant=Aw,F.countBy=GX,F.create=oQ,F.curry=TT,F.curryRight=LT,F.debounce=AT,F.defaults=aQ,F.defaultsDeep=sQ,F.defer=mZ,F.delay=vZ,F.difference=FK,F.differenceBy=zK,F.differenceWith=jK,F.drop=HK,F.dropRight=VK,F.dropRightWhile=UK,F.dropWhile=WK,F.fill=GK,F.filter=YX,F.flatMap=ZX,F.flatMapDeep=QX,F.flatMapDepth=JX,F.flatten=yT,F.flattenDeep=qK,F.flattenDepth=YK,F.flip=yZ,F.flow=hJ,F.flowRight=pJ,F.fromPairs=KK,F.functions=pQ,F.functionsIn=gQ,F.groupBy=eZ,F.initial=ZK,F.intersection=QK,F.intersectionBy=JK,F.intersectionWith=eX,F.invert=vQ,F.invertBy=yQ,F.invokeMap=nZ,F.iteratee=Ow,F.keyBy=rZ,F.keys=Ei,F.keysIn=zo,F.map=x3,F.mapKeys=SQ,F.mapValues=xQ,F.matches=gJ,F.matchesProperty=mJ,F.memoize=C3,F.merge=wQ,F.mergeWith=zT,F.method=vJ,F.methodOf=yJ,F.mixin=Mw,F.negate=_3,F.nthArg=SJ,F.omit=CQ,F.omitBy=_Q,F.once=bZ,F.orderBy=iZ,F.over=xJ,F.overArgs=SZ,F.overEvery=wJ,F.overSome=CJ,F.partial=_w,F.partialRight=OT,F.partition=oZ,F.pick=kQ,F.pickBy=jT,F.property=YT,F.propertyOf=_J,F.pull=iX,F.pullAll=ST,F.pullAllBy=oX,F.pullAllWith=aX,F.pullAt=sX,F.range=kJ,F.rangeRight=EJ,F.rearg=xZ,F.reject=lZ,F.remove=lX,F.rest=wZ,F.reverse=xw,F.sampleSize=cZ,F.set=PQ,F.setWith=TQ,F.shuffle=dZ,F.slice=uX,F.sortBy=pZ,F.sortedUniq=mX,F.sortedUniqBy=vX,F.split=ZQ,F.spread=CZ,F.tail=yX,F.take=bX,F.takeRight=SX,F.takeRightWhile=xX,F.takeWhile=wX,F.tap=BX,F.throttle=_Z,F.thru=S3,F.toArray=NT,F.toPairs=HT,F.toPairsIn=VT,F.toPath=OJ,F.toPlainObject=$T,F.transform=LQ,F.unary=kZ,F.union=CX,F.unionBy=_X,F.unionWith=kX,F.uniq=EX,F.uniqBy=PX,F.uniqWith=TX,F.unset=AQ,F.unzip=ww,F.unzipWith=xT,F.update=OQ,F.updateWith=MQ,F.values=S0,F.valuesIn=RQ,F.without=LX,F.words=GT,F.wrap=EZ,F.xor=AX,F.xorBy=OX,F.xorWith=MX,F.zip=RX,F.zipObject=IX,F.zipObjectDeep=DX,F.zipWith=NX,F.entries=HT,F.entriesIn=VT,F.extend=FT,F.extendWith=P3,Mw(F,F),F.add=RJ,F.attempt=qT,F.camelCase=BQ,F.capitalize=UT,F.ceil=IJ,F.clamp=IQ,F.clone=TZ,F.cloneDeep=AZ,F.cloneDeepWith=OZ,F.cloneWith=LZ,F.conformsTo=MZ,F.deburr=WT,F.defaultTo=fJ,F.divide=DJ,F.endsWith=$Q,F.eq=Os,F.escape=FQ,F.escapeRegExp=zQ,F.every=qX,F.find=KX,F.findIndex=mT,F.findKey=lQ,F.findLast=XX,F.findLastIndex=vT,F.findLastKey=uQ,F.floor=NJ,F.forEach=CT,F.forEachRight=_T,F.forIn=cQ,F.forInRight=dQ,F.forOwn=fQ,F.forOwnRight=hQ,F.get=Pw,F.gt=RZ,F.gte=IZ,F.has=mQ,F.hasIn=Tw,F.head=bT,F.identity=jo,F.includes=tZ,F.indexOf=XK,F.inRange=DQ,F.invoke=bQ,F.isArguments=sh,F.isArray=jt,F.isArrayBuffer=DZ,F.isArrayLike=Fo,F.isArrayLikeObject=Vr,F.isBoolean=NZ,F.isBuffer=sd,F.isDate=BZ,F.isElement=$Z,F.isEmpty=FZ,F.isEqual=zZ,F.isEqualWith=jZ,F.isError=kw,F.isFinite=HZ,F.isFunction=Bu,F.isInteger=MT,F.isLength=k3,F.isMap=RT,F.isMatch=VZ,F.isMatchWith=UZ,F.isNaN=WZ,F.isNative=GZ,F.isNil=YZ,F.isNull=qZ,F.isNumber=IT,F.isObject=gr,F.isObjectLike=Mr,F.isPlainObject=Bm,F.isRegExp=Ew,F.isSafeInteger=KZ,F.isSet=DT,F.isString=E3,F.isSymbol=Sa,F.isTypedArray=b0,F.isUndefined=XZ,F.isWeakMap=ZZ,F.isWeakSet=QZ,F.join=tX,F.kebabCase=jQ,F.last=qa,F.lastIndexOf=nX,F.lowerCase=HQ,F.lowerFirst=VQ,F.lt=JZ,F.lte=eQ,F.max=BJ,F.maxBy=$J,F.mean=FJ,F.meanBy=zJ,F.min=jJ,F.minBy=HJ,F.stubArray=Iw,F.stubFalse=Dw,F.stubObject=PJ,F.stubString=TJ,F.stubTrue=LJ,F.multiply=VJ,F.nth=rX,F.noConflict=bJ,F.noop=Rw,F.now=w3,F.pad=UQ,F.padEnd=WQ,F.padStart=GQ,F.parseInt=qQ,F.random=NQ,F.reduce=aZ,F.reduceRight=sZ,F.repeat=YQ,F.replace=KQ,F.result=EQ,F.round=UJ,F.runInContext=ie,F.sample=uZ,F.size=fZ,F.snakeCase=XQ,F.some=hZ,F.sortedIndex=cX,F.sortedIndexBy=dX,F.sortedIndexOf=fX,F.sortedLastIndex=hX,F.sortedLastIndexBy=pX,F.sortedLastIndexOf=gX,F.startCase=QQ,F.startsWith=JQ,F.subtract=WJ,F.sum=GJ,F.sumBy=qJ,F.template=eJ,F.times=AJ,F.toFinite=$u,F.toInteger=Wt,F.toLength=BT,F.toLower=tJ,F.toNumber=Ya,F.toSafeInteger=tQ,F.toString=Pn,F.toUpper=nJ,F.trim=rJ,F.trimEnd=iJ,F.trimStart=oJ,F.truncate=aJ,F.unescape=sJ,F.uniqueId=MJ,F.upperCase=lJ,F.upperFirst=Lw,F.each=CT,F.eachRight=_T,F.first=bT,Mw(F,function(){var c={};return ya(F,function(g,w){cn.call(F.prototype,w)||(c[w]=g)}),c}(),{chain:!1}),F.VERSION=r,Kn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){F[c].placeholder=F}),Kn(["drop","take"],function(c,g){Jt.prototype[c]=function(w){w=w===n?1:Tr(Wt(w),0);var O=this.__filtered__&&!g?new Jt(this):this.clone();return O.__filtered__?O.__takeCount__=ci(w,O.__takeCount__):O.__views__.push({size:ci(w,fe),type:c+(O.__dir__<0?"Right":"")}),O},Jt.prototype[c+"Right"]=function(w){return this.reverse()[c](w).reverse()}}),Kn(["filter","map","takeWhile"],function(c,g){var w=g+1,O=w==$||w==J;Jt.prototype[c]=function(N){var H=this.clone();return H.__iteratees__.push({iteratee:Me(N,3),type:w}),H.__filtered__=H.__filtered__||O,H}}),Kn(["head","last"],function(c,g){var w="take"+(g?"Right":"");Jt.prototype[c]=function(){return this[w](1).value()[0]}}),Kn(["initial","tail"],function(c,g){var w="drop"+(g?"":"Right");Jt.prototype[c]=function(){return this.__filtered__?new Jt(this):this[w](1)}}),Jt.prototype.compact=function(){return this.filter(jo)},Jt.prototype.find=function(c){return this.filter(c).head()},Jt.prototype.findLast=function(c){return this.reverse().find(c)},Jt.prototype.invokeMap=Mt(function(c,g){return typeof c=="function"?new Jt(this):this.map(function(w){return Ps(w,c,g)})}),Jt.prototype.reject=function(c){return this.filter(_3(Me(c)))},Jt.prototype.slice=function(c,g){c=Wt(c);var w=this;return w.__filtered__&&(c>0||g<0)?new Jt(w):(c<0?w=w.takeRight(-c):c&&(w=w.drop(c)),g!==n&&(g=Wt(g),w=g<0?w.dropRight(-g):w.take(g-c)),w)},Jt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Jt.prototype.toArray=function(){return this.take(fe)},ya(Jt.prototype,function(c,g){var w=/^(?:filter|find|map|reject)|While$/.test(g),O=/^(?:head|last)$/.test(g),N=F[O?"take"+(g=="last"?"Right":""):g],H=O||/^find/.test(g);!N||(F.prototype[g]=function(){var Q=this.__wrapped__,ne=O?[1]:arguments,de=Q instanceof Jt,Ee=ne[0],Pe=de||jt(Q),Re=function(en){var an=N.apply(F,Ha([en],ne));return O&&tt?an[0]:an};Pe&&w&&typeof Ee=="function"&&Ee.length!=1&&(de=Pe=!1);var tt=this.__chain__,wt=!!this.__actions__.length,Lt=H&&!tt,Kt=de&&!wt;if(!H&&Pe){Q=Kt?Q:new Jt(this);var At=c.apply(Q,ne);return At.__actions__.push({func:S3,args:[Re],thisArg:n}),new co(At,tt)}return Lt&&Kt?c.apply(this,ne):(At=this.thru(Re),Lt?O?At.value()[0]:At.value():At)})}),Kn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Bc[c],w=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var N=arguments;if(O&&!this.__chain__){var H=this.value();return g.apply(jt(H)?H:[],N)}return this[w](function(Q){return g.apply(jt(Q)?Q:[],N)})}}),ya(Jt.prototype,function(c,g){var w=F[g];if(w){var O=w.name+"";cn.call(_s,O)||(_s[O]=[]),_s[O].push({name:g,func:w})}}),_s[ih(n,k).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=Xi,Jt.prototype.reverse=Di,Jt.prototype.value=i3,F.prototype.at=$X,F.prototype.chain=FX,F.prototype.commit=zX,F.prototype.next=jX,F.prototype.plant=VX,F.prototype.reverse=UX,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=WX,F.prototype.first=F.prototype.head,Hc&&(F.prototype[Hc]=HX),F},Ua=Io();Qt?((Qt.exports=Ua)._=Ua,Bt._=Ua):Pt._=Ua}).call(xo)})(gi,gi.exports);const He=gi.exports,hSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300,shouldUseSingleGalleryColumn:!1},NU=gx({name:"gallery",initialState:hSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=gi.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r<n.length-1){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:ag,clearIntermediateImage:lC,removeImage:BU,setCurrentImage:wR,addGalleryImages:pSe,setIntermediateImage:gSe,selectNextImage:HE,selectPrevImage:VE,setShouldPinGallery:mSe,setShouldShowGallery:Vd,setGalleryScrollPosition:vSe,setGalleryImageMinimumWidth:ev,setGalleryImageObjectFit:ySe,setShouldHoldGalleryOpen:$U,setShouldAutoSwitchToNewImages:bSe,setCurrentCategory:gb,setGalleryWidth:SSe,setShouldUseSingleGalleryColumn:xSe}=NU.actions,wSe=NU.reducer;function Qs(e){return Qs=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},Qs(e)}function vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CSe(e,t){if(Qs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FU(e){var t=CSe(e,"string");return Qs(t)==="symbol"?t:String(t)}function CR(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,FU(r.key),r)}}function yu(e,t,n){return t&&CR(e.prototype,t),n&&CR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ud(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z9(e,t){return Z9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Z9(e,t)}function vx(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&&Z9(e,t)}function Ay(e,t){if(t&&(Qs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ud(e)}function cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cu(e)}function pf(e,t,n){return t=FU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Se(e){if(Array.isArray(e))return e}function kSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _R(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ESe(e,t){if(!!e){if(typeof e=="string")return _R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _R(e,t)}}function PSe(){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 TSe(e){return _Se(e)||kSe(e)||ESe(e)||PSe()}function kR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ER(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var LSe={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},ASe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};vu(this,e),this.init(t,n)}return yu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||LSe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,ER(ER({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Kl=new ASe,tf=function(){function e(){vu(this,e),this.observers={}}return yu(e,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),e}();function tv(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function PR(e){return e==null?"":""+e}function OSe(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function UE(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function TR(e,t,n){var r=UE(e,t,Object),i=r.obj,o=r.k;i[o]=n}function MSe(e,t,n,r){var i=UE(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function B5(e,t){var n=UE(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function LR(e,t,n){var r=B5(e,n);return r!==void 0?r:B5(t,n)}function zU(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):zU(e[r],t[r],n):e[r]=t[r]);return e}function A0(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var RSe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ISe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return RSe[t]}):e}var yx=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,DSe=[" ",",","?","!",";"];function NSe(e,t,n){t=t||"",n=n||"";var r=DSe.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function AR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BSe(e){var t=$Se();return function(){var r=cu(e),i;if(t){var o=cu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Ay(this,i)}}function $Se(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function jU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];l===void 0&&r.length>o+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(o+a).join(n);return u?jU(l,u,n):void 0}i=i[r[o]]}return i}}var FSe=function(e){vx(n,e);var t=BSe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return vu(this,n),i=t.call(this),yx&&tf.call(Ud(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return yu(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[i,o];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(f=i.split("."));var p=B5(this.data,f);return p||!u||typeof a!="string"?p:jU(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[i,o];a&&(f=f.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(f=i.split("."),s=o,o=f[1]),this.addNamespaces(o),TR(this.data,f,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[i,o];i.indexOf(".")>-1&&(f=i.split("."),s=a,a=o,o=f[1]),this.addNamespaces(o);var p=B5(this.data,f)||{};s?zU(p,a,l):p=mb(mb({},p),a),TR(this.data,f,p),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?mb(mb({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(tf),HU={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function OR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zSe(e){var t=jSe();return function(){var r=cu(e),i;if(t){var o=cu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Ay(this,i)}}function jSe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var MR={},RR=function(e){vx(n,e);var t=zSe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return vu(this,n),i=t.call(this),yx&&tf.call(Ud(i)),OSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Ud(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Kl.create("translator"),i}return yu(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!NSe(i,a,s);if(u&&!f){var p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:l};var m=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),i=m.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Qs(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(i[i.length-1],o),p=f.key,m=f.namespaces,v=m[m.length-1],b=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b&&b.toLowerCase()==="cimode"){if(x){var E=o.nsSeparator||this.options.nsSeparator;return l?(k.res="".concat(v).concat(E).concat(p),k):"".concat(v).concat(E).concat(p)}return l?(k.res=p,k):p}var k=this.resolve(i,o),_=k&&k.res,T=k&&k.usedKey||p,A=k&&k.exactUsedKey||p,R=Object.prototype.toString.apply(_),I=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,B=!this.i18nFormat||this.i18nFormat.handleAsObject,z=typeof _!="string"&&typeof _!="boolean"&&typeof _!="number";if(B&&_&&z&&I.indexOf(R)<0&&!(typeof D=="string"&&R==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,_,yo(yo({},o),{},{ns:m})):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");return l?(k.res=j,k):j}if(u){var Y=R==="[object Array]",te=Y?[]:{},G=Y?A:T;for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$)){var V="".concat(G).concat(u).concat($);te[$]=this.translate(V,yo(yo({},o),{joinArrays:!1,ns:m})),te[$]===V&&(te[$]=_[$])}_=te}}else if(B&&typeof D=="string"&&R==="[object Array]")_=_.join(D),_&&(_=this.extendTranslation(_,i,o,a));else{var J=!1,Z=!1,U=o.count!==void 0&&typeof o.count!="string",X=n.hasDefaultValue(o),le=U?this.pluralResolver.getSuffix(b,o.count,o):"",fe=o["defaultValue".concat(le)]||o.defaultValue;!this.isValidLookup(_)&&X&&(J=!0,_=fe),this.isValidLookup(_)||(Z=!0,_=p);var Se=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Ae=Se&&Z?void 0:_,be=X&&fe!==_&&this.options.updateMissing;if(Z||J||be){if(this.logger.log(be?"updateKey":"missingKey",b,v,p,be?fe:_),u){var ke=this.resolve(p,yo(yo({},o),{},{keySeparator:!1}));ke&&ke.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.")}var De=[],Je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Je&&Je[0])for(var Ye=0;Ye<Je.length;Ye++)De.push(Je[Ye]);else this.options.saveMissingTo==="all"?De=this.languageUtils.toResolveHierarchy(o.lng||this.language):De.push(o.lng||this.language);var mt=function(dt,vt,xt){var Le=X&&xt!==_?xt:Ae;s.options.missingKeyHandler?s.options.missingKeyHandler(dt,v,vt,Le,be,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(dt,v,vt,Le,be,o),s.emit("missingKey",dt,v,vt,_)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?De.forEach(function(_t){s.pluralResolver.getSuffixes(_t,o).forEach(function(dt){mt([_t],p+dt,o["defaultValue".concat(dt)]||fe)})}):mt(De,p,fe))}_=this.extendTranslation(_,i,o,k,a),Z&&_===p&&this.options.appendNamespaceToMissingKey&&(_="".concat(v,":").concat(p)),(Z||J)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?_=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(v,":").concat(p):p,J?_:void 0):_=this.options.parseMissingKeyHandler(_))}return l?(k.res=_,k):_}},{key:"extendTranslation",value:function(i,o,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,yo(yo({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(yo(yo({},a),{interpolation:yo(yo({},this.options.interpolation),a.interpolation)}));var f=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),p;if(f){var m=i.match(this.interpolator.nestingRegexp);p=m&&m.length}var v=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(v=yo(yo({},this.options.interpolation.defaultVariables),v)),i=this.interpolator.interpolate(i,v,a.lng||this.language,a),f){var b=i.match(this.interpolator.nestingRegexp),x=b&&b.length;p<x&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var _=arguments.length,T=new Array(_),A=0;A<_;A++)T[A]=arguments[A];return l&&l[0]===T[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(T[0]," in key: ").concat(o[0])),null):u.translate.apply(u,T.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var E=a.postProcess||this.options.postProcess,k=typeof E=="string"?[E]:E;return i!=null&&k&&k.length&&a.applyPostProcessor!==!1&&(i=HU.handle(k,i,o,this.options&&this.options.postProcessPassResolved?yo({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,p;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!o.isValidLookup(s)){var v=o.extractFromKey(m,a),b=v.key;l=b;var x=v.namespaces;o.options.fallbackNS&&(x=x.concat(o.options.fallbackNS));var E=a.count!==void 0&&typeof a.count!="string",k=E&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),_=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);x.forEach(function(A){o.isValidLookup(s)||(p=A,!MR["".concat(T[0],"-").concat(A)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(p)&&(MR["".concat(T[0],"-").concat(A)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(T.join(", "),`" won't get resolved as namespace "`).concat(p,'" 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!!!")),T.forEach(function(R){if(!o.isValidLookup(s)){f=R;var I=[b];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(I,b,R,A,a);else{var D;E&&(D=o.pluralResolver.getSuffix(R,a.count,a));var B="".concat(o.options.pluralSeparator,"zero");if(E&&(I.push(b+D),k&&I.push(b+B)),_){var z="".concat(b).concat(o.options.contextSeparator).concat(a.context);I.push(z),E&&(I.push(z+D),k&&I.push(z+B))}}for(var j;j=I.pop();)o.isValidLookup(s)||(u=j,s=o.getResource(R,A,j,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:p}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(tf);function uC(e){return e.charAt(0).toUpperCase()+e.slice(1)}var IR=function(){function e(t){vu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kl.create("languageUtils")}return yu(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=uC(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=uC(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=uC(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){!u||(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),HSe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],VSe={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},USe=["v1","v2","v3"],DR={zero:0,one:1,two:2,few:3,many:4,other:5};function WSe(){var e={};return HSe.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:VSe[t.fc]}})}),e}var GSe=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};vu(this,e),this.languageUtils=t,this.options=n,this.logger=Kl.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=WSe()}return yu(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch(i){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return DR[a]-DR[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!USe.includes(this.options.compatibilityJSON)}}]),e}();function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var qSe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vu(this,e),this.logger=Kl.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return yu(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ISe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?A0(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?A0(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?A0(r.nestingPrefix):r.nestingPrefixEscaped||A0("$t("),this.nestingSuffix=r.nestingSuffix?A0(r.nestingSuffix):r.nestingSuffixEscaped||A0(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(E){return E.replace(/\$/g,"$$$$")}var m=function(k){if(k.indexOf(a.formatSeparator)<0){var _=LR(r,f,k);return a.alwaysFormat?a.format(_,void 0,i,Bs(Bs(Bs({},o),r),{},{interpolationkey:k})):_}var T=k.split(a.formatSeparator),A=T.shift().trim(),R=T.join(a.formatSeparator).trim();return a.format(LR(r,f,A),R,i,Bs(Bs(Bs({},o),r),{},{interpolationkey:A}))};this.resetRegExp();var v=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,b=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(k){return p(k)}},{regex:this.regexp,safeValue:function(k){return a.escapeValue?p(a.escape(k)):p(k)}}];return x.forEach(function(E){for(u=0;s=E.regex.exec(n);){var k=s[1].trim();if(l=m(k),l===void 0)if(typeof v=="function"){var _=v(n,s,o);l=typeof _=="string"?_:""}else if(o&&o.hasOwnProperty(k))l="";else if(b){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(k," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=PR(l));var T=E.safeValue(l);if(n=n.replace(s[0],T),b?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=s[0].length):E.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(v,b){var x=this.nestingOptionsSeparator;if(v.indexOf(x)<0)return v;var E=v.split(new RegExp("".concat(x,"[ ]*{"))),k="{".concat(E[1]);v=E[0],k=this.interpolate(k,l);var _=k.match(/'/g),T=k.match(/"/g);(_&&_.length%2===0&&!T||T.length%2!==0)&&(k=k.replace(/'/g,'"'));try{l=JSON.parse(k),b&&(l=Bs(Bs({},b),l))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(v),A),"".concat(v).concat(x).concat(k)}return delete l.defaultValue,v}for(;a=this.nestingRegexp.exec(n);){var f=[];l=Bs({},o),l.applyPostProcessor=!1,delete l.defaultValue;var p=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(v){return v.trim()});a[1]=m.shift(),f=m,p=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=PR(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),p&&(s=f.reduce(function(v,b){return i.format(v,b,o.lng,Bs(Bs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function BR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YSe(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(!!a){var s=a.split(":"),l=TSe(s),u=l[0],f=l.slice(1),p=f.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=p),p==="false"&&(n[u.trim()]=!1),p==="true"&&(n[u.trim()]=!0),isNaN(p)||(n[u.trim()]=parseInt(p,10))}})}}return{formatName:t,formatOptions:n}}function O0(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var KSe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vu(this,e),this.logger=Kl.create("formatter"),this.options=t,this.formats={number:O0(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:O0(function(n,r){var i=new Intl.NumberFormat(n,fd(fd({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:O0(function(n,r){var i=new Intl.DateTimeFormat(n,fd({},r));return function(o){return i.format(o)}}),relativetime:O0(function(n,r){var i=new Intl.RelativeTimeFormat(n,fd({},r));return function(o){return i.format(o,r.range||"day")}}),list:O0(function(n,r){var i=new Intl.ListFormat(n,fd({},r));return function(o){return i.format(o)}})},this.init(t)}return yu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=O0(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,f){var p=YSe(f),m=p.formatName,v=p.formatOptions;if(a.formats[m]){var b=u;try{var x=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},E=x.locale||x.lng||o.locale||o.lng||i;b=a.formats[m](u,E,fd(fd(fd({},v),o),x))}catch(k){a.logger.warn(k)}return b}else a.logger.warn("there was no format function for ".concat(m));return u},n);return l}}]),e}();function $R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$R(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$R(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XSe(e){var t=ZSe();return function(){var r=cu(e),i;if(t){var o=cu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Ay(this,i)}}function ZSe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function QSe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var JSe=function(e){vx(n,e);var t=XSe(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return vu(this,n),a=t.call(this),yx&&tf.call(Ud(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Kl.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return yu(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},f={},p={},m={};return i.forEach(function(v){var b=!0;o.forEach(function(x){var E="".concat(v,"|").concat(x);!a.reload&&l.store.hasResourceBundle(v,x)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?f[E]===void 0&&(f[E]=!0):(l.state[E]=1,b=!1,f[E]===void 0&&(f[E]=!0),u[E]===void 0&&(u[E]=!0),m[x]===void 0&&(m[x]=!0)))}),b||(p[v]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var f={};this.queue.forEach(function(p){MSe(p.loaded,[l],u),QSe(p,i),o&&p.errors.push(o),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(function(m){f[m]||(f[m]={});var v=p.loaded[m];v.length&&v.forEach(function(b){f[m][b]===void 0&&(f[m][b]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(p){return!p.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!i.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:f});return}this.readingCalls++;var p=function(x,E){if(s.readingCalls--,s.waitingReads.length>0){var k=s.waitingReads.shift();s.read(k.lng,k.ns,k.fcName,k.tried,k.wait,k.callback)}if(x&&E&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,u*2,f)},u);return}f(x,E)},m=this.backend[a].bind(this.backend);if(m.length===2){try{var v=m(i,o);v&&typeof v.then=="function"?v.then(function(b){return p(null,b)}).catch(p):p(null,v)}catch(b){p(b)}return}return m(i,o,p)}},{key:"prepareLoading",value:function(i,o){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,p){f&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&p&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),p),o.loaded(i,f,p)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},f=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" 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(!(a==null||a==="")){if(this.backend&&this.backend.create){var p=FR(FR({},u),{},{isUpdate:l}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var v;m.length===5?v=m(i,o,a,s,p):v=m(i,o,a,s),v&&typeof v.then=="function"?v.then(function(b){return f(null,b)}).catch(f):f(null,v)}catch(b){f(b)}else m(i,o,a,s,f,p)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(tf);function zR(){return{debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Qs(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Qs(t[2])==="object"||Qs(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function jR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function HR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HR(Object(n),!0).forEach(function(r){pf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function exe(e){var t=txe();return function(){var r=cu(e),i;if(t){var o=cu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Ay(this,i)}}function txe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function vb(){}function nxe(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var $5=function(e){vx(n,e);var t=exe(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(vu(this,n),r=t.call(this),yx&&tf.call(Ud(r)),r.options=jR(i),r.services={},r.logger=Kl,r.modules={external:[]},nxe(Ud(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),Ay(r,Ud(r));setTimeout(function(){r.init(i,o)},0)}return r}return yu(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=zR();this.options=Dl(Dl(Dl({},s),this.options),jR(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Dl(Dl({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(k){return k?typeof k=="function"?new k:k:null}if(!this.options.isClone){this.modules.logger?Kl.init(l(this.modules.logger),this.options):Kl.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=KSe);var f=new IR(this.options);this.store=new FSe(this.options.resources,this.options);var p=this.services;p.logger=Kl,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new GSe(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=l(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new qSe(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new JSe(l(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(k){for(var _=arguments.length,T=new Array(_>1?_-1:0),A=1;A<_;A++)T[A-1]=arguments[A];i.emit.apply(i,[k].concat(T))}),this.modules.languageDetector&&(p.languageDetector=l(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=l(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new RR(this.services,this.options),this.translator.on("*",function(k){for(var _=arguments.length,T=new Array(_>1?_-1:0),A=1;A<_;A++)T[A-1]=arguments[A];i.emit.apply(i,[k].concat(T))}),this.modules.external.forEach(function(k){k.init&&k.init(i)})}if(this.format=this.options.interpolation.format,a||(a=vb),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var v=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];v.forEach(function(k){i[k]=function(){var _;return(_=i.store)[k].apply(_,arguments)}});var b=["addResource","addResources","addResourceBundle","removeResourceBundle"];b.forEach(function(k){i[k]=function(){var _;return(_=i.store)[k].apply(_,arguments),i}});var x=tv(),E=function(){var _=function(A,R){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),x.resolve(R),a(A,R)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return _(null,i.t.bind(i));i.changeLanguage(i.options.lng,_)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),x}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vb,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(v){if(!!v){var b=o.services.languageUtils.toResolveHierarchy(v);b.forEach(function(x){u.indexOf(x)<0&&u.push(x)})}};if(l)f(l);else{var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.forEach(function(m){return f(m)})}this.options.preload&&this.options.preload.forEach(function(m){return f(m)}),this.services.backendConnector.load(u,this.options.ns,function(m){!m&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(m)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=tv();return i||(i=this.languages),o||(o=this.options.ns),a||(a=vb),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&HU.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=tv();this.emit("languageChanging",i);var l=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},u=function(m,v){v?(l(v),a.translator.changeLanguage(v),a.isLanguageChangingTo=void 0,a.emit("languageChanged",v),a.logger.log("languageChanged",v)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(m,function(){return a.t.apply(a,arguments)})},f=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var v=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);v&&(a.language||l(v),a.translator.language||a.translator.changeLanguage(v),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(v)),a.loadResources(v,function(b){u(b,v)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(f,p){var m;if(Qs(p)!=="object"){for(var v=arguments.length,b=new Array(v>2?v-2:0),x=2;x<v;x++)b[x-2]=arguments[x];m=s.options.overloadTranslationOptionHandler([f,p].concat(b))}else m=Dl({},p);m.lng=m.lng||u.lng,m.lngs=m.lngs||u.lngs,m.ns=m.ns||u.ns,m.keyPrefix=m.keyPrefix||a||u.keyPrefix;var E=s.options.keySeparator||".",k=m.keyPrefix?"".concat(m.keyPrefix).concat(E).concat(f):f;return s.t(k,m)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(v,b){var x=o.services.backendConnector.state["".concat(v,"|").concat(b)];return x===-1||x===2};if(a.precheck){var p=a.precheck(this,f);if(p!==void 0)return p}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,i)&&(!l||f(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=tv();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=tv();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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"],a=this.services&&this.services.languageUtils||new IR(zR());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vb,s=Dl(Dl(Dl({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(f){l[f]=i[f]}),l.services=Dl({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new RR(l.services,l.options),l.translator.on("*",function(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),v=1;v<p;v++)m[v-1]=arguments[v];l.emit.apply(l,[f].concat(m))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(tf);pf($5,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new $5(e,t)});var Ht=$5.createInstance();Ht.createInstance=$5.createInstance;Ht.createInstance;Ht.dir;Ht.init;Ht.loadResources;Ht.reloadResources;Ht.use;Ht.changeLanguage;Ht.getFixedT;Ht.t;Ht.exists;Ht.setDefaultNamespace;Ht.hasLoadedNamespace;Ht.loadNamespaces;Ht.loadLanguages;function rxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y2(e){return Y2=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},Y2(e)}function ixe(e,t){if(Y2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Y2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oxe(e){var t=ixe(e,"string");return Y2(t)==="symbol"?t:String(t)}function VR(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,oxe(r.key),r)}}function axe(e,t,n){return t&&VR(e.prototype,t),n&&VR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var VU=[],sxe=VU.forEach,lxe=VU.slice;function uxe(e){return sxe.call(lxe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var UR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,cxe=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),a="".concat(t,"=").concat(o);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!UR.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!UR.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},WR={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=cxe(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var o=r[i];o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(n)===0)return o.substring(n.length,o.length)}return null},remove:function(t){this.create(t,"",-1)}},dxe={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=WR.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&WR.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},fxe={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a<o.length;a++){var s=o[a].indexOf("=");if(s>0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},nv=null,GR=function(){if(nv!==null)return nv;try{nv=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(n){nv=!1}return nv},hxe={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&GR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&GR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},rv=null,qR=function(){if(rv!==null)return rv;try{rv=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(n){rv=!1}return rv},pxe={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&qR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&qR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},gxe={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},mxe={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},vxe={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},yxe={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(!!r)return r[n]}};function bxe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var UU=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};rxe(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return axe(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=uxe(r,this.options||{},bxe()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(dxe),this.addDetector(fxe),this.addDetector(hxe),this.addDetector(pxe),this.addDetector(gxe),this.addDetector(mxe),this.addDetector(vxe),this.addDetector(yxe)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();UU.type="languageDetector";function Q9(e){return Q9=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},Q9(e)}var WU=[],Sxe=WU.forEach,xxe=WU.slice;function J9(e){return Sxe.call(xxe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function GU(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Q9(XMLHttpRequest))==="object"}function wxe(e){return!!e&&typeof e.then=="function"}function Cxe(e){return wxe(e)?e:Promise.resolve(e)}function _xe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var F5={exports:{}},yb={exports:{}},YR;function kxe(){return YR||(YR=1,function(e,t){var n=typeof self<"u"?self:xo,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch($){return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l($){return $&&DataView.prototype.isPrototypeOf($)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function($){return $&&u.indexOf(Object.prototype.toString.call($))>-1};function p($){if(typeof $!="string"&&($=String($)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test($))throw new TypeError("Invalid character in header field name");return $.toLowerCase()}function m($){return typeof $!="string"&&($=String($)),$}function v($){var V={next:function(){var J=$.shift();return{done:J===void 0,value:J}}};return s.iterable&&(V[Symbol.iterator]=function(){return V}),V}function b($){this.map={},$ instanceof b?$.forEach(function(V,J){this.append(J,V)},this):Array.isArray($)?$.forEach(function(V){this.append(V[0],V[1])},this):$&&Object.getOwnPropertyNames($).forEach(function(V){this.append(V,$[V])},this)}b.prototype.append=function($,V){$=p($),V=m(V);var J=this.map[$];this.map[$]=J?J+", "+V:V},b.prototype.delete=function($){delete this.map[p($)]},b.prototype.get=function($){return $=p($),this.has($)?this.map[$]:null},b.prototype.has=function($){return this.map.hasOwnProperty(p($))},b.prototype.set=function($,V){this.map[p($)]=m(V)},b.prototype.forEach=function($,V){for(var J in this.map)this.map.hasOwnProperty(J)&&$.call(V,this.map[J],J,this)},b.prototype.keys=function(){var $=[];return this.forEach(function(V,J){$.push(J)}),v($)},b.prototype.values=function(){var $=[];return this.forEach(function(V){$.push(V)}),v($)},b.prototype.entries=function(){var $=[];return this.forEach(function(V,J){$.push([J,V])}),v($)},s.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function x($){if($.bodyUsed)return Promise.reject(new TypeError("Already read"));$.bodyUsed=!0}function E($){return new Promise(function(V,J){$.onload=function(){V($.result)},$.onerror=function(){J($.error)}})}function k($){var V=new FileReader,J=E(V);return V.readAsArrayBuffer($),J}function _($){var V=new FileReader,J=E(V);return V.readAsText($),J}function T($){for(var V=new Uint8Array($),J=new Array(V.length),Z=0;Z<V.length;Z++)J[Z]=String.fromCharCode(V[Z]);return J.join("")}function A($){if($.slice)return $.slice(0);var V=new Uint8Array($.byteLength);return V.set(new Uint8Array($)),V.buffer}function R(){return this.bodyUsed=!1,this._initBody=function($){this._bodyInit=$,$?typeof $=="string"?this._bodyText=$:s.blob&&Blob.prototype.isPrototypeOf($)?this._bodyBlob=$:s.formData&&FormData.prototype.isPrototypeOf($)?this._bodyFormData=$:s.searchParams&&URLSearchParams.prototype.isPrototypeOf($)?this._bodyText=$.toString():s.arrayBuffer&&s.blob&&l($)?(this._bodyArrayBuffer=A($.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf($)||f($))?this._bodyArrayBuffer=A($):this._bodyText=$=Object.prototype.toString.call($):this._bodyText="",this.headers.get("content-type")||(typeof $=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf($)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var $=x(this);if($)return $;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?x(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(k)}),this.text=function(){var $=x(this);if($)return $;if(this._bodyBlob)return _(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D($){var V=$.toUpperCase();return I.indexOf(V)>-1?V:$}function B($,V){V=V||{};var J=V.body;if($ instanceof B){if($.bodyUsed)throw new TypeError("Already read");this.url=$.url,this.credentials=$.credentials,V.headers||(this.headers=new b($.headers)),this.method=$.method,this.mode=$.mode,this.signal=$.signal,!J&&$._bodyInit!=null&&(J=$._bodyInit,$.bodyUsed=!0)}else this.url=String($);if(this.credentials=V.credentials||this.credentials||"same-origin",(V.headers||!this.headers)&&(this.headers=new b(V.headers)),this.method=D(V.method||this.method||"GET"),this.mode=V.mode||this.mode||null,this.signal=V.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&J)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(J)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function z($){var V=new FormData;return $.trim().split("&").forEach(function(J){if(J){var Z=J.split("="),U=Z.shift().replace(/\+/g," "),X=Z.join("=").replace(/\+/g," ");V.append(decodeURIComponent(U),decodeURIComponent(X))}}),V}function j($){var V=new b,J=$.replace(/\r?\n[\t ]+/g," ");return J.split(/\r?\n/).forEach(function(Z){var U=Z.split(":"),X=U.shift().trim();if(X){var le=U.join(":").trim();V.append(X,le)}}),V}R.call(B.prototype);function Y($,V){V||(V={}),this.type="default",this.status=V.status===void 0?200:V.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in V?V.statusText:"OK",this.headers=new b(V.headers),this.url=V.url||"",this._initBody($)}R.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},Y.error=function(){var $=new Y(null,{status:0,statusText:""});return $.type="error",$};var te=[301,302,303,307,308];Y.redirect=function($,V){if(te.indexOf(V)===-1)throw new RangeError("Invalid status code");return new Y(null,{status:V,headers:{location:$}})},a.DOMException=o.DOMException;try{new a.DOMException}catch($){a.DOMException=function(V,J){this.message=V,this.name=J;var Z=Error(V);this.stack=Z.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function G($,V){return new Promise(function(J,Z){var U=new B($,V);if(U.signal&&U.signal.aborted)return Z(new a.DOMException("Aborted","AbortError"));var X=new XMLHttpRequest;function le(){X.abort()}X.onload=function(){var fe={status:X.status,statusText:X.statusText,headers:j(X.getAllResponseHeaders()||"")};fe.url="responseURL"in X?X.responseURL:fe.headers.get("X-Request-URL");var Se="response"in X?X.response:X.responseText;J(new Y(Se,fe))},X.onerror=function(){Z(new TypeError("Network request failed"))},X.ontimeout=function(){Z(new TypeError("Network request failed"))},X.onabort=function(){Z(new a.DOMException("Aborted","AbortError"))},X.open(U.method,U.url,!0),U.credentials==="include"?X.withCredentials=!0:U.credentials==="omit"&&(X.withCredentials=!1),"responseType"in X&&s.blob&&(X.responseType="blob"),U.headers.forEach(function(fe,Se){X.setRequestHeader(Se,fe)}),U.signal&&(U.signal.addEventListener("abort",le),X.onreadystatechange=function(){X.readyState===4&&U.signal.removeEventListener("abort",le)}),X.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return G.polyfill=!0,o.fetch||(o.fetch=G,o.Headers=b,o.Request=B,o.Response=Y),a.Headers=b,a.Request=B,a.Response=Y,a.fetch=G,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(yb,yb.exports)),yb.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof xo<"u"&&xo.fetch?n=xo.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof _xe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||kxe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(F5,F5.exports);const qU=F5.exports,KR=qN({__proto__:null,default:qU},[F5.exports]);function z5(e){return z5=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},z5(e)}var ec;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?ec=global.fetch:typeof window<"u"&&window.fetch?ec=window.fetch:ec=fetch);var K2;GU()&&(typeof global<"u"&&global.XMLHttpRequest?K2=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(K2=window.XMLHttpRequest));var j5;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?j5=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(j5=window.ActiveXObject));!ec&&KR&&!K2&&!j5&&(ec=qU||KR);typeof ec!="function"&&(ec=void 0);var e8=function(t,n){if(n&&z5(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},XR=function(t,n,r){ec(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},ZR=!1,Exe=function(t,n,r,i){t.queryStringParams&&(n=e8(n,t.queryStringParams));var o=J9({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=J9({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},ZR?{}:a);try{XR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),XR(n,s,i),ZR=!0}catch(u){i(u)}}},Pxe=function(t,n,r,i){r&&z5(r)==="object"&&(r=e8("",r).slice(1)),t.queryStringParams&&(n=e8(n,t.queryStringParams));try{var o;K2?o=new K2:o=new j5("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},Txe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},ec&&n.indexOf("file:")!==0)return Exe(t,n,r,i);if(GU()||typeof ActiveXObject=="function")return Pxe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function X2(e){return X2=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},X2(e)}function Lxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QR(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,YU(r.key),r)}}function Axe(e,t,n){return t&&QR(e.prototype,t),n&&QR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oxe(e,t,n){return t=YU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YU(e){var t=Mxe(e,"string");return X2(t)==="symbol"?t:String(t)}function Mxe(e,t){if(X2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(X2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rxe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return Oxe({},r,i||"")},request:Txe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},KU=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Lxe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Axe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=J9(i,this.options||{},Rxe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=Cxe(l),l.then(function(u){if(!u)return a(null,{});var f=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(f,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,f;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch(p){f="failed parsing "+n+" to json"}if(f)return r(f,!1);r(null,u)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(!!this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,f=[],p=[];n.forEach(function(m){var v=s.options.addPath;typeof s.options.addPath=="function"&&(v=s.options.addPath(m,r));var b=s.services.interpolator.interpolate(v,{lng:m,ns:r});s.options.request(s.options,b,l,function(x,E){u+=1,f.push(x),p.push(E),u===n.length&&a&&a(f,p)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(p){var m=o.toResolveHierarchy(p);m.forEach(function(v){l.indexOf(v)<0&&l.push(v)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return u(f)}),l.forEach(function(f){n.allOptions.ns.forEach(function(p){i.read(f,p,"read",null,null,function(m,v){m&&a.warn("loading namespace ".concat(p," for language ").concat(f," failed"),m),!m&&v&&a.log("loaded namespace ".concat(p," for language ").concat(f),v),i.loaded("".concat(f,"|").concat(p),m,v)})})})}}}]),e}();KU.type="backend";function Z2(e){return Z2=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},Z2(e)}function Ixe(e,t){if(Z2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Z2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XU(e){var t=Ixe(e,"string");return Z2(t)==="symbol"?t:String(t)}function ZU(e,t,n){return t=XU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dxe(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var JR={};function t8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&JR[t[0]]||(typeof t[0]=="string"&&(JR[t[0]]=new Date),Dxe.apply(void 0,t))}function eI(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function i(){setTimeout(function(){e.off("initialized",i)},0),n()};e.on("initialized",r)}})}function Nxe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function Bxe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return t8("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):Nxe(e,t,n)}var $xe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Fxe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},zxe=function(t){return Fxe[t]},jxe=function(t){return t.replace($xe,zxe)};function tI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tI(Object(n),!0).forEach(function(r){ZU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var n8={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jxe};function Hxe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n8=nI(nI({},n8),e)}function Vxe(){return n8}var QU;function Uxe(e){QU=e}function Wxe(){return QU}function Gxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rI(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,XU(r.key),r)}}function qxe(e,t,n){return t&&rI(e.prototype,t),n&&rI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Yxe={type:"3rdParty",init:function(t){Hxe(t.options.react),Uxe(t)}},Kxe=C.exports.createContext(),Xxe=function(){function e(){Gxe(this,e),this.usedNamespaces={}}return qxe(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function Zxe(e){if(Array.isArray(e))return e}function Qxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function iI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jxe(e,t){if(!!e){if(typeof e=="string")return iI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iI(e,t)}}function ewe(){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 twe(e,t){return Zxe(e)||Qxe(e,t)||Jxe(e,t)||ewe()}function oI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oI(Object(n),!0).forEach(function(r){ZU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nwe=function(t,n){var r=C.exports.useRef();return C.exports.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function Ke(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=C.exports.useContext(Kxe)||{},i=r.i18n,o=r.defaultNS,a=n||i||Wxe();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Xxe),!a){t8("You will need to pass in an i18next instance by using initReactI18next");var s=function(z){return Array.isArray(z)?z[z.length-1]:z},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&t8("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=cC(cC(cC({},Vxe()),a.options.react),t),f=u.useSuspense,p=u.keyPrefix,m=e||o||a.options&&a.options.defaultNS;m=typeof m=="string"?[m]:m||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(m);var v=(a.isInitialized||a.initializedStoreOnce)&&m.every(function(B){return Bxe(B,a,u)});function b(){return a.getFixedT(null,u.nsMode==="fallback"?m:m[0],p)}var x=C.exports.useState(b),E=twe(x,2),k=E[0],_=E[1],T=m.join(),A=nwe(T),R=C.exports.useRef(!0);C.exports.useEffect(function(){var B=u.bindI18n,z=u.bindI18nStore;R.current=!0,!v&&!f&&eI(a,m,function(){R.current&&_(b)}),v&&A&&A!==T&&R.current&&_(b);function j(){R.current&&_(b)}return B&&a&&a.on(B,j),z&&a&&a.store.on(z,j),function(){R.current=!1,B&&a&&B.split(" ").forEach(function(Y){return a.off(Y,j)}),z&&a&&z.split(" ").forEach(function(Y){return a.store.off(Y,j)})}},[a,T]);var I=C.exports.useRef(!0);C.exports.useEffect(function(){R.current&&!I.current&&_(b),I.current=!1},[a,p]);var D=[k,a,v];if(D.t=k,D.i18n=a,D.ready=v,v||!v&&!f)return D;throw new Promise(function(B){eI(a,m,function(){B()})})}Ht.use(KU).use(UU).use(Yxe).init({fallbackLng:"en",debug:!1,ns:["common","gallery","hotkeys","options","settings","modelmanager","toast","tooltip","unifiedcanvas"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const rwe={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:Ht.isInitialized?Ht.t("common:statusDisconnected"):"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},infill_methods:[],hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[],searchFolder:null,foundModels:null,openModel:null},JU=gx({name:"system",initialState:rwe,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Ht.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?Ht.t("common:statusConnected"):Ht.t("common:statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Ht.t("common:statusProcessingCanceled")},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=Ht.t("common:statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=Ht.t("common:statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1},setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setFoundModels:(e,t)=>{e.foundModels=t.payload},setOpenModel:(e,t)=>{e.openModel=t.payload}}}),{setShouldDisplayInProgressType:iwe,setIsProcessing:Ws,addLogEntry:eo,setShouldShowLogViewer:dC,setIsConnected:aI,setSocketId:Oze,setShouldConfirmOnDelete:eW,setOpenAccordions:owe,setSystemStatus:awe,setCurrentStatus:_4,setSystemConfig:swe,setShouldDisplayGuides:lwe,processingCanceled:uwe,errorOccurred:sI,errorSeen:tW,setModelList:bb,setIsCancelable:sg,modelChangeRequested:cwe,setSaveIntermediatesInterval:dwe,setEnableImageDebugging:fwe,generationRequested:hwe,addToast:Rh,clearToastQueue:pwe,setProcessingIndeterminateTask:gwe,setSearchFolder:nW,setFoundModels:rW,setOpenModel:lI}=JU.actions,mwe=JU.reducer,Od=(e,t)=>Math.floor(e/t)*t,Xl=(e,t)=>Math.round(e/t)*t,M0=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},R0=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},vwe=.999,ywe=.1,bwe=20,iv=.95,uI=30,r8=10,cI=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),ch=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a<i;)if(s+=64,t===n){r.width=512,r.height=512;break}else o>1?(r.width=s,r.height=Xl(s/o,64)):o<1&&(r.height=s,r.width=Xl(s*o,64)),a=r.width*r.height;return r},Swe=e=>({width:Xl(e.width,64),height:Xl(e.height,64)}),iW=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],xwe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],WE=e=>e.kind==="line"&&e.layer==="mask",wwe=e=>e.kind==="line"&&e.layer==="base",H5=e=>e.kind==="image"&&e.layer==="base",Cwe=e=>e.kind==="fillRect"&&e.layer==="base",_we=e=>e.kind==="eraseRect"&&e.layer==="base",kwe=e=>e.kind==="line",Cv={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},Ewe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Cv,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},oW=gx({name:"canvas",initialState:Ewe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!WE(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:Od(He.clamp(n.width,64,512),64),height:Od(He.clamp(n.height,64,512),64)},o={x:Xl(n.width/2-i.width/2,64),y:Xl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=ch(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.layerState={...Cv,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=R0(r.width,r.height,n.width,n.height,iv),s=M0(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=Swe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=ch(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=cI(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Cv.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(kwe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(He.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.layerState=Cv,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(H5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const f=R0(i.width,i.height,512,512,iv),p=M0(i.width,i.height,0,0,512,512,f),m={width:512,height:512};if(e.stageScale=f,e.stageCoordinates=p,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=ch(m);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=R0(t,n,o,a,.95),u=M0(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=cI(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(H5)){const i=R0(r.width,r.height,512,512,iv),o=M0(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=ch(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=R0(r,i,s,l,iv),f=M0(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=f}else{const u=R0(r,i,512,512,iv),f=M0(r,i,0,0,512,512,u),p={width:512,height:512};if(e.stageScale=u,e.stageCoordinates=f,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=p,e.boundingBoxScaleMethod==="auto"){const m=ch(p);e.scaledBoundingBoxDimensions=m}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Cv.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:Od(He.clamp(o,64,512),64),height:Od(He.clamp(a,64,512),64)},l={x:Xl(o/2-s.width/2,64),y:Xl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=ch(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=ch(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(He.cloneDeep(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:aW,addFillRect:sW,addImageToStagingArea:Pwe,addLine:Twe,addPointToCurrentLine:lW,clearCanvasHistory:uW,clearMask:GE,commitColorPickerColor:Lwe,commitStagingAreaImage:Awe,discardStagedImages:Owe,fitBoundingBoxToStage:Mze,mouseLeftCanvas:Mwe,nextStagingAreaImage:Rwe,prevStagingAreaImage:Iwe,redo:Dwe,resetCanvas:qE,resetCanvasInteractionState:Nwe,resetCanvasView:cW,resizeAndScaleCanvas:bx,resizeCanvas:Bwe,setBoundingBoxCoordinates:fC,setBoundingBoxDimensions:_v,setBoundingBoxPreviewFill:Rze,setBoundingBoxScaleMethod:$we,setBrushColor:Ng,setBrushSize:Bg,setCanvasContainerDimensions:Fwe,setColorPickerColor:zwe,setCursorPosition:jwe,setDoesCanvasNeedScaling:vi,setInitialCanvasImage:Sx,setInpaintReplace:dI,setIsDrawing:dW,setIsMaskEnabled:Oy,setIsMouseOverBoundingBox:Sb,setIsMoveBoundingBoxKeyHeld:Ize,setIsMoveStageKeyHeld:Dze,setIsMovingBoundingBox:hC,setIsMovingStage:V5,setIsTransformingBoundingBox:pC,setLayer:U5,setMaskColor:fW,setMergedCanvas:Hwe,setShouldAutoSave:hW,setShouldCropToBoundingBoxOnSave:pW,setShouldDarkenOutsideBoundingBox:gW,setShouldLockBoundingBox:Nze,setShouldPreserveMaskedArea:mW,setShouldShowBoundingBox:Vwe,setShouldShowBrush:Bze,setShouldShowBrushPreview:$ze,setShouldShowCanvasDebugInfo:vW,setShouldShowCheckboardTransparency:Fze,setShouldShowGrid:yW,setShouldShowIntermediates:bW,setShouldShowStagingImage:Uwe,setShouldShowStagingOutline:fI,setShouldSnapToGrid:W5,setShouldUseInpaintReplace:Wwe,setStageCoordinates:SW,setStageScale:Gwe,setTool:iu,toggleShouldLockBoundingBox:zze,toggleTool:jze,undo:qwe,setScaledBoundingBoxDimensions:xb,setShouldRestrictStrokesToBox:xW}=oW.actions,Ywe=oW.reducer,du=Object.create(null);du.open="0";du.close="1";du.ping="2";du.pong="3";du.message="4";du.upgrade="5";du.noop="6";const k4=Object.create(null);Object.keys(du).forEach(e=>{k4[du[e]]=e});const Kwe={type:"error",data:"parser error"},Xwe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Zwe=typeof ArrayBuffer=="function",Qwe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,wW=({type:e,data:t},n,r)=>Xwe&&t instanceof Blob?n?r(t):hI(t,r):Zwe&&(t instanceof ArrayBuffer||Qwe(t))?n?r(t):hI(new Blob([t]),r):r(du[e]+(t||"")),hI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},pI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<pI.length;e++)kv[pI.charCodeAt(e)]=e;const Jwe=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)o=kv[e.charCodeAt(r)],a=kv[e.charCodeAt(r+1)],s=kv[e.charCodeAt(r+2)],l=kv[e.charCodeAt(r+3)],f[i++]=o<<2|a>>4,f[i++]=(a&15)<<4|s>>2,f[i++]=(s&3)<<6|l&63;return u},e6e=typeof ArrayBuffer=="function",CW=(e,t)=>{if(typeof e!="string")return{type:"message",data:_W(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:t6e(e.substring(1),t)}:k4[n]?e.length>1?{type:k4[n],data:e.substring(1)}:{type:k4[n]}:Kwe},t6e=(e,t)=>{if(e6e){const n=Jwe(e);return _W(n,t)}else return{base64:!0,data:e}},_W=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},kW=String.fromCharCode(30),n6e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{wW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(kW))})})},r6e=(e,t)=>{const n=e.split(kW),r=[];for(let i=0;i<n.length;i++){const o=CW(n[i],t);if(r.push(o),o.type==="error")break}return r},EW=4;function oi(e){if(e)return i6e(e)}function i6e(e){for(var t in oi.prototype)e[t]=oi.prototype[t];return e}oi.prototype.on=oi.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};oi.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};oi.prototype.off=oi.prototype.removeListener=oi.prototype.removeAllListeners=oi.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};oi.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};oi.prototype.emitReserved=oi.prototype.emit;oi.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};oi.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Md=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function PW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const o6e=setTimeout,a6e=clearTimeout;function xx(e,t){t.useNativeTimers?(e.setTimeoutFn=o6e.bind(Md),e.clearTimeoutFn=a6e.bind(Md)):(e.setTimeoutFn=setTimeout.bind(Md),e.clearTimeoutFn=clearTimeout.bind(Md))}const s6e=1.33;function l6e(e){return typeof e=="string"?u6e(e):Math.ceil((e.byteLength||e.size)*s6e)}function u6e(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class c6e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class TW extends oi{constructor(t){super(),this.writable=!1,xx(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new c6e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=CW(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i8=64,d6e={};let gI=0,wb=0,mI;function vI(e){let t="";do t=LW[e%i8]+t,e=Math.floor(e/i8);while(e>0);return t}function AW(){const e=vI(+new Date);return e!==mI?(gI=0,mI=e):e+"."+vI(gI++)}for(;wb<i8;wb++)d6e[LW[wb]]=wb;function OW(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function f6e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let MW=!1;try{MW=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(e){}const h6e=MW;function RW(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||h6e))return new XMLHttpRequest}catch(n){}if(!t)try{return new Md[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}function p6e(){}const g6e=function(){return new RW({xdomain:!1}).responseType!=null}();class m6e extends TW{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=g6e&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};r6e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,n6e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=AW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=OW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new ou(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ou extends oi{constructor(t,n){super(),xx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=PW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new RW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{n.setRequestHeader("Accept","*/*")}catch(r){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ou.requestsCount++,ou.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=p6e,t)try{this.xhr.abort()}catch(n){}typeof document<"u"&&delete ou.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ou.requestsCount=0;ou.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",yI);else if(typeof addEventListener=="function"){const e="onpagehide"in Md?"pagehide":"unload";addEventListener(e,yI,!1)}}function yI(){for(let e in ou.requests)ou.requests.hasOwnProperty(e)&&ou.requests[e].abort()}const IW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Cb=Md.WebSocket||Md.MozWebSocket,bI=!0,v6e="arraybuffer",SI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class y6e extends TW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=SI?{}:PW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=bI&&!SI?n?new Cb(t,n):new Cb(t):new Cb(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||v6e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;wW(r,this.supportsBinary,o=>{const a={};try{bI&&this.ws.send(o)}catch(s){}i&&IW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=AW()),this.supportsBinary||(t.b64=1);const i=OW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Cb}}const b6e={websocket:y6e,polling:m6e},S6e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,x6e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function o8(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=S6e.exec(e||""),o={},a=14;for(;a--;)o[x6e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=w6e(o,o.path),o.queryKey=C6e(o,o.query),o}function w6e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function C6e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class kd extends oi{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=o8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=o8(n.host).host),xx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=f6e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=EW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new b6e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&kd.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;kd.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;kd.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",kd.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=l6e(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){kd.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}kd.protocol=EW;function _6e(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=o8(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const k6e=typeof ArrayBuffer=="function",E6e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DW=Object.prototype.toString,P6e=typeof Blob=="function"||typeof Blob<"u"&&DW.call(Blob)==="[object BlobConstructor]",T6e=typeof File=="function"||typeof File<"u"&&DW.call(File)==="[object FileConstructor]";function YE(e){return k6e&&(e instanceof ArrayBuffer||E6e(e))||P6e&&e instanceof Blob||T6e&&e instanceof File}function E4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(E4(e[n]))return!0;return!1}if(YE(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return E4(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&E4(e[n]))return!0;return!1}function L6e(e){const t=[],n=e.data,r=e;return r.data=a8(n,t),r.attachments=t.length,{packet:r,buffers:t}}function a8(e,t){if(!e)return e;if(YE(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=a8(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=a8(e[r],t));return n}return e}function A6e(e,t){return e.data=s8(e.data,t),e.attachments=void 0,e}function s8(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=s8(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=s8(e[n],t));return e}const O6e=5;var dn;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(dn||(dn={}));class M6e{constructor(t){this.replacer=t}encode(t){return(t.type===dn.EVENT||t.type===dn.ACK)&&E4(t)?(t.type=t.type===dn.EVENT?dn.BINARY_EVENT:dn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===dn.BINARY_EVENT||t.type===dn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=L6e(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class KE extends oi{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===dn.BINARY_EVENT||n.type===dn.BINARY_ACK?(this.reconstructor=new R6e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(YE(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(dn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===dn.BINARY_EVENT||r.type===dn.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(KE.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case dn.CONNECT:return typeof n=="object";case dn.DISCONNECT:return n===void 0;case dn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case dn.EVENT:case dn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case dn.ACK:case dn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class R6e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=A6e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const I6e=Object.freeze(Object.defineProperty({__proto__:null,protocol:O6e,get PacketType(){return dn},Encoder:M6e,Decoder:KE},Symbol.toStringTag,{value:"Module"}));function js(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const D6e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class NW extends oi{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[js(t,"open",this.onopen.bind(this)),js(t,"packet",this.onpacket.bind(this)),js(t,"error",this.onerror.bind(this)),js(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(D6e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:dn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:dn.CONNECT,data:t})}):this.packet({type:dn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case dn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case dn.EVENT:case dn.BINARY_EVENT:this.onevent(t);break;case dn.ACK:case dn.BINARY_ACK:this.onack(t);break;case dn.DISCONNECT:this.ondisconnect();break;case dn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:dn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:dn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function _1(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}_1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};_1.prototype.reset=function(){this.attempts=0};_1.prototype.setMin=function(e){this.ms=e};_1.prototype.setMax=function(e){this.max=e};_1.prototype.setJitter=function(e){this.jitter=e};class l8 extends oi{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,xx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||I6e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new kd(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=js(n,"open",function(){r.onopen(),t&&t()}),o=js(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(js(t,"ping",this.onping.bind(this)),js(t,"data",this.ondata.bind(this)),js(t,"error",this.onerror.bind(this)),js(t,"close",this.onclose.bind(this)),js(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){IW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new NW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ov={};function P4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=_6e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=ov[i]&&o in ov[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new l8(r,t):(ov[i]||(ov[i]=new l8(r,t)),l=ov[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(P4,{Manager:l8,Socket:NW,io:P4,connect:P4});let _b;const N6e=new Uint8Array(16);function B6e(){if(!_b&&(_b=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_b))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _b(N6e)}const zi=[];for(let e=0;e<256;++e)zi.push((e+256).toString(16).slice(1));function $6e(e,t=0){return(zi[e[t+0]]+zi[e[t+1]]+zi[e[t+2]]+zi[e[t+3]]+"-"+zi[e[t+4]]+zi[e[t+5]]+"-"+zi[e[t+6]]+zi[e[t+7]]+"-"+zi[e[t+8]]+zi[e[t+9]]+"-"+zi[e[t+10]]+zi[e[t+11]]+zi[e[t+12]]+zi[e[t+13]]+zi[e[t+14]]+zi[e[t+15]]).toLowerCase()}const F6e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xI={randomUUID:F6e};function lg(e,t,n){if(xI.randomUUID&&!t&&!e)return xI.randomUUID();e=e||{};const r=e.random||(e.rng||B6e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return $6e(r)}var z6e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,j6e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,H6e=/[^-+\dA-Z]/g;function to(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(wI[t]||t||wI.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},f=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},x=function(){return V6e(e)},E=function(){return U6e(e)},k={d:function(){return a()},dd:function(){return Ca(a())},ddd:function(){return Ho.dayNames[s()]},DDD:function(){return CI({y:u(),m:l(),d:a(),_:o(),dayName:Ho.dayNames[s()],short:!0})},dddd:function(){return Ho.dayNames[s()+7]},DDDD:function(){return CI({y:u(),m:l(),d:a(),_:o(),dayName:Ho.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Ca(l()+1)},mmm:function(){return Ho.monthNames[l()]},mmmm:function(){return Ho.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Ca(u(),4)},h:function(){return f()%12||12},hh:function(){return Ca(f()%12||12)},H:function(){return f()},HH:function(){return Ca(f())},M:function(){return p()},MM:function(){return Ca(p())},s:function(){return m()},ss:function(){return Ca(m())},l:function(){return Ca(v(),3)},L:function(){return Ca(Math.floor(v()/10))},t:function(){return f()<12?Ho.timeNames[0]:Ho.timeNames[1]},tt:function(){return f()<12?Ho.timeNames[2]:Ho.timeNames[3]},T:function(){return f()<12?Ho.timeNames[4]:Ho.timeNames[5]},TT:function(){return f()<12?Ho.timeNames[6]:Ho.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":W6e(e)},o:function(){return(b()>0?"-":"+")+Ca(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Ca(Math.floor(Math.abs(b())/60),2)+":"+Ca(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return x()},WW:function(){return Ca(x())},N:function(){return E()}};return t.replace(z6e,function(_){return _ in k?k[_]():_.slice(1,_.length-1)})}var wI={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},Ho={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Ca=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},CI=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,f=new Date;f.setDate(f[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},x=function(){return f[o+"Date"]()},E=function(){return f[o+"Month"]()},k=function(){return f[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},A=function(){return p[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":k()===n&&E()===r&&x()===i?l?"Ysd":"Yesterday":A()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},V6e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},U6e=function(t){var n=t.getDay();return n===0&&(n=7),n},W6e=function(t){return(String(t).match(j6e)||[""]).pop().replace(H6e,"").replace(/GMT\+0000/g,"UTC")};const u8=Nr("socketio/generateImage"),G6e=Nr("socketio/runESRGAN"),q6e=Nr("socketio/runFacetool"),Y6e=Nr("socketio/deleteImage"),c8=Nr("socketio/requestImages"),_I=Nr("socketio/requestNewImages"),K6e=Nr("socketio/cancelProcessing"),X6e=Nr("socketio/requestSystemConfig"),kI=Nr("socketio/searchForModels"),XE=Nr("socketio/addNewModel"),Z6e=Nr("socketio/deleteModel"),BW=Nr("socketio/requestModelChange"),Q6e=Nr("socketio/saveStagingAreaImageToGallery"),J6e=Nr("socketio/requestEmptyTempFolder"),eCe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(aI(!0)),t(_4(Ht.t("common:statusConnected"))),t(X6e());const r=n().gallery;r.categories.result.latest_mtime?t(_I("result")):t(c8("result")),r.categories.user.latest_mtime?t(_I("user")):t(c8("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(aI(!1)),t(_4(Ht.t("common:statusDisconnected"))),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,f={uuid:lg(),...u};if(["txt2img","img2img"].includes(l)&&t(ag({category:"result",image:{...f,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(Pwe({image:{...f,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(ag({image:{...f,category:"result"},category:"result"}))}if(o)switch(zE[a]){case"img2img":{t(C1(f));break}}t(lC()),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(gSe({uuid:lg(),...r,category:"result"})),r.isBase64||t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(ag({category:"result",image:{uuid:lg(),...r,category:"result"}})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Ws(!0)),t(awe(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(eo({timestamp:to(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(sI()),t(lC())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:lg(),...l}));t(pSe({images:s,areMoreImagesAvailable:o,category:a})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(uwe());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(ag({category:"result",image:r})),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(lC())),t(eo({timestamp:to(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(BU(r));const{initialImage:o,maskPath:a}=n().options;(o===i||(o==null?void 0:o.url)===i)&&t(xU()),a===i&&t(EU("")),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(swe(r)),r.infill_methods.includes("patchmatch")||t(kU(r.infill_methods[0]))},onFoundModels:r=>{const{search_folder:i,found_models:o}=r;t(nW(i)),t(rW(o))},onNewModelAdded:r=>{const{new_model_name:i,model_list:o,update:a}=r;t(bb(o)),t(Ws(!1)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Model Added: ${i}`,level:"info"})),t(Rh({title:a?`${Ht.t("modelmanager:modelUpdated")}: ${i}`:`${Ht.t("modelmanager:modelAdded")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelDeleted:r=>{const{deleted_model_name:i,model_list:o}=r;t(bb(o)),t(Ws(!1)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`${Ht.t("modelmanager:modelAdded")}: ${i}`,level:"info"})),t(Rh({title:`${Ht.t("modelmanager:modelEntryDeleted")}: ${i}`,status:"success",duration:2500,isClosable:!0}))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(bb(o)),t(_4(Ht.t("common:statusModelChanged"))),t(Ws(!1)),t(sg(!0)),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(bb(o)),t(Ws(!1)),t(sg(!0)),t(sI()),t(eo({timestamp:to(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(Rh({title:Ht.t("toast:tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},tCe=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],nCe=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],rCe=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],iCe=[{key:"2x",value:2},{key:"4x",value:4}],ZE=0,QE=4294967295,oCe=["gfpgan","codeformer"],aCe=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$W=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);var sCe=Math.PI/180;function lCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const $g=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},gt={_global:$g,version:"8.3.14",isBrowser:lCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return gt.angleDeg?e*sCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return gt.DD.isDragging},isDragReady(){return!!gt.DD.node},releaseCanvasOnDestroy:!0,document:$g.document,_injectGlobal(e){$g.Konva=e}},Cr=e=>{gt[e.prototype.getClassName()]=e};gt._injectGlobal(gt);class Ea{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Ea(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var f=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/f):-Math.acos(r/f)),l.scaleX=s/f,l.scaleY=f,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=he._getRotation(l.rotation),l}}var uCe="[object Array]",cCe="[object Number]",dCe="[object String]",fCe="[object Boolean]",hCe=Math.PI/180,pCe=180/Math.PI,gC="#",gCe="",mCe="0",vCe="Konva warning: ",EI="Konva error: ",yCe="rgb(",mC={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},bCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,kb=[];const SCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},he={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===uCe},_isNumber(e){return Object.prototype.toString.call(e)===cCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===dCe},_isBoolean(e){return Object.prototype.toString.call(e)===fCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){kb.push(e),kb.length===1&&SCe(function(){const t=kb;kb=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=he.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(gC,gCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=mCe+e;return gC+e},getRGB(e){var t;return e in mC?(t=mC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===gC?this._hexToRgb(e.substring(1)):e.substr(0,4)===yCe?(t=bCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",he._namedColorToRBA(e)||he._hex3ColorToRGBA(e)||he._hex6ColorToRGBA(e)||he._rgbColorToRGBA(e)||he._rgbaColorToRGBA(e)||he._hslColorToRGBA(e)},_namedColorToRBA(e){var t=mC[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,f=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,f[p]=l*255;return{r:Math.round(f[0]),g:Math.round(f[1]),b:Math.round(f[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*hCe},radToDeg(e){return e*pCe},_degToRad(e){return he.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),he.degToRad(e)},_radToDeg(e){return he.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),he.radToDeg(e)},_getRotation(e){return gt.angleDeg?he.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(EI+e)},error(e){console.error(EI+e)},warn(e){!gt.showWarnings||console.warn(vCe+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,o){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(u==0)a=e,s=t,l=(i-n)*(i-n)+(o-r)*(o-r);else{var f=((i-e)*(n-e)+(o-t)*(r-t))/u;f<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):f>1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+f*(n-e),s=t+f*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=he.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=he._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],f=l[1],p=l[2];p<i&&(r.x=u,r.y=f,i=p)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],o=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});var s=[];return o.forEach(function(l){var u=he._getProjectionToLine(l,i,n);s.push(u.x),s.push(u.y)}),s},_prepareToStringify(e){var t;e.visitedByCircularReferenceRemoval=!0;for(var n in e)if(!!(e.hasOwnProperty(n)&&e[n]&&typeof e[n]=="object")){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||he._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(he._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){!gt.releaseCanvasOnDestroy||e.forEach(t=>{t.width=0,t.height=0})}};function gf(e){return he._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||he._isBoolean(e)?e:Object.prototype.toString.call(e)}function FW(e){return e>255?255:e<0?0:Math.round(e)}function Ge(){if(gt.isUnminified)return function(e,t){return he._isNumber(e)||he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function zW(e){if(gt.isUnminified)return function(t,n){let r=he._isNumber(t),i=he._isArray(t)&&t.length==e;return!r&&!i&&he.warn(gf(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function JE(){if(gt.isUnminified)return function(e,t){var n=he._isNumber(e),r=e==="auto";return n||r||he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function k1(){if(gt.isUnminified)return function(e,t){return he._isString(e)||he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function jW(){if(gt.isUnminified)return function(e,t){const n=he._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function xCe(){if(gt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(he._isArray(e)?e.forEach(function(r){he._isNumber(r)||he.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function il(){if(gt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||he.warn(gf(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function wCe(e){if(gt.isUnminified)return function(t,n){return t==null||he.isObject(t)||he.warn(gf(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var av="get",sv="set";const ee={addGetterSetter(e,t,n,r,i){ee.addGetter(e,t,n),ee.addSetter(e,t,r,i),ee.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=av+he._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=sv+he._capitalize(t);e.prototype[i]||ee.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=sv+he._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=he._capitalize,s=av+a(t),l=sv+a(t),u,f;e.prototype[s]=function(){var m={};for(u=0;u<o;u++)f=n[u],m[f]=this.getAttr(t+a(f));return m};var p=wCe(n);e.prototype[l]=function(m){var v=this.attrs[t],b;r&&(m=r.call(this,m)),p&&p.call(this,m,t);for(b in m)!m.hasOwnProperty(b)||this._setAttr(t+a(b),m[b]);return m||n.forEach(x=>{this._setAttr(t+a(x),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},ee.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=he._capitalize(t),r=sv+n,i=av+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){he.error("Adding deprecated "+t);var i=av+he._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){he.error(o);var a=this.attrs[t];return a===void 0?n:a},ee.addSetter(e,t,r,function(){he.error(o)}),ee.addOverloadedGetterSetter(e,t)},backCompat(e,t){he.each(t,function(n,r){var i=e.prototype[r],o=av+he._capitalize(n),a=sv+he._capitalize(n);function s(){i.apply(this,arguments),he.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function CCe(e){var t=[],n=e.length,r=he,i,o;for(i=0;i<n;i++)o=e[i],r._isNumber(o)?o=Math.round(o*1e3)/1e3:r._isString(o)||(o=o+""),t.push(o);return t}var PI=",",_Ce="(",kCe=")",ECe="([",PCe="])",TCe=";",LCe="()",ACe="=",TI=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],OCe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const MCe=100;class wx{constructor(t){this.canvas=t,gt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,i=r.length,o="",a,s,l,u;for(a=0;a<i;a++)s=r[a],l=s.method,l?(u=s.args,o+=l,t?o+=LCe:he._isArray(u[0])?o+=ECe+u.join(PI)+PCe:(n&&(u=u.map(f=>typeof f=="number"?Math.floor(f):f)),o+=_Ce+u.join(PI)+kCe)):(o+=s.property,t||(o+=ACe+s.val)),o+=TCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=MCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,i,o):f.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=TI.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=CCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i<n;i++)a(TI[i]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],l=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:s,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}OCe.forEach(function(e){Object.defineProperty(wx.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class RCe extends wx{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){var n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){var n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}var i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}var o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}var a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){var n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=t.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,i,o=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),f=l.x*u,p=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",s.x*f),this.setAttr("shadowOffsetY",s.y*p)}}class ICe extends wx{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var n=t.getStrokeScaleEnabled();if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),o=i==="auto"?t.strokeWidth():i;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),n||this.restore()}}}var Eb;function DCe(){if(Eb)return Eb;var e=he.createCanvasElement(),t=e.getContext("2d");return Eb=function(){var n=gt._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),he.releaseCanvas(e),Eb}class Cx{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||gt.pixelRatio||DCe();this.pixelRatio=r,this._canvas=he.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(i){return he.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}ee.addGetterSetter(Cx,"pixelRatio",void 0,Ge());class Fg extends Cx{constructor(t={width:0,height:0}){super(t),this.context=new RCe(this),this.setSize(t.width,t.height)}}class eP extends Cx{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new ICe(this),this.setSize(t.width,t.height)}}const yn={get isDragging(){var e=!1;return yn._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return yn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];yn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=he._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];yn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(yn.justDragged=!0,gt._mouseListenClick=!1,gt._touchListenClick=!1,gt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof gt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){yn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&yn._dragElements.delete(n)})}};gt.isBrowser&&(window.addEventListener("mouseup",yn._endDragBefore,!0),window.addEventListener("touchend",yn._endDragBefore,!0),window.addEventListener("mousemove",yn._drag),window.addEventListener("touchmove",yn._drag),window.addEventListener("mouseup",yn._endDragAfter,!1),window.addEventListener("touchend",yn._endDragAfter,!1));var T4="absoluteOpacity",Pb="allEventListeners",Uu="absoluteTransform",LI="absoluteScale",dh="canvas",NCe="Change",BCe="children",$Ce="konva",d8="listening",AI="mouseenter",OI="mouseleave",MI="set",RI="Shape",L4=" ",II="stage",md="transform",FCe="Stage",f8="visible",zCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(L4);let jCe=1;class qe{constructor(t){this._id=jCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===md||t===Uu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===md||t===Uu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(L4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(dh)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Uu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(dh)){const{scene:t,filter:n,hit:r}=this._cache.get(dh);he.releaseCanvas(t,n,r),this._cache.delete(dh)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){he.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new Fg({pixelRatio:a,width:i,height:o}),v=new Fg({pixelRatio:a,width:0,height:0}),b=new eP({pixelRatio:p,width:i,height:o}),x=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(dh),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),x.save(),E.save(),x.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(T4),this._clearSelfAndDescendantCache(LI),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,x.restore(),E.restore(),f&&(x.save(),x.beginPath(),x.rect(0,0,i,o),x.closePath(),x.setAttr("strokeStyle","red"),x.setAttr("lineWidth",5),x.stroke(),x.restore()),this._cache.set(dh,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(dh)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var f=l.point(u);i===void 0&&(i=a=f.x,o=s=f.y),i=Math.min(i,f.x),o=Math.min(o,f.y),a=Math.max(a,f.x),s=Math.max(s,f.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<a;l++){if(u=t[l],typeof u!="function"){he.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,s),o.putImageData(s,0,0)}}catch(p){he.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,n){if(this._cache&&this._cache.delete(Pb),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(L4),i=r.length,o,a,s,l,u;for(o=0;o<i;o++)a=r[o],s=a.split("."),l=s[0],u=s[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(L4),i=r.length,o,a,s,l,u,f;if(this._cache&&this._cache.delete(Pb),!t)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=r[o],l=s.split("."),u=l[0],f=l[1],u)this.eventListeners[u]&&this._off(u,f,n);else for(a in this.eventListeners)this._off(a,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var i=this;this.on(t,function(o){for(var a=o.target.findAncestors(n,!0,i),s=0;s<a.length;s++)o=he.cloneObject(o),o.currentTarget=a[s],r.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),yn._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Uu),this._clearSelfAndDescendantCache(T4),this._clearSelfAndDescendantCache(LI),this._clearSelfAndDescendantCache(II),this._clearSelfAndDescendantCache(f8),this._clearSelfAndDescendantCache(d8)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+he._capitalize(t);return he._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==BCe&&(r=MI+he._capitalize(n),he._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(d8,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(f8,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;yn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!gt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a<o;a++)s=u[a],r++,s.nodeType!==RI&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==FCe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(md),this._clearSelfAndDescendantCache(Uu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new Ea,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(md);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(md),this._clearSelfAndDescendantCache(Uu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a<o;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return he.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return he.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return he.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return he.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return he.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&he.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(T4,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=he.isObject(i)&&!he._isPlainObject(i)&&!he._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),he._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i<r;i++)if(o=n[i],he.isValidSelector(o)||(he.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),he.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),he.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(II,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Uu,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new Ea,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?n.multiply(i.getTransform()):o==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),n;n=this._cache.get(Uu)||new Ea,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(i-a,o-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(md,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(md)||new Ea;r.reset();var i=this.x(),o=this.y(),a=gt.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,m=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),a!==0&&r.rotate(a),(u!==0||f!==0)&&r.skew(u,f),(s!==1||l!==1)&&r.scale(s,l),(p!==0||m!==0)&&r.translate(-1*p,-1*m),r.dirty=!1,r}clone(t){var n=he.cloneObject(this.attrs),r,i,o,a,s;for(r in t)n[r]=t[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf($Ce)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(n.x),o=t.y!==void 0?t.y:Math.floor(n.y),a=t.pixelRatio||1,s=new Fg({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:a}),l=s.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,he._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():gt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||n==="konva")&&(!n||a===n)&&(!r||r===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+NCe,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[MI+he._capitalize(t)];return he._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(gt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!he.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,n,r){n&&this.nodeType===RI&&(n.target=this);var i=(t===AI||t===OI)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===AI||t===OI)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!o&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){let n=this._cache.get(Pb);if(!n){n={};let i=Object.getPrototypeOf(this);for(;i;){if(!i.eventListeners){i=Object.getPrototypeOf(i);continue}for(var r in i.eventListeners){const o=i.eventListeners[r],a=n[r]||[];n[r]=o.concat(a)}i=Object.getPrototypeOf(i)}this._cache.set(Pb,n)}return n[t]}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const o=this.eventListeners[t];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition(),o=r._getPointerById(n)||r._changedPointerPositions[0]||i;yn._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){yn._dragElements.has(this._id)||this._createDragElement(t);const r=yn._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(!!r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,t);a?i=a:he.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const n=yn._dragElements.get(this._id);n&&(n.dragStatus="stopped"),yn._endDragBefore(t),yn._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=yn._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||gt.dragButtons.indexOf(t.evt.button)>=0;if(!!r&&!this.isDragging()){var i=!1;yn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=yn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&yn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return he.haveIntersection(r,this.getClientRect())}static create(t,n){return he._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=qe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),gt[r]||(he.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=gt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(qe._createNode(i[s]));return o}}qe.prototype.nodeType="Node";qe.prototype._attrsAffectingSize=[];qe.prototype.eventListeners={};qe.prototype.on.call(qe.prototype,zCe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(md),this._clearSelfAndDescendantCache(Uu)});qe.prototype.on.call(qe.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(f8)});qe.prototype.on.call(qe.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(d8)});qe.prototype.on.call(qe.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(T4)});const qn=ee.addGetterSetter;qn(qe,"zIndex");qn(qe,"absolutePosition");qn(qe,"position");qn(qe,"x",0,Ge());qn(qe,"y",0,Ge());qn(qe,"globalCompositeOperation","source-over",k1());qn(qe,"opacity",1,Ge());qn(qe,"name","",k1());qn(qe,"id","",k1());qn(qe,"rotation",0,Ge());ee.addComponentsGetterSetter(qe,"scale",["x","y"]);qn(qe,"scaleX",1,Ge());qn(qe,"scaleY",1,Ge());ee.addComponentsGetterSetter(qe,"skew",["x","y"]);qn(qe,"skewX",0,Ge());qn(qe,"skewY",0,Ge());ee.addComponentsGetterSetter(qe,"offset",["x","y"]);qn(qe,"offsetX",0,Ge());qn(qe,"offsetY",0,Ge());qn(qe,"dragDistance",null,Ge());qn(qe,"width",0,Ge());qn(qe,"height",0,Ge());qn(qe,"listening",!0,il());qn(qe,"preventDefault",!0,il());qn(qe,"filters",null,function(e){return this._filterUpToDate=!1,e});qn(qe,"visible",!0,il());qn(qe,"transformsEnabled","all",k1());qn(qe,"size");qn(qe,"dragBoundFunc");qn(qe,"draggable",!1,il());ee.backCompat(qe,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Oa extends qe{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}var r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=qe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=qe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const f=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),b=this.clipY();o.rect(v,b,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var x=!f&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),x&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(x){if(!!x.visible()){var E=x.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;v<p.length;v++){var b=p[v];if(b._isVisible(this)){m=!0;break}}return m&&o!==void 0?u={x:o,y:a,width:s-o,height:l-a}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}ee.addComponentsGetterSetter(Oa,"clip",["x","y","width","height"]);ee.addGetterSetter(Oa,"clipX",void 0,Ge());ee.addGetterSetter(Oa,"clipY",void 0,Ge());ee.addGetterSetter(Oa,"clipWidth",void 0,Ge());ee.addGetterSetter(Oa,"clipHeight",void 0,Ge());ee.addGetterSetter(Oa,"clipFunc");const Q2=new Map,HW=gt._global.PointerEvent!==void 0;function vC(e){return Q2.get(e)}function tP(e){return{evt:e,pointerId:e.pointerId}}function VW(e,t){return Q2.get(e)===t}function UW(e,t){n2(e),t.getStage()&&(Q2.set(e,t),HW&&t._fire("gotpointercapture",tP(new PointerEvent("gotpointercapture"))))}function n2(e,t){const n=Q2.get(e);if(!n)return;const r=n.getStage();r&&r.content,Q2.delete(e),HW&&n._fire("lostpointercapture",tP(new PointerEvent("lostpointercapture")))}var HCe="Stage",VCe="string",DI="px",UCe="mouseout",WW="mouseleave",GW="mouseover",qW="mouseenter",YW="mousemove",KW="mousedown",XW="mouseup",Ev="pointermove",Pv="pointerdown",ug="pointerup",Tv="pointercancel",WCe="lostpointercapture",Tb="pointerout",Lb="pointerleave",Ab="pointerover",Ob="pointerenter",h8="contextmenu",ZW="touchstart",QW="touchend",JW="touchmove",eG="touchcancel",p8="wheel",GCe=5,qCe=[[qW,"_pointerenter"],[KW,"_pointerdown"],[YW,"_pointermove"],[XW,"_pointerup"],[WW,"_pointerleave"],[ZW,"_pointerdown"],[JW,"_pointermove"],[QW,"_pointerup"],[eG,"_pointercancel"],[GW,"_pointerover"],[p8,"_wheel"],[h8,"_contextmenu"],[Pv,"_pointerdown"],[Ev,"_pointermove"],[ug,"_pointerup"],[Tv,"_pointercancel"],[WCe,"_lostpointercapture"]];const yC={mouse:{[Tb]:UCe,[Lb]:WW,[Ab]:GW,[Ob]:qW,[Ev]:YW,[Pv]:KW,[ug]:XW,[Tv]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Tb]:"touchout",[Lb]:"touchleave",[Ab]:"touchover",[Ob]:"touchenter",[Ev]:JW,[Pv]:ZW,[ug]:QW,[Tv]:eG,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Tb]:Tb,[Lb]:Lb,[Ab]:Ab,[Ob]:Ob,[Ev]:Ev,[Pv]:Pv,[ug]:ug,[Tv]:Tv,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Lv=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",I0=e=>{const t=Lv(e);if(t==="pointer")return gt.pointerEventsEnabled&&yC.pointer;if(t==="touch")return yC.touch;if(t==="mouse")return yC.mouse};function NI(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&he.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const YCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",A4=[];class _x extends Oa{constructor(t){super(NI(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),A4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{NI(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||he.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===VCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r<n;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Oa.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&he._isInDocument(t)&&this.container().removeChild(t);var n=A4.indexOf(this);return n>-1&&A4.splice(n,1),he.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(he.warn(YCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new Fg({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+DI,this.content.style.height=n+DI),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(t);var i=this.children.length;return i>GCe&&he.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),gt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return VW(t,this)}setPointerCapture(t){UW(t,this)}releaseCapture(t){n2(t)}getLayers(){return this.children}_bindContentEvents(){!gt.isBrowser||qCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=I0(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=I0(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=I0(t.type),r=Lv(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!yn.isDragging||gt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=I0(t.type),r=Lv(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(yn.justDragged=!1,gt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;gt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=I0(t.type),r=Lv(t.type);if(!n)return;yn.isDragging&&yn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!yn.isDragging||gt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=vC(l.id)||this.getIntersection(l),f=l.id,p={evt:t,pointerId:f};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:f}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=I0(t.type),r=Lv(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=vC(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const f=l.id,p={evt:t,pointerId:f};let m=!1;gt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):yn.justDragged||(gt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){gt["_"+r+"InDblClickWindow"]=!1},gt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),gt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,gt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:f}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:f}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),gt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(h8,{evt:t}):this._fire(h8,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(p8,{evt:t}):this._fire(p8,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=vC(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(ug,tP(t)),n2(t.pointerId)}_lostpointercapture(t){n2(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:he._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:he._getFirstPointerId(t)}])}_setPointerPosition(t){he.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Fg({width:this.width(),height:this.height()}),this.bufferHitCanvas=new eP({pixelRatio:1,width:this.width(),height:this.height()}),!!gt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return he.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}_x.prototype.nodeType=HCe;Cr(_x);ee.addGetterSetter(_x,"container");var tG="hasShadow",nG="shadowRGBA",rG="patternImage",iG="linearGradient",oG="radialGradient";let Mb;function bC(){return Mb||(Mb=he.createCanvasElement().getContext("2d"),Mb)}const r2={};function KCe(e){e.fill()}function XCe(e){e.stroke()}function ZCe(e){e.fill()}function QCe(e){e.stroke()}function JCe(){this._clearCache(tG)}function e7e(){this._clearCache(nG)}function t7e(){this._clearCache(rG)}function n7e(){this._clearCache(iG)}function r7e(){this._clearCache(oG)}class $e extends qe{constructor(t){super(t);let n;for(;n=he.getRandomColor(),!(n&&!(n in r2)););this.colorKey=n,r2[n]=this}getContext(){return he.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return he.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(tG,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(rG,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=bC();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new Ea;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(gt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(iG,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=bC(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}_getRadialGradient(){return this._getCache(oG,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=bC(),r=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),o=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}getShadowRGBA(){return this._getCache(nG,this._getShadowRGBA)}_getShadowRGBA(){if(!!this.hasShadow()){var t=he.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return qe.prototype.destroy.call(this),delete r2[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){he.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),f=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(f),v=l+Math.abs(p),b=u&&this.shadowBlur()||0,x=m+b*2,E=v+b*2,k={width:x,height:E,x:-(a/2+b)+Math.min(f,0)+i.x,y:-(a/2+b)+Math.min(p,0)+i.y};return n?k:this._transformedRect(k,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,f,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var b=this.getAbsoluteTransform(n).getMatrix();return o.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),f=u.bufferCanvas,p=f.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var x=this.getAbsoluteTransform(n).getMatrix();p.transform(x[0],x[1],x[2],x[3],x[4],x[5]),s.call(this,p,this),p.restore();var E=f.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(f._canvas,0,0,f.width/E,f.height/E)}else{if(o._applyLineJoin(this),!v){var x=this.getAbsoluteTransform(n).getMatrix();o.transform(x[0],x[1],x[2],x[3],x[4],x[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||he.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var f=this.getAbsoluteTransform(n).getMatrix();return a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,f,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,f=u.length,p=he._hexToRgb(this.colorKey),m=0;m<f;m+=4)v=u[m+3],v>t?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){he.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return VW(t,this)}setPointerCapture(t){UW(t,this)}releaseCapture(t){n2(t)}}$e.prototype._fillFunc=KCe;$e.prototype._strokeFunc=XCe;$e.prototype._fillFuncHit=ZCe;$e.prototype._strokeFuncHit=QCe;$e.prototype._centroid=!1;$e.prototype.nodeType="Shape";Cr($e);$e.prototype.eventListeners={};$e.prototype.on.call($e.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",JCe);$e.prototype.on.call($e.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",e7e);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",t7e);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",n7e);$e.prototype.on.call($e.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",r7e);ee.addGetterSetter($e,"stroke",void 0,jW());ee.addGetterSetter($e,"strokeWidth",2,Ge());ee.addGetterSetter($e,"fillAfterStrokeEnabled",!1);ee.addGetterSetter($e,"hitStrokeWidth","auto",JE());ee.addGetterSetter($e,"strokeHitEnabled",!0,il());ee.addGetterSetter($e,"perfectDrawEnabled",!0,il());ee.addGetterSetter($e,"shadowForStrokeEnabled",!0,il());ee.addGetterSetter($e,"lineJoin");ee.addGetterSetter($e,"lineCap");ee.addGetterSetter($e,"sceneFunc");ee.addGetterSetter($e,"hitFunc");ee.addGetterSetter($e,"dash");ee.addGetterSetter($e,"dashOffset",0,Ge());ee.addGetterSetter($e,"shadowColor",void 0,k1());ee.addGetterSetter($e,"shadowBlur",0,Ge());ee.addGetterSetter($e,"shadowOpacity",1,Ge());ee.addComponentsGetterSetter($e,"shadowOffset",["x","y"]);ee.addGetterSetter($e,"shadowOffsetX",0,Ge());ee.addGetterSetter($e,"shadowOffsetY",0,Ge());ee.addGetterSetter($e,"fillPatternImage");ee.addGetterSetter($e,"fill",void 0,jW());ee.addGetterSetter($e,"fillPatternX",0,Ge());ee.addGetterSetter($e,"fillPatternY",0,Ge());ee.addGetterSetter($e,"fillLinearGradientColorStops");ee.addGetterSetter($e,"strokeLinearGradientColorStops");ee.addGetterSetter($e,"fillRadialGradientStartRadius",0);ee.addGetterSetter($e,"fillRadialGradientEndRadius",0);ee.addGetterSetter($e,"fillRadialGradientColorStops");ee.addGetterSetter($e,"fillPatternRepeat","repeat");ee.addGetterSetter($e,"fillEnabled",!0);ee.addGetterSetter($e,"strokeEnabled",!0);ee.addGetterSetter($e,"shadowEnabled",!0);ee.addGetterSetter($e,"dashEnabled",!0);ee.addGetterSetter($e,"strokeScaleEnabled",!0);ee.addGetterSetter($e,"fillPriority","color");ee.addComponentsGetterSetter($e,"fillPatternOffset",["x","y"]);ee.addGetterSetter($e,"fillPatternOffsetX",0,Ge());ee.addGetterSetter($e,"fillPatternOffsetY",0,Ge());ee.addComponentsGetterSetter($e,"fillPatternScale",["x","y"]);ee.addGetterSetter($e,"fillPatternScaleX",1,Ge());ee.addGetterSetter($e,"fillPatternScaleY",1,Ge());ee.addComponentsGetterSetter($e,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter($e,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter($e,"fillLinearGradientStartPointX",0);ee.addGetterSetter($e,"strokeLinearGradientStartPointX",0);ee.addGetterSetter($e,"fillLinearGradientStartPointY",0);ee.addGetterSetter($e,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter($e,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter($e,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter($e,"fillLinearGradientEndPointX",0);ee.addGetterSetter($e,"strokeLinearGradientEndPointX",0);ee.addGetterSetter($e,"fillLinearGradientEndPointY",0);ee.addGetterSetter($e,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter($e,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter($e,"fillRadialGradientStartPointX",0);ee.addGetterSetter($e,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter($e,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter($e,"fillRadialGradientEndPointX",0);ee.addGetterSetter($e,"fillRadialGradientEndPointY",0);ee.addGetterSetter($e,"fillPatternRotation",0);ee.backCompat($e,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var i7e="#",o7e="beforeDraw",a7e="draw",aG=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],s7e=aG.length;class hp extends Oa{constructor(t){super(t),this.canvas=new Fg,this.hitCanvas=new eP({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){qe.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=qe.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(qe.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(qe.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return qe.prototype.remove.call(this),t&&t.parentNode&&he._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&he.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),qe.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){he.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){he.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,he.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<s7e;i++){const o=aG[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=he._rgbToHex(r[0],r[1],r[2]),a=r2[i7e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(o7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Oa.prototype.drawScene.call(this,i,n),this._fire(a7e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Oa.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){he.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return he.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return he.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}hp.prototype.nodeType="Layer";Cr(hp);ee.addGetterSetter(hp,"imageSmoothingEnabled",!0);ee.addGetterSetter(hp,"clearBeforeDraw",!0);ee.addGetterSetter(hp,"hitGraphEnabled",!0,il());class nP extends hp{constructor(t){super(t),this.listening(!1),he.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}nP.prototype.nodeType="FastLayer";Cr(nP);class n1 extends Oa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&he.throw("You may only add groups and shapes to groups.")}}n1.prototype.nodeType="Group";Cr(n1);var SC=function(){return $g.performance&&$g.performance.now?function(){return $g.performance.now()}:function(){return new Date().getTime()}}();class ns{constructor(t,n){this.id=ns.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:SC(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;i<r;i++)if(n[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=ns,n=t.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=SC(),ns._addAnimation(this),this}stop(){return ns._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,i=r.length,o;for(o=0;o<i;o++)if(r[o].id===n){this.animations.splice(o,1);break}}static _runFrames(){var t={},n=this.animations,r,i,o,a,s,l,u,f,p;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(SC()),l=i.length,o?p=o.call(r,r.frame)!==!1:p=!0,!!p)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(f in t)!t.hasOwnProperty(f)||t[f].batchDraw()}static _animationLoop(){var t=ns;t.animations.length?(t._runFrames(),he.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,he.requestAnimFrame(this._animationLoop))}}ns.animations=[];ns.animIdCounter=0;ns.animRunning=!1;var l7e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},u7e=1,BI=2,$I=3,c7e=0,FI=["fill","stroke","shadowColor"];class d7e{constructor(t,n,r,i,o,a,s){this.prop=t,this.propFunc=n,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=o-this.begin,this.pause()}fire(t){var n=this[t];n&&n()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=BI,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$I,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===BI?this.setTime(t):this.state===$I&&this.setTime(this.duration-t)}pause(){this.state=u7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Wr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||i2.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=c7e++;var u=r.getLayer()||(r instanceof gt.Stage?r.getLayers():null);u||he.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new ns(function(){n.tween.onEnterFrame()},u),this.tween=new d7e(l,function(f){n._tweenFunc(f)},a,0,1,o*1e3,s),this._addListeners(),Wr.attrs[i]||(Wr.attrs[i]={}),Wr.attrs[i][this._id]||(Wr.attrs[i][this._id]={}),Wr.tweens[i]||(Wr.tweens[i]={});for(l in t)l7e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,f,p,m;if(s=Wr.tweens[i][t],s&&delete Wr.attrs[i][s][t],o=r.getAttr(t),he._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=he._prepareArrayForTween(o,n,r.closed())):(f=n,n=he._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l<u;l++)if(l%2===0)a.push(n[l]-o[l]);else{var v=he.colorToRGBA(o[l]);m=he.colorToRGBA(n[l]),o[l]=v,a.push({r:m.r-v.r,g:m.g-v.g,b:m.b-v.b,a:m.a-v.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else FI.indexOf(t)!==-1?(o=he.colorToRGBA(o),m=he.colorToRGBA(n),a={r:m.r-o.r,g:m.g-o.g,b:m.b-o.b,a:m.a-o.a}):a=n-o;Wr.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:f,trueStart:p},Wr.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=Wr.attrs[n._id][this._id],i,o,a,s,l,u,f,p;for(i in r){if(o=r[i],a=o.start,s=o.diff,p=o.end,he._isArray(a))if(l=[],f=Math.max(a.length,p.length),i.indexOf("fill")===0)for(u=0;u<f;u++)u%2===0?l.push((a[u]||0)+s[u]*t):l.push("rgba("+Math.round(a[u].r+s[u].r*t)+","+Math.round(a[u].g+s[u].g*t)+","+Math.round(a[u].b+s[u].b*t)+","+(a[u].a+s[u].a*t)+")");else for(u=0;u<f;u++)l.push((a[u]||0)+s[u]*t);else FI.indexOf(i)!==-1?l="rgba("+Math.round(a.r+s.r*t)+","+Math.round(a.g+s.g*t)+","+Math.round(a.b+s.b*t)+","+(a.a+s.a*t)+")":l=a+s*t;n.setAttr(i,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Wr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Wr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Wr.tweens[t],i;this.pause();for(i in r)delete Wr.tweens[t][i];delete Wr.attrs[t][n]}}Wr.attrs={};Wr.tweens={};qe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Wr(e);n.play()};const i2={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t)},ElasticEaseOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/o)+n+t)},ElasticEaseInOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r/2)===2?t+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-i2.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?i2.BounceEaseIn(e*2,0,n,r)*.5+t:i2.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},rp=he._assign(gt,{Util:he,Transform:Ea,Node:qe,Container:Oa,Stage:_x,stages:A4,Layer:hp,FastLayer:nP,Group:n1,DD:yn,Shape:$e,shapes:r2,Animation:ns,Tween:Wr,Easings:i2,Context:wx,Canvas:Cx});class gc extends $e{_sceneFunc(t){var n=gt.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,n,r),t.arc(0,0,this.innerRadius(),n,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=gt.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),u=o*(o>0?t:n),f=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:f-u,height:m-p}}}gc.prototype._centroid=!0;gc.prototype.className="Arc";gc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Cr(gc);ee.addGetterSetter(gc,"innerRadius",0,Ge());ee.addGetterSetter(gc,"outerRadius",0,Ge());ee.addGetterSetter(gc,"angle",0,Ge());ee.addGetterSetter(gc,"clockwise",!1,il());function g8(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),f=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+f*(i-e),b=r+f*(o-t);return[p,m,v,b]}function zI(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=g8(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(o[0])&&(r.push(o[0]),r.push(o[1]),r.push(e[i]),r.push(e[i+1]),r.push(o[2]),r.push(o[3]));return r}class mc extends $e{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,l,u;if(!!r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u<l-2;)t.bezierCurveTo(s[u++],s[u++],s[u++],s[u++],s[u++],s[u++]);o||t.quadraticCurveTo(s[l-2],s[l-1],n[r-2],n[r-1])}else if(a)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);o?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():zI(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=g8(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=g8(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=zI(t,r),s=[i[2],i[3]].concat(a).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);return{x:n,y:i,width:r-n,height:o-i}}}mc.prototype.className="Line";mc.prototype._attrsAffectingSize=["points","bezier","tension"];Cr(mc);ee.addGetterSetter(mc,"closed",!1);ee.addGetterSetter(mc,"bezier",!1);ee.addGetterSetter(mc,"tension",0,Ge());ee.addGetterSetter(mc,"points",[],xCe());class zn extends $e{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=zn.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=zn.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,a=n[i].points;switch(o){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],l=a[1],u=a[2],f=a[3],p=a[4],m=a[5],v=a[6],b=a[7],x=u>f?u:f,E=u>f?1:u/f,k=u>f?f/u:1;t.translate(s,l),t.rotate(v),t.scale(E,k),t.arc(0,0,x,p,p+m,1-b),t.scale(1/E,1/k),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var f=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(f-m)<v&&(v=Math.abs(f-m)),p<0)for(let b=f-v;b>m;b-=v){const x=zn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(x.x,x.y)}else for(let b=f+v;b<m;b+=v){const x=zn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(x.x,x.y)}}else if(u.command==="C")for(let b=0;b<=1;b+=.01){const x=zn.getPointOnCubicBezier(b,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(x.x,x.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],isNaN(a)||(n=Math.min(n,a),r=Math.max(r,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return zn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return zn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return zn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],f=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,zn.getPointOnEllipticalArc(s,l,u,f,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var f=l*u,p;if(i===n)p={x:a,y:s+f};else if((s-r)/(a-n+1e-8)===l)p={x:a+u,y:s+f};else{var m,v,b=this.getLineLength(n,r,i,o),x=(a-n)*(i-n)+(s-r)*(o-r);x=x/(b*b),m=n+x*(i-n),v=r+x*(o-r);var E=this.getLineLength(a,s,m,v),k=Math.sqrt(t*t-E*E);u=Math.sqrt(k*k/(1+l*l)),i<n&&(u*=-1),f=l*u,p={x:m+u,y:v+f}}return p}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function f(E){return E*E*E}function p(E){return 3*E*E*(1-E)}function m(E){return 3*E*(1-E)*(1-E)}function v(E){return(1-E)*(1-E)*(1-E)}var b=l*f(t)+a*p(t)+i*m(t)+n*v(t),x=u*f(t)+s*p(t)+o*m(t)+r*v(t);return{x:b,y:x}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(v){return v*v}function u(v){return 2*v*(1-v)}function f(v){return(1-v)*(1-v)}var p=a*l(t)+i*u(t)+n*f(t),m=s*l(t)+o*u(t)+r*f(t);return{x:p,y:m}}static getPointOnEllipticalArc(t,n,r,i,o,a){var s=Math.cos(a),l=Math.sin(a),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*s-u.y*l),y:n+(u.x*l+u.y*s)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var o=n.split("|"),a=[],s=[],l=0,u=0,f=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(i=1;i<o.length;i++){var m=o[i],v=m.charAt(0);for(m=m.slice(1),s.length=0;p=f.exec(m);)s.push(p[0]);for(var b=[],x=0,E=s.length;x<E;x++){if(s[x]==="00"){b.push(0,0);continue}var k=parseFloat(s[x]);isNaN(k)?b.push(0):b.push(k)}for(;b.length>0&&!isNaN(b[0]);){var _=null,T=[],A=l,R=u,I,D,B,z,j,Y,te,G,$,V;switch(v){case"l":l+=b.shift(),u+=b.shift(),_="L",T.push(l,u);break;case"L":l=b.shift(),u=b.shift(),T.push(l,u);break;case"m":var J=b.shift(),Z=b.shift();if(l+=J,u+=Z,_="M",a.length>2&&a[a.length-1].command==="z"){for(var U=a.length-2;U>=0;U--)if(a[U].command==="M"){l=a[U].points[0]+J,u=a[U].points[1]+Z;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),_="L",T.push(l,u);break;case"H":l=b.shift(),_="L",T.push(l,u);break;case"v":u+=b.shift(),_="L",T.push(l,u);break;case"V":u=b.shift(),_="L",T.push(l,u);break;case"C":T.push(b.shift(),b.shift(),b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"c":T.push(l+b.shift(),u+b.shift(),l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="C",T.push(l,u);break;case"S":D=l,B=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),B=u+(u-I.points[3])),T.push(D,B,b.shift(),b.shift()),l=b.shift(),u=b.shift(),_="C",T.push(l,u);break;case"s":D=l,B=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),B=u+(u-I.points[3])),T.push(D,B,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="C",T.push(l,u);break;case"Q":T.push(b.shift(),b.shift()),l=b.shift(),u=b.shift(),T.push(l,u);break;case"q":T.push(l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),_="Q",T.push(l,u);break;case"T":D=l,B=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),B=u+(u-I.points[1])),l=b.shift(),u=b.shift(),_="Q",T.push(D,B,l,u);break;case"t":D=l,B=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),B=u+(u-I.points[1])),l+=b.shift(),u+=b.shift(),_="Q",T.push(D,B,l,u);break;case"A":z=b.shift(),j=b.shift(),Y=b.shift(),te=b.shift(),G=b.shift(),$=l,V=u,l=b.shift(),u=b.shift(),_="A",T=this.convertEndpointToCenterParameterization($,V,l,u,te,G,z,j,Y);break;case"a":z=b.shift(),j=b.shift(),Y=b.shift(),te=b.shift(),G=b.shift(),$=l,V=u,l+=b.shift(),u+=b.shift(),_="A",T=this.convertEndpointToCenterParameterization($,V,l,u,te,G,z,j,Y);break}a.push({command:_||v,points:T,start:{x:A,y:R},pathLength:this.calcLength(A,R,_||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=zn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var f=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(f-m)<v&&(v=Math.abs(f-m)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),p<0)for(l=f-v;l>m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=f+v;l<m;l+=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],m,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,a,s,l,u){var f=u*(Math.PI/180),p=Math.cos(f)*(t-r)/2+Math.sin(f)*(n-i)/2,m=-1*Math.sin(f)*(t-r)/2+Math.cos(f)*(n-i)/2,v=p*p/(s*s)+m*m/(l*l);v>1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(b*=-1),isNaN(b)&&(b=0);var x=b*s*m/l,E=b*-l*p/s,k=(t+r)/2+Math.cos(f)*x-Math.sin(f)*E,_=(n+i)/2+Math.sin(f)*x+Math.cos(f)*E,T=function(j){return Math.sqrt(j[0]*j[0]+j[1]*j[1])},A=function(j,Y){return(j[0]*Y[0]+j[1]*Y[1])/(T(j)*T(Y))},R=function(j,Y){return(j[0]*Y[1]<j[1]*Y[0]?-1:1)*Math.acos(A(j,Y))},I=R([1,0],[(p-x)/s,(m-E)/l]),D=[(p-x)/s,(m-E)/l],B=[(-1*p-x)/s,(-1*m-E)/l],z=R(D,B);return A(D,B)<=-1&&(z=Math.PI),A(D,B)>=1&&(z=0),a===0&&z>0&&(z=z-2*Math.PI),a===1&&z<0&&(z=z+2*Math.PI),[k,_,s,l,I,z,f,a]}}zn.prototype.className="Path";zn.prototype._attrsAffectingSize=["data"];Cr(zn);ee.addGetterSetter(zn,"data");class pp extends mc{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=zn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=zn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-b.x,u=r[s-1]-b.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var f=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(f),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}pp.prototype.className="Arrow";Cr(pp);ee.addGetterSetter(pp,"pointerLength",10,Ge());ee.addGetterSetter(pp,"pointerWidth",10,Ge());ee.addGetterSetter(pp,"pointerAtBeginning",!1);ee.addGetterSetter(pp,"pointerAtEnding",!0);class E1 extends $e{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}E1.prototype._centroid=!0;E1.prototype.className="Circle";E1.prototype._attrsAffectingSize=["radius"];Cr(E1);ee.addGetterSetter(E1,"radius",0,Ge());class mf extends $e{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}mf.prototype.className="Ellipse";mf.prototype._centroid=!0;mf.prototype._attrsAffectingSize=["radiusX","radiusY"];Cr(mf);ee.addComponentsGetterSetter(mf,"radius",["x","y"]);ee.addGetterSetter(mf,"radiusX",0,Ge());ee.addGetterSetter(mf,"radiusY",0,Ge());class ol extends $e{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=he.createImageElement();i.onload=function(){var o=new ol({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}ol.prototype.className="Image";Cr(ol);ee.addGetterSetter(ol,"image");ee.addComponentsGetterSetter(ol,"crop",["x","y","width","height"]);ee.addGetterSetter(ol,"cropX",0,Ge());ee.addGetterSetter(ol,"cropY",0,Ge());ee.addGetterSetter(ol,"cropWidth",0,Ge());ee.addGetterSetter(ol,"cropHeight",0,Ge());var sG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],f7e="Change.konva",h7e="none",m8="up",v8="right",y8="down",b8="left",p7e=sG.length;class rP extends n1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r<p7e;r++)t.on(sG[r]+f7e,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,a,s,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),a=n.pointerWidth(),u=n.pointerHeight(),s=0,l=0,o){case m8:s=r/2,l=-1*u;break;case v8:s=r+a,l=i/2;break;case y8:s=r/2,l=i+u;break;case b8:s=-1*a,l=i/2;break}n.setAttrs({x:-1*s,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*s,y:-1*l})}}}rP.prototype.className="Label";Cr(rP);class gp extends $e{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let l=0,u=0,f=0,p=0;typeof s=="number"?l=u=f=p=Math.min(s,n/2,r/2):(l=Math.min(s[0]||0,n/2,r/2),u=Math.min(s[1]||0,n/2,r/2),p=Math.min(s[2]||0,n/2,r/2),f=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===m8&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*a),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===v8&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-p),t.arc(n-p,r-p,p,0,Math.PI/2,!1),i===y8&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(f,r),t.arc(f,r-f,f,Math.PI/2,Math.PI,!1),i===b8&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===m8?(n-=i,s+=i):o===y8?s+=i:o===b8?(t-=r*1.5,a+=r):o===v8&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}gp.prototype.className="Tag";Cr(gp);ee.addGetterSetter(gp,"pointerDirection",h7e);ee.addGetterSetter(gp,"pointerWidth",0,Ge());ee.addGetterSetter(gp,"pointerHeight",0,Ge());ee.addGetterSetter(gp,"cornerRadius",0,zW(4));class My extends $e{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();if(t.beginPath(),!n)t.rect(0,0,r,i);else{let o=0,a=0,s=0,l=0;typeof n=="number"?o=a=s=l=Math.min(n,r/2,i/2):(o=Math.min(n[0]||0,r/2,i/2),a=Math.min(n[1]||0,r/2,i/2),l=Math.min(n[2]||0,r/2,i/2),s=Math.min(n[3]||0,r/2,i/2)),t.moveTo(o,0),t.lineTo(r-a,0),t.arc(r-a,a,a,Math.PI*3/2,0,!1),t.lineTo(r,i-l),t.arc(r-l,i-l,l,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}t.closePath(),t.fillStrokeShape(this)}}My.prototype.className="Rect";Cr(My);ee.addGetterSetter(My,"cornerRadius",0,zW(4));class mp extends $e{_sceneFunc(t){const n=this._getPoints();t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:n*Math.sin(i*2*Math.PI/t),y:-1*n*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,i=t[0].x,o=t[0].y;return t.forEach(a=>{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}mp.prototype.className="RegularPolygon";mp.prototype._centroid=!0;mp.prototype._attrsAffectingSize=["radius"];Cr(mp);ee.addGetterSetter(mp,"radius",0,Ge());ee.addGetterSetter(mp,"sides",0,Ge());var jI=Math.PI*2;class vp extends $e{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,jI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),jI,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}vp.prototype.className="Ring";vp.prototype._centroid=!0;vp.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Cr(vp);ee.addGetterSetter(vp,"innerRadius",0,Ge());ee.addGetterSetter(vp,"outerRadius",0,Ge());class bu extends $e{constructor(t){super(t),this._updated=!0,this.anim=new ns(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],f=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,f),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,f,m[v+0],m[v+1],u,f)}else t.drawImage(p,s,l,u,f,0,0,u,f)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],f=r*2;t.rect(u[f+0],u[f+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t<o-1?this.frameIndex(t+1):this.frameIndex(0)}}bu.prototype.className="Sprite";Cr(bu);ee.addGetterSetter(bu,"animation");ee.addGetterSetter(bu,"animations");ee.addGetterSetter(bu,"frameOffsets");ee.addGetterSetter(bu,"image");ee.addGetterSetter(bu,"frameIndex",0,Ge());ee.addGetterSetter(bu,"frameRate",17,Ge());ee.backCompat(bu,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class vf extends $e{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var o=1;o<i*2;o++){var a=o%2===0?r:n,s=a*Math.sin(o*Math.PI/i),l=-1*a*Math.cos(o*Math.PI/i);t.lineTo(s,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}vf.prototype.className="Star";vf.prototype._centroid=!0;vf.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Cr(vf);ee.addGetterSetter(vf,"numPoints",5,Ge());ee.addGetterSetter(vf,"innerRadius",0,Ge());ee.addGetterSetter(vf,"outerRadius",0,Ge());function lG(e){return Array.from(e)}var D0="auto",g7e="center",lv="justify",m7e="Change.konva",v7e="2d",HI="-",uG="left",y7e="text",b7e="Text",S7e="top",x7e="bottom",VI="middle",cG="normal",w7e="px ",Rb=" ",C7e="right",_7e="word",k7e="char",UI="none",xC="\u2026",dG=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],E7e=dG.length;function P7e(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var Ib;function wC(){return Ib||(Ib=he.createCanvasElement().getContext(v7e),Ib)}function T7e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L7e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A7e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class wr extends $e{constructor(t){super(A7e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<E7e;n++)this.on(dG[n]+m7e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(!!this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),m=this.fill(),v=this.textDecoration(),b=v.indexOf("underline")!==-1,x=v.indexOf("line-through")!==-1,E,k=0,k=a/2,_=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",VI),t.setAttr("textAlign",uG),s===VI?l=(this.getHeight()-r*a-i*2)/2:s===x7e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),E=0;E<r;E++){var _=0,T=0,A=n[E],R=A.text,I=A.width,D=A.lastInParagraph,B,z,j;if(t.save(),u===C7e?_+=f-I-i*2:u===g7e&&(_+=(f-I-i*2)/2),b&&(t.save(),t.beginPath(),t.moveTo(_,k+T+Math.round(o/2)),B=R.split(" ").length-1,z=B===0,j=u===lv&&D&&!z?f-i*2:I,t.lineTo(_+Math.round(j),k+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),x&&(t.save(),t.beginPath(),t.moveTo(_,k+T),B=R.split(" ").length-1,z=B===0,j=u===lv&&D&&!z?f-i*2:I,t.lineTo(_+Math.round(j),k+T),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),p!==0||u===lv){B=R.split(" ").length-1;for(var Y=lG(R),te=0;te<Y.length;te++){var G=Y[te];G===" "&&!D&&u===lv&&(_+=(f-i*2-I)/B),this._partialTextX=_,this._partialTextY=k+T,this._partialText=G,t.fillStrokeShape(this),_+=this.measureSize(G).width+p}}else this._partialTextX=_,this._partialTextY=k+T,this._partialText=R,t.fillStrokeShape(this);t.restore(),r>1&&(k+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=he._isString(t)?t:t==null?"":t+"";return this._setAttr(y7e,n),this}getWidth(){var t=this.attrs.width===D0||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===D0||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return he.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=wC(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Rb+this.fontVariant()+Rb+(this.fontSize()+w7e)+P7e(this.fontFamily())}_addTextLine(t){this.align()===lv&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return wC().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==D0&&o!==void 0,l=a!==D0&&a!==void 0,u=this.padding(),f=o-u*2,p=a-u*2,m=0,v=this.wrap(),b=v!==UI,x=v!==k7e&&b,E=this.ellipsis();this.textArr=[],wC().font=this._getContextFont();for(var k=E?this._getTextWidth(xC):0,_=0,T=t.length;_<T;++_){var A=t[_],R=this._getTextWidth(A);if(s&&R>f)for(;A.length>0;){for(var I=0,D=A.length,B="",z=0;I<D;){var j=I+D>>>1,Y=A.slice(0,j+1),te=this._getTextWidth(Y)+k;te<=f?(I=j+1,B=Y,z=te):D=j}if(B){if(x){var G,$=A[B.length],V=$===Rb||$===HI;V&&z<=f?G=B.length:G=Math.max(B.lastIndexOf(Rb),B.lastIndexOf(HI))+1,G>0&&(I=G,B=B.slice(0,I),z=this._getTextWidth(B))}B=B.trimRight(),this._addTextLine(B),r=Math.max(r,z),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(A=A.slice(I),A=A.trimLeft(),A.length>0&&(R=this._getTextWidth(A),R<=f)){this._addTextLine(A),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(A),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&_<T-1&&this._tryToAddEllipsisToLastLine();if(l&&m+i>p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==D0&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==UI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==D0&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+xC)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+xC)}}getStrokeScaleEnabled(){return!0}}wr.prototype._fillFunc=T7e;wr.prototype._strokeFunc=L7e;wr.prototype.className=b7e;wr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];Cr(wr);ee.overWriteSetter(wr,"width",JE());ee.overWriteSetter(wr,"height",JE());ee.addGetterSetter(wr,"fontFamily","Arial");ee.addGetterSetter(wr,"fontSize",12,Ge());ee.addGetterSetter(wr,"fontStyle",cG);ee.addGetterSetter(wr,"fontVariant",cG);ee.addGetterSetter(wr,"padding",0,Ge());ee.addGetterSetter(wr,"align",uG);ee.addGetterSetter(wr,"verticalAlign",S7e);ee.addGetterSetter(wr,"lineHeight",1,Ge());ee.addGetterSetter(wr,"wrap",_7e);ee.addGetterSetter(wr,"ellipsis",!1,il());ee.addGetterSetter(wr,"letterSpacing",0,Ge());ee.addGetterSetter(wr,"text","",k1());ee.addGetterSetter(wr,"textDecoration","");var O7e="",fG="normal";function hG(e){e.fillText(this.partialText,0,0)}function pG(e){e.strokeText(this.partialText,0,0)}class bi extends $e{constructor(t){super(t),this.dummyCanvas=he.createCanvasElement(),this.dataArray=[],this.dataArray=zn.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=zn.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a<o.length;a++){t.save();var s=o[a].p0;t.translate(s.x,s.y),t.rotate(o[a].rotation),this.partialText=o[a].text,t.fillStrokeShape(this),n==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var o=n[i].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return he.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return wr.prototype.setText.call(this,t)}_getContextFont(){return wr.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),i=this.align(),o=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var s=0,l=0;l<t.dataArray.length;l++)t.dataArray[l].pathLength>0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var f=lG(this.text()),p=this.text().split(" ").length-1,m,v,b,x=-1,E=0,k=function(){E=0;for(var te=t.dataArray,G=x+1;G<te.length;G++){if(te[G].pathLength>0)return x=G,te[G];te[G].command==="M"&&(m={x:te[G].points[0],y:te[G].points[1]})}return{}},_=function(te){var G=t._getTextSize(te).width+r;te===" "&&i==="justify"&&(G+=(s-a)/p);var $=0,V=0;for(v=void 0;Math.abs(G-$)/G>.01&&V<20;){V++;for(var J=$;b===void 0;)b=k(),b&&J+b.pathLength<G&&(J+=b.pathLength,b=void 0);if(Object.keys(b).length===0||m===void 0)return;var Z=!1;switch(b.command){case"L":zn.getLineLength(m.x,m.y,b.points[0],b.points[1])>G?v=zn.getPointOnLine(G,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var U=b.points[4],X=b.points[5],le=b.points[4]+X;E===0?E=U+1e-8:G>$?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E<le||X>=0&&E>le)&&(E=le,Z=!0),v=zn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?G>b.pathLength?E=1e-8:E=G/b.pathLength:G>$?E+=(G-$)/b.pathLength/2:E=Math.max(E-($-G)/b.pathLength/2,0),E>1&&(E=1,Z=!0),v=zn.getPointOnCubicBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case"Q":E===0?E=G/b.pathLength:G>$?E+=(G-$)/b.pathLength:E-=($-G)/b.pathLength,E>1&&(E=1,Z=!0),v=zn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&($=zn.getLineLength(m.x,m.y,v.x,v.y)),Z&&(Z=!1,b=void 0)}},T="C",A=t._getTextSize(T).width+r,R=u/A-1,I=0;I<R&&(_(T),!(m===void 0||v===void 0));I++)m=v;for(var D=0;D<f.length&&(_(f[D]),!(m===void 0||v===void 0));D++){var B=zn.getLineLength(m.x,m.y,v.x,v.y),z=0;if(o)try{z=o(f[D-1],f[D])*this.fontSize()}catch(te){z=0}m.x+=z,v.x+=z,this.textWidth+=z;var j=zn.getPointOnLine(z+B/2,m.x,m.y,v.x,v.y),Y=Math.atan2(v.y-m.y,v.x-m.x);this.glyphInfo.push({transposeX:j.x,transposeY:j.y,text:f[D],rotation:Y,p0:m,p1:v}),m=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(f){t.push(f.p0.x),t.push(f.p0.y),t.push(f.p1.x),t.push(f.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}destroy(){return he.releaseCanvas(this.dummyCanvas),super.destroy()}}bi.prototype._fillFunc=hG;bi.prototype._strokeFunc=pG;bi.prototype._fillFuncHit=hG;bi.prototype._strokeFuncHit=pG;bi.prototype.className="TextPath";bi.prototype._attrsAffectingSize=["text","fontSize","data"];Cr(bi);ee.addGetterSetter(bi,"data");ee.addGetterSetter(bi,"fontFamily","Arial");ee.addGetterSetter(bi,"fontSize",12,Ge());ee.addGetterSetter(bi,"fontStyle",fG);ee.addGetterSetter(bi,"align","left");ee.addGetterSetter(bi,"letterSpacing",0,Ge());ee.addGetterSetter(bi,"textBaseline","middle");ee.addGetterSetter(bi,"fontVariant",fG);ee.addGetterSetter(bi,"text",O7e);ee.addGetterSetter(bi,"textDecoration",null);ee.addGetterSetter(bi,"kerningFunc",null);var gG="tr-konva",M7e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${gG}`).join(" "),WI="nodesRect",R7e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],I7e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const D7e="ontouchstart"in gt._global;function N7e(e,t){if(e==="rotater")return"crosshair";t+=he.degToRad(I7e[e]||0);var n=(he.radToDeg(t)%360+360)%360;return he._inRange(n,315+22.5,360)||he._inRange(n,0,22.5)?"ns-resize":he._inRange(n,45-22.5,45+22.5)?"nesw-resize":he._inRange(n,90-22.5,90+22.5)?"ew-resize":he._inRange(n,135-22.5,135+22.5)?"nwse-resize":he._inRange(n,180-22.5,180+22.5)?"ns-resize":he._inRange(n,225-22.5,225+22.5)?"nesw-resize":he._inRange(n,270-22.5,270+22.5)?"ew-resize":he._inRange(n,315-22.5,315+22.5)?"nwse-resize":(he.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var G5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],GI=1e8;function B7e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function mG(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function $7e(e,t){const n=B7e(e);return mG(e,t,n)}function F7e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=gt.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}class On extends n1{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(M7e,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return he.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return gG+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(R7e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(WI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(WI,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(gt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),f={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return mG(f,-gt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-GI,y:-GI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const f=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:f.x,y:f.y},{x:f.x+f.width,y:f.y},{x:f.x+f.width,y:f.y+f.height},{x:f.x,y:f.y+f.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new Ea;r.rotate(-gt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var f=r.point(u);i===void 0&&(i=a=f.x,o=s=f.y),i=Math.min(i,f.x),o=Math.min(o,f.y),a=Math.max(a,f.x),s=Math.max(s,f.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:gt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),G5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new My({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:D7e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=gt.getAngle(this.rotation()),o=N7e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new $e({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*he._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const f=o.getAbsolutePosition();if(!(u.x===f.x&&u.y===f.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let te=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(te-=Math.PI);var m=gt.getAngle(this.rotation());const G=m+te,$=gt.getAngle(this.rotationSnapTolerance()),J=F7e(this.rotationSnaps(),G,$)-p.rotation,Z=$7e(p,J);this._fitNodesInto(Z,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(b.y-o.y(),2));var x=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".top-left").x(b.x-n),this.findOne(".top-left").y(b.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var b=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(b.y-o.y(),2));var x=this.findOne(".top-right").x()<b.x?-1:1,E=this.findOne(".top-right").y()>b.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var k=o.position();this.findOne(".top-left").y(k.y),this.findOne(".bottom-right").x(k.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var b=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(b.x-o.x(),2)+Math.pow(o.y()-b.y,2));var x=b.x<o.x()?-1:1,E=o.y()<b.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,o.x(b.x-n),o.y(b.y+r)}k=o.position(),this.findOne(".top-left").x(k.x),this.findOne(".bottom-right").y(k.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var b=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-b.x,2)+Math.pow(o.y()-b.y,2));var x=this.findOne(".bottom-right").x()<b.x?-1:1,E=this.findOne(".bottom-right").y()<b.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".bottom-right").x(b.x+n),this.findOne(".bottom-right").y(b.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var _=this.centeredScaling()||t.altKey;if(_){var T=this.findOne(".top-left"),A=this.findOne(".bottom-right"),R=T.x(),I=T.y(),D=this.getWidth()-A.x(),B=this.getHeight()-A.y();A.move({x:-R,y:-I}),T.move({x:D,y:B})}var z=this.findOne(".top-left").getAbsolutePosition();n=z.x,r=z.y;var j=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),Y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:j,height:Y,rotation:gt.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:t,target:n}),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(he._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(he._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new Ea;if(a.rotate(gt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:he.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new Ea;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new Ea;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const f=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),b=p.getTransform().copy();b.translate(p.offsetX(),p.offsetY());const x=new Ea;x.multiply(v.copy().invert()).multiply(f).multiply(v).multiply(b);const E=x.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(he._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(he._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*he._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),n1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return qe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function z7e(e){return e instanceof Array||he.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){G5.indexOf(t)===-1&&he.warn("Unknown anchor name: "+t+". Available names are: "+G5.join(", "))}),e||[]}On.prototype.className="Transformer";Cr(On);ee.addGetterSetter(On,"enabledAnchors",G5,z7e);ee.addGetterSetter(On,"flipEnabled",!0,il());ee.addGetterSetter(On,"resizeEnabled",!0);ee.addGetterSetter(On,"anchorSize",10,Ge());ee.addGetterSetter(On,"rotateEnabled",!0);ee.addGetterSetter(On,"rotationSnaps",[]);ee.addGetterSetter(On,"rotateAnchorOffset",50,Ge());ee.addGetterSetter(On,"rotationSnapTolerance",5,Ge());ee.addGetterSetter(On,"borderEnabled",!0);ee.addGetterSetter(On,"anchorStroke","rgb(0, 161, 255)");ee.addGetterSetter(On,"anchorStrokeWidth",1,Ge());ee.addGetterSetter(On,"anchorFill","white");ee.addGetterSetter(On,"anchorCornerRadius",0,Ge());ee.addGetterSetter(On,"borderStroke","rgb(0, 161, 255)");ee.addGetterSetter(On,"borderStrokeWidth",1,Ge());ee.addGetterSetter(On,"borderDash");ee.addGetterSetter(On,"keepRatio",!0);ee.addGetterSetter(On,"centeredScaling",!1);ee.addGetterSetter(On,"ignoreStroke",!1);ee.addGetterSetter(On,"padding",0,Ge());ee.addGetterSetter(On,"node");ee.addGetterSetter(On,"nodes");ee.addGetterSetter(On,"boundBoxFunc");ee.addGetterSetter(On,"anchorDragBoundFunc");ee.addGetterSetter(On,"shouldOverdrawWholeArea",!1);ee.addGetterSetter(On,"useSingleNodeRotation",!0);ee.backCompat(On,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class vc extends $e{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,gt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vc.prototype.className="Wedge";vc.prototype._centroid=!0;vc.prototype._attrsAffectingSize=["radius"];Cr(vc);ee.addGetterSetter(vc,"radius",0,Ge());ee.addGetterSetter(vc,"angle",0,Ge());ee.addGetterSetter(vc,"clockwise",!1);ee.backCompat(vc,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function qI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var j7e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],H7e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function V7e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,f,p,m,v,b,x,E,k,_,T,A,R,I,D,B,z,j,Y,te,G=t+t+1,$=r-1,V=i-1,J=t+1,Z=J*(J+1)/2,U=new qI,X=null,le=U,fe=null,Se=null,Ae=j7e[t],be=H7e[t];for(s=1;s<G;s++)le=le.next=new qI,s===J&&(X=le);for(le.next=U,p=f=0,a=0;a<i;a++){for(A=R=I=D=m=v=b=x=0,E=J*(B=n[f]),k=J*(z=n[f+1]),_=J*(j=n[f+2]),T=J*(Y=n[f+3]),m+=Z*B,v+=Z*z,b+=Z*j,x+=Z*Y,le=U,s=0;s<J;s++)le.r=B,le.g=z,le.b=j,le.a=Y,le=le.next;for(s=1;s<J;s++)l=f+(($<s?$:s)<<2),m+=(le.r=B=n[l])*(te=J-s),v+=(le.g=z=n[l+1])*te,b+=(le.b=j=n[l+2])*te,x+=(le.a=Y=n[l+3])*te,A+=B,R+=z,I+=j,D+=Y,le=le.next;for(fe=U,Se=X,o=0;o<r;o++)n[f+3]=Y=x*Ae>>be,Y!==0?(Y=255/Y,n[f]=(m*Ae>>be)*Y,n[f+1]=(v*Ae>>be)*Y,n[f+2]=(b*Ae>>be)*Y):n[f]=n[f+1]=n[f+2]=0,m-=E,v-=k,b-=_,x-=T,E-=fe.r,k-=fe.g,_-=fe.b,T-=fe.a,l=p+((l=o+t+1)<$?l:$)<<2,A+=fe.r=n[l],R+=fe.g=n[l+1],I+=fe.b=n[l+2],D+=fe.a=n[l+3],m+=A,v+=R,b+=I,x+=D,fe=fe.next,E+=B=Se.r,k+=z=Se.g,_+=j=Se.b,T+=Y=Se.a,A-=B,R-=z,I-=j,D-=Y,Se=Se.next,f+=4;p+=r}for(o=0;o<r;o++){for(R=I=D=A=v=b=x=m=0,f=o<<2,E=J*(B=n[f]),k=J*(z=n[f+1]),_=J*(j=n[f+2]),T=J*(Y=n[f+3]),m+=Z*B,v+=Z*z,b+=Z*j,x+=Z*Y,le=U,s=0;s<J;s++)le.r=B,le.g=z,le.b=j,le.a=Y,le=le.next;for(u=r,s=1;s<=t;s++)f=u+o<<2,m+=(le.r=B=n[f])*(te=J-s),v+=(le.g=z=n[f+1])*te,b+=(le.b=j=n[f+2])*te,x+=(le.a=Y=n[f+3])*te,A+=B,R+=z,I+=j,D+=Y,le=le.next,s<V&&(u+=r);for(f=o,fe=U,Se=X,a=0;a<i;a++)l=f<<2,n[l+3]=Y=x*Ae>>be,Y>0?(Y=255/Y,n[l]=(m*Ae>>be)*Y,n[l+1]=(v*Ae>>be)*Y,n[l+2]=(b*Ae>>be)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=k,b-=_,x-=T,E-=fe.r,k-=fe.g,_-=fe.b,T-=fe.a,l=o+((l=a+J)<V?l:V)*r<<2,m+=A+=fe.r=n[l],v+=R+=fe.g=n[l+1],b+=I+=fe.b=n[l+2],x+=D+=fe.a=n[l+3],fe=fe.next,E+=B=Se.r,k+=z=Se.g,_+=j=Se.b,T+=Y=Se.a,A-=B,R-=z,I-=j,D-=Y,Se=Se.next,f+=r}}const U7e=function(t){var n=Math.round(this.blurRadius());n>0&&V7e(t,n)};ee.addGetterSetter(qe,"blurRadius",0,Ge(),ee.afterSetFilter);const W7e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};ee.addGetterSetter(qe,"brightness",0,Ge(),ee.afterSetFilter);const G7e=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,a=150,s;for(s=0;s<r;s+=4)i=n[s],o=n[s+1],a=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};ee.addGetterSetter(qe,"contrast",0,Ge(),ee.afterSetFilter);const q7e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,f=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:he.error("Unknown emboss direction: "+r)}do{var m=(p-1)*f,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var b=(p-1+v)*l*4,x=l;do{var E=m+(x-1)*4,k=a;x+k<1&&(k=0),x+k>l&&(k=0);var _=b+(x-1+k)*4,T=s[E]-s[_],A=s[E+1]-s[_+1],R=s[E+2]-s[_+2],I=T,D=I>0?I:-I,B=A>0?A:-A,z=R>0?R:-R;if(B>D&&(I=A),z>D&&(I=R),I*=t,i){var j=s[E]+I,Y=s[E+1]+I,te=s[E+2]+I;s[E]=j>255?255:j<0?0:j,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=te>255?255:te<0?0:te}else{var G=n-I;G<0?G=0:G>255&&(G=255),s[E]=s[E+1]=s[E+2]=G}}while(--x)}while(--p)};ee.addGetterSetter(qe,"embossStrength",.5,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"embossWhiteLevel",.5,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"embossDirection","top-left",null,ee.afterSetFilter);ee.addGetterSetter(qe,"embossBlend",!1,null,ee.afterSetFilter);function CC(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const Y7e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],f=u,p,m,v=this.enhance();if(v!==0){for(m=0;m<n;m+=4)o=t[m+0],o<r?r=o:o>i&&(i=o),l=t[m+1],l<a?a=l:l>s&&(s=l),p=t[m+2],p<u?u=p:p>f&&(f=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),f===u&&(f=255,u=0);var b,x,E,k,_,T,A,R,I;for(v>0?(x=i+v*(255-i),E=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),R=f+v*(255-f),I=u-v*(u-0)):(b=(i+r)*.5,x=i+v*(i-b),E=r+v*(r-b),k=(s+a)*.5,_=s+v*(s-k),T=a+v*(a-k),A=(f+u)*.5,R=f+v*(f-A),I=u+v*(u-A)),m=0;m<n;m+=4)t[m+0]=CC(t[m+0],r,i,E,x),t[m+1]=CC(t[m+1],a,s,T,_),t[m+2]=CC(t[m+2],u,f,I,R)}};ee.addGetterSetter(qe,"enhance",0,Ge(),ee.afterSetFilter);const K7e=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};ee.addGetterSetter(qe,"hue",0,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"saturation",0,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"luminance",0,Ge(),ee.afterSetFilter);const X7e=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),f=.299*r+.701*l+.167*u,p=.587*r-.587*l+.33*u,m=.114*r-.114*l-.497*u,v=.299*r-.299*l-.328*u,b=.587*r+.413*l+.035*u,x=.114*r-.114*l+.293*u,E=.299*r-.3*l+1.25*u,k=.587*r-.586*l-1.05*u,_=.114*r+.886*l-.2*u,T,A,R,I;for(s=0;s<n;s+=4)T=t[s+0],A=t[s+1],R=t[s+2],I=t[s+3],t[s+0]=f*T+p*A+m*R+a,t[s+1]=v*T+b*A+x*R+a,t[s+2]=E*T+k*A+_*R+a,t[s+3]=I},Z7e=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*s+.167*l,f=.587*r-.587*s+.33*l,p=.114*r-.114*s-.497*l,m=.299*r-.299*s-.328*l,v=.587*r+.413*s+.035*l,b=.114*r-.114*s+.293*l,x=.299*r-.3*s+1.25*l,E=.587*r-.586*s-1.05*l,k=.114*r+.886*s-.2*l,_,T,A,R;for(a=0;a<n;a+=4)_=t[a+0],T=t[a+1],A=t[a+2],R=t[a+3],t[a+0]=u*_+f*T+p*A,t[a+1]=m*_+v*T+b*A,t[a+2]=x*_+E*T+k*A,t[a+3]=R};ee.addGetterSetter(qe,"hue",0,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"saturation",0,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"value",0,Ge(),ee.afterSetFilter);const Q7e=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};var J7e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,f,p,m=0,v=0,b=0,x=0,E,k=Math.sqrt(s*s+l*l);f=o-s,p=a-l,E=Math.sqrt(f*f+p*p),k=E>k?E:k;var _=a,T=o,A,R,I=360/T*Math.PI/180,D,B;for(R=0;R<T;R+=1)for(D=Math.sin(R*I),B=Math.cos(R*I),A=0;A<_;A+=1)f=Math.floor(s+k*A/_*B),p=Math.floor(l+k*A/_*D),u=(p*o+f)*4,m=r[u+0],v=r[u+1],b=r[u+2],x=r[u+3],u=(R+A*o)*4,i[u+0]=m,i[u+1]=v,i[u+2]=b,i[u+3]=x},e9e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,f,p,m,v,b=0,x=0,E=0,k=0,_,T=Math.sqrt(s*s+l*l);f=o-s,p=a-l,_=Math.sqrt(f*f+p*p),T=_>T?_:T;var A=a,R=o,I,D,B=n.polarRotation||0,z,j;for(f=0;f<o;f+=1)for(p=0;p<a;p+=1)m=f-s,v=p-l,I=Math.sqrt(m*m+v*v)*A/T,D=(Math.atan2(v,m)*180/Math.PI+360+B)%360,D=D*R/360,z=Math.floor(D),j=Math.floor(I),u=(j*o+z)*4,b=r[u+0],x=r[u+1],E=r[u+2],k=r[u+3],u=(p*o+f)*4,i[u+0]=b,i[u+1]=x,i[u+2]=E,i[u+3]=k};const t9e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,f,p,m,v=Math.round(this.kaleidoscopePower()),b=Math.round(this.kaleidoscopeAngle()),x=Math.floor(t*(b%360)/360);if(!(v<1)){var E=he.createCanvasElement();E.width=t,E.height=n;var k=E.getContext("2d").getImageData(0,0,t,n);he.releaseCanvas(E),J7e(e,k,{polarCenterX:t/2,polarCenterY:n/2});for(var _=t/Math.pow(2,v);_<=8;)_=_*2,v-=1;_=Math.ceil(_);var T=_,A=0,R=T,I=1;for(x+_>t&&(A=T,R=0,I=-1),i=0;i<n;i+=1)for(r=A;r!==R;r+=I)o=Math.round(r+x)%t,p=(t*i+o)*4,s=k.data[p+0],l=k.data[p+1],u=k.data[p+2],f=k.data[p+3],m=(t*i+r)*4,k.data[m+0]=s,k.data[m+1]=l,k.data[m+2]=u,k.data[m+3]=f;for(i=0;i<n;i+=1)for(T=Math.floor(_),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)p=(t*i+r)*4,s=k.data[p+0],l=k.data[p+1],u=k.data[p+2],f=k.data[p+3],m=(t*i+T*2-r-1)*4,k.data[m+0]=s,k.data[m+1]=l,k.data[m+2]=u,k.data[m+3]=f;T*=2}e9e(k,e,{polarRotation:0})}};ee.addGetterSetter(qe,"kaleidoscopePower",2,Ge(),ee.afterSetFilter);ee.addGetterSetter(qe,"kaleidoscopeAngle",0,Ge(),ee.afterSetFilter);function Db(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function uv(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function n9e(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function r9e(e,t){var n=Db(e,0,0),r=Db(e,e.width-1,0),i=Db(e,0,e.height-1),o=Db(e,e.width-1,e.height-1),a=t||10;if(uv(n,r)<a&&uv(r,o)<a&&uv(o,i)<a&&uv(i,n)<a){for(var s=n9e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var f=uv(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=f<a?0:255}return l}}function i9e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function o9e(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,b=l+m-o;if(v>=0&&v<n&&b>=0&&b<t){var x=v*t+b,E=r[p*i+m];f+=e[x]*E}}a[u]=f===255*8?255:0}return a}function a9e(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,b=l+m-o;if(v>=0&&v<n&&b>=0&&b<t){var x=v*t+b,E=r[p*i+m];f+=e[x]*E}}a[u]=f>=255*4?255:0}return a}function s9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,b=l+m-o;if(v>=0&&v<n&&b>=0&&b<t){var x=v*t+b,E=r[p*i+m];f+=e[x]*E}}a[u]=f}return a}const l9e=function(e){var t=this.threshold(),n=r9e(e,t);return n&&(n=o9e(n,e.width,e.height),n=a9e(n,e.width,e.height),n=s9e(n,e.width,e.height),i9e(e,n)),e};ee.addGetterSetter(qe,"threshold",0,Ge(),ee.afterSetFilter);const u9e=function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,o;for(o=0;o<r;o+=4)n[o+0]+=i-2*i*Math.random(),n[o+1]+=i-2*i*Math.random(),n[o+2]+=i-2*i*Math.random()};ee.addGetterSetter(qe,"noise",.2,Ge(),ee.afterSetFilter);const c9e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,f,p=Math.ceil(n/t),m=Math.ceil(r/t),v,b,x,E,k,_,T,A=e.data;if(t<=0){he.error("pixelSize value can not be <= 0");return}for(k=0;k<p;k+=1)for(_=0;_<m;_+=1){for(s=0,l=0,u=0,f=0,v=k*t,b=v+t,x=_*t,E=x+t,T=0,i=v;i<b;i+=1)if(!(i>=n))for(o=x;o<E;o+=1)o>=r||(a=(n*o+i)*4,s+=A[a+0],l+=A[a+1],u+=A[a+2],f+=A[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,f=f/T,i=v;i<b;i+=1)if(!(i>=n))for(o=x;o<E;o+=1)o>=r||(a=(n*o+i)*4,A[a+0]=s,A[a+1]=l,A[a+2]=u,A[a+3]=f)}};ee.addGetterSetter(qe,"pixelSize",8,Ge(),ee.afterSetFilter);const d9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o<r;o+=1)n[o]=Math.floor(n[o]/i)*i};ee.addGetterSetter(qe,"levels",.5,Ge(),ee.afterSetFilter);const f9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<n;a+=4)s=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=s*r,t[a+1]=s*i,t[a+2]=s*o,t[a+3]=t[a+3]};ee.addGetterSetter(qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(qe,"blue",0,FW,ee.afterSetFilter);const h9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s<n;s+=4)l=1-a,t[s]=r*a+t[s]*l,t[s+1]=i*a+t[s+1]*l,t[s+2]=o*a+t[s+2]*l};ee.addGetterSetter(qe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(qe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ee.addGetterSetter(qe,"blue",0,FW,ee.afterSetFilter);ee.addGetterSetter(qe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const p9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+a*.189),t[r+1]=Math.min(255,i*.349+o*.686+a*.168),t[r+2]=Math.min(255,i*.272+o*.534+a*.131)},g9e=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var a=(o-1)*i,s=n;do{var l=a+(s-1)*4,u=t[l],f=t[l+1],p=t[l+2];u>127&&(u=255-u),f>127&&(f=255-f),p>127&&(p=255-p),t[l]=u,t[l+1]=f,t[l+2]=p}while(--s)}while(--o)},m9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255};ee.addGetterSetter(qe,"threshold",.5,Ge(),ee.afterSetFilter);const F0=rp.Util._assign(rp,{Arc:gc,Arrow:pp,Circle:E1,Ellipse:mf,Image:ol,Label:rP,Tag:gp,Line:mc,Path:zn,Rect:My,RegularPolygon:mp,Ring:vp,Sprite:bu,Star:vf,Text:wr,TextPath:bi,Transformer:On,Wedge:vc,Filters:{Blur:U7e,Brighten:W7e,Contrast:G7e,Emboss:q7e,Enhance:Y7e,Grayscale:K7e,HSL:X7e,HSV:Z7e,Invert:Q7e,Kaleidoscope:t9e,Mask:l9e,Noise:u9e,Pixelate:c9e,Posterize:d9e,RGB:f9e,RGBA:h9e,Sepia:p9e,Solarize:g9e,Threshold:m9e}}),v9e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new F0.Stage({container:i,width:n,height:r}),a=new F0.Layer,s=new F0.Layer;a.add(new F0.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new F0.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},y9e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("</br>"),t.document.write(r.outerHTML),t.document.write("</br></br>")})};let vG=null,yG=null;const b9e=e=>{vG=e},tl=()=>vG,S9e=e=>{yG=e},bG=()=>yG,x9e=e=>{const t=tl(),{generationMode:n,optionsState:r,canvasState:i,systemState:o}=e,{cfgScale:a,codeformerFidelity:s,facetoolStrength:l,facetoolType:u,height:f,hiresFix:p,img2imgStrength:m,infillMethod:v,initialImage:b,iterations:x,perlin:E,prompt:k,sampler:_,seamBlur:T,seamless:A,seamSize:R,seamSteps:I,seamStrength:D,seed:B,seedWeights:z,shouldFitToWidthHeight:j,shouldGenerateVariations:Y,shouldRandomizeSeed:te,shouldRunESRGAN:G,shouldRunFacetool:$,steps:V,threshold:J,tileSize:Z,upscalingLevel:U,upscalingStrength:X,variationAmount:le,width:fe}=r,{shouldDisplayInProgressType:Se,saveIntermediatesInterval:Ae,enableImageDebugging:be}=o,ke={prompt:k,iterations:x,steps:V,cfg_scale:a,threshold:J,perlin:E,height:f,width:fe,sampler_name:_,seed:B,progress_images:Se==="full-res",progress_latents:Se==="latents",save_intermediates:Ae,generation_mode:n,init_mask:""};let De=!1,Je=!1;if(ke.seed=te?$W(ZE,QE):B,["txt2img","img2img"].includes(n)&&(ke.seamless=A,ke.hires_fix=p,G&&(De={level:U,strength:X}),$&&(Je={type:u,strength:l},u==="codeformer"&&(Je.codeformer_fidelity=s))),n==="img2img"&&b&&(ke.init_img=typeof b=="string"?b:b.url,ke.strength=m,ke.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ye},boundingBoxCoordinates:mt,boundingBoxDimensions:_t,inpaintReplace:dt,shouldUseInpaintReplace:vt,stageScale:xt,isMaskEnabled:Le,shouldPreserveMaskedArea:ut,boundingBoxScaleMethod:Rt,scaledBoundingBoxDimensions:ot}=i,Ct={...mt,..._t},ln=v9e(Le?Ye.filter(WE):[],Ct);ke.init_mask=ln,ke.fit=!1,ke.strength=m,ke.invert_mask=ut,vt&&(ke.inpaint_replace=dt),ke.bounding_box=Ct;const ue=t.scale();t.scale({x:1/xt,y:1/xt});const Ie=t.getAbsolutePosition(),We=t.toDataURL({x:Ct.x+Ie.x,y:Ct.y+Ie.y,width:Ct.width,height:Ct.height});be&&y9e([{base64:ln,caption:"mask sent as init_mask"},{base64:We,caption:"image sent as init_img"}]),t.scale(ue),ke.init_img=We,ke.progress_images=!1,Rt!=="none"&&(ke.inpaint_width=ot.width,ke.inpaint_height=ot.height),ke.seam_size=R,ke.seam_blur=T,ke.seam_strength=D,ke.seam_steps=I,ke.tile_size=Z,ke.infill_method=v,ke.force_outpaint=!1}return Y?(ke.variation_amount=le,z&&(ke.with_variations=q5e(z))):ke.variation_amount=0,be&&(ke.enable_image_debugging=be),{generationParameters:ke,esrganParameters:De,facetoolParameters:Je}},w9e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Ws(!0));const o=r(),{options:a,system:s,canvas:l}=o,u={generationMode:i,optionsState:a,canvasState:l,systemState:s};n(hwe());const{generationParameters:f,esrganParameters:p,facetoolParameters:m}=x9e(u);t.emit("generateImage",f,p,m),f.init_mask&&(f.init_mask=f.init_mask.substr(0,64).concat("...")),f.init_img&&(f.init_img=f.init_img.substr(0,64).concat("...")),n(eo({timestamp:to(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...f,...p,...m})}`}))},emitRunESRGAN:i=>{n(Ws(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(eo({timestamp:to(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Ws(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(eo({timestamp:to(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(BU(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitSearchForModels:i=>{t.emit("searchForModels",i)},emitAddNewModel:i=>{t.emit("addNewModel",i)},emitDeleteModel:i=>{t.emit("deleteModel",i)},emitRequestModelChange:i=>{n(cwe()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},C9e=()=>{const{origin:e}=new URL(window.location.href),t=P4(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:f,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:x,onImageDeleted:E,onSystemConfig:k,onModelChanged:_,onFoundModels:T,onNewModelAdded:A,onModelDeleted:R,onModelChangeFailed:I,onTempFolderEmptied:D}=eCe(i),{emitGenerateImage:B,emitRunESRGAN:z,emitRunFacetool:j,emitDeleteImage:Y,emitRequestImages:te,emitRequestNewImages:G,emitCancelProcessing:$,emitRequestSystemConfig:V,emitSearchForModels:J,emitAddNewModel:Z,emitDeleteModel:U,emitRequestModelChange:X,emitSaveStagingAreaImageToGallery:le,emitRequestEmptyTempFolder:fe}=w9e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Se=>u(Se)),t.on("generationResult",Se=>p(Se)),t.on("postprocessingResult",Se=>f(Se)),t.on("intermediateResult",Se=>m(Se)),t.on("progressUpdate",Se=>v(Se)),t.on("galleryImages",Se=>b(Se)),t.on("processingCanceled",()=>{x()}),t.on("imageDeleted",Se=>{E(Se)}),t.on("systemConfig",Se=>{k(Se)}),t.on("foundModels",Se=>{T(Se)}),t.on("newModelAdded",Se=>{A(Se)}),t.on("modelDeleted",Se=>{R(Se)}),t.on("modelChanged",Se=>{_(Se)}),t.on("modelChangeFailed",Se=>{I(Se)}),t.on("tempFolderEmptied",()=>{D()}),n=!0),a.type){case"socketio/generateImage":{B(a.payload);break}case"socketio/runESRGAN":{z(a.payload);break}case"socketio/runFacetool":{j(a.payload);break}case"socketio/deleteImage":{Y(a.payload);break}case"socketio/requestImages":{te(a.payload);break}case"socketio/requestNewImages":{G(a.payload);break}case"socketio/cancelProcessing":{$();break}case"socketio/requestSystemConfig":{V();break}case"socketio/searchForModels":{J(a.payload);break}case"socketio/addNewModel":{Z(a.payload);break}case"socketio/deleteModel":{U(a.payload);break}case"socketio/requestModelChange":{X(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{le(a.payload);break}case"socketio/requestEmptyTempFolder":{fe();break}}o(a)}},_9e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),k9e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps","openModel"].map(e=>`system.${e}`),E9e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),SG=aU({options:fSe,gallery:wSe,system:mwe,canvas:Ywe}),P9e=vU.getPersistConfig({key:"root",storage:mU,rootReducer:SG,blacklist:[..._9e,...k9e,...E9e],debounce:300}),T9e=A5e(P9e,SG),xG=a5e({reducer:T9e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(C9e()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}});var wG={exports:{}},CG={};/**
* @license React
* use-sync-external-store-shim.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 r1=C.exports;function L9e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A9e=typeof Object.is=="function"?Object.is:L9e,O9e=r1.useState,M9e=r1.useEffect,R9e=r1.useLayoutEffect,I9e=r1.useDebugValue;function D9e(e,t){var n=t(),r=O9e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return R9e(function(){i.value=n,i.getSnapshot=t,_C(i)&&o({inst:i})},[e,n,t]),M9e(function(){return _C(i)&&o({inst:i}),e(function(){_C(i)&&o({inst:i})})},[e]),I9e(n),n}function _C(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!A9e(e,n)}catch(r){return!0}}function N9e(e,t){return t()}var B9e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?N9e:D9e;CG.useSyncExternalStore=r1.useSyncExternalStore!==void 0?r1.useSyncExternalStore:B9e;(function(e){e.exports=CG})(wG);var _G={exports:{}},kG={};/**
* @license React
* use-sync-external-store-shim/with-selector.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 kx=C.exports,$9e=wG.exports;function F9e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var z9e=typeof Object.is=="function"?Object.is:F9e,j9e=$9e.useSyncExternalStore,H9e=kx.useRef,V9e=kx.useEffect,U9e=kx.useMemo,W9e=kx.useDebugValue;kG.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=H9e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=U9e(function(){function l(v){if(!u){if(u=!0,f=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return p=b}return p=v}if(b=p,z9e(f,v))return b;var x=r(v);return i!==void 0&&i(b,x)?b:(f=v,p=x)}var u=!1,f,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=j9e(e,o[0],o[1]);return V9e(function(){a.hasValue=!0,a.value=s},[s]),W9e(s),s};(function(e){e.exports=kG})(_G);function G9e(e){e()}let EG=G9e;const q9e=e=>EG=e,Y9e=()=>EG,nf=C.exports.createContext(null);function PG(){return C.exports.useContext(nf)}const K9e=()=>{throw new Error("uSES not initialized!")};let TG=K9e;const X9e=e=>{TG=e},Z9e=(e,t)=>e===t;function Q9e(e=nf){const t=e===nf?PG:()=>C.exports.useContext(e);return function(r,i=Z9e){const{store:o,subscription:a,getServerState:s}=t(),l=TG(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const J9e=Q9e();var e8e={exports:{}},Bn={};/**
* @license React
* 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 iP=Symbol.for("react.element"),oP=Symbol.for("react.portal"),Ex=Symbol.for("react.fragment"),Px=Symbol.for("react.strict_mode"),Tx=Symbol.for("react.profiler"),Lx=Symbol.for("react.provider"),Ax=Symbol.for("react.context"),t8e=Symbol.for("react.server_context"),Ox=Symbol.for("react.forward_ref"),Mx=Symbol.for("react.suspense"),Rx=Symbol.for("react.suspense_list"),Ix=Symbol.for("react.memo"),Dx=Symbol.for("react.lazy"),n8e=Symbol.for("react.offscreen"),LG;LG=Symbol.for("react.module.reference");function vs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case iP:switch(e=e.type,e){case Ex:case Tx:case Px:case Mx:case Rx:return e;default:switch(e=e&&e.$$typeof,e){case t8e:case Ax:case Ox:case Dx:case Ix:case Lx:return e;default:return t}}case oP:return t}}}Bn.ContextConsumer=Ax;Bn.ContextProvider=Lx;Bn.Element=iP;Bn.ForwardRef=Ox;Bn.Fragment=Ex;Bn.Lazy=Dx;Bn.Memo=Ix;Bn.Portal=oP;Bn.Profiler=Tx;Bn.StrictMode=Px;Bn.Suspense=Mx;Bn.SuspenseList=Rx;Bn.isAsyncMode=function(){return!1};Bn.isConcurrentMode=function(){return!1};Bn.isContextConsumer=function(e){return vs(e)===Ax};Bn.isContextProvider=function(e){return vs(e)===Lx};Bn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===iP};Bn.isForwardRef=function(e){return vs(e)===Ox};Bn.isFragment=function(e){return vs(e)===Ex};Bn.isLazy=function(e){return vs(e)===Dx};Bn.isMemo=function(e){return vs(e)===Ix};Bn.isPortal=function(e){return vs(e)===oP};Bn.isProfiler=function(e){return vs(e)===Tx};Bn.isStrictMode=function(e){return vs(e)===Px};Bn.isSuspense=function(e){return vs(e)===Mx};Bn.isSuspenseList=function(e){return vs(e)===Rx};Bn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ex||e===Tx||e===Px||e===Mx||e===Rx||e===n8e||typeof e=="object"&&e!==null&&(e.$$typeof===Dx||e.$$typeof===Ix||e.$$typeof===Lx||e.$$typeof===Ax||e.$$typeof===Ox||e.$$typeof===LG||e.getModuleId!==void 0)};Bn.typeOf=vs;(function(e){e.exports=Bn})(e8e);function r8e(){const e=Y9e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const YI={notify(){},get:()=>[]};function i8e(e,t){let n,r=YI;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){f.onStateChange&&f.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=r8e())}function u(){n&&(n(),n=void 0,r.clear(),r=YI)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return f}const o8e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a8e=o8e?C.exports.useLayoutEffect:C.exports.useEffect;function s8e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=i8e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return a8e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),y((t||nf).Provider,{value:i,children:n})}function AG(e=nf){const t=e===nf?PG:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const l8e=AG();function u8e(e=nf){const t=e===nf?l8e:AG(e);return function(){return t().dispatch}}const c8e=u8e();X9e(_G.exports.useSyncExternalStoreWithSelector);q9e(pu.exports.unstable_batchedUpdates);function O4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O4=function(n){return typeof n}:O4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},O4(e)}function d8e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(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,r.key,r)}}function f8e(e,t,n){return t&&KI(e.prototype,t),n&&KI(e,n),e}function h8e(e,t){return t&&(O4(t)==="object"||typeof t=="function")?t:M4(e)}function S8(e){return S8=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},S8(e)}function M4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p8e(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}}),t&&x8(e,t)}function x8(e,t){return x8=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},x8(e,t)}function R4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var OG=function(e){p8e(t,e);function t(){var n,r;d8e(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=h8e(this,(n=S8(t)).call.apply(n,[this].concat(o))),R4(M4(r),"state",{bootstrapped:!1}),R4(M4(r),"_unsubscribe",void 0),R4(M4(r),"handlePersistorState",function(){var s=r.props.persistor,l=s.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return f8e(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(C.exports.PureComponent);R4(OG,"defaultProps",{children:null,loading:null});const MG=N5e(xG),XI=()=>y(at,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:y(by,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),Be=c8e,ve=J9e,g8e=lt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),m8e=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ve(g8e),i=t?Math.round(t*100/n):0;return y(LV,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};var RG={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ZI=oe.createContext&&oe.createContext(RG),Wd=globalThis&&globalThis.__assign||function(){return Wd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wd.apply(this,arguments)},v8e=globalThis&&globalThis.__rest||function(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function IG(e){return e&&e.map(function(t,n){return oe.createElement(t.tag,Wd({key:n},t.attr),IG(t.child))})}function yt(e){return function(t){return y(y8e,{...Wd({attr:Wd({},e.attr)},t),children:IG(e.child)})}}function y8e(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=v8e(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),K("svg",{...Wd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Wd(Wd({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&y("title",{children:o}),e.children]})};return ZI!==void 0?y(ZI.Consumer,{children:function(n){return t(n)}}):t(RG)}function b8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function S8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function x8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function DG(e){return yt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function NG(e){return yt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function w8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function C8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function BG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function _8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function k8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function aP(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function $G(e){return yt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function Ry(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function FG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function E8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function sP(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function zG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function P8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function T8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function jG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z"}}]})(e)}function L8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function A8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function HG(e){return yt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function O8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function M8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function R8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function I8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function VG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function D8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function N8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function UG(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function B8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function $8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function Iy(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function F8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function z8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function j8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function lP(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function H8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function V8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function QI(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function uP(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function U8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function yp(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function W8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function Nx(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function G8e(e){return yt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function cP(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const WG=""+new URL("logo.13003d72.png",import.meta.url).href,Qe=Oe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return y(so,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:y(fs,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function q8e(e){const{title:t,hotkey:n,description:r}=e;return K("div",{className:"hotkey-modal-item",children:[K("div",{className:"hotkey-info",children:[y("p",{className:"hotkey-title",children:t}),r&&y("p",{className:"hotkey-description",children:r})]}),y("div",{className:"hotkey-key",children:n})]})}function Y8e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Qh(),{t:i}=Ke(),o=[{title:i("hotkeys:invoke.title"),desc:i("hotkeys:invoke.desc"),hotkey:"Ctrl+Enter"},{title:i("hotkeys:cancel.title"),desc:i("hotkeys:cancel.desc"),hotkey:"Shift+X"},{title:i("hotkeys:focusPrompt.title"),desc:i("hotkeys:focusPrompt.desc"),hotkey:"Alt+A"},{title:i("hotkeys:toggleOptions.title"),desc:i("hotkeys:toggleOptions.desc"),hotkey:"O"},{title:i("hotkeys:pinOptions.title"),desc:i("hotkeys:pinOptions.desc"),hotkey:"Shift+O"},{title:i("hotkeys:toggleViewer.title"),desc:i("hotkeys:toggleViewer.desc"),hotkey:"Z"},{title:i("hotkeys:toggleGallery.title"),desc:i("hotkeys:toggleGallery.desc"),hotkey:"G"},{title:i("hotkeys:maximizeWorkSpace.title"),desc:i("hotkeys:maximizeWorkSpace.desc"),hotkey:"F"},{title:i("hotkeys:changeTabs.title"),desc:i("hotkeys:changeTabs.desc"),hotkey:"1-5"},{title:i("hotkeys:consoleToggle.title"),desc:i("hotkeys:consoleToggle.desc"),hotkey:"`"}],a=[{title:i("hotkeys:setPrompt.title"),desc:i("hotkeys:setPrompt.desc"),hotkey:"P"},{title:i("hotkeys:setSeed.title"),desc:i("hotkeys:setSeed.desc"),hotkey:"S"},{title:i("hotkeys:setParameters.title"),desc:i("hotkeys:setParameters.desc"),hotkey:"A"},{title:i("hotkeys:restoreFaces.title"),desc:i("hotkeys:restoreFaces.desc"),hotkey:"Shift+R"},{title:i("hotkeys:upscale.title"),desc:i("hotkeys:upscale.desc"),hotkey:"Shift+U"},{title:i("hotkeys:showInfo.title"),desc:i("hotkeys:showInfo.desc"),hotkey:"I"},{title:i("hotkeys:sendToImageToImage.title"),desc:i("hotkeys:sendToImageToImage.desc"),hotkey:"Shift+I"},{title:i("hotkeys:deleteImage.title"),desc:i("hotkeys:deleteImage.desc"),hotkey:"Del"},{title:i("hotkeys:closePanels.title"),desc:i("hotkeys:closePanels.desc"),hotkey:"Esc"}],s=[{title:i("hotkeys:previousImage.title"),desc:i("hotkeys:previousImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextImage.title"),desc:i("hotkeys:nextImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:toggleGalleryPin.title"),desc:i("hotkeys:toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:i("hotkeys:increaseGalleryThumbSize.title"),desc:i("hotkeys:increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:i("hotkeys:decreaseGalleryThumbSize.title"),desc:i("hotkeys:decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],l=[{title:i("hotkeys:selectBrush.title"),desc:i("hotkeys:selectBrush.desc"),hotkey:"B"},{title:i("hotkeys:selectEraser.title"),desc:i("hotkeys:selectEraser.desc"),hotkey:"E"},{title:i("hotkeys:decreaseBrushSize.title"),desc:i("hotkeys:decreaseBrushSize.desc"),hotkey:"["},{title:i("hotkeys:increaseBrushSize.title"),desc:i("hotkeys:increaseBrushSize.desc"),hotkey:"]"},{title:i("hotkeys:decreaseBrushOpacity.title"),desc:i("hotkeys:decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:i("hotkeys:increaseBrushOpacity.title"),desc:i("hotkeys:increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:i("hotkeys:moveTool.title"),desc:i("hotkeys:moveTool.desc"),hotkey:"V"},{title:i("hotkeys:fillBoundingBox.title"),desc:i("hotkeys:fillBoundingBox.desc"),hotkey:"Shift + F"},{title:i("hotkeys:eraseBoundingBox.title"),desc:i("hotkeys:eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:i("hotkeys:colorPicker.title"),desc:i("hotkeys:colorPicker.desc"),hotkey:"C"},{title:i("hotkeys:toggleSnap.title"),desc:i("hotkeys:toggleSnap.desc"),hotkey:"N"},{title:i("hotkeys:quickToggleMove.title"),desc:i("hotkeys:quickToggleMove.desc"),hotkey:"Hold Space"},{title:i("hotkeys:toggleLayer.title"),desc:i("hotkeys:toggleLayer.desc"),hotkey:"Q"},{title:i("hotkeys:clearMask.title"),desc:i("hotkeys:clearMask.desc"),hotkey:"Shift+C"},{title:i("hotkeys:hideMask.title"),desc:i("hotkeys:hideMask.desc"),hotkey:"H"},{title:i("hotkeys:showHideBoundingBox.title"),desc:i("hotkeys:showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:i("hotkeys:mergeVisible.title"),desc:i("hotkeys:mergeVisible.desc"),hotkey:"Shift+M"},{title:i("hotkeys:saveToGallery.title"),desc:i("hotkeys:saveToGallery.desc"),hotkey:"Shift+S"},{title:i("hotkeys:copyToClipboard.title"),desc:i("hotkeys:copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:i("hotkeys:downloadImage.title"),desc:i("hotkeys:downloadImage.desc"),hotkey:"Shift+D"},{title:i("hotkeys:undoStroke.title"),desc:i("hotkeys:undoStroke.desc"),hotkey:"Ctrl+Z"},{title:i("hotkeys:redoStroke.title"),desc:i("hotkeys:redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:i("hotkeys:resetView.title"),desc:i("hotkeys:resetView.desc"),hotkey:"R"},{title:i("hotkeys:previousStagingImage.title"),desc:i("hotkeys:previousStagingImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextStagingImage.title"),desc:i("hotkeys:nextStagingImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:acceptStagingImage.title"),desc:i("hotkeys:acceptStagingImage.desc"),hotkey:"Enter"}],u=f=>{const p=[];return f.forEach((m,v)=>{p.push(y(q8e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),y("div",{className:"hotkey-modal-category",children:p})};return K(fn,{children:[C.exports.cloneElement(e,{onClick:n}),K(Qd,{isOpen:t,onClose:r,children:[y(Jd,{}),K(ep,{className:" modal hotkeys-modal",children:[y(Cy,{className:"modal-close-btn"}),y("h1",{children:"Keyboard Shorcuts"}),y("div",{className:"hotkeys-modal-items",children:K(Nk,{allowMultiple:!0,children:[K(rg,{children:[K(tg,{className:"hotkeys-modal-button",children:[y("h2",{children:i("hotkeys:appHotkeys")}),y(ng,{})]}),y(ig,{children:u(o)})]}),K(rg,{children:[K(tg,{className:"hotkeys-modal-button",children:[y("h2",{children:i("hotkeys:generalHotkeys")}),y(ng,{})]}),y(ig,{children:u(a)})]}),K(rg,{children:[K(tg,{className:"hotkeys-modal-button",children:[y("h2",{children:i("hotkeys:galleryHotkeys")}),y(ng,{})]}),y(ig,{children:u(s)})]}),K(rg,{children:[K(tg,{className:"hotkeys-modal-button",children:[y("h2",{children:i("hotkeys:unifiedCanvasHotkeys")}),y(ng,{})]}),y(ig,{children:u(l)})]})]})})]})]})]})}const os=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return K(Ir,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...i,children:[y(ti,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...o,children:t}),y(kE,{className:"invokeai__switch-root",...s})]})},nl=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="sm",styleClass:l,...u}=e;return K(Ir,{isDisabled:n,className:`invokeai__select ${l}`,onClick:f=>{f.stopPropagation(),f.nativeEvent.stopImmediatePropagation(),f.nativeEvent.stopPropagation(),f.nativeEvent.cancelBubble=!0},children:[t&&y(ti,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),y(so,{label:i,...o,children:y(OV,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(f=>typeof f=="string"||typeof f=="number"?y("option",{value:f,className:"invokeai__select-option",children:f},f):y("option",{value:f.value,className:"invokeai__select-option",children:f.key},f.value))})})]})},JI=/^-?(0\.)?\.?$/,Eo=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:f,min:p,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:x,numberInputFieldProps:E,numberInputStepperProps:k,tooltipProps:_,...T}=e,[A,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!A.match(JI)&&u!==Number(A)&&R(String(u))},[u,A]);const I=B=>{R(B),B.match(JI)||f(v?Math.floor(Number(B)):Number(B))},D=B=>{const z=He.clamp(v?Math.floor(Number(B.target.value)):Number(B.target.value),p,m);R(String(z)),f(z)};return y(so,{..._,children:K(Ir,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&y(ti,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...x,children:t}),K(gE,{className:"invokeai__number-input-root",value:A,min:p,max:m,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:D,width:a,...T,children:[y(mE,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&K("div",{className:"invokeai__number-input-stepper",children:[y(yE,{...k,className:"invokeai__number-input-stepper-button"}),y(vE,{...k,className:"invokeai__number-input-stepper-button"})]})]})]})})},al=e=>e.system,K8e=e=>e.system.toastQueue,_r=lt(e=>e.options,e=>zE[e.activeTab],{memoizeOptions:{equalityCheck:He.isEqual}});lt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:He.isEqual}});const dP=e=>e.options,X8e=lt([al,dP],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:He.map(o,(u,f)=>f),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l}},{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),Z8e=({children:e})=>{const t=Be(),{t:n}=Ke(),r=ve(_=>_.options.steps),{isOpen:i,onOpen:o,onClose:a}=Qh(),{isOpen:s,onOpen:l,onClose:u}=Qh(),{shouldDisplayInProgressType:f,shouldConfirmOnDelete:p,shouldDisplayGuides:m,saveIntermediatesInterval:v,enableImageDebugging:b,shouldUseCanvasBetaLayout:x}=ve(X8e),E=()=>{MG.purge().then(()=>{a(),l()})},k=_=>{_>r&&(_=r),_<1&&(_=1),t(dwe(_))};return K(fn,{children:[C.exports.cloneElement(e,{onClick:o}),K(Qd,{isOpen:i,onClose:a,size:"lg",children:[y(Jd,{}),K(ep,{className:"modal settings-modal",children:[y(S1,{className:"settings-modal-header",children:n("common:settingsLabel")}),y(Cy,{className:"modal-close-btn"}),K(t1,{className:"settings-modal-content",children:[K("div",{className:"settings-modal-items",children:[K("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[y(nl,{label:n("settings:displayInProgress"),validValues:aCe,value:f,onChange:_=>t(iwe(_.target.value))}),f==="full-res"&&y(Eo,{label:n("settings:saveSteps"),min:1,max:r,step:1,onChange:k,value:v,width:"auto",textAlign:"center"})]}),y(os,{styleClass:"settings-modal-item",label:n("settings:confirmOnDelete"),isChecked:p,onChange:_=>t(eW(_.target.checked))}),y(os,{styleClass:"settings-modal-item",label:n("settings:displayHelpIcons"),isChecked:m,onChange:_=>t(lwe(_.target.checked))}),y(os,{styleClass:"settings-modal-item",label:n("settings:useCanvasBeta"),isChecked:x,onChange:_=>t(cSe(_.target.checked))})]}),K("div",{className:"settings-modal-items",children:[y("h2",{style:{fontWeight:"bold"},children:"Developer"}),y(os,{styleClass:"settings-modal-item",label:n("settings:enableImageDebugging"),isChecked:b,onChange:_=>t(fwe(_.target.checked))})]}),K("div",{className:"settings-modal-reset",children:[y(Hh,{size:"md",children:n("settings:resetWebUI")}),y(ds,{colorScheme:"red",onClick:E,children:n("settings:resetWebUI")}),y(yr,{children:n("settings:resetWebUIDesc1")}),y(yr,{children:n("settings:resetWebUIDesc2")})]})]}),y(cx,{children:y(ds,{onClick:a,className:"modal-close-btn",children:n("common:close")})})]})]}),K(Qd,{closeOnOverlayClick:!1,isOpen:s,onClose:u,isCentered:!0,children:[y(Jd,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),y(ep,{children:y(t1,{pb:6,pt:6,children:y(at,{justifyContent:"center",children:y(yr,{fontSize:"lg",children:y(yr,{children:n("settings:resetComplete")})})})})})]})]})},Q8e=lt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),J8e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ve(Q8e),s=Be(),{t:l}=Ke();let u;e&&!o?u="status-good":u="status-bad";let f=i;return[l("common:statusGenerating"),l("common:statusPreparing"),l("common:statusSavingImage"),l("common:statusRestoringFaces"),l("common:statusUpscaling")].includes(f)&&(u="status-working"),f&&t&&r>1&&(f=l(f)+` (${n}/${r})`),y(so,{label:o&&!a?"Click to clear, check logs for details":void 0,children:y(yr,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(tW())},className:`status ${u}`,children:l(f)})})},Js=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return K(bE,{...o,children:[y(wE,{children:t}),K(xE,{className:`invokeai__popover-content ${r}`,children:[i&&y(SE,{className:"invokeai__popover-arrow"}),n]})]})},qr=Oe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return y(so,{label:r,...i,children:y(ds,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function e_e(){const{t:e}=Ke(),{setColorMode:t,colorMode:n}=uy(),r=Be(),i=ve(l=>l.options.currentTheme),o={dark:e("common:darkTheme"),light:e("common:lightTheme"),green:e("common:greenTheme")};C.exports.useEffect(()=>{n!==i&&t(i)},[t,n,i]);const a=l=>{r(Q5e(l))},s=()=>{const l=[];return Object.keys(o).forEach(u=>{l.push(y(qr,{style:{width:"6rem"},leftIcon:i===u?y(aP,{}):void 0,size:"sm",onClick:()=>a(u),children:o[u]},u))}),l};return y(Js,{trigger:"hover",triggerComponent:y(Qe,{"aria-label":e("common:themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y(B8e,{})}),children:y(pi,{align:"stretch",children:s()})})}const t_e=lt([al],e=>{const{isProcessing:t,model_list:n}=e,r=He.map(n,(a,s)=>s),i=He.reduce(n,(a,s,l)=>(s.status==="active"&&(a=l),a),""),o=n[i].description;return{models:r,activeModel:i,isProcessing:t,activeDesc:o}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),n_e=()=>{const e=Be(),{models:t,activeModel:n,isProcessing:r,activeDesc:i}=ve(t_e);return y(at,{style:{paddingLeft:"0.3rem"},children:y(nl,{style:{fontSize:"0.8rem"},tooltip:i,isDisabled:r,value:n,validValues:t,onChange:a=>{e(BW(a.target.value))}})})};function rs(e){const{label:t="",styleClass:n,isDisabled:r=!1,fontSize:i="sm",width:o,size:a="sm",isInvalid:s,...l}=e;return K(Ir,{className:`input ${n}`,isInvalid:s,isDisabled:r,children:[t!==""&&y(ti,{fontSize:i,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),y(Uk,{...l,className:"input-entry",size:a,width:o})]})}var eD=Array.isArray,tD=Object.keys,r_e=Object.prototype.hasOwnProperty,i_e=typeof Element<"u";function w8(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=eD(e),r=eD(t),i,o,a;if(n&&r){if(o=e.length,o!=t.length)return!1;for(i=o;i--!==0;)if(!w8(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var p=tD(e);if(o=p.length,o!==tD(t).length)return!1;for(i=o;i--!==0;)if(!r_e.call(t,p[i]))return!1;if(i_e&&e instanceof Element&&t instanceof Element)return e===t;for(i=o;i--!==0;)if(a=p[i],!(a==="_owner"&&e.$$typeof)&&!w8(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}var Sd=function(t,n){try{return w8(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}},o_e=function(t){return a_e(t)&&!s_e(t)};function a_e(e){return!!e&&typeof e=="object"}function s_e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||c_e(e)}var l_e=typeof Symbol=="function"&&Symbol.for,u_e=l_e?Symbol.for("react.element"):60103;function c_e(e){return e.$$typeof===u_e}function d_e(e){return Array.isArray(e)?[]:{}}function q5(e,t){return t.clone!==!1&&t.isMergeableObject(e)?J2(d_e(e),e,t):e}function f_e(e,t,n){return e.concat(t).map(function(r){return q5(r,n)})}function h_e(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=q5(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=q5(t[i],n):r[i]=J2(e[i],t[i],n)}),r}function J2(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||f_e,n.isMergeableObject=n.isMergeableObject||o_e;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):h_e(e,t,n):q5(t,n)}J2.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return J2(r,i,n)},{})};var C8=J2,p_e=typeof global=="object"&&global&&global.Object===Object&&global;const GG=p_e;var g_e=typeof self=="object"&&self&&self.Object===Object&&self,m_e=GG||g_e||Function("return this")();const Su=m_e;var v_e=Su.Symbol;const rf=v_e;var qG=Object.prototype,y_e=qG.hasOwnProperty,b_e=qG.toString,cv=rf?rf.toStringTag:void 0;function S_e(e){var t=y_e.call(e,cv),n=e[cv];try{e[cv]=void 0;var r=!0}catch(o){}var i=b_e.call(e);return r&&(t?e[cv]=n:delete e[cv]),i}var x_e=Object.prototype,w_e=x_e.toString;function C_e(e){return w_e.call(e)}var __e="[object Null]",k_e="[object Undefined]",nD=rf?rf.toStringTag:void 0;function bp(e){return e==null?e===void 0?k_e:__e:nD&&nD in Object(e)?S_e(e):C_e(e)}function YG(e,t){return function(n){return e(t(n))}}var E_e=YG(Object.getPrototypeOf,Object);const fP=E_e;function Sp(e){return e!=null&&typeof e=="object"}var P_e="[object Object]",T_e=Function.prototype,L_e=Object.prototype,KG=T_e.toString,A_e=L_e.hasOwnProperty,O_e=KG.call(Object);function rD(e){if(!Sp(e)||bp(e)!=P_e)return!1;var t=fP(e);if(t===null)return!0;var n=A_e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&KG.call(n)==O_e}function M_e(){this.__data__=[],this.size=0}function XG(e,t){return e===t||e!==e&&t!==t}function Bx(e,t){for(var n=e.length;n--;)if(XG(e[n][0],t))return n;return-1}var R_e=Array.prototype,I_e=R_e.splice;function D_e(e){var t=this.__data__,n=Bx(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():I_e.call(t,n,1),--this.size,!0}function N_e(e){var t=this.__data__,n=Bx(t,e);return n<0?void 0:t[n][1]}function B_e(e){return Bx(this.__data__,e)>-1}function $_e(e,t){var n=this.__data__,r=Bx(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yc(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])}}yc.prototype.clear=M_e;yc.prototype.delete=D_e;yc.prototype.get=N_e;yc.prototype.has=B_e;yc.prototype.set=$_e;function F_e(){this.__data__=new yc,this.size=0}function z_e(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function j_e(e){return this.__data__.get(e)}function H_e(e){return this.__data__.has(e)}function Dy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var V_e="[object AsyncFunction]",U_e="[object Function]",W_e="[object GeneratorFunction]",G_e="[object Proxy]";function ZG(e){if(!Dy(e))return!1;var t=bp(e);return t==U_e||t==W_e||t==V_e||t==G_e}var q_e=Su["__core-js_shared__"];const kC=q_e;var iD=function(){var e=/[^.]+$/.exec(kC&&kC.keys&&kC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Y_e(e){return!!iD&&iD in e}var K_e=Function.prototype,X_e=K_e.toString;function xp(e){if(e!=null){try{return X_e.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Z_e=/[\\^$.*+?()[\]{}|]/g,Q_e=/^\[object .+?Constructor\]$/,J_e=Function.prototype,eke=Object.prototype,tke=J_e.toString,nke=eke.hasOwnProperty,rke=RegExp("^"+tke.call(nke).replace(Z_e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ike(e){if(!Dy(e)||Y_e(e))return!1;var t=ZG(e)?rke:Q_e;return t.test(xp(e))}function oke(e,t){return e==null?void 0:e[t]}function wp(e,t){var n=oke(e,t);return ike(n)?n:void 0}var ake=wp(Su,"Map");const ey=ake;var ske=wp(Object,"create");const ty=ske;function lke(){this.__data__=ty?ty(null):{},this.size=0}function uke(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cke="__lodash_hash_undefined__",dke=Object.prototype,fke=dke.hasOwnProperty;function hke(e){var t=this.__data__;if(ty){var n=t[e];return n===cke?void 0:n}return fke.call(t,e)?t[e]:void 0}var pke=Object.prototype,gke=pke.hasOwnProperty;function mke(e){var t=this.__data__;return ty?t[e]!==void 0:gke.call(t,e)}var vke="__lodash_hash_undefined__";function yke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ty&&t===void 0?vke:t,this}function ip(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])}}ip.prototype.clear=lke;ip.prototype.delete=uke;ip.prototype.get=hke;ip.prototype.has=mke;ip.prototype.set=yke;function bke(){this.size=0,this.__data__={hash:new ip,map:new(ey||yc),string:new ip}}function Ske(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $x(e,t){var n=e.__data__;return Ske(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xke(e){var t=$x(this,e).delete(e);return this.size-=t?1:0,t}function wke(e){return $x(this,e).get(e)}function Cke(e){return $x(this,e).has(e)}function _ke(e,t){var n=$x(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function yf(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])}}yf.prototype.clear=bke;yf.prototype.delete=xke;yf.prototype.get=wke;yf.prototype.has=Cke;yf.prototype.set=_ke;var kke=200;function Eke(e,t){var n=this.__data__;if(n instanceof yc){var r=n.__data__;if(!ey||r.length<kke-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new yf(r)}return n.set(e,t),this.size=n.size,this}function P1(e){var t=this.__data__=new yc(e);this.size=t.size}P1.prototype.clear=F_e;P1.prototype.delete=z_e;P1.prototype.get=j_e;P1.prototype.has=H_e;P1.prototype.set=Eke;function Pke(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Tke=function(){try{var e=wp(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const oD=Tke;function QG(e,t,n){t=="__proto__"&&oD?oD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Lke=Object.prototype,Ake=Lke.hasOwnProperty;function JG(e,t,n){var r=e[t];(!(Ake.call(e,t)&&XG(r,n))||n===void 0&&!(t in e))&&QG(e,t,n)}function Fx(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?QG(n,s,l):JG(n,s,l)}return n}function Oke(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Mke="[object Arguments]";function aD(e){return Sp(e)&&bp(e)==Mke}var eq=Object.prototype,Rke=eq.hasOwnProperty,Ike=eq.propertyIsEnumerable,Dke=aD(function(){return arguments}())?aD:function(e){return Sp(e)&&Rke.call(e,"callee")&&!Ike.call(e,"callee")};const Nke=Dke;var Bke=Array.isArray;const Ny=Bke;function $ke(){return!1}var tq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sD=tq&&typeof module=="object"&&module&&!module.nodeType&&module,Fke=sD&&sD.exports===tq,lD=Fke?Su.Buffer:void 0,zke=lD?lD.isBuffer:void 0,jke=zke||$ke;const nq=jke;var Hke=9007199254740991,Vke=/^(?:0|[1-9]\d*)$/;function Uke(e,t){var n=typeof e;return t=t==null?Hke:t,!!t&&(n=="number"||n!="symbol"&&Vke.test(e))&&e>-1&&e%1==0&&e<t}var Wke=9007199254740991;function rq(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Wke}var Gke="[object Arguments]",qke="[object Array]",Yke="[object Boolean]",Kke="[object Date]",Xke="[object Error]",Zke="[object Function]",Qke="[object Map]",Jke="[object Number]",eEe="[object Object]",tEe="[object RegExp]",nEe="[object Set]",rEe="[object String]",iEe="[object WeakMap]",oEe="[object ArrayBuffer]",aEe="[object DataView]",sEe="[object Float32Array]",lEe="[object Float64Array]",uEe="[object Int8Array]",cEe="[object Int16Array]",dEe="[object Int32Array]",fEe="[object Uint8Array]",hEe="[object Uint8ClampedArray]",pEe="[object Uint16Array]",gEe="[object Uint32Array]",ir={};ir[sEe]=ir[lEe]=ir[uEe]=ir[cEe]=ir[dEe]=ir[fEe]=ir[hEe]=ir[pEe]=ir[gEe]=!0;ir[Gke]=ir[qke]=ir[oEe]=ir[Yke]=ir[aEe]=ir[Kke]=ir[Xke]=ir[Zke]=ir[Qke]=ir[Jke]=ir[eEe]=ir[tEe]=ir[nEe]=ir[rEe]=ir[iEe]=!1;function mEe(e){return Sp(e)&&rq(e.length)&&!!ir[bp(e)]}function hP(e){return function(t){return e(t)}}var iq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o2=iq&&typeof module=="object"&&module&&!module.nodeType&&module,vEe=o2&&o2.exports===iq,EC=vEe&&GG.process,yEe=function(){try{var e=o2&&o2.require&&o2.require("util").types;return e||EC&&EC.binding&&EC.binding("util")}catch(t){}}();const i1=yEe;var uD=i1&&i1.isTypedArray,bEe=uD?hP(uD):mEe;const SEe=bEe;var xEe=Object.prototype,wEe=xEe.hasOwnProperty;function oq(e,t){var n=Ny(e),r=!n&&Nke(e),i=!n&&!r&&nq(e),o=!n&&!r&&!i&&SEe(e),a=n||r||i||o,s=a?Oke(e.length,String):[],l=s.length;for(var u in e)(t||wEe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Uke(u,l)))&&s.push(u);return s}var CEe=Object.prototype;function pP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||CEe;return e===n}var _Ee=YG(Object.keys,Object);const kEe=_Ee;var EEe=Object.prototype,PEe=EEe.hasOwnProperty;function TEe(e){if(!pP(e))return kEe(e);var t=[];for(var n in Object(e))PEe.call(e,n)&&n!="constructor"&&t.push(n);return t}function aq(e){return e!=null&&rq(e.length)&&!ZG(e)}function gP(e){return aq(e)?oq(e):TEe(e)}function LEe(e,t){return e&&Fx(t,gP(t),e)}function AEe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var OEe=Object.prototype,MEe=OEe.hasOwnProperty;function REe(e){if(!Dy(e))return AEe(e);var t=pP(e),n=[];for(var r in e)r=="constructor"&&(t||!MEe.call(e,r))||n.push(r);return n}function mP(e){return aq(e)?oq(e,!0):REe(e)}function IEe(e,t){return e&&Fx(t,mP(t),e)}var sq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cD=sq&&typeof module=="object"&&module&&!module.nodeType&&module,DEe=cD&&cD.exports===sq,dD=DEe?Su.Buffer:void 0,fD=dD?dD.allocUnsafe:void 0;function NEe(e,t){if(t)return e.slice();var n=e.length,r=fD?fD(n):new e.constructor(n);return e.copy(r),r}function lq(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function BEe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function uq(){return[]}var $Ee=Object.prototype,FEe=$Ee.propertyIsEnumerable,hD=Object.getOwnPropertySymbols,zEe=hD?function(e){return e==null?[]:(e=Object(e),BEe(hD(e),function(t){return FEe.call(e,t)}))}:uq;const vP=zEe;function jEe(e,t){return Fx(e,vP(e),t)}function cq(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var HEe=Object.getOwnPropertySymbols,VEe=HEe?function(e){for(var t=[];e;)cq(t,vP(e)),e=fP(e);return t}:uq;const dq=VEe;function UEe(e,t){return Fx(e,dq(e),t)}function fq(e,t,n){var r=t(e);return Ny(e)?r:cq(r,n(e))}function WEe(e){return fq(e,gP,vP)}function GEe(e){return fq(e,mP,dq)}var qEe=wp(Su,"DataView");const _8=qEe;var YEe=wp(Su,"Promise");const k8=YEe;var KEe=wp(Su,"Set");const E8=KEe;var XEe=wp(Su,"WeakMap");const P8=XEe;var pD="[object Map]",ZEe="[object Object]",gD="[object Promise]",mD="[object Set]",vD="[object WeakMap]",yD="[object DataView]",QEe=xp(_8),JEe=xp(ey),ePe=xp(k8),tPe=xp(E8),nPe=xp(P8),bh=bp;(_8&&bh(new _8(new ArrayBuffer(1)))!=yD||ey&&bh(new ey)!=pD||k8&&bh(k8.resolve())!=gD||E8&&bh(new E8)!=mD||P8&&bh(new P8)!=vD)&&(bh=function(e){var t=bp(e),n=t==ZEe?e.constructor:void 0,r=n?xp(n):"";if(r)switch(r){case QEe:return yD;case JEe:return pD;case ePe:return gD;case tPe:return mD;case nPe:return vD}return t});const yP=bh;var rPe=Object.prototype,iPe=rPe.hasOwnProperty;function oPe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&iPe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var aPe=Su.Uint8Array;const bD=aPe;function bP(e){var t=new e.constructor(e.byteLength);return new bD(t).set(new bD(e)),t}function sPe(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var lPe=/\w*$/;function uPe(e){var t=new e.constructor(e.source,lPe.exec(e));return t.lastIndex=e.lastIndex,t}var SD=rf?rf.prototype:void 0,xD=SD?SD.valueOf:void 0;function cPe(e){return xD?Object(xD.call(e)):{}}function dPe(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var fPe="[object Boolean]",hPe="[object Date]",pPe="[object Map]",gPe="[object Number]",mPe="[object RegExp]",vPe="[object Set]",yPe="[object String]",bPe="[object Symbol]",SPe="[object ArrayBuffer]",xPe="[object DataView]",wPe="[object Float32Array]",CPe="[object Float64Array]",_Pe="[object Int8Array]",kPe="[object Int16Array]",EPe="[object Int32Array]",PPe="[object Uint8Array]",TPe="[object Uint8ClampedArray]",LPe="[object Uint16Array]",APe="[object Uint32Array]";function OPe(e,t,n){var r=e.constructor;switch(t){case SPe:return bP(e);case fPe:case hPe:return new r(+e);case xPe:return sPe(e,n);case wPe:case CPe:case _Pe:case kPe:case EPe:case PPe:case TPe:case LPe:case APe:return dPe(e,n);case pPe:return new r;case gPe:case yPe:return new r(e);case mPe:return uPe(e);case vPe:return new r;case bPe:return cPe(e)}}var wD=Object.create,MPe=function(){function e(){}return function(t){if(!Dy(t))return{};if(wD)return wD(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const RPe=MPe;function IPe(e){return typeof e.constructor=="function"&&!pP(e)?RPe(fP(e)):{}}var DPe="[object Map]";function NPe(e){return Sp(e)&&yP(e)==DPe}var CD=i1&&i1.isMap,BPe=CD?hP(CD):NPe;const $Pe=BPe;var FPe="[object Set]";function zPe(e){return Sp(e)&&yP(e)==FPe}var _D=i1&&i1.isSet,jPe=_D?hP(_D):zPe;const HPe=jPe;var VPe=1,UPe=2,WPe=4,hq="[object Arguments]",GPe="[object Array]",qPe="[object Boolean]",YPe="[object Date]",KPe="[object Error]",pq="[object Function]",XPe="[object GeneratorFunction]",ZPe="[object Map]",QPe="[object Number]",gq="[object Object]",JPe="[object RegExp]",eTe="[object Set]",tTe="[object String]",nTe="[object Symbol]",rTe="[object WeakMap]",iTe="[object ArrayBuffer]",oTe="[object DataView]",aTe="[object Float32Array]",sTe="[object Float64Array]",lTe="[object Int8Array]",uTe="[object Int16Array]",cTe="[object Int32Array]",dTe="[object Uint8Array]",fTe="[object Uint8ClampedArray]",hTe="[object Uint16Array]",pTe="[object Uint32Array]",Zn={};Zn[hq]=Zn[GPe]=Zn[iTe]=Zn[oTe]=Zn[qPe]=Zn[YPe]=Zn[aTe]=Zn[sTe]=Zn[lTe]=Zn[uTe]=Zn[cTe]=Zn[ZPe]=Zn[QPe]=Zn[gq]=Zn[JPe]=Zn[eTe]=Zn[tTe]=Zn[nTe]=Zn[dTe]=Zn[fTe]=Zn[hTe]=Zn[pTe]=!0;Zn[KPe]=Zn[pq]=Zn[rTe]=!1;function a2(e,t,n,r,i,o){var a,s=t&VPe,l=t&UPe,u=t&WPe;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!Dy(e))return e;var f=Ny(e);if(f){if(a=oPe(e),!s)return lq(e,a)}else{var p=yP(e),m=p==pq||p==XPe;if(nq(e))return NEe(e,s);if(p==gq||p==hq||m&&!i){if(a=l||m?{}:IPe(e),!s)return l?UEe(e,IEe(a,e)):jEe(e,LEe(a,e))}else{if(!Zn[p])return i?e:{};a=OPe(e,p,s)}}o||(o=new P1);var v=o.get(e);if(v)return v;o.set(e,a),HPe(e)?e.forEach(function(E){a.add(a2(E,t,n,E,e,o))}):$Pe(e)&&e.forEach(function(E,k){a.set(k,a2(E,t,n,k,e,o))});var b=u?l?GEe:WEe:l?mP:gP,x=f?void 0:b(e);return Pke(x||e,function(E,k){x&&(k=E,E=e[k]),JG(a,k,a2(E,t,n,k,e,o))}),a}var gTe=4;function kD(e){return a2(e,gTe)}function mq(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var mTe="[object Symbol]";function SP(e){return typeof e=="symbol"||Sp(e)&&bp(e)==mTe}var vTe="Expected a function";function xP(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vTe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(xP.Cache||yf),n}xP.Cache=yf;var yTe=500;function bTe(e){var t=xP(e,function(r){return n.size===yTe&&n.clear(),r}),n=t.cache;return t}var STe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xTe=/\\(\\)?/g,wTe=bTe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(STe,function(n,r,i,o){t.push(i?o.replace(xTe,"$1"):r||n)}),t});const CTe=wTe;var _Te=1/0;function kTe(e){if(typeof e=="string"||SP(e))return e;var t=e+"";return t=="0"&&1/e==-_Te?"-0":t}var ETe=1/0,ED=rf?rf.prototype:void 0,PD=ED?ED.toString:void 0;function vq(e){if(typeof e=="string")return e;if(Ny(e))return mq(e,vq)+"";if(SP(e))return PD?PD.call(e):"";var t=e+"";return t=="0"&&1/e==-ETe?"-0":t}function PTe(e){return e==null?"":vq(e)}function yq(e){return Ny(e)?mq(e,kTe):SP(e)?[e]:lq(CTe(PTe(e)))}var TTe=!0;function LTe(e,t){if(!TTe){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch(r){}}}var ATe=1,OTe=4;function MTe(e){return a2(e,ATe|OTe)}function Wn(){return Wn=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},Wn.apply(this,arguments)}function RTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ih(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function TD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var LD=function(t){return Array.isArray(t)&&t.length===0},Vo=function(t){return typeof t=="function"},zx=function(t){return t!==null&&typeof t=="object"},ITe=function(t){return String(Math.floor(Number(t)))===t},PC=function(t){return Object.prototype.toString.call(t)==="[object String]"},bq=function(t){return C.exports.Children.count(t)===0},TC=function(t){return zx(t)&&Vo(t.then)};function Hi(e,t,n,r){r===void 0&&(r=0);for(var i=yq(t);e&&r<i.length;)e=e[i[r++]];return e===void 0?n:e}function au(e,t,n){for(var r=kD(e),i=r,o=0,a=yq(t);o<a.length-1;o++){var s=a[o],l=Hi(e,a.slice(0,o+1));if(l&&(zx(l)||Array.isArray(l)))i=i[s]=kD(l);else{var u=a[o+1];i=i[s]=ITe(u)&&Number(u)>=0?[]:{}}}return(o===0?e:i)[a[o]]===n?e:(n===void 0?delete i[a[o]]:i[a[o]]=n,o===0&&n===void 0&&delete r[a[o]],r)}function Sq(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],s=e[a];zx(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},Sq(s,t,n,r[a])):r[a]=t}return r}var jx=C.exports.createContext(void 0);jx.displayName="FormikContext";var DTe=jx.Provider;jx.Consumer;function xq(){var e=C.exports.useContext(jx);return e||LTe(!1),e}function NTe(e,t){switch(t.type){case"SET_VALUES":return Wn({},e,{values:t.payload});case"SET_TOUCHED":return Wn({},e,{touched:t.payload});case"SET_ERRORS":return Sd(e.errors,t.payload)?e:Wn({},e,{errors:t.payload});case"SET_STATUS":return Wn({},e,{status:t.payload});case"SET_ISSUBMITTING":return Wn({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Wn({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Wn({},e,{values:au(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Wn({},e,{touched:au(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Wn({},e,{errors:au(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Wn({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Wn({},e,{touched:Sq(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Wn({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Wn({},e,{isSubmitting:!1});default:return e}}var fh={},Nb={};function BTe(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,o=e.validateOnMount,a=o===void 0?!1:o,s=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,p=Ih(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),m=Wn({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:f},p),v=C.exports.useRef(m.initialValues),b=C.exports.useRef(m.initialErrors||fh),x=C.exports.useRef(m.initialTouched||Nb),E=C.exports.useRef(m.initialStatus),k=C.exports.useRef(!1),_=C.exports.useRef({});C.exports.useEffect(function(){return k.current=!0,function(){k.current=!1}},[]);var T=C.exports.useReducer(NTe,{values:m.initialValues,errors:m.initialErrors||fh,touched:m.initialTouched||Nb,status:m.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),A=T[0],R=T[1],I=C.exports.useCallback(function(ue,Ie){return new Promise(function(We,Xe){var Ce=m.validate(ue,Ie);Ce==null?We(fh):TC(Ce)?Ce.then(function(Ne){We(Ne||fh)},function(Ne){Xe(Ne)}):We(Ce)})},[m.validate]),D=C.exports.useCallback(function(ue,Ie){var We=m.validationSchema,Xe=Vo(We)?We(Ie):We,Ce=Ie&&Xe.validateAt?Xe.validateAt(Ie,ue):FTe(ue,Xe);return new Promise(function(Ne,kt){Ce.then(function(){Ne(fh)},function(Nt){Nt.name==="ValidationError"?Ne($Te(Nt)):kt(Nt)})})},[m.validationSchema]),B=C.exports.useCallback(function(ue,Ie){return new Promise(function(We){return We(_.current[ue].validate(Ie))})},[]),z=C.exports.useCallback(function(ue){var Ie=Object.keys(_.current).filter(function(Xe){return Vo(_.current[Xe].validate)}),We=Ie.length>0?Ie.map(function(Xe){return B(Xe,Hi(ue,Xe))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(We).then(function(Xe){return Xe.reduce(function(Ce,Ne,kt){return Ne==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Ne&&(Ce=au(Ce,Ie[kt],Ne)),Ce},{})})},[B]),j=C.exports.useCallback(function(ue){return Promise.all([z(ue),m.validationSchema?D(ue):{},m.validate?I(ue):{}]).then(function(Ie){var We=Ie[0],Xe=Ie[1],Ce=Ie[2],Ne=C8.all([We,Xe,Ce],{arrayMerge:zTe});return Ne})},[m.validate,m.validationSchema,z,I,D]),Y=Xa(function(ue){return ue===void 0&&(ue=A.values),R({type:"SET_ISVALIDATING",payload:!0}),j(ue).then(function(Ie){return k.current&&(R({type:"SET_ISVALIDATING",payload:!1}),R({type:"SET_ERRORS",payload:Ie})),Ie})});C.exports.useEffect(function(){a&&k.current===!0&&Sd(v.current,m.initialValues)&&Y(v.current)},[a,Y]);var te=C.exports.useCallback(function(ue){var Ie=ue&&ue.values?ue.values:v.current,We=ue&&ue.errors?ue.errors:b.current?b.current:m.initialErrors||{},Xe=ue&&ue.touched?ue.touched:x.current?x.current:m.initialTouched||{},Ce=ue&&ue.status?ue.status:E.current?E.current:m.initialStatus;v.current=Ie,b.current=We,x.current=Xe,E.current=Ce;var Ne=function(){R({type:"RESET_FORM",payload:{isSubmitting:!!ue&&!!ue.isSubmitting,errors:We,touched:Xe,status:Ce,values:Ie,isValidating:!!ue&&!!ue.isValidating,submitCount:!!ue&&!!ue.submitCount&&typeof ue.submitCount=="number"?ue.submitCount:0}})};if(m.onReset){var kt=m.onReset(A.values,dt);TC(kt)?kt.then(Ne):Ne()}else Ne()},[m.initialErrors,m.initialStatus,m.initialTouched]);C.exports.useEffect(function(){k.current===!0&&!Sd(v.current,m.initialValues)&&(u&&(v.current=m.initialValues,te()),a&&Y(v.current))},[u,m.initialValues,te,a,Y]),C.exports.useEffect(function(){u&&k.current===!0&&!Sd(b.current,m.initialErrors)&&(b.current=m.initialErrors||fh,R({type:"SET_ERRORS",payload:m.initialErrors||fh}))},[u,m.initialErrors]),C.exports.useEffect(function(){u&&k.current===!0&&!Sd(x.current,m.initialTouched)&&(x.current=m.initialTouched||Nb,R({type:"SET_TOUCHED",payload:m.initialTouched||Nb}))},[u,m.initialTouched]),C.exports.useEffect(function(){u&&k.current===!0&&!Sd(E.current,m.initialStatus)&&(E.current=m.initialStatus,R({type:"SET_STATUS",payload:m.initialStatus}))},[u,m.initialStatus,m.initialTouched]);var G=Xa(function(ue){if(_.current[ue]&&Vo(_.current[ue].validate)){var Ie=Hi(A.values,ue),We=_.current[ue].validate(Ie);return TC(We)?(R({type:"SET_ISVALIDATING",payload:!0}),We.then(function(Xe){return Xe}).then(function(Xe){R({type:"SET_FIELD_ERROR",payload:{field:ue,value:Xe}}),R({type:"SET_ISVALIDATING",payload:!1})})):(R({type:"SET_FIELD_ERROR",payload:{field:ue,value:We}}),Promise.resolve(We))}else if(m.validationSchema)return R({type:"SET_ISVALIDATING",payload:!0}),D(A.values,ue).then(function(Xe){return Xe}).then(function(Xe){R({type:"SET_FIELD_ERROR",payload:{field:ue,value:Xe[ue]}}),R({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),$=C.exports.useCallback(function(ue,Ie){var We=Ie.validate;_.current[ue]={validate:We}},[]),V=C.exports.useCallback(function(ue){delete _.current[ue]},[]),J=Xa(function(ue,Ie){R({type:"SET_TOUCHED",payload:ue});var We=Ie===void 0?i:Ie;return We?Y(A.values):Promise.resolve()}),Z=C.exports.useCallback(function(ue){R({type:"SET_ERRORS",payload:ue})},[]),U=Xa(function(ue,Ie){var We=Vo(ue)?ue(A.values):ue;R({type:"SET_VALUES",payload:We});var Xe=Ie===void 0?n:Ie;return Xe?Y(We):Promise.resolve()}),X=C.exports.useCallback(function(ue,Ie){R({type:"SET_FIELD_ERROR",payload:{field:ue,value:Ie}})},[]),le=Xa(function(ue,Ie,We){R({type:"SET_FIELD_VALUE",payload:{field:ue,value:Ie}});var Xe=We===void 0?n:We;return Xe?Y(au(A.values,ue,Ie)):Promise.resolve()}),fe=C.exports.useCallback(function(ue,Ie){var We=Ie,Xe=ue,Ce;if(!PC(ue)){ue.persist&&ue.persist();var Ne=ue.target?ue.target:ue.currentTarget,kt=Ne.type,Nt=Ne.name,Te=Ne.id,Et=Ne.value,Ut=Ne.checked,Ve=Ne.outerHTML,ft=Ne.options,un=Ne.multiple;We=Ie||Nt||Te,Xe=/number|range/.test(kt)?(Ce=parseFloat(Et),isNaN(Ce)?"":Ce):/checkbox/.test(kt)?HTe(Hi(A.values,We),Ut,Et):ft&&un?jTe(ft):Et}We&&le(We,Xe)},[le,A.values]),Se=Xa(function(ue){if(PC(ue))return function(Ie){return fe(Ie,ue)};fe(ue)}),Ae=Xa(function(ue,Ie,We){Ie===void 0&&(Ie=!0),R({type:"SET_FIELD_TOUCHED",payload:{field:ue,value:Ie}});var Xe=We===void 0?i:We;return Xe?Y(A.values):Promise.resolve()}),be=C.exports.useCallback(function(ue,Ie){ue.persist&&ue.persist();var We=ue.target,Xe=We.name,Ce=We.id,Ne=We.outerHTML,kt=Ie||Xe||Ce;Ae(kt,!0)},[Ae]),ke=Xa(function(ue){if(PC(ue))return function(Ie){return be(Ie,ue)};be(ue)}),De=C.exports.useCallback(function(ue){Vo(ue)?R({type:"SET_FORMIK_STATE",payload:ue}):R({type:"SET_FORMIK_STATE",payload:function(){return ue}})},[]),Je=C.exports.useCallback(function(ue){R({type:"SET_STATUS",payload:ue})},[]),Ye=C.exports.useCallback(function(ue){R({type:"SET_ISSUBMITTING",payload:ue})},[]),mt=Xa(function(){return R({type:"SUBMIT_ATTEMPT"}),Y().then(function(ue){var Ie=ue instanceof Error,We=!Ie&&Object.keys(ue).length===0;if(We){var Xe;try{if(Xe=vt(),Xe===void 0)return}catch(Ce){throw Ce}return Promise.resolve(Xe).then(function(Ce){return k.current&&R({type:"SUBMIT_SUCCESS"}),Ce}).catch(function(Ce){if(k.current)throw R({type:"SUBMIT_FAILURE"}),Ce})}else if(k.current&&(R({type:"SUBMIT_FAILURE"}),Ie))throw ue})}),_t=Xa(function(ue){ue&&ue.preventDefault&&Vo(ue.preventDefault)&&ue.preventDefault(),ue&&ue.stopPropagation&&Vo(ue.stopPropagation)&&ue.stopPropagation(),mt().catch(function(Ie){console.warn("Warning: An unhandled error was caught from submitForm()",Ie)})}),dt={resetForm:te,validateForm:Y,validateField:G,setErrors:Z,setFieldError:X,setFieldTouched:Ae,setFieldValue:le,setStatus:Je,setSubmitting:Ye,setTouched:J,setValues:U,setFormikState:De,submitForm:mt},vt=Xa(function(){return f(A.values,dt)}),xt=Xa(function(ue){ue&&ue.preventDefault&&Vo(ue.preventDefault)&&ue.preventDefault(),ue&&ue.stopPropagation&&Vo(ue.stopPropagation)&&ue.stopPropagation(),te()}),Le=C.exports.useCallback(function(ue){return{value:Hi(A.values,ue),error:Hi(A.errors,ue),touched:!!Hi(A.touched,ue),initialValue:Hi(v.current,ue),initialTouched:!!Hi(x.current,ue),initialError:Hi(b.current,ue)}},[A.errors,A.touched,A.values]),ut=C.exports.useCallback(function(ue){return{setValue:function(We,Xe){return le(ue,We,Xe)},setTouched:function(We,Xe){return Ae(ue,We,Xe)},setError:function(We){return X(ue,We)}}},[le,Ae,X]),Rt=C.exports.useCallback(function(ue){var Ie=zx(ue),We=Ie?ue.name:ue,Xe=Hi(A.values,We),Ce={name:We,value:Xe,onChange:Se,onBlur:ke};if(Ie){var Ne=ue.type,kt=ue.value,Nt=ue.as,Te=ue.multiple;Ne==="checkbox"?kt===void 0?Ce.checked=!!Xe:(Ce.checked=!!(Array.isArray(Xe)&&~Xe.indexOf(kt)),Ce.value=kt):Ne==="radio"?(Ce.checked=Xe===kt,Ce.value=kt):Nt==="select"&&Te&&(Ce.value=Ce.value||[],Ce.multiple=!0)}return Ce},[ke,Se,A.values]),ot=C.exports.useMemo(function(){return!Sd(v.current,A.values)},[v.current,A.values]),Ct=C.exports.useMemo(function(){return typeof s<"u"?ot?A.errors&&Object.keys(A.errors).length===0:s!==!1&&Vo(s)?s(m):s:A.errors&&Object.keys(A.errors).length===0},[s,ot,A.errors,m]),ln=Wn({},A,{initialValues:v.current,initialErrors:b.current,initialTouched:x.current,initialStatus:E.current,handleBlur:ke,handleChange:Se,handleReset:xt,handleSubmit:_t,resetForm:te,setErrors:Z,setFormikState:De,setFieldTouched:Ae,setFieldValue:le,setFieldError:X,setStatus:Je,setSubmitting:Ye,setTouched:J,setValues:U,submitForm:mt,validateForm:Y,validateField:G,isValid:Ct,dirty:ot,unregisterField:V,registerField:$,getFieldProps:Rt,getFieldMeta:Le,getFieldHelpers:ut,validateOnBlur:i,validateOnChange:n,validateOnMount:a});return ln}function wP(e){var t=BTe(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return C.exports.useImperativeHandle(o,function(){return t}),C.exports.createElement(DTe,{value:t},n?C.exports.createElement(n,t):i?i(t):r?Vo(r)?r(t):bq(r)?null:C.exports.Children.only(r):null)}function $Te(e){var t={};if(e.inner){if(e.inner.length===0)return au(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var o;if(n){if(r>=i.length)break;o=i[r++]}else{if(r=i.next(),r.done)break;o=r.value}var a=o;Hi(t,a.path)||(t=au(t,a.path,a.message))}}return t}function FTe(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r={});var i=T8(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function T8(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||rD(i)?T8(i):i!==""?i:void 0}):rD(e[r])?t[r]=T8(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function zTe(e,t,n){var r=e.slice();return t.forEach(function(o,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(o);r[a]=l?C8(Array.isArray(o)?[]:{},o,n):o}else n.isMergeableObject(o)?r[a]=C8(e[a],o,n):e.indexOf(o)===-1&&r.push(o)}),r}function jTe(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function HTe(e,t,n){if(typeof e=="boolean")return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,o=e.indexOf(n),i=o>=0;else if(!n||n=="true"||n=="false")return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,o).concat(r.slice(o+1)):r}var VTe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function Xa(e){var t=C.exports.useRef(e);return VTe(function(){t.current=e}),C.exports.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}function qo(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,s=Ih(e,["validate","name","render","children","as","component"]),l=xq(),u=Ih(l,["validate","validationSchema"]),f=u.registerField,p=u.unregisterField;C.exports.useEffect(function(){return f(n,{validate:t}),function(){p(n)}},[f,p,n,t]);var m=u.getFieldProps(Wn({name:n},s)),v=u.getFieldMeta(n),b={field:m,form:u};if(r)return r(Wn({},b,{meta:v}));if(Vo(i))return i(Wn({},b,{meta:v}));if(a){if(typeof a=="string"){var x=s.innerRef,E=Ih(s,["innerRef"]);return C.exports.createElement(a,Wn({ref:x},m,E),i)}return C.exports.createElement(a,Wn({field:m,form:u},s),i)}var k=o||"input";if(typeof k=="string"){var _=s.innerRef,T=Ih(s,["innerRef"]);return C.exports.createElement(k,Wn({ref:_},m,T),i)}return C.exports.createElement(k,Wn({},m,s),i)}var UTe=C.exports.forwardRef(function(e,t){var n=e.action,r=Ih(e,["action"]),i=n!=null?n:"#",o=xq(),a=o.handleReset,s=o.handleSubmit;return C.exports.createElement("form",Object.assign({onSubmit:s,ref:t,onReset:a,action:i},r))});UTe.displayName="Form";var WTe=function(t,n,r){var i=o1(t),o=i[n];return i.splice(n,1),i.splice(r,0,o),i},GTe=function(t,n,r){var i=o1(t),o=i[n];return i[n]=i[r],i[r]=o,i},LC=function(t,n,r){var i=o1(t);return i.splice(n,0,r),i},qTe=function(t,n,r){var i=o1(t);return i[n]=r,i},o1=function(t){if(t){if(Array.isArray(t))return[].concat(t);var n=Object.keys(t).map(function(r){return parseInt(r)}).reduce(function(r,i){return i>r?i:r},0);return Array.from(Wn({},t,{length:n+1}))}else return[]},YTe=function(e){RTe(t,e);function t(r){var i;return i=e.call(this,r)||this,i.updateArrayField=function(o,a,s){var l=i.props,u=l.name,f=l.formik.setFormikState;f(function(p){var m=typeof s=="function"?s:o,v=typeof a=="function"?a:o,b=au(p.values,u,o(Hi(p.values,u))),x=s?m(Hi(p.errors,u)):void 0,E=a?v(Hi(p.touched,u)):void 0;return LD(x)&&(x=void 0),LD(E)&&(E=void 0),Wn({},p,{values:b,errors:s?au(p.errors,u,x):p.errors,touched:a?au(p.touched,u,E):p.touched})})},i.push=function(o){return i.updateArrayField(function(a){return[].concat(o1(a),[MTe(o)])},!1,!1)},i.handlePush=function(o){return function(){return i.push(o)}},i.swap=function(o,a){return i.updateArrayField(function(s){return GTe(s,o,a)},!0,!0)},i.handleSwap=function(o,a){return function(){return i.swap(o,a)}},i.move=function(o,a){return i.updateArrayField(function(s){return WTe(s,o,a)},!0,!0)},i.handleMove=function(o,a){return function(){return i.move(o,a)}},i.insert=function(o,a){return i.updateArrayField(function(s){return LC(s,o,a)},function(s){return LC(s,o,null)},function(s){return LC(s,o,null)})},i.handleInsert=function(o,a){return function(){return i.insert(o,a)}},i.replace=function(o,a){return i.updateArrayField(function(s){return qTe(s,o,a)},!1,!1)},i.handleReplace=function(o,a){return function(){return i.replace(o,a)}},i.unshift=function(o){var a=-1;return i.updateArrayField(function(s){var l=s?[o].concat(s):[o];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l},function(s){var l=s?[null].concat(s):[null];return a<0&&(a=l.length),l}),a},i.handleUnshift=function(o){return function(){return i.unshift(o)}},i.handleRemove=function(o){return function(){return i.remove(o)}},i.handlePop=function(){return function(){return i.pop()}},i.remove=i.remove.bind(TD(i)),i.pop=i.pop.bind(TD(i)),i}var n=t.prototype;return n.componentDidUpdate=function(i){this.props.validateOnChange&&this.props.formik.validateOnChange&&!Sd(Hi(i.formik.values,i.name),Hi(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(i){var o;return this.updateArrayField(function(a){var s=a?o1(a):[];return o||(o=s[i]),Vo(s.splice)&&s.splice(i,1),s},!0,!0),o},n.pop=function(){var i;return this.updateArrayField(function(o){var a=o;return i||(i=a&&a.pop&&a.pop()),a},!0,!0),i},n.render=function(){var i={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},o=this.props,a=o.component,s=o.render,l=o.children,u=o.name,f=o.formik,p=Ih(f,["validate","validationSchema"]),m=Wn({},i,{form:p,name:u});return a?C.exports.createElement(a,m):s?s(m):l?typeof l=="function"?l(m):bq(l)?null:C.exports.Children.only(l):null},t}(C.exports.Component);YTe.defaultProps={validateOnChange:!0};const KTe=lt([al],e=>{const{openModel:t,model_list:n}=e;return{model_list:n,openModel:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),AD=64,OD=2048;function XTe(){const{openModel:e,model_list:t}=ve(KTe),n=ve(l=>l.system.isProcessing),r=Be(),{t:i}=Ke(),[o,a]=C.exports.useState({name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1});C.exports.useEffect(()=>{var l,u,f,p,m,v,b;if(e){const x=He.pickBy(t,(E,k)=>He.isEqual(k,e));a({name:e,description:(l=x[e])==null?void 0:l.description,config:(u=x[e])==null?void 0:u.config,weights:(f=x[e])==null?void 0:f.weights,vae:(p=x[e])==null?void 0:p.vae,width:(m=x[e])==null?void 0:m.width,height:(v=x[e])==null?void 0:v.height,default:(b=x[e])==null?void 0:b.default})}},[t,e]);const s=l=>{r(XE(l))};return e?K(at,{flexDirection:"column",rowGap:"1rem",width:"100%",children:[y(at,{alignItems:"center",children:y(yr,{fontSize:"lg",fontWeight:"bold",children:e})}),y(at,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",paddingRight:"2rem",children:y(wP,{enableReinitialize:!0,initialValues:o,onSubmit:s,children:({handleSubmit:l,errors:u,touched:f})=>y("form",{onSubmit:l,children:K(pi,{rowGap:"0.5rem",alignItems:"start",children:[K(Ir,{isInvalid:!!u.description&&f.description,isRequired:!0,children:[y(ti,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"description",name:"description",type:"text",width:"lg"}),!!u.description&&f.description?y(Wo,{children:u.description}):y(Uo,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),K(Ir,{isInvalid:!!u.config&&f.config,isRequired:!0,children:[y(ti,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:config")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"config",name:"config",type:"text",width:"lg"}),!!u.config&&f.config?y(Wo,{children:u.config}):y(Uo,{margin:0,children:i("modelmanager:configValidationMsg")})]})]}),K(Ir,{isInvalid:!!u.weights&&f.weights,isRequired:!0,children:[y(ti,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:modelLocation")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"weights",name:"weights",type:"text",width:"lg"}),!!u.weights&&f.weights?y(Wo,{children:u.weights}):y(Uo,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),K(Ir,{isInvalid:!!u.vae&&f.vae,children:[y(ti,{htmlFor:"vae",fontSize:"sm",children:i("modelmanager:vaeLocation")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"vae",name:"vae",type:"text",width:"lg"}),!!u.vae&&f.vae?y(Wo,{children:u.vae}):y(Uo,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),K(Sy,{width:"100%",children:[K(Ir,{isInvalid:!!u.width&&f.width,children:[y(ti,{htmlFor:"width",fontSize:"sm",children:i("modelmanager:width")}),K(pi,{alignItems:"start",children:[y(qo,{id:"width",name:"width",children:({field:p,form:m})=>y(Eo,{id:"width",name:"width",min:AD,max:OD,step:64,value:m.values.width,onChange:v=>m.setFieldValue(p.name,Number(v))})}),!!u.width&&f.width?y(Wo,{children:u.width}):y(Uo,{margin:0,children:i("modelmanager:widthValidationMsg")})]})]}),K(Ir,{isInvalid:!!u.height&&f.height,children:[y(ti,{htmlFor:"height",fontSize:"sm",children:i("modelmanager:height")}),K(pi,{alignItems:"start",children:[y(qo,{id:"height",name:"height",children:({field:p,form:m})=>y(Eo,{id:"height",name:"height",min:AD,max:OD,step:64,value:m.values.height,onChange:v=>m.setFieldValue(p.name,Number(v))})}),!!u.height&&f.height?y(Wo,{children:u.height}):y(Uo,{margin:0,children:i("modelmanager:heightValidationMsg")})]})]})]}),y(qr,{type:"submit",className:"modal-close-btn",isLoading:n,children:i("modelmanager:updateModel")})]})})})})]}):y(at,{width:"100%",height:"250px",justifyContent:"center",alignItems:"center",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",children:y(yr,{fontWeight:"bold",color:"var(--subtext-color-bright)",children:"Pick A Model To Edit"})})}const Qn=e=>{const{label:t,styleClass:n,...r}=e;return y(Vj,{className:`invokeai__checkbox ${n}`,...r,children:t})};function ZTe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"}}]})(e)}function QTe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function JTe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function eLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function wq(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function tLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function nLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}function rLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function Hx(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function iLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function oLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function aLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function sLe(e){return yt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}const Cq=lt([al],e=>{const{model_list:t}=e,n=[];return He.forEach(t,r=>{n.push(r.weights)}),n});function lLe(){const{t:e}=Ke();return y(rl,{position:"absolute",zIndex:2,right:4,top:4,fontSize:"0.7rem",fontWeight:"bold",backgroundColor:"var(--accent-color)",padding:"0.2rem 0.5rem",borderRadius:"0.2rem",alignItems:"center",children:e("modelmanager:modelExists")})}function MD({model:e,modelsToAdd:t,setModelsToAdd:n}){const r=ve(Cq),i=o=>{t.includes(o.target.value)?n(He.remove(t,a=>a!==o.target.value)):n([...t,o.target.value])};return K(rl,{position:"relative",children:[r.includes(e.location)?y(lLe,{}):null,y(Qn,{value:e.name,label:y(fn,{children:K(pi,{alignItems:"start",children:[y("p",{style:{fontWeight:"bold"},children:e.name}),y("p",{style:{fontStyle:"italic"},children:e.location})]})}),isChecked:t.includes(e.name),isDisabled:r.includes(e.location),onChange:i,padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",_checked:{backgroundColor:"var(--accent-color)",color:"var(--text-color)"},_disabled:{backgroundColor:"var(--background-color-secondary)"}})]})}function uLe(){const e=Be(),{t}=Ke(),n=ve(x=>x.system.searchFolder),r=ve(x=>x.system.foundModels),i=ve(Cq),o=ve(x=>x.options.shouldShowExistingModelsInSearch),a=ve(x=>x.system.isProcessing),[s,l]=oe.useState([]),u=()=>{e(nW(null)),e(rW(null)),l([])},f=x=>{e(kI(x.checkpointFolder))},p=()=>{l([]),r&&r.forEach(x=>{i.includes(x.location)||l(E=>[...E,x.name])})},m=()=>{l([])},v=()=>{const x=r==null?void 0:r.filter(E=>s.includes(E.name));x==null||x.forEach(E=>{const k={name:E.name,description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:E.location,vae:"",width:512,height:512,default:!1};e(XE(k))}),l([])},b=()=>{const x=[],E=[];return r&&r.forEach((k,_)=>{i.includes(k.location)?E.push(y(MD,{model:k,modelsToAdd:s,setModelsToAdd:l},_)):x.push(y(MD,{model:k,modelsToAdd:s,setModelsToAdd:l},_))}),K(fn,{children:[x,o&&E]})};return K(fn,{children:[n?K(at,{flexDirection:"column",padding:"1rem",backgroundColor:"var(--background-color)",borderRadius:"0.5rem",rowGap:"0.5rem",position:"relative",children:[y("p",{style:{fontWeight:"bold",fontSize:"0.8rem",backgroundColor:"var(--background-color-secondary)",padding:"0.2rem 1rem",width:"max-content",borderRadius:"0.2rem"},children:t("modelmanager:checkpointFolder")}),y("p",{style:{fontWeight:"bold",fontSize:"0.8rem",maxWidth:"80%"},children:n}),y(Qe,{"aria-label":t("modelmanager:scanAgain"),tooltip:t("modelmanager:scanAgain"),icon:y(Hx,{}),position:"absolute",right:16,fontSize:18,disabled:a,onClick:()=>e(kI(n))}),y(Qe,{"aria-label":t("modelmanager:clearCheckpointFolder"),icon:y(Iy,{style:{transform:"rotate(45deg)"}}),position:"absolute",right:5,onClick:u})]}):y(wP,{initialValues:{checkpointFolder:""},onSubmit:x=>{f(x)},children:({handleSubmit:x})=>y("form",{onSubmit:x,children:K(Sy,{columnGap:"0.5rem",children:[y(Ir,{isRequired:!0,width:"max-content",children:y(qo,{as:rs,id:"checkpointFolder",name:"checkpointFolder",type:"text",width:"lg",size:"md",label:t("modelmanager:checkpointFolder")})}),y(Qe,{icon:y(ZTe,{}),"aria-label":t("modelmanager:findModels"),tooltip:t("modelmanager:findModels"),type:"submit",disabled:a})]})})}),r&&K(at,{flexDirection:"column",rowGap:"1rem",children:[K(at,{justifyContent:"space-between",alignItems:"center",children:[K("p",{children:[t("modelmanager:modelsFound"),": ",r.length]}),K("p",{children:[t("modelmanager:selected"),": ",s.length]})]}),K(at,{columnGap:"0.5rem",justifyContent:"space-between",children:[K(at,{columnGap:"0.5rem",children:[y(qr,{isDisabled:s.length===r.length,onClick:p,children:t("modelmanager:selectAll")}),y(qr,{isDisabled:s.length===0,onClick:m,children:t("modelmanager:deselectAll")}),y(Qn,{label:t("modelmanager:showExisting"),isChecked:o,onChange:()=>e(dSe(!o))})]}),y(qr,{isDisabled:s.length===0,onClick:v,backgroundColor:s.length>0?"var(--accent-color) !important":"",children:t("modelmanager:addSelected")})]}),K(at,{rowGap:"1rem",flexDirection:"column",maxHeight:"18rem",overflowY:"scroll",paddingRight:"1rem",paddingLeft:"0.2rem",borderRadius:"0.2rem",children:[r.length>0?s.length===0&&y(yr,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",margin:"0 0.5rem 0 1rem",textAlign:"center",backgroundColor:"var(--notice-color)",boxShadow:"0 0 200px 6px var(--notice-color)",marginTop:"1rem",width:"max-content",children:t("modelmanager:selectAndAdd")}):y(yr,{fontWeight:"bold",fontSize:14,padding:"0.5rem",borderRadius:"0.2rem",textAlign:"center",backgroundColor:"var(--status-bad-color)",children:t("modelmanager:noModelsFound")}),b()]})]})]})}const RD=64,ID=2048;function cLe(){const{isOpen:e,onOpen:t,onClose:n}=Qh(),r=Be(),{t:i}=Ke(),o=ve(v=>v.system.isProcessing);function a(v){return/\\s/g.test(v)}function s(v){let b;return a(v)&&(b=i("modelmanager:cannotUseSpaces")),b}const l={name:"",description:"",config:"configs/stable-diffusion/v1-inference.yaml",weights:"",vae:"",width:512,height:512,default:!1},u=v=>{r(XE(v)),n()},f=()=>{n()},[p,m]=oe.useState(!1);return K(fn,{children:[y(qr,{"aria-label":i("modelmanager:addNewModel"),tooltip:i("modelmanager:addNewModel"),onClick:t,className:"modal-close-btn",size:"sm",children:K(at,{columnGap:"0.5rem",alignItems:"center",children:[y(Iy,{}),i("modelmanager:addNew")]})}),K(Qd,{isOpen:e,onClose:f,size:"3xl",closeOnOverlayClick:!1,children:[y(Jd,{}),K(ep,{className:"modal add-model-modal",children:[y(S1,{children:i("modelmanager:addNewModel")}),y(Cy,{}),K(t1,{className:"add-model-modal-body",children:[y(uLe,{}),y(Qn,{label:i("modelmanager:addManually"),isChecked:p,onChange:()=>m(!p)}),p&&y(wP,{initialValues:l,onSubmit:u,children:({handleSubmit:v,errors:b,touched:x})=>y("form",{onSubmit:v,children:K(pi,{rowGap:"0.5rem",children:[y(yr,{fontSize:20,fontWeight:"bold",alignSelf:"start",children:i("modelmanager:manual")}),K(Ir,{isInvalid:!!b.name&&x.name,isRequired:!0,children:[y(ti,{htmlFor:"name",fontSize:"sm",children:i("modelmanager:name")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"name",name:"name",type:"text",validate:s,width:"2xl"}),!!b.name&&x.name?y(Wo,{children:b.name}):y(Uo,{margin:0,children:i("modelmanager:nameValidationMsg")})]})]}),K(Ir,{isInvalid:!!b.description&&x.description,isRequired:!0,children:[y(ti,{htmlFor:"description",fontSize:"sm",children:i("modelmanager:description")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"description",name:"description",type:"text",width:"2xl"}),!!b.description&&x.description?y(Wo,{children:b.description}):y(Uo,{margin:0,children:i("modelmanager:descriptionValidationMsg")})]})]}),K(Ir,{isInvalid:!!b.config&&x.config,isRequired:!0,children:[y(ti,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:config")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"config",name:"config",type:"text",width:"2xl"}),!!b.config&&x.config?y(Wo,{children:b.config}):y(Uo,{margin:0,children:i("modelmanager:configValidationMsg")})]})]}),K(Ir,{isInvalid:!!b.weights&&x.weights,isRequired:!0,children:[y(ti,{htmlFor:"config",fontSize:"sm",children:i("modelmanager:modelLocation")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"weights",name:"weights",type:"text",width:"2xl"}),!!b.weights&&x.weights?y(Wo,{children:b.weights}):y(Uo,{margin:0,children:i("modelmanager:modelLocationValidationMsg")})]})]}),K(Ir,{isInvalid:!!b.vae&&x.vae,children:[y(ti,{htmlFor:"vae",fontSize:"sm",children:i("modelmanager:vaeLocation")}),K(pi,{alignItems:"start",children:[y(qo,{as:rs,id:"vae",name:"vae",type:"text",width:"2xl"}),!!b.vae&&x.vae?y(Wo,{children:b.vae}):y(Uo,{margin:0,children:i("modelmanager:vaeLocationValidationMsg")})]})]}),K(Sy,{width:"100%",children:[K(Ir,{isInvalid:!!b.width&&x.width,children:[y(ti,{htmlFor:"width",fontSize:"sm",children:i("modelmanager:width")}),K(pi,{alignItems:"start",children:[y(qo,{id:"width",name:"width",children:({field:E,form:k})=>y(Eo,{id:"width",name:"width",min:RD,max:ID,step:64,width:"90%",value:k.values.width,onChange:_=>k.setFieldValue(E.name,Number(_))})}),!!b.width&&x.width?y(Wo,{children:b.width}):y(Uo,{margin:0,children:i("modelmanager:widthValidationMsg")})]})]}),K(Ir,{isInvalid:!!b.height&&x.height,children:[y(ti,{htmlFor:"height",fontSize:"sm",children:i("modelmanager:height")}),K(pi,{alignItems:"start",children:[y(qo,{id:"height",name:"height",children:({field:E,form:k})=>y(Eo,{id:"height",name:"height",min:RD,max:ID,width:"90%",step:64,value:k.values.height,onChange:_=>k.setFieldValue(E.name,Number(_))})}),!!b.height&&x.height?y(Wo,{children:b.height}):y(Uo,{margin:0,children:i("modelmanager:heightValidationMsg")})]})]})]}),y(qr,{type:"submit",className:"modal-close-btn",isLoading:o,children:i("modelmanager:addModel")})]})})})]})]})]})]})}bt({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});bt({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});bt({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});bt({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});bt({displayName:"SunIcon",path:K("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[y("circle",{cx:"12",cy:"12",r:"5"}),y("path",{d:"M12 1v2"}),y("path",{d:"M12 21v2"}),y("path",{d:"M4.22 4.22l1.42 1.42"}),y("path",{d:"M18.36 18.36l1.42 1.42"}),y("path",{d:"M1 12h2"}),y("path",{d:"M21 12h2"}),y("path",{d:"M4.22 19.78l1.42-1.42"}),y("path",{d:"M18.36 5.64l1.42-1.42"})]})});bt({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});bt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:y("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});bt({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});bt({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});bt({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});bt({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});bt({displayName:"ViewIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),y("circle",{cx:"12",cy:"12",r:"2"})]})});bt({displayName:"ViewOffIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),y("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});bt({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});var dLe=bt({displayName:"DeleteIcon",path:y("g",{fill:"currentColor",children:y("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});bt({displayName:"RepeatIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),y("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});bt({displayName:"RepeatClockIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),y("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});var fLe=bt({displayName:"EditIcon",path:K("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[y("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),y("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});bt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});bt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});bt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});bt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});bt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});bt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});bt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});bt({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});bt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var _q=bt({displayName:"ExternalLinkIcon",path:K("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[y("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),y("path",{d:"M15 3h6v6"}),y("path",{d:"M10 14L21 3"})]})});bt({displayName:"LinkIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),y("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});bt({displayName:"PlusSquareIcon",path:K("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[y("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),y("path",{d:"M12 8v8"}),y("path",{d:"M8 12h8"})]})});bt({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});bt({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});bt({displayName:"TimeIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),y("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});bt({displayName:"ArrowRightIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),y("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});bt({displayName:"ArrowLeftIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),y("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});bt({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});bt({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});bt({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});bt({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});bt({displayName:"EmailIcon",path:K("g",{fill:"currentColor",children:[y("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),y("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});bt({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});bt({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});bt({displayName:"SpinnerIcon",path:K(fn,{children:[y("defs",{children:K("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[y("stop",{stopColor:"currentColor",offset:"0%"}),y("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),K("g",{transform:"translate(2)",fill:"none",children:[y("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),y("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),y("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});bt({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});bt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:y("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});bt({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});bt({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});bt({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});bt({displayName:"InfoOutlineIcon",path:K("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[y("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),y("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),y("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});bt({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});bt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});bt({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});bt({displayName:"QuestionOutlineIcon",path:K("g",{stroke:"currentColor",strokeWidth:"1.5",children:[y("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),y("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),y("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});bt({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});bt({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});bt({viewBox:"0 0 14 14",path:y("g",{fill:"currentColor",children:y("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});bt({displayName:"MinusIcon",path:y("g",{fill:"currentColor",children:y("rect",{height:"4",width:"20",x:"2",y:"10"})})});bt({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});const CP=Oe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:f,onClose:p}=Qh(),m=C.exports.useRef(null),v=()=>{r(),p()},b=()=>{o&&o(),p()};return K(fn,{children:[C.exports.cloneElement(l,{onClick:f,ref:t}),y(xV,{isOpen:u,leastDestructiveRef:m,onClose:p,children:y(Jd,{children:K(wV,{className:"modal",children:[y(S1,{fontSize:"lg",fontWeight:"bold",children:s}),y(t1,{children:a}),K(cx,{children:[y(ds,{ref:m,onClick:b,className:"modal-close-btn",children:i}),y(ds,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})});function DD(e){const{isProcessing:t,isConnected:n}=ve(v=>v.system),r=ve(v=>v.system.openModel),{t:i}=Ke(),o=Be(),{name:a,status:s,description:l}=e,u=()=>{o(BW(a))},f=()=>{o(lI(a))},p=()=>{o(Z6e(a)),o(lI(null))};return K(at,{alignItems:"center",padding:"0.5rem 0.5rem",borderRadius:"0.2rem",backgroundColor:a===r?"var(--accent-color)":"",_hover:{backgroundColor:a===r?"var(--accent-color)":"var(--background-color)"},children:[y(rl,{onClick:f,cursor:"pointer",children:y(so,{label:l,hasArrow:!0,placement:"bottom",children:y(yr,{fontWeight:"bold",children:a})})}),y(rH,{onClick:f,cursor:"pointer"}),K(at,{gap:2,alignItems:"center",children:[y(yr,{color:(()=>{switch(s){case"active":return"var(--status-good-color)";case"cached":return"var(--status-working-color)";case"not loaded":return"var(--text-color-secondary)"}})(),children:s}),y(ds,{size:"sm",onClick:u,isDisabled:s==="active"||t||!n,className:"modal-close-btn",children:i("modelmanager:load")}),y(Qe,{icon:y(fLe,{}),size:"sm",onClick:f,"aria-label":"Modify Config",isDisabled:s==="active"||t||!n,className:" modal-close-btn"}),y(CP,{title:i("modelmanager:deleteModel"),acceptCallback:p,acceptButtonText:i("modelmanager:delete"),triggerComponent:y(Qe,{icon:y(dLe,{}),size:"sm","aria-label":i("modelmanager:deleteConfig"),isDisabled:s==="active"||t||!n,className:" modal-close-btn",style:{backgroundColor:"var(--btn-delete-image)"}}),children:K(at,{rowGap:"1rem",flexDirection:"column",children:[y("p",{style:{fontWeight:"bold"},children:i("modelmanager:deleteMsg1")}),y("p",{style:{color:"var(--text-color-secondary"},children:i("modelmanager:deleteMsg2")})]})})]})]})}const hLe=lt(e=>e.system,e=>{const t=He.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),pLe=()=>{const{models:e}=ve(hLe),[t,n]=C.exports.useState(""),{t:r}=Ke(),i=He.debounce(a=>{n(a.target.value)},400),o=()=>{const a=[],s=[];return e.forEach((l,u)=>{l.name.startsWith(t)&&s.push(y(DD,{name:l.name,status:l.status,description:l.description},u)),a.push(y(DD,{name:l.name,status:l.status,description:l.description},u))}),t!==""?s:a};return K(at,{flexDirection:"column",rowGap:"2rem",width:"50%",minWidth:"50%",children:[K(at,{justifyContent:"space-between",children:[y(yr,{fontSize:"1.4rem",fontWeight:"bold",children:r("modelmanager:availableModels")}),y(cLe,{})]}),y(rs,{onChange:i,label:r("modelmanager:search")}),y(at,{flexDirection:"column",gap:1,maxHeight:window.innerHeight-360,overflow:"scroll",paddingRight:"1rem",children:o()})]})};function gLe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Qh(),{t:i}=Ke();return K(fn,{children:[C.exports.cloneElement(e,{onClick:n}),K(Qd,{isOpen:t,onClose:r,size:"6xl",children:[y(Jd,{}),K(ep,{className:" modal",children:[y(Cy,{className:"modal-close-btn"}),y(S1,{children:i("modelmanager:modelManager")}),K(at,{padding:"0 1.5rem 1.5rem 1.5rem",width:"100%",columnGap:"2rem",children:[y(pLe,{}),y(XTe,{})]})]})]})]})}function mLe(){const{t:e,i18n:t}=Ke(),n={en:e("common:langEnglish"),ru:e("common:langRussian"),it:e("common:langItalian"),pt_br:e("common:langBrPortuguese"),de:e("common:langGerman"),pl:e("common:langPolish"),zh_cn:e("common:langSimplifiedChinese"),es:e("common:langSpanish")},r=()=>{const i=[];return Object.keys(n).forEach(o=>{i.push(y(qr,{"data-selected":localStorage.getItem("i18nextLng")===o,onClick:()=>t.changeLanguage(o),className:"modal-close-btn lang-select-btn","aria-label":n[o],tooltip:n[o],size:"sm",minWidth:"200px",children:n[o]},o))}),i};return y(Js,{trigger:"hover",triggerComponent:y(Qe,{"aria-label":e("common:languagePickerLabel"),tooltip:e("common:languagePickerLabel"),icon:y(I8e,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:y(pi,{children:r()})})}const vLe=()=>{const{t:e}=Ke();return K("div",{className:"site-header",children:[K("div",{className:"site-header-left-side",children:[y("img",{src:WG,alt:"invoke-ai-logo"}),K("h1",{children:["invoke ",y("strong",{children:"ai"})]})]}),K("div",{className:"site-header-right-side",children:[y(J8e,{}),y(n_e,{}),y(gLe,{children:y(Qe,{"aria-label":e("modelmanager:modelManager"),tooltip:e("modelmanager:modelManager"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y(E8e,{})})}),y(Y8e,{children:y(Qe,{"aria-label":e("common:hotkeysLabel"),tooltip:e("common:hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:y(R8e,{})})}),y(e_e,{}),y(mLe,{}),y(Qe,{"aria-label":e("common:reportBugLabel"),tooltip:e("common:reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y(Vh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:y(k8e,{})})}),y(Qe,{"aria-label":e("common:githubLabel"),tooltip:e("common:githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y(Vh,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:y(S8e,{})})}),y(Qe,{"aria-label":e("common:discordLabel"),tooltip:e("common:discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:y(Vh,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:y(b8e,{})})}),y(Z8e,{children:y(Qe,{"aria-label":e("common:settingsLabel"),tooltip:e("common:settingsLabel"),variant:"link","data-variant":"link",fontSize:22,size:"sm",icon:y(JTe,{})})})]})]})};var yLe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jr=globalThis&&globalThis.__assign||function(){return Jr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jr.apply(this,arguments)},ND={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},BD={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Bb={width:"20px",height:"20px",position:"absolute"},bLe={top:Jr(Jr({},ND),{top:"-5px"}),right:Jr(Jr({},BD),{left:void 0,right:"-5px"}),bottom:Jr(Jr({},ND),{top:void 0,bottom:"-5px"}),left:Jr(Jr({},BD),{left:"-5px"}),topRight:Jr(Jr({},Bb),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Jr(Jr({},Bb),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Jr(Jr({},Bb),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Jr(Jr({},Bb),{left:"-10px",top:"-10px",cursor:"nw-resize"})},SLe=function(e){yLe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return y("div",{className:this.props.className||"",style:Jr(Jr({position:"absolute",userSelect:"none"},bLe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(C.exports.PureComponent),xLe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fl=globalThis&&globalThis.__assign||function(){return Fl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fl.apply(this,arguments)},wLe={width:"auto",height:"auto"},$b=function(e,t,n){return Math.max(Math.min(e,n),t)},$D=function(e,t){return Math.round(e/t)*t},N0=function(e,t){return new RegExp(e,"i").test(t)},Fb=function(e){return Boolean(e.touches&&e.touches.length)},CLe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},FD=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},AC=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},zb=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return n*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},_Le=function(e,t,n,r,i,o,a){return r=zb(r,e.width,t,n),i=zb(i,e.height,t,n),o=zb(o,e.width,t,n),a=zb(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},kLe=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],zD="__resizable_base__",kq=function(e){xLe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(zD):o.className+=zD,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||wLe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),f=u/l[s]*100;return f+"%"}return AC(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?AC(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?AC(r.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&N0("left",o),s=i&&N0("top",o),l,u;if(this.props.bounds==="parent"){var f=this.parentNode;f&&(l=a?this.resizableRight-this.parentLeft:f.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:f.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),u&&Number.isFinite(u)&&(r=r&&r<u?r:u),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var i=this.props.scale||1,o=this.props.resizeRatio||1,a=this.state,s=a.direction,l=a.original,u=this.props,f=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=l.width,b=l.height,x=p||0,E=m||0;return N0("right",s)&&(v=l.width+(n-l.x)*o/i,f&&(b=(v-E)/this.ratio+x)),N0("left",s)&&(v=l.width-(n-l.x)*o/i,f&&(b=(v-E)/this.ratio+x)),N0("bottom",s)&&(b=l.height+(r-l.y)*o/i,f&&(v=(b-x)*this.ratio+E)),N0("top",s)&&(b=l.height-(r-l.y)*o/i,f&&(v=(b-x)*this.ratio+E)),{newWidth:v,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,f=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,b=l||0,x=u||0;if(s){var E=(m-b)*this.ratio+x,k=(v-b)*this.ratio+x,_=(f-x)/this.ratio+b,T=(p-x)/this.ratio+b,A=Math.max(f,E),R=Math.min(p,k),I=Math.max(m,_),D=Math.min(v,T);n=$b(n,A,R),r=$b(r,I,D)}else n=$b(n,f,p),r=$b(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&CLe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Fb(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var f=this.window.getComputedStyle(u).flexDirection;this.flexDir=f.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Fl(Fl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Fb(n))try{n.preventDefault(),n.stopPropagation()}catch(V){}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Fb(n)?n.touches[0].clientX:n.clientX,f=Fb(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,b=p.width,x=p.height,E=this.getParentSize(),k=_Le(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=k.maxWidth,a=k.maxHeight,s=k.minWidth,l=k.minHeight;var _=this.calculateNewSizeFromDirection(u,f),T=_.newHeight,A=_.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(A=FD(A,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=FD(T,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(A,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(A=I.newWidth,T=I.newHeight,this.props.grid){var D=$D(A,this.props.grid[0]),B=$D(T,this.props.grid[1]),z=this.props.snapGap||0;A=z===0||Math.abs(D-A)<=z?D:A,T=z===0||Math.abs(B-T)<=z?B:T}var j={width:A-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var Y=A/E.width*100;A=Y+"%"}else if(b.endsWith("vw")){var te=A/this.window.innerWidth*100;A=te+"vw"}else if(b.endsWith("vh")){var G=A/this.window.innerHeight*100;A=G+"vh"}}if(x&&typeof x=="string"){if(x.endsWith("%")){var Y=T/E.height*100;T=Y+"%"}else if(x.endsWith("vw")){var te=T/this.window.innerWidth*100;T=te+"vw"}else if(x.endsWith("vh")){var G=T/this.window.innerHeight*100;T=G+"vh"}}var $={width:this.createSizeForCssProperty(A,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?$.flexBasis=$.width:this.flexDir==="column"&&($.flexBasis=$.height),pu.exports.flushSync(function(){r.setState($)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,j)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Fl(Fl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var f=Object.keys(i).map(function(p){return i[p]!==!1?y(SLe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return y("div",{className:l,style:s,children:f})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return kLe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=Fl(Fl(Fl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return K(o,{...Fl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&y("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent),ELe=Object.create,Eq=Object.defineProperty,PLe=Object.getOwnPropertyDescriptor,TLe=Object.getOwnPropertyNames,LLe=Object.getPrototypeOf,ALe=Object.prototype.hasOwnProperty,Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),OLe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of TLe(t))!ALe.call(e,i)&&i!==n&&Eq(e,i,{get:()=>t[i],enumerable:!(r=PLe(t,i))||r.enumerable});return e},Pq=(e,t,n)=>(n=e!=null?ELe(LLe(e)):{},OLe(t||!e||!e.__esModule?Eq(n,"default",{value:e,enumerable:!0}):n,e)),MLe=Ue((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),Tq=Ue((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Vx=Ue((e,t)=>{var n=Tq();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),RLe=Ue((e,t)=>{var n=Vx(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),ILe=Ue((e,t)=>{var n=Vx();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),DLe=Ue((e,t)=>{var n=Vx();function r(i){return n(this.__data__,i)>-1}t.exports=r}),NLe=Ue((e,t)=>{var n=Vx();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),Ux=Ue((e,t)=>{var n=MLe(),r=RLe(),i=ILe(),o=DLe(),a=NLe();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),BLe=Ue((e,t)=>{var n=Ux();function r(){this.__data__=new n,this.size=0}t.exports=r}),$Le=Ue((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),FLe=Ue((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),zLe=Ue((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lq=Ue((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),bc=Ue((e,t)=>{var n=Lq(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),_P=Ue((e,t)=>{var n=bc(),r=n.Symbol;t.exports=r}),jLe=Ue((e,t)=>{var n=_P(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),f=l[a];try{l[a]=void 0;var p=!0}catch(v){}var m=o.call(l);return p&&(u?l[a]=f:delete l[a]),m}t.exports=s}),HLe=Ue((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Wx=Ue((e,t)=>{var n=_P(),r=jLe(),i=HLe(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),Aq=Ue((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),Oq=Ue((e,t)=>{var n=Wx(),r=Aq(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var f=n(u);return f==o||f==a||f==i||f==s}t.exports=l}),VLe=Ue((e,t)=>{var n=bc(),r=n["__core-js_shared__"];t.exports=r}),ULe=Ue((e,t)=>{var n=VLe(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),Mq=Ue((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch(a){}try{return o+""}catch(a){}}return""}t.exports=i}),WLe=Ue((e,t)=>{var n=Oq(),r=ULe(),i=Aq(),o=Mq(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,f=l.toString,p=u.hasOwnProperty,m=RegExp("^"+f.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var x=n(b)?m:s;return x.test(o(b))}t.exports=v}),GLe=Ue((e,t)=>{function n(r,i){return r==null?void 0:r[i]}t.exports=n}),T1=Ue((e,t)=>{var n=WLe(),r=GLe();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),kP=Ue((e,t)=>{var n=T1(),r=bc(),i=n(r,"Map");t.exports=i}),Gx=Ue((e,t)=>{var n=T1(),r=n(Object,"create");t.exports=r}),qLe=Ue((e,t)=>{var n=Gx();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),YLe=Ue((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),KLe=Ue((e,t)=>{var n=Gx(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),XLe=Ue((e,t)=>{var n=Gx(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),ZLe=Ue((e,t)=>{var n=Gx(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),QLe=Ue((e,t)=>{var n=qLe(),r=YLe(),i=KLe(),o=XLe(),a=ZLe();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),JLe=Ue((e,t)=>{var n=QLe(),r=Ux(),i=kP();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),eAe=Ue((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),qx=Ue((e,t)=>{var n=eAe();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),tAe=Ue((e,t)=>{var n=qx();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),nAe=Ue((e,t)=>{var n=qx();function r(i){return n(this,i).get(i)}t.exports=r}),rAe=Ue((e,t)=>{var n=qx();function r(i){return n(this,i).has(i)}t.exports=r}),iAe=Ue((e,t)=>{var n=qx();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),Rq=Ue((e,t)=>{var n=JLe(),r=tAe(),i=nAe(),o=rAe(),a=iAe();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),oAe=Ue((e,t)=>{var n=Ux(),r=kP(),i=Rq(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var f=u.__data__;if(!r||f.length<o-1)return f.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(f)}return u.set(s,l),this.size=u.size,this}t.exports=a}),aAe=Ue((e,t)=>{var n=Ux(),r=BLe(),i=$Le(),o=FLe(),a=zLe(),s=oAe();function l(u){var f=this.__data__=new n(u);this.size=f.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),sAe=Ue((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),lAe=Ue((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),uAe=Ue((e,t)=>{var n=Rq(),r=sAe(),i=lAe();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s<l;)this.add(a[s])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o}),cAe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o<a;)if(i(r[o],o,r))return!0;return!1}t.exports=n}),dAe=Ue((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),Iq=Ue((e,t)=>{var n=uAe(),r=cAe(),i=dAe(),o=1,a=2;function s(l,u,f,p,m,v){var b=f&o,x=l.length,E=u.length;if(x!=E&&!(b&&E>x))return!1;var k=v.get(l),_=v.get(u);if(k&&_)return k==u&&_==l;var T=-1,A=!0,R=f&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T<x;){var I=l[T],D=u[T];if(p)var B=b?p(D,I,T,u,l,v):p(I,D,T,l,u,v);if(B!==void 0){if(B)continue;A=!1;break}if(R){if(!r(u,function(z,j){if(!i(R,j)&&(I===z||m(I,z,f,p,v)))return R.push(j)})){A=!1;break}}else if(!(I===D||m(I,D,f,p,v))){A=!1;break}}return v.delete(l),v.delete(u),A}t.exports=s}),fAe=Ue((e,t)=>{var n=bc(),r=n.Uint8Array;t.exports=r}),hAe=Ue((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),pAe=Ue((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),gAe=Ue((e,t)=>{var n=_P(),r=fAe(),i=Tq(),o=Iq(),a=hAe(),s=pAe(),l=1,u=2,f="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",x="[object RegExp]",E="[object Set]",k="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",A="[object DataView]",R=n?n.prototype:void 0,I=R?R.valueOf:void 0;function D(B,z,j,Y,te,G,$){switch(j){case A:if(B.byteLength!=z.byteLength||B.byteOffset!=z.byteOffset)return!1;B=B.buffer,z=z.buffer;case T:return!(B.byteLength!=z.byteLength||!G(new r(B),new r(z)));case f:case p:case b:return i(+B,+z);case m:return B.name==z.name&&B.message==z.message;case x:case k:return B==z+"";case v:var V=a;case E:var J=Y&l;if(V||(V=s),B.size!=z.size&&!J)return!1;var Z=$.get(B);if(Z)return Z==z;Y|=u,$.set(B,z);var U=o(V(B),V(z),Y,te,G,$);return $.delete(B),U;case _:if(I)return I.call(B)==I.call(z)}return!1}t.exports=D}),mAe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}t.exports=n}),EP=Ue((e,t)=>{var n=Array.isArray;t.exports=n}),vAe=Ue((e,t)=>{var n=mAe(),r=EP();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),yAe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o<a;){var u=r[o];i(u,o,r)&&(l[s++]=u)}return l}t.exports=n}),bAe=Ue((e,t)=>{function n(){return[]}t.exports=n}),SAe=Ue((e,t)=>{var n=yAe(),r=bAe(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),xAe=Ue((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),Yx=Ue((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),wAe=Ue((e,t)=>{var n=Wx(),r=Yx(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),CAe=Ue((e,t)=>{var n=wAe(),r=Yx(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),_Ae=Ue((e,t)=>{function n(){return!1}t.exports=n}),Dq=Ue((e,t)=>{var n=bc(),r=_Ae(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),kAe=Ue((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a!=null?a:n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o<a}t.exports=i}),Nq=Ue((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),EAe=Ue((e,t)=>{var n=Wx(),r=Nq(),i=Yx(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",x="[object Set]",E="[object String]",k="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",A="[object Float32Array]",R="[object Float64Array]",I="[object Int8Array]",D="[object Int16Array]",B="[object Int32Array]",z="[object Uint8Array]",j="[object Uint8ClampedArray]",Y="[object Uint16Array]",te="[object Uint32Array]",G={};G[A]=G[R]=G[I]=G[D]=G[B]=G[z]=G[j]=G[Y]=G[te]=!0,G[o]=G[a]=G[_]=G[s]=G[T]=G[l]=G[u]=G[f]=G[p]=G[m]=G[v]=G[b]=G[x]=G[E]=G[k]=!1;function $(V){return i(V)&&r(V.length)&&!!G[n(V)]}t.exports=$}),PAe=Ue((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),TAe=Ue((e,t)=>{var n=Lq(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch(u){}}();t.exports=s}),Bq=Ue((e,t)=>{var n=EAe(),r=PAe(),i=TAe(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),LAe=Ue((e,t)=>{var n=xAe(),r=CAe(),i=EP(),o=Dq(),a=kAe(),s=Bq(),l=Object.prototype,u=l.hasOwnProperty;function f(p,m){var v=i(p),b=!v&&r(p),x=!v&&!b&&o(p),E=!v&&!b&&!x&&s(p),k=v||b||x||E,_=k?n(p.length,String):[],T=_.length;for(var A in p)(m||u.call(p,A))&&!(k&&(A=="length"||x&&(A=="offset"||A=="parent")||E&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||a(A,T)))&&_.push(A);return _}t.exports=f}),AAe=Ue((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),OAe=Ue((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),MAe=Ue((e,t)=>{var n=OAe(),r=n(Object.keys,Object);t.exports=r}),RAe=Ue((e,t)=>{var n=AAe(),r=MAe(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),IAe=Ue((e,t)=>{var n=Oq(),r=Nq();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),DAe=Ue((e,t)=>{var n=LAe(),r=RAe(),i=IAe();function o(a){return i(a)?n(a):r(a)}t.exports=o}),NAe=Ue((e,t)=>{var n=vAe(),r=SAe(),i=DAe();function o(a){return n(a,i,r)}t.exports=o}),BAe=Ue((e,t)=>{var n=NAe(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,f,p,m){var v=u&r,b=n(s),x=b.length,E=n(l),k=E.length;if(x!=k&&!v)return!1;for(var _=x;_--;){var T=b[_];if(!(v?T in l:o.call(l,T)))return!1}var A=m.get(s),R=m.get(l);if(A&&R)return A==l&&R==s;var I=!0;m.set(s,l),m.set(l,s);for(var D=v;++_<x;){T=b[_];var B=s[T],z=l[T];if(f)var j=v?f(z,B,T,l,s,m):f(B,z,T,s,l,m);if(!(j===void 0?B===z||p(B,z,u,f,m):j)){I=!1;break}D||(D=T=="constructor")}if(I&&!D){var Y=s.constructor,te=l.constructor;Y!=te&&"constructor"in s&&"constructor"in l&&!(typeof Y=="function"&&Y instanceof Y&&typeof te=="function"&&te instanceof te)&&(I=!1)}return m.delete(s),m.delete(l),I}t.exports=a}),$Ae=Ue((e,t)=>{var n=T1(),r=bc(),i=n(r,"DataView");t.exports=i}),FAe=Ue((e,t)=>{var n=T1(),r=bc(),i=n(r,"Promise");t.exports=i}),zAe=Ue((e,t)=>{var n=T1(),r=bc(),i=n(r,"Set");t.exports=i}),jAe=Ue((e,t)=>{var n=T1(),r=bc(),i=n(r,"WeakMap");t.exports=i}),HAe=Ue((e,t)=>{var n=$Ae(),r=kP(),i=FAe(),o=zAe(),a=jAe(),s=Wx(),l=Mq(),u="[object Map]",f="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",x=l(n),E=l(r),k=l(i),_=l(o),T=l(a),A=s;(n&&A(new n(new ArrayBuffer(1)))!=b||r&&A(new r)!=u||i&&A(i.resolve())!=p||o&&A(new o)!=m||a&&A(new a)!=v)&&(A=function(R){var I=s(R),D=I==f?R.constructor:void 0,B=D?l(D):"";if(B)switch(B){case x:return b;case E:return u;case k:return p;case _:return m;case T:return v}return I}),t.exports=A}),VAe=Ue((e,t)=>{var n=aAe(),r=Iq(),i=gAe(),o=BAe(),a=HAe(),s=EP(),l=Dq(),u=Bq(),f=1,p="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,x=b.hasOwnProperty;function E(k,_,T,A,R,I){var D=s(k),B=s(_),z=D?m:a(k),j=B?m:a(_);z=z==p?v:z,j=j==p?v:j;var Y=z==v,te=j==v,G=z==j;if(G&&l(k)){if(!l(_))return!1;D=!0,Y=!1}if(G&&!Y)return I||(I=new n),D||u(k)?r(k,_,T,A,R,I):i(k,_,z,T,A,R,I);if(!(T&f)){var $=Y&&x.call(k,"__wrapped__"),V=te&&x.call(_,"__wrapped__");if($||V){var J=$?k.value():k,Z=V?_.value():_;return I||(I=new n),R(J,Z,T,A,I)}}return G?(I||(I=new n),o(k,_,T,A,R,I)):!1}t.exports=E}),UAe=Ue((e,t)=>{var n=VAe(),r=Yx();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),$q=Ue((e,t)=>{var n=UAe();function r(i,o){return n(i,o)}t.exports=r}),WAe=["ctrl","shift","alt","meta","mod"],GAe={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function OC(e,t=","){return typeof e=="string"?e.split(t):e}function s2(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>GAe[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!WAe.includes(o));return{...r,keys:i}}function qAe(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function YAe(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function KAe(e){return Fq(e,["input","textarea","select"])}function Fq({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function XAe(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var ZAe=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:f,metaKey:p,shiftKey:m,key:v,code:b}=e,x=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!f)return!1}else if(p!==o&&x!=="meta"||f!==i&&x!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(x))?!0:l?l.every(k=>n.has(k)):!l},QAe=C.exports.createContext(void 0),JAe=()=>C.exports.useContext(QAe),eOe=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),tOe=()=>C.exports.useContext(eOe),nOe=Pq($q());function rOe(e){let t=C.exports.useRef(void 0);return(0,nOe.default)(t.current,e)||(t.current=e),t.current}var jD=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function Ze(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=rOe(a),{enabledScopes:f}=tOe(),p=JAe();return C.exports.useLayoutEffect(()=>{if((u==null?void 0:u.enabled)===!1||!XAe(f,u==null?void 0:u.scopes))return;let m=x=>{var E;if(!(KAe(x)&&!Fq(x,u==null?void 0:u.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){jD(x);return}((E=x.target)==null?void 0:E.isContentEditable)&&!(u!=null&&u.enableOnContentEditable)||OC(e,u==null?void 0:u.splitKey).forEach(k=>{var T;let _=s2(k,u==null?void 0:u.combinationKey);if(ZAe(x,_,o)||((T=_.keys)==null?void 0:T.includes("*"))){if(qAe(x,_,u==null?void 0:u.preventDefault),!YAe(x,_,u==null?void 0:u.enabled)){jD(x);return}l(x,_)}})}},v=x=>{o.add(x.key.toLowerCase()),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||(u==null?void 0:u.keydown))&&m(x)},b=x=>{x.key.toLowerCase()!=="meta"?o.delete(x.key.toLowerCase()):o.clear(),u!=null&&u.keyup&&m(x)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),p&&OC(e,u==null?void 0:u.splitKey).forEach(x=>p.addHotkey(s2(x,u==null?void 0:u.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),p&&OC(e,u==null?void 0:u.splitKey).forEach(x=>p.removeHotkey(s2(x,u==null?void 0:u.combinationKey)))}},[e,l,u,f]),i}Pq($q());var L8=new Set;function iOe(e){(Array.isArray(e)?e:[e]).forEach(t=>L8.add(s2(t)))}function oOe(e){(Array.isArray(e)?e:[e]).forEach(t=>{var r;let n=s2(t);for(let i of L8)(r=i.keys)!=null&&r.every(o=>{var a;return(a=n.keys)==null?void 0:a.includes(o)})&&L8.delete(i)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{iOe(e.key)}),document.addEventListener("keyup",e=>{oOe(e.key)})});const aOe=lt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),sOe=lt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),lOe=()=>{const e=Be(),t=ve(aOe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ve(sOe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(tW()),e(dC(!n))};return Ze("`",()=>{e(dC(!n))},[n]),Ze("esc",()=>{e(dC(!1))}),K(fn,{children:[n&&y(kq,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:y("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)},children:t.map((f,p)=>{const{timestamp:m,message:v,level:b}=f;return K("div",{className:`console-entry console-${b}-color`,children:[K("p",{className:"console-timestamp",children:[m,":"]}),y("p",{className:"console-message",children:v})]},p)})})}),n&&y(so,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:y(fs,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:y(x8e,{}),onClick:()=>a(!o)})}),y(so,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:y(fs,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?y(N8e,{}):y($G,{}),onClick:l})})]})};function uOe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}function cOe(){const{t:e}=Ke();return K("div",{className:"work-in-progress nodes-work-in-progress",children:[y("h1",{children:e("common:nodes")}),y("p",{children:e("common:nodesDesc")})]})}const dOe=()=>{const{t:e}=Ke();return K("div",{className:"work-in-progress post-processing-work-in-progress",children:[y("h1",{children:e("common:postProcessing")}),y("p",{children:e("common:postProcessDesc1")}),y("p",{children:e("common:postProcessDesc2")}),y("p",{children:e("common:postProcessDesc3")})]})},fOe=bt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:y("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:y("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),hOe=bt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:y("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),pOe=bt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:y("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),gOe=bt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:y("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:y("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var oo=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e[e.BOUNDING_BOX=8]="BOUNDING_BOX",e[e.SEAM_CORRECTION=9]="SEAM_CORRECTION",e[e.INFILL_AND_SCALING=10]="INFILL_AND_SCALING",e))(oo||{});const mOe=()=>{const{t:e}=Ke();return C.exports.useMemo(()=>({[0]:{text:e("tooltip:feature.prompt"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:e("tooltip:feature.gallery"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:e("tooltip:feature.other"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:e("tooltip:feature.seed"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:e("tooltip:feature.variations"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:e("tooltip:feature.upscale"),href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:e("tooltip:feature.faceCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:e("tooltip:feature.imageToImage"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:e("tooltip:feature.boundingBox"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:e("tooltip:feature.seamCorrection"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:e("tooltip:feature.infillAndScaling"),href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}}),[e])},vOe=e=>mOe()[e],yOe=lt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),bOe=lt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),PP=()=>{const e=Be(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ve(yOe),{isGFPGANAvailable:i}=ve(bOe),o=u=>e(w4(u)),a=u=>e(CU(u)),s=u=>e(C4(u.target.value)),{t:l}=Ke();return K(at,{direction:"column",gap:2,children:[y(nl,{label:l("options:type"),validValues:oCe.concat(),value:n,onChange:s}),y(Eo,{isDisabled:!i,label:l("options:strength"),step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&y(Eo,{isDisabled:!i,label:l("options:codeformerFidelity"),step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function zq(){const e=ve(i=>i.system.isGFPGANAvailable),t=ve(i=>i.options.shouldRunFacetool),n=Be();return y(os,{isDisabled:!e,isChecked:t,onChange:i=>n(sSe(i.target.checked))})}function SOe(){const e=Be(),t=ve(i=>i.options.shouldFitToWidthHeight),n=i=>e(OU(i.target.checked)),{t:r}=Ke();return y(os,{label:r("options:imageFit"),isChecked:t,onChange:n})}function Zo(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,width:u="100%",tooltipSuffix:f="",withSliderMarks:p=!1,sliderMarkLeftOffset:m=0,sliderMarkRightOffset:v=-7,withInput:b=!1,isInteger:x=!1,inputWidth:E="5.5rem",inputReadOnly:k=!0,withReset:_=!1,hideTooltip:T=!1,isCompact:A=!1,handleReset:R,isResetDisabled:I,isSliderDisabled:D,isInputDisabled:B,styleClass:z,sliderFormControlProps:j,sliderFormLabelProps:Y,sliderMarkProps:te,sliderTrackProps:G,sliderThumbProps:$,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:Z,sliderTooltipProps:U,sliderIAIIconButtonProps:X,...le}=e,[fe,Se]=C.exports.useState(String(i)),Ae=C.exports.useMemo(()=>V!=null&&V.max?V.max:a,[a,V==null?void 0:V.max]);C.exports.useEffect(()=>{String(i)!==fe&&fe!==""&&Se(String(i))},[i,fe,Se]);const be=Je=>{const Ye=He.clamp(x?Math.floor(Number(Je.target.value)):Number(Je.target.value),o,Ae);Se(String(Ye)),l(Ye)},ke=Je=>{Se(String(Je)),l(Number(Je))},De=()=>{!R||R()};return K(Ir,{className:z?`invokeai__slider-component ${z}`:"invokeai__slider-component","data-markers":p,style:A?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...j,children:[y(ti,{className:"invokeai__slider-component-label",...Y,children:r}),K(Sy,{w:"100%",gap:2,alignItems:"center",children:[K(_E,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ke,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:D,width:u,...le,children:[p&&K(fn,{children:[y($9,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:m,...te,children:o}),y($9,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:v,...te,children:a})]}),y(HV,{className:"invokeai__slider_track",...G,children:y(VV,{className:"invokeai__slider_track-filled"})}),y(so,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${f}`,hidden:T,...U,children:y(jV,{className:"invokeai__slider-thumb",...$})})]}),b&&K(gE,{min:o,max:Ae,step:s,value:fe,onChange:ke,onBlur:be,className:"invokeai__slider-number-field",isDisabled:B,...V,children:[y(mE,{className:"invokeai__slider-number-input",width:E,minWidth:E,readOnly:k,...J}),K(_V,{...Z,children:[y(yE,{className:"invokeai__slider-number-stepper"}),y(vE,{className:"invokeai__slider-number-stepper"})]})]}),_&&y(Qe,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:y(Hx,{}),onClick:De,isDisabled:I,...X})]})]})}function jq(e){const{t}=Ke(),{label:n=`${t("options:strength")}`,styleClass:r}=e,i=ve(l=>l.options.img2imgStrength),o=Be();return y(Zo,{label:n,step:.01,min:.01,max:.99,onChange:l=>o(Y9(l)),value:i,isInteger:!1,styleClass:r,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{o(Y9(.75))}})}const Hq=()=>{const e=Be(),t=ve(i=>i.options.seamless),n=i=>e(LU(i.target.checked)),{t:r}=Ke();return y(at,{gap:2,direction:"column",children:y(os,{label:r("options:seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})})},xOe=()=>y(at,{gap:2,direction:"column",children:y(Hq,{})});function wOe(){const e=Be(),{t}=Ke(),n=ve(i=>i.options.shouldRandomizeSeed),r=i=>e(oSe(i.target.checked));return y(os,{label:t("options:randomizeSeed"),isChecked:n,onChange:r})}function COe(){const e=ve(a=>a.options.seed),t=ve(a=>a.options.shouldRandomizeSeed),n=ve(a=>a.options.shouldGenerateVariations),{t:r}=Ke(),i=Be(),o=a=>i(Ly(a));return y(Eo,{label:r("options:seed"),step:1,precision:0,flexGrow:1,min:ZE,max:QE,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"auto"})}function _Oe(){const e=Be(),t=ve(i=>i.options.shouldRandomizeSeed),{t:n}=Ke();return y(ds,{size:"sm",isDisabled:t,onClick:()=>e(Ly($W(ZE,QE))),padding:"0 1.5rem",children:y("p",{children:n("options:shuffle")})})}function kOe(){const e=Be(),t=ve(i=>i.options.threshold),{t:n}=Ke(),r=i=>e(IU(i));return y(Eo,{label:n("options:noiseThreshold"),min:0,max:1e3,step:.1,onChange:r,value:t,isInteger:!1})}function EOe(){const e=Be(),t=ve(i=>i.options.perlin),{t:n}=Ke(),r=i=>e(PU(i));return y(Eo,{label:n("options:perlinNoise"),min:0,max:1,step:.05,onChange:r,value:t,isInteger:!1})}const TP=()=>K(at,{gap:2,direction:"column",children:[y(wOe,{}),K(at,{gap:2,children:[y(COe,{}),y(_Oe,{})]}),y(at,{gap:2,children:y(kOe,{})}),y(at,{gap:2,children:y(EOe,{})})]}),POe=lt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),TOe=lt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),LP=()=>{const e=Be(),{upscalingLevel:t,upscalingStrength:n}=ve(POe),{isESRGANAvailable:r}=ve(TOe),{t:i}=Ke(),o=s=>e(K9(Number(s.target.value))),a=s=>e(X9(s));return K("div",{className:"upscale-options",children:[y(nl,{isDisabled:!r,label:i("options:scale"),value:t,onChange:o,validValues:iCe}),y(Eo,{isDisabled:!r,label:i("options:strength"),step:.05,min:0,max:1,onChange:a,value:n,isInteger:!1})]})};function Vq(){const e=ve(i=>i.system.isESRGANAvailable),t=ve(i=>i.options.shouldRunESRGAN),n=Be();return y(os,{isDisabled:!e,isChecked:t,onChange:i=>n(aSe(i.target.checked))})}function AP(){const e=ve(r=>r.options.shouldGenerateVariations),t=Be();return y(os,{isChecked:e,width:"auto",onChange:r=>t(tSe(r.target.checked))})}function LOe(){const e=ve(o=>o.options.seedWeights),t=ve(o=>o.options.shouldGenerateVariations),{t:n}=Ke(),r=Be(),i=o=>r(AU(o.target.value));return y(rs,{label:n("options:seedWeights"),value:e,isInvalid:t&&!(FE(e)||e===""),isDisabled:!t,onChange:i})}function AOe(){const e=ve(o=>o.options.variationAmount),t=ve(o=>o.options.shouldGenerateVariations),{t:n}=Ke(),r=Be(),i=o=>r(uSe(o));return y(Eo,{label:n("options:variationAmount"),value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i,isInteger:!1})}const OP=()=>K(at,{gap:2,direction:"column",children:[y(AOe,{}),y(LOe,{})]});function OOe(){const e=Be(),t=ve(i=>i.options.cfgScale),{t:n}=Ke(),r=i=>e(wU(i));return y(Eo,{label:n("options:cfgScale"),step:.5,min:1.01,max:200,onChange:r,value:t,width:"auto",styleClass:"main-option-block",textAlign:"center",isInteger:!1})}function MOe(){const e=ve(o=>o.options.height),t=ve(_r),n=Be(),{t:r}=Ke(),i=o=>n(_U(Number(o.target.value)));return y(nl,{isDisabled:t==="unifiedCanvas",label:r("options:height"),value:e,flexGrow:1,onChange:i,validValues:rCe,styleClass:"main-option-block"})}const ROe=lt([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function IOe(){const e=Be(),{iterations:t}=ve(ROe),{t:n}=Ke(),r=i=>e(J5e(i));return y(Eo,{label:n("options:images"),step:1,min:1,max:9999,onChange:r,value:t,width:"auto",labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function DOe(){const e=ve(i=>i.options.sampler),t=Be(),{t:n}=Ke(),r=i=>t(TU(i.target.value));return y(nl,{label:n("options:sampler"),value:e,onChange:r,validValues:tCe,styleClass:"main-option-block"})}function NOe(){const e=Be(),t=ve(i=>i.options.steps),{t:n}=Ke(),r=i=>e(RU(i));return y(Eo,{label:n("options:steps"),min:1,max:9999,step:1,onChange:r,value:t,width:"auto",styleClass:"main-option-block",textAlign:"center"})}function BOe(){const e=ve(o=>o.options.width),t=ve(_r),{t:n}=Ke(),r=Be(),i=o=>r(DU(Number(o.target.value)));return y(nl,{isDisabled:t==="unifiedCanvas",label:n("options:width"),value:e,flexGrow:1,onChange:i,validValues:nCe,styleClass:"main-option-block"})}function MP(){return y("div",{className:"main-options",children:K("div",{className:"main-options-list",children:[K("div",{className:"main-options-row",children:[y(IOe,{}),y(NOe,{}),y(OOe,{})]}),K("div",{className:"main-options-row",children:[y(BOe,{}),y(MOe,{}),y(DOe,{})]})]})})}const $Oe=lt(e=>e.system,e=>e.shouldDisplayGuides),FOe=({children:e,feature:t})=>{const n=ve($Oe),{text:r}=vOe(t);return n?K(bE,{trigger:"hover",children:[y(wE,{children:y(rl,{children:e})}),K(xE,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[y(SE,{className:"guide-popover-arrow"}),y("div",{className:"guide-popover-guide-content",children:r})]})]}):null},zOe=Oe(({feature:e,icon:t=QTe},n)=>y(FOe,{feature:e,children:y(rl,{ref:n,children:y($a,{marginBottom:"-.15rem",as:t})})}));function jOe(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return K(rg,{className:"advanced-settings-item",children:[y(tg,{className:"advanced-settings-header",children:K(at,{width:"100%",gap:"0.5rem",align:"center",children:[y(rl,{flexGrow:1,textAlign:"left",children:t}),i,n&&y(zOe,{feature:n}),y(ng,{})]})}),y(ig,{className:"advanced-settings-panel",children:r})]})}const RP=e=>{const{accordionInfo:t}=e,n=ve(a=>a.system.openAccordions),r=Be();return y(Nk,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(owe(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:f,additionalHeaderComponents:p}=t[s];a.push(y(jOe,{header:l,feature:u,content:f,additionalHeaderComponents:p},s))}),a})()})},rn=e=>e.canvas,kr=lt([rn,_r,al],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),Uq=e=>e.canvas.layerState.objects.find(H5),Wq=lt([e=>e.options,e=>e.system,Uq,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:f}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),f||(p=!1,m.push("System Disconnected")),o&&(!(FE(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:He.isEqual,resultEqualityCheck:He.isEqual}});function IP(e){const{iconButton:t=!1,...n}=e,r=Be(),{isReady:i}=ve(Wq),o=ve(_r),a=()=>{r(u8(o))},{t:s}=Ke();return Ze(["ctrl+enter","meta+enter"],()=>{r(u8(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),y("div",{style:{flexGrow:4},children:t?y(Qe,{"aria-label":s("options:invoke"),type:"submit",icon:y($8e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:s("options:invoke"),tooltipProps:{placement:"bottom"},...n}):y(qr,{"aria-label":s("options:invoke"),type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const HOe=lt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:He.isEqual}});function DP(e){const{...t}=e,n=Be(),{isProcessing:r,isConnected:i,isCancelable:o}=ve(HOe),a=()=>n(K6e()),{t:s}=Ke();return Ze("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),y(Qe,{icon:y(nLe,{}),tooltip:s("options:cancel"),"aria-label":s("options:cancel"),isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const VOe=lt(e=>e.options,e=>e.shouldLoopback),UOe=()=>{const e=Be(),t=ve(VOe),{t:n}=Ke();return y(Qe,{"aria-label":n("options:toggleLoopback"),tooltip:n("options:toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:y(z8e,{}),onClick:()=>{e(rSe(!t))}})},NP=()=>{const e=ve(_r);return K("div",{className:"process-buttons",children:[y(IP,{}),e==="img2img"&&y(UOe,{}),y(DP,{})]})},WOe=lt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:He.isEqual}}),BP=()=>{const e=Be(),{prompt:t,activeTabName:n}=ve(WOe),{isReady:r}=ve(Wq),i=C.exports.useRef(null),{t:o}=Ke(),a=l=>{e(mx(l.target.value))};Ze("alt+a",()=>{var l;(l=i.current)==null||l.focus()},[]);const s=l=>{l.key==="Enter"&&l.shiftKey===!1&&r&&(l.preventDefault(),e(u8(n)))};return y("div",{className:"prompt-bar",children:y(Ir,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:y(ZV,{id:"prompt",name:"prompt",placeholder:o("options:promptPlaceholder"),size:"lg",value:t,onChange:a,onKeyDown:s,resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})};function Gq(e){return yt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function qq(e){return yt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function GOe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function qOe(e,t){e.classList?e.classList.add(t):GOe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function HD(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function YOe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=HD(e.className,t):e.setAttribute("class",HD(e.className&&e.className.baseVal||"",t))}const VD={disabled:!1},Yq=oe.createContext(null);var Kq=function(t){return t.scrollTop},Av="unmounted",Sh="exited",xh="entering",z0="entered",A8="exiting",Sc=function(e){oE(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Sh,o.appearStatus=xh):l=z0:r.unmountOnExit||r.mountOnEnter?l=Av:l=Sh,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Av?{status:Sh}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xh&&a!==z0&&(o=xh):(a===xh||a===z0)&&(o=A8)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xh){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:W3.findDOMNode(this);a&&Kq(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sh&&this.setState({status:Av})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[W3.findDOMNode(this),s],u=l[0],f=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||VD.disabled){this.safeSetState({status:z0},function(){o.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:xh},function(){o.props.onEntering(u,f),o.onTransitionEnd(m,function(){o.safeSetState({status:z0},function(){o.props.onEntered(u,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:W3.findDOMNode(this);if(!o||VD.disabled){this.safeSetState({status:Sh},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:A8},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Sh},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:W3.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Av)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=nE(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return y(Yq.Provider,{value:null,children:typeof a=="function"?a(i,s):oe.cloneElement(oe.Children.only(a),s)})},t}(oe.Component);Sc.contextType=Yq;Sc.propTypes={};function B0(){}Sc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:B0,onEntering:B0,onEntered:B0,onExit:B0,onExiting:B0,onExited:B0};Sc.UNMOUNTED=Av;Sc.EXITED=Sh;Sc.ENTERING=xh;Sc.ENTERED=z0;Sc.EXITING=A8;const KOe=Sc;var XOe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return qOe(t,r)})},MC=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return YOe(t,r)})},$P=function(e){oE(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1];r.removeClasses(f,"exit"),r.addClass(f,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1],m=p?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1],m=p?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",f=u&&l?l+"-":"",p=u?""+f+s:l[s],m=u?p+"-active":l[s+"Active"],v=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:v}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;o==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&i&&Kq(i),s&&(this.appliedClasses[o][a]=s,XOe(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,l=a.active,u=a.done;this.appliedClasses[o]={},s&&MC(i,s),l&&MC(i,l),u&&MC(i,u)},n.render=function(){var i=this.props;i.classNames;var o=nE(i,["classNames"]);return y(KOe,{...o,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(oe.Component);$P.defaultProps={classNames:""};$P.propTypes={};const Xq=$P,ZOe=lt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),FP=e=>{const t=Be(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ve(ZOe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;Ze("o",()=>{t(Ju(!n)),i&&setTimeout(()=>t(vi(!0)),400)},[n,i]),Ze("esc",()=>{t(Ju(!1))},{enabled:()=>!i,preventDefault:!0},[i]),Ze("shift+o",()=>{m(),t(vi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(eSe(a.current?a.current.scrollTop:0)),t(Ju(!1)),t(nSe(!1)))},[t,i]),f=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(iSe(!i)),t(vi(!0))};return C.exports.useEffect(()=>{function v(b){o.current&&!o.current.contains(b.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),y(Xq,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:y("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:y("div",{className:"options-panel-margin",children:K("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&f()},children:[y(so,{label:"Pin Options Panel",children:y("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?y(Gq,{}):y(qq,{})})}),!i&&K("div",{className:"invoke-ai-logo-wrapper",children:[y("img",{src:WG,alt:"invoke-ai-logo"}),K("h1",{children:["invoke ",y("strong",{children:"ai"})]})]}),l]})})})})};function QOe(){const{t:e}=Ke(),t={seed:{header:`${e("options:seed")}`,feature:oo.SEED,content:y(TP,{})},variations:{header:`${e("options:variations")}`,feature:oo.VARIATIONS,content:y(OP,{}),additionalHeaderComponents:y(AP,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:oo.FACE_CORRECTION,content:y(PP,{}),additionalHeaderComponents:y(zq,{})},upscale:{header:`${e("options:upscaling")}`,feature:oo.UPSCALE,content:y(LP,{}),additionalHeaderComponents:y(Vq,{})},other:{header:`${e("options:otherOptions")}`,feature:oo.OTHER,content:y(xOe,{})}},n=Be(),r=ve(_r);return C.exports.useEffect(()=>{r==="img2img"&&n(jE(!1))},[r,n]),K(FP,{children:[y(BP,{}),y(NP,{}),y(MP,{}),y(jq,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),y(SOe,{}),y(RP,{accordionInfo:t})]})}const zP=C.exports.createContext(null),JOe=e=>{const{styleClass:t}=e,n=C.exports.useContext(zP),r=()=>{n&&n()};return y("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:K("div",{className:"image-upload-button",children:[y(Nx,{}),y(Hh,{size:"lg",children:"Click or Drag and Drop"})]})})},eMe=lt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),O8=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Qh(),a=Be(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ve(eMe),f=C.exports.useRef(null),p=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(Y6e(e)),o()};Ze("delete",()=>{s?i():m()},[e,s]);const v=b=>a(eW(!b.target.checked));return K(fn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),y(xV,{isOpen:r,leastDestructiveRef:f,onClose:o,children:y(Jd,{children:K(wV,{className:"modal",children:[y(S1,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),y(t1,{children:K(at,{direction:"column",gap:5,children:[y(yr,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),y(Ir,{children:K(at,{alignItems:"center",children:[y(ti,{mb:0,children:"Don't ask me again"}),y(kE,{checked:!s,onChange:v})]})})]})}),K(cx,{children:[y(ds,{ref:f,onClick:o,className:"modal-close-btn",children:"Cancel"}),y(ds,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),tMe=lt([e=>e.system,e=>e.options,e=>e.gallery,_r],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:f,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:f,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:gi.exports.isEqual}}),Zq=()=>{var B,z,j,Y,te,G;const e=Be(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:f,activeTabName:p}=ve(tMe),m=Ty(),{t:v}=Ke(),b=()=>{!u||(f&&e(Qu(!1)),e(C1(u)),e(Go("img2img")))},x=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:v("toast:imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};Ze("shift+i",()=>{u?(b(),m({title:v("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:imageNotLoaded"),description:v("toast:imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{var $,V;!u||(u.metadata&&e(X5e(u.metadata)),(($=u.metadata)==null?void 0:$.image.type)==="img2img"?e(Go("img2img")):((V=u.metadata)==null?void 0:V.image.type)==="txt2img"&&e(Go("txt2img")))};Ze("a",()=>{var $,V;["txt2img","img2img"].includes((V=($=u==null?void 0:u.metadata)==null?void 0:$.image)==null?void 0:V.type)?(E(),m({title:v("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:parametersNotSet"),description:v("toast:parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u!=null&&u.metadata&&e(Ly(u.metadata.image.seed))};Ze("s",()=>{var $,V;(V=($=u==null?void 0:u.metadata)==null?void 0:$.image)!=null&&V.seed?(k(),m({title:v("toast:seedSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:seedNotSet"),description:v("toast:seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{var $,V;return((V=($=u==null?void 0:u.metadata)==null?void 0:$.image)==null?void 0:V.prompt)&&e(mx(u.metadata.image.prompt))};Ze("p",()=>{var $,V;(V=($=u==null?void 0:u.metadata)==null?void 0:$.image)!=null&&V.prompt?(_(),m({title:v("toast:promptSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:promptNotSet"),description:v("toast:promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const T=()=>{u&&e(G6e(u))};Ze("Shift+U",()=>{i&&!s&&n&&!t&&o?T():m({title:v("toast:upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const A=()=>{u&&e(q6e(u))};Ze("Shift+R",()=>{r&&!s&&n&&!t&&a?A():m({title:v("toast:faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const R=()=>e(MU(!l)),I=()=>{!u||(f&&e(Qu(!1)),e(Sx(u)),e(vi(!0)),p!=="unifiedCanvas"&&e(Go("unifiedCanvas")),m({title:v("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};Ze("i",()=>{u?R():m({title:v("toast:metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[u,l]);const D=()=>{e(Qu(!f))};return K("div",{className:"current-image-options",children:[K(io,{isAttached:!0,children:[y(Js,{trigger:"hover",triggerComponent:y(Qe,{"aria-label":`${v("options:sendTo")}...`,icon:y(V8e,{})}),children:K("div",{className:"current-image-send-to-popover",children:[y(qr,{size:"sm",onClick:b,leftIcon:y(QI,{}),children:v("options:sendToImg2Img")}),y(qr,{size:"sm",onClick:I,leftIcon:y(QI,{}),children:v("options:sendToUnifiedCanvas")}),y(qr,{size:"sm",onClick:x,leftIcon:y(Ry,{}),children:v("options:copyImageToLink")}),y(qr,{leftIcon:y(sP,{}),size:"sm",children:y(Vh,{download:!0,href:u==null?void 0:u.url,children:v("options:downloadImage")})})]})}),y(Qe,{icon:y(T8e,{}),tooltip:f?`${v("options:closeViewer")} (Z)`:`${v("options:openInViewer")} (Z)`,"aria-label":f?`${v("options:closeViewer")} (Z)`:`${v("options:openInViewer")} (Z)`,"data-selected":f,onClick:D})]}),K(io,{isAttached:!0,children:[y(Qe,{icon:y(F8e,{}),tooltip:`${v("options:usePrompt")} (P)`,"aria-label":`${v("options:usePrompt")} (P)`,isDisabled:!((z=(B=u==null?void 0:u.metadata)==null?void 0:B.image)!=null&&z.prompt),onClick:_}),y(Qe,{icon:y(H8e,{}),tooltip:`${v("options:useSeed")} (S)`,"aria-label":`${v("options:useSeed")} (S)`,isDisabled:!((Y=(j=u==null?void 0:u.metadata)==null?void 0:j.image)!=null&&Y.seed),onClick:k}),y(Qe,{icon:y(_8e,{}),tooltip:`${v("options:useAll")} (A)`,"aria-label":`${v("options:useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((G=(te=u==null?void 0:u.metadata)==null?void 0:te.image)==null?void 0:G.type),onClick:E})]}),K(io,{isAttached:!0,children:[y(Js,{trigger:"hover",triggerComponent:y(Qe,{icon:y(O8e,{}),"aria-label":v("options:restoreFaces")}),children:K("div",{className:"current-image-postprocessing-popover",children:[y(PP,{}),y(qr,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:A,children:v("options:restoreFaces")})]})}),y(Js,{trigger:"hover",triggerComponent:y(Qe,{icon:y(P8e,{}),"aria-label":v("options:upscale")}),children:K("div",{className:"current-image-postprocessing-popover",children:[y(LP,{}),y(qr,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:T,children:v("options:upscaleImage")})]})})]}),y(io,{isAttached:!0,children:y(Qe,{icon:y($G,{}),tooltip:`${v("options:info")} (I)`,"aria-label":`${v("options:info")} (I)`,"data-selected":l,onClick:R})}),y(O8,{image:u,children:y(Qe,{icon:y(yp,{}),tooltip:`${v("options:deleteImage")} (Del)`,"aria-label":`${v("options:deleteImage")} (Del)`,isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};function nMe(e){return yt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const $n=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>K(at,{gap:2,children:[n&&y(so,{label:`Recall ${e}`,children:y(fs,{"aria-label":"Use this parameter",icon:y(nMe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&y(so,{label:`Copy ${e}`,children:y(fs,{"aria-label":`Copy ${e}`,icon:y(Ry,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),K(at,{direction:i?"column":"row",children:[K(yr,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?K(Vh,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",y(_q,{mx:"2px"})]}):y(yr,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),rMe=(e,t)=>e.image.uuid===t.image.uuid,Qq=C.exports.memo(({image:e,styleClass:t})=>{var j,Y;const n=Be();Ze("esc",()=>{n(MU(!1))});const r=((j=e==null?void 0:e.metadata)==null?void 0:j.image)||{},i=e==null?void 0:e.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:f,orig_path:p,perlin:m,postprocessing:v,prompt:b,sampler:x,scale:E,seamless:k,seed:_,steps:T,strength:A,threshold:R,type:I,variations:D,width:B}=r,z=JSON.stringify(e.metadata,null,2);return y("div",{className:`image-metadata-viewer ${t}`,children:K(at,{gap:1,direction:"column",width:"100%",children:[K(at,{gap:2,children:[y(yr,{fontWeight:"semibold",children:"File:"}),K(Vh,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,y(_q,{mx:"2px"})]})]}),Object.keys(r).length>0?K(fn,{children:[I&&y($n,{label:"Generation type",value:I}),((Y=e.metadata)==null?void 0:Y.model_weights)&&y($n,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(I)&&y($n,{label:"Original image",value:p}),I==="gfpgan"&&A!==void 0&&y($n,{label:"Fix faces strength",value:A,onClick:()=>n(w4(A))}),I==="esrgan"&&E!==void 0&&y($n,{label:"Upscaling scale",value:E,onClick:()=>n(K9(E))}),I==="esrgan"&&A!==void 0&&y($n,{label:"Upscaling strength",value:A,onClick:()=>n(X9(A))}),b&&y($n,{label:"Prompt",labelPosition:"top",value:x4(b),onClick:()=>n(mx(b))}),_!==void 0&&y($n,{label:"Seed",value:_,onClick:()=>n(Ly(_))}),R!==void 0&&y($n,{label:"Noise Threshold",value:R,onClick:()=>n(IU(R))}),m!==void 0&&y($n,{label:"Perlin Noise",value:m,onClick:()=>n(PU(m))}),x&&y($n,{label:"Sampler",value:x,onClick:()=>n(TU(x))}),T&&y($n,{label:"Steps",value:T,onClick:()=>n(RU(T))}),o!==void 0&&y($n,{label:"CFG scale",value:o,onClick:()=>n(wU(o))}),D&&D.length>0&&y($n,{label:"Seed-weight pairs",value:N5(D),onClick:()=>n(AU(N5(D)))}),k&&y($n,{label:"Seamless",value:k,onClick:()=>n(LU(k))}),l&&y($n,{label:"High Resolution Optimization",value:l,onClick:()=>n(jE(l))}),B&&y($n,{label:"Width",value:B,onClick:()=>n(DU(B))}),s&&y($n,{label:"Height",value:s,onClick:()=>n(_U(s))}),u&&y($n,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(C1(u))}),f&&y($n,{label:"Mask image",value:f,isLink:!0,onClick:()=>n(EU(f))}),I==="img2img"&&A&&y($n,{label:"Image to image strength",value:A,onClick:()=>n(Y9(A))}),a&&y($n,{label:"Image to image fit",value:a,onClick:()=>n(OU(a))}),v&&v.length>0&&K(fn,{children:[y(Hh,{size:"sm",children:"Postprocessing"}),v.map((te,G)=>{if(te.type==="esrgan"){const{scale:$,strength:V}=te;return K(at,{pl:"2rem",gap:1,direction:"column",children:[y(yr,{size:"md",children:`${G+1}: Upscale (ESRGAN)`}),y($n,{label:"Scale",value:$,onClick:()=>n(K9($))}),y($n,{label:"Strength",value:V,onClick:()=>n(X9(V))})]},G)}else if(te.type==="gfpgan"){const{strength:$}=te;return K(at,{pl:"2rem",gap:1,direction:"column",children:[y(yr,{size:"md",children:`${G+1}: Face restoration (GFPGAN)`}),y($n,{label:"Strength",value:$,onClick:()=>{n(w4($)),n(C4("gfpgan"))}})]},G)}else if(te.type==="codeformer"){const{strength:$,fidelity:V}=te;return K(at,{pl:"2rem",gap:1,direction:"column",children:[y(yr,{size:"md",children:`${G+1}: Face restoration (Codeformer)`}),y($n,{label:"Strength",value:$,onClick:()=>{n(w4($)),n(C4("codeformer"))}}),V&&y($n,{label:"Fidelity",value:V,onClick:()=>{n(CU(V)),n(C4("codeformer"))}})]},G)}})]}),i&&y($n,{withCopy:!0,label:"Dream Prompt",value:i}),K(at,{gap:2,direction:"column",children:[K(at,{gap:2,children:[y(so,{label:"Copy metadata JSON",children:y(fs,{"aria-label":"Copy metadata JSON",icon:y(Ry,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(z)})}),y(yr,{fontWeight:"semibold",children:"Metadata JSON:"})]}),y("div",{className:"image-json-viewer",children:y("pre",{children:z})})]})]}):y(eH,{width:"100%",pt:10,children:y(yr,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},rMe),Jq=lt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>{var f;return u.uuid===((f=e==null?void 0:e.currentImage)==null?void 0:f.uuid)}),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function iMe(){const e=Be(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ve(Jq),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},f=()=>{e(VE())},p=()=>{e(HE())};return K("div",{className:"current-image-preview",children:[i&&y(nx,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&K("div",{className:"current-image-next-prev-buttons",children:[y("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&y(fs,{"aria-label":"Previous image",icon:y(DG,{className:"next-prev-button"}),variant:"unstyled",onClick:f})}),y("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&y(fs,{"aria-label":"Next image",icon:y(NG,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&y(Qq,{image:i,styleClass:"current-image-metadata"})]})}const oMe=lt([e=>e.gallery,e=>e.options,_r],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),eY=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ve(oMe);return y("div",{className:"current-image-area","data-tab-name":t,children:e?K(fn,{children:[y(Zq,{}),y(iMe,{})]}):y("div",{className:"current-image-display-placeholder",children:y(tLe,{})})})},aMe=()=>{const e=C.exports.useContext(zP);return y(Qe,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:y(Nx,{}),onClick:e||void 0})};function sMe(){const e=ve(o=>o.options.initialImage),{t}=Ke(),n=Be(),r=Ty(),i=()=>{r({title:t("toast:parametersFailed"),description:t("toast:parametersFailedDesc"),status:"error",isClosable:!0}),n(xU())};return K(fn,{children:[K("div",{className:"init-image-preview-header",children:[y("h2",{children:t("options:initialImage")}),y(aMe,{})]}),e&&y("div",{className:"init-image-preview",children:y(nx,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:i})})]})}const lMe=()=>{const e=ve(r=>r.options.initialImage),{currentImage:t}=ve(r=>r.gallery);return K("div",{className:"workarea-split-view",children:[y("div",{className:"workarea-split-view-left",children:e?y("div",{className:"image-to-image-area",children:y(sMe,{})}):y(JOe,{})}),t&&y("div",{className:"workarea-split-view-right",children:y(eY,{})})]})};function uMe(e){return yt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}function tr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function By(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...b}=p,x=(m==null?void 0:m[e][l])||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(x.Provider,{value:E},v)}function f(p,m){const v=(m==null?void 0:m[e][l])||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,f]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,cMe(i,...t)]}function cMe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function dMe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function tY(...e){return t=>e.forEach(n=>dMe(n,t))}function gs(...e){return C.exports.useCallback(tY(...e),e)}const ny=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(hMe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(M8,Dn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(M8,Dn({},r,{ref:t}),n)});ny.displayName="Slot";const M8=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...pMe(r,n.props),ref:tY(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});M8.displayName="SlotClone";const fMe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function hMe(e){return C.exports.isValidElement(e)&&e.type===fMe}function pMe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const gMe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],uc=gMe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?ny:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Dn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nY(e,t){e&&pu.exports.flushSync(()=>e.dispatchEvent(t))}function rY(e){const t=e+"CollectionProvider",[n,r]=By(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:x}=v,E=oe.useRef(null),k=oe.useRef(new Map).current;return oe.createElement(i,{scope:b,itemMap:k,collectionRef:E},x)},s=e+"CollectionSlot",l=oe.forwardRef((v,b)=>{const{scope:x,children:E}=v,k=o(s,x),_=gs(b,k.collectionRef);return oe.createElement(ny,{ref:_},E)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",p=oe.forwardRef((v,b)=>{const{scope:x,children:E,...k}=v,_=oe.useRef(null),T=gs(b,_),A=o(u,x);return oe.useEffect(()=>(A.itemMap.set(_,{ref:_,...k}),()=>void A.itemMap.delete(_))),oe.createElement(ny,{[f]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return oe.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const k=Array.from(E.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((A,R)=>k.indexOf(A.ref.current)-k.indexOf(R.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const mMe=C.exports.createContext(void 0);function iY(e){const t=C.exports.useContext(mMe);return e||t||"ltr"}function fu(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function vMe(e,t=globalThis==null?void 0:globalThis.document){const n=fu(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const R8="dismissableLayer.update",yMe="dismissableLayer.pointerDownOutside",bMe="dismissableLayer.focusOutside";let UD;const SMe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xMe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=C.exports.useContext(SMe),[p,m]=C.exports.useState(null),v=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=C.exports.useState({}),x=gs(t,B=>m(B)),E=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=E.indexOf(k),T=p?E.indexOf(p):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,R=T>=_,I=wMe(B=>{const z=B.target,j=[...f.branches].some(Y=>Y.contains(z));!R||j||(o==null||o(B),s==null||s(B),B.defaultPrevented||l==null||l())},v),D=CMe(B=>{const z=B.target;[...f.branches].some(Y=>Y.contains(z))||(a==null||a(B),s==null||s(B),B.defaultPrevented||l==null||l())},v);return vMe(B=>{T===f.layers.size-1&&(i==null||i(B),!B.defaultPrevented&&l&&(B.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(UD=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),WD(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=UD)}},[p,v,r,f]),C.exports.useEffect(()=>()=>{!p||(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),WD())},[p,f]),C.exports.useEffect(()=>{const B=()=>b({});return document.addEventListener(R8,B),()=>document.removeEventListener(R8,B)},[]),C.exports.createElement(uc.div,Dn({},u,{ref:x,style:{pointerEvents:A?R?"auto":"none":void 0,...e.style},onFocusCapture:tr(e.onFocusCapture,D.onFocusCapture),onBlurCapture:tr(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:tr(e.onPointerDownCapture,I.onPointerDownCapture)}))});function wMe(e,t=globalThis==null?void 0:globalThis.document){const n=fu(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){oY(yMe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function CMe(e,t=globalThis==null?void 0:globalThis.document){const n=fu(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&oY(bMe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WD(){const e=new CustomEvent(R8);document.dispatchEvent(e)}function oY(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?nY(i,o):i.dispatchEvent(o)}let RC=0;function _Me(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:GD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:GD()),RC++,()=>{RC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),RC--}},[])}function GD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const IC="focusScope.autoFocusOnMount",DC="focusScope.autoFocusOnUnmount",qD={bubbles:!1,cancelable:!0},kMe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=fu(i),f=fu(o),p=C.exports.useRef(null),m=gs(t,x=>l(x)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let x=function(k){if(v.paused||!s)return;const _=k.target;s.contains(_)?p.current=_:wh(p.current,{select:!0})},E=function(k){v.paused||!s||s.contains(k.relatedTarget)||wh(p.current,{select:!0})};return document.addEventListener("focusin",x),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){KD.add(v);const x=document.activeElement;if(!s.contains(x)){const k=new CustomEvent(IC,qD);s.addEventListener(IC,u),s.dispatchEvent(k),k.defaultPrevented||(EMe(OMe(aY(s)),{select:!0}),document.activeElement===x&&wh(s))}return()=>{s.removeEventListener(IC,u),setTimeout(()=>{const k=new CustomEvent(DC,qD);s.addEventListener(DC,f),s.dispatchEvent(k),k.defaultPrevented||wh(x!=null?x:document.body,{select:!0}),s.removeEventListener(DC,f),KD.remove(v)},0)}}},[s,u,f,v]);const b=C.exports.useCallback(x=>{if(!n&&!r||v.paused)return;const E=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,k=document.activeElement;if(E&&k){const _=x.currentTarget,[T,A]=PMe(_);T&&A?!x.shiftKey&&k===A?(x.preventDefault(),n&&wh(T,{select:!0})):x.shiftKey&&k===T&&(x.preventDefault(),n&&wh(A,{select:!0})):k===_&&x.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(uc.div,Dn({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function EMe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wh(r,{select:t}),document.activeElement!==n)return}function PMe(e){const t=aY(e),n=YD(t,e),r=YD(t.reverse(),e);return[n,r]}function aY(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function YD(e,t){for(const n of e)if(!TMe(n,{upTo:t}))return n}function TMe(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 LMe(e){return e instanceof HTMLInputElement&&"select"in e}function wh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LMe(e)&&t&&e.select()}}const KD=AMe();function AMe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=XD(e,t),e.unshift(t)},remove(t){var n;e=XD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function XD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function OMe(e){return e.filter(t=>t.tagName!=="A")}const a1=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:()=>{},MMe=jC["useId".toString()]||(()=>{});let RMe=0;function IMe(e){const[t,n]=C.exports.useState(MMe());return a1(()=>{e||n(r=>r!=null?r:String(RMe++))},[e]),e||(t?`radix-${t}`:"")}function L1(e){return e.split("-")[0]}function Kx(e){return e.split("-")[1]}function A1(e){return["top","bottom"].includes(L1(e))?"x":"y"}function jP(e){return e==="y"?"height":"width"}function ZD(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=A1(t),l=jP(s),u=r[l]/2-i[l]/2,f=L1(t),p=s==="x";let m;switch(f){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(Kx(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const DMe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=ZD(l,r,s),p=r,m={},v=0;for(let b=0;b<o.length;b++){const{name:x,fn:E}=o[b],{x:k,y:_,data:T,reset:A}=await E({x:u,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=k!=null?k:u,f=_!=null?_:f,m={...m,[x]:{...m[x],...T}},A&&v<=50){v++,typeof A=="object"&&(A.placement&&(p=A.placement),A.rects&&(l=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:f}=ZD(l,p,s)),b=-1;continue}}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};function NMe(e){return{top:0,right:0,bottom:0,left:0,...e}}function sY(e){return typeof e!="number"?NMe(e):{top:e,right:e,bottom:e,left:e}}function Y5(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function K5(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=t,b=sY(v),E=s[m?p==="floating"?"reference":"floating":p],k=Y5(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),_=Y5(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[p]);return{top:k.top-_.top+b.top,bottom:_.bottom-k.bottom+b.bottom,left:k.left-_.left+b.left,right:_.right-k.right+b.right}}const BMe=Math.min,$Me=Math.max;function I8(e,t,n){return $Me(e,BMe(t,n))}const QD=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e!=null?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=sY(r),f={x:i,y:o},p=A1(a),m=Kx(a),v=jP(p),b=await l.getDimensions(n),x=p==="y"?"top":"left",E=p==="y"?"bottom":"right",k=s.reference[v]+s.reference[p]-f[p]-s.floating[v],_=f[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let A=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;A===0&&(A=s.floating[v]);const R=k/2-_/2,I=u[x],D=A-b[v]-u[E],B=A/2-b[v]/2+R,z=I8(I,B,D),te=(m==="start"?u[x]:u[E])>0&&B!==z&&s.reference[v]<=s.floating[v]?B<I?I-B:D-B:0;return{[p]:f[p]-te,data:{[p]:z,centerOffset:B-z}}}}),FMe={left:"right",right:"left",bottom:"top",top:"bottom"};function X5(e){return e.replace(/left|right|bottom|top/g,t=>FMe[t])}function zMe(e,t,n){n===void 0&&(n=!1);const r=Kx(e),i=A1(e),o=jP(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=X5(a)),{main:a,cross:X5(a)}}const jMe={start:"end",end:"start"};function JD(e){return e.replace(/start|end/g,t=>jMe[t])}const HMe=["top","right","bottom","left"];function VMe(e){const t=X5(e);return[JD(e),t,JD(t)]}const UMe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,x=L1(r),k=p||(x===a||!v?[X5(a)]:VMe(a)),_=[a,...k],T=await K5(t,b),A=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&A.push(T[x]),f){const{main:z,cross:j}=zMe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));A.push(T[z],T[j])}if(R=[...R,{placement:r,overflows:A}],!A.every(z=>z<=0)){var I,D;const z=((I=(D=i.flip)==null?void 0:D.index)!=null?I:0)+1,j=_[z];if(j)return{data:{index:z,overflows:R},reset:{placement:j}};let Y="bottom";switch(m){case"bestFit":{var B;const te=(B=R.map(G=>[G,G.overflows.filter($=>$>0).reduce(($,V)=>$+V,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:B[0].placement;te&&(Y=te);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function eN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tN(e){return HMe.some(t=>e[t]>=0)}const WMe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await K5(r,{...n,elementContext:"reference"}),a=eN(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:tN(a)}}}case"escaped":{const o=await K5(r,{...n,altBoundary:!0}),a=eN(o,i.floating);return{data:{escapedOffsets:a,escaped:tN(a)}}}default:return{}}}}};async function GMe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=L1(n),s=Kx(n),l=A1(n)==="x",u=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const qMe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await GMe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function lY(e){return e==="x"?"y":"x"}const YMe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:k,y:_}=E;return{x:k,y:_}}},...l}=e,u={x:n,y:r},f=await K5(t,l),p=A1(L1(i)),m=lY(p);let v=u[p],b=u[m];if(o){const E=p==="y"?"top":"left",k=p==="y"?"bottom":"right",_=v+f[E],T=v-f[k];v=I8(_,v,T)}if(a){const E=m==="y"?"top":"left",k=m==="y"?"bottom":"right",_=b+f[E],T=b-f[k];b=I8(_,b,T)}const x=s.fn({...t,[p]:v,[m]:b});return{...x,data:{x:x.x-n,y:x.y-r}}}}},KMe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:n,y:r},p=A1(i),m=lY(p);let v=f[p],b=f[m];const x=typeof s=="function"?s({...o,placement:i}):s,E=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const R=p==="y"?"height":"width",I=o.reference[p]-o.floating[R]+E.mainAxis,D=o.reference[p]+o.reference[R]-E.mainAxis;v<I?v=I:v>D&&(v=D)}if(u){var k,_,T,A;const R=p==="y"?"width":"height",I=["top","left"].includes(L1(i)),D=o.reference[m]-o.floating[R]+(I&&(k=(_=a.offset)==null?void 0:_[m])!=null?k:0)+(I?0:E.crossAxis),B=o.reference[m]+o.reference[R]+(I?0:(T=(A=a.offset)==null?void 0:A[m])!=null?T:0)-(I?E.crossAxis:0);b<D?b=D:b>B&&(b=B)}return{[p]:v,[m]:b}}}};function uY(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function xc(e){if(e==null)return window;if(!uY(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function $y(e){return xc(e).getComputedStyle(e)}function cc(e){return uY(e)?"":e?(e.nodeName||"").toLowerCase():""}function cY(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function hu(e){return e instanceof xc(e).HTMLElement}function of(e){return e instanceof xc(e).Element}function XMe(e){return e instanceof xc(e).Node}function HP(e){if(typeof ShadowRoot>"u")return!1;const t=xc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Xx(e){const{overflow:t,overflowX:n,overflowY:r}=$y(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function ZMe(e){return["table","td","th"].includes(cc(e))}function dY(e){const t=/firefox/i.test(cY()),n=$y(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function fY(){return!/^((?!chrome|android).)*safari/i.test(cY())}const nN=Math.min,l2=Math.max,Z5=Math.round;function dc(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&hu(e)&&(l=e.offsetWidth>0&&Z5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Z5(s.height)/e.offsetHeight||1);const f=of(e)?xc(e):window,p=!fY()&&n,m=(s.left+(p&&(r=(i=f.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,x=s.height/u;return{width:b,height:x,top:v,right:m+b,bottom:v+x,left:m,x:m,y:v}}function bf(e){return((XMe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zx(e){return of(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function hY(e){return dc(bf(e)).left+Zx(e).scrollLeft}function QMe(e){const t=dc(e);return Z5(t.width)!==e.offsetWidth||Z5(t.height)!==e.offsetHeight}function JMe(e,t,n){const r=hu(t),i=bf(t),o=dc(e,r&&QMe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((cc(t)!=="body"||Xx(i))&&(a=Zx(t)),hu(t)){const l=dc(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=hY(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function pY(e){return cc(e)==="html"?e:e.assignedSlot||e.parentNode||(HP(e)?e.host:null)||bf(e)}function rN(e){return!hu(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function eRe(e){let t=pY(e);for(HP(t)&&(t=t.host);hu(t)&&!["html","body"].includes(cc(t));){if(dY(t))return t;t=t.parentNode}return null}function D8(e){const t=xc(e);let n=rN(e);for(;n&&ZMe(n)&&getComputedStyle(n).position==="static";)n=rN(n);return n&&(cc(n)==="html"||cc(n)==="body"&&getComputedStyle(n).position==="static"&&!dY(n))?t:n||eRe(e)||t}function iN(e){if(hu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=dc(e);return{width:t.width,height:t.height}}function tRe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=hu(n),o=bf(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((cc(n)!=="body"||Xx(o))&&(a=Zx(n)),hu(n))){const l=dc(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function nRe(e,t){const n=xc(e),r=bf(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=fY();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function rRe(e){var t;const n=bf(e),r=Zx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=l2(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=l2(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+hY(e);const l=-r.scrollTop;return $y(i||n).direction==="rtl"&&(s+=l2(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function gY(e){const t=pY(e);return["html","body","#document"].includes(cc(t))?e.ownerDocument.body:hu(t)&&Xx(t)?t:gY(t)}function Q5(e,t){var n;t===void 0&&(t=[]);const r=gY(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=xc(r),a=i?[o].concat(o.visualViewport||[],Xx(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Q5(a))}function iRe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&HP(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function oRe(e,t){const n=dc(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function oN(e,t,n){return t==="viewport"?Y5(nRe(e,n)):of(t)?oRe(t,n):Y5(rRe(bf(e)))}function aRe(e){const t=Q5(e),r=["absolute","fixed"].includes($y(e).position)&&hu(e)?D8(e):e;return of(r)?t.filter(i=>of(i)&&iRe(i,r)&&cc(i)!=="body"):[]}function sRe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?aRe(t):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const p=oN(t,f,i);return u.top=l2(p.top,u.top),u.right=nN(p.right,u.right),u.bottom=nN(p.bottom,u.bottom),u.left=l2(p.left,u.left),u},oN(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const lRe={getClippingRect:sRe,convertOffsetParentRelativeRectToViewportRelativeRect:tRe,isElement:of,getDimensions:iN,getOffsetParent:D8,getDocumentElement:bf,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:JMe(t,D8(n),r),floating:{...iN(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>$y(e).direction==="rtl"};function uRe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,f=l||u?[...of(e)?Q5(e):[],...Q5(t)]:[];f.forEach(x=>{l&&x.addEventListener("scroll",n,{passive:!0}),u&&x.addEventListener("resize",n)});let p=null;if(a){let x=!0;p=new ResizeObserver(()=>{x||n(),x=!1}),of(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?dc(e):null;s&&b();function b(){const x=dc(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,m=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(x=p)==null||x.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const cRe=(e,t,n)=>DMe(e,t,{platform:lRe,...n});var N8=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function B8(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!B8(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!B8(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function dRe(e){const t=C.exports.useRef(e);return N8(()=>{t.current=e}),t}function fRe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=dRe(i),l=C.exports.useRef(null),[u,f]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);B8(p==null?void 0:p.map(T=>{let{options:A}=T;return A}),t==null?void 0:t.map(T=>{let{options:A}=T;return A}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||cRe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{b.current&&pu.exports.flushSync(()=>{f(T)})})},[p,n,r]);N8(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);N8(()=>(b.current=!0,()=>{b.current=!1}),[]);const x=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,x()},[x]),k=C.exports.useCallback(T=>{a.current=T,x()},[x]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:E,floating:k}),[u,v,_,E,k])}const hRe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?QD({element:t.current,padding:n}).fn(i):{}:t?QD({element:t,padding:n}).fn(i):{}}}};function pRe(e){const[t,n]=C.exports.useState(void 0);return a1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const mY="Popper",[VP,vY]=By(mY),[gRe,yY]=VP(mY),mRe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(gRe,{scope:t,anchor:r,onAnchorChange:i},n)},vRe="PopperAnchor",yRe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=yY(vRe,n),a=C.exports.useRef(null),s=gs(t,a);return C.exports.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:C.exports.createElement(uc.div,Dn({},i,{ref:s}))}),J5="PopperContent",[bRe,Hze]=VP(J5),[SRe,xRe]=VP(J5,{hasParent:!1,positionUpdateFns:new Set}),wRe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:f,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:x=0,collisionBoundary:E=[],collisionPadding:k=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:A=!0,...R}=e,I=yY(J5,f),[D,B]=C.exports.useState(null),z=gs(t,ue=>B(ue)),[j,Y]=C.exports.useState(null),te=pRe(j),G=(n=te==null?void 0:te.width)!==null&&n!==void 0?n:0,$=(r=te==null?void 0:te.height)!==null&&r!==void 0?r:0,V=p+(v!=="center"?"-"+v:""),J=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},Z=Array.isArray(E)?E:[E],U=Z.length>0,X={padding:J,boundary:Z.filter(_Re),altBoundary:U},{reference:le,floating:fe,strategy:Se,x:Ae,y:be,placement:ke,middlewareData:De,update:Je}=fRe({strategy:"fixed",placement:V,whileElementsMounted:uRe,middleware:[qMe({mainAxis:m+$,alignmentAxis:b}),A?YMe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?KMe():void 0,...X}):void 0,j?hRe({element:j,padding:x}):void 0,A?UMe({...X}):void 0,kRe({arrowWidth:G,arrowHeight:$}),T?WMe({strategy:"referenceHidden"}):void 0].filter(CRe)});a1(()=>{le(I.anchor)},[le,I.anchor]);const Ye=Ae!==null&&be!==null,[mt,_t]=bY(ke),dt=(i=De.arrow)===null||i===void 0?void 0:i.x,vt=(o=De.arrow)===null||o===void 0?void 0:o.y,xt=((a=De.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,ut]=C.exports.useState();a1(()=>{D&&ut(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Rt,positionUpdateFns:ot}=xRe(J5,f),Ct=!Rt;C.exports.useLayoutEffect(()=>{if(!Ct)return ot.add(Je),()=>{ot.delete(Je)}},[Ct,ot,Je]),C.exports.useLayoutEffect(()=>{Ct&&Ye&&Array.from(ot).reverse().forEach(ue=>requestAnimationFrame(ue))},[Ct,Ye,ot]);const ln={"data-side":mt,"data-align":_t,...R,ref:z,style:{...R.style,animation:Ye?void 0:"none",opacity:(s=De.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:fe,"data-radix-popper-content-wrapper":"",style:{position:Se,left:0,top:0,transform:Ye?`translate3d(${Math.round(Ae)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=De.transformOrigin)===null||l===void 0?void 0:l.x,(u=De.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(bRe,{scope:f,placedSide:mt,onArrowChange:Y,arrowX:dt,arrowY:vt,shouldHideArrow:xt},Ct?C.exports.createElement(SRe,{scope:f,hasParent:!0,positionUpdateFns:ot},C.exports.createElement(uc.div,ln)):C.exports.createElement(uc.div,ln)))});function CRe(e){return e!==void 0}function _Re(e){return e!==null}const kRe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[b,x]=bY(s),E={start:"0%",center:"50%",end:"100%"}[x],k=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",A="";return b==="bottom"?(T=p?E:`${k}px`,A=`${-v}px`):b==="top"?(T=p?E:`${k}px`,A=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,A=p?E:`${_}px`):b==="left"&&(T=`${l.floating.width+v}px`,A=p?E:`${_}px`),{data:{x:T,y:A}}}});function bY(e){const[t,n="center"]=e.split("-");return[t,n]}const ERe=mRe,PRe=yRe,TRe=wRe;function LRe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i!=null?i:n},e)}const SY=e=>{const{present:t,children:n}=e,r=ARe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=gs(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};SY.displayName="Presence";function ARe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=LRe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=jb(r.current);o.current=s==="mounted"?u:"none"},[s]),a1(()=>{const u=r.current,f=i.current;if(f!==e){const m=o.current,v=jb(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),a1(()=>{if(t){const u=p=>{const v=jb(r.current).includes(p.animationName);p.target===t&&v&&pu.exports.flushSync(()=>l("ANIMATION_END"))},f=p=>{p.target===t&&(o.current=jb(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function jb(e){return(e==null?void 0:e.animationName)||"none"}function ORe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=MRe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=fu(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function MRe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=fu(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const NC="rovingFocusGroup.onEntryFocus",RRe={bubbles:!1,cancelable:!0},UP="RovingFocusGroup",[$8,xY,IRe]=rY(UP),[DRe,wY]=By(UP,[IRe]),[NRe,BRe]=DRe(UP),$Re=C.exports.forwardRef((e,t)=>C.exports.createElement($8.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement($8.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(FRe,Dn({},e,{ref:t}))))),FRe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,p=C.exports.useRef(null),m=gs(t,p),v=iY(o),[b=null,x]=ORe({prop:a,defaultProp:s,onChange:l}),[E,k]=C.exports.useState(!1),_=fu(u),T=xY(n),A=C.exports.useRef(!1),[R,I]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=p.current;if(D)return D.addEventListener(NC,_),()=>D.removeEventListener(NC,_)},[_]),C.exports.createElement(NRe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(D=>x(D),[x]),onItemShiftTab:C.exports.useCallback(()=>k(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>I(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>I(D=>D-1),[])},C.exports.createElement(uc.div,Dn({tabIndex:E||R===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:tr(e.onMouseDown,()=>{A.current=!0}),onFocus:tr(e.onFocus,D=>{const B=!A.current;if(D.target===D.currentTarget&&B&&!E){const z=new CustomEvent(NC,RRe);if(D.currentTarget.dispatchEvent(z),!z.defaultPrevented){const j=T().filter(V=>V.focusable),Y=j.find(V=>V.active),te=j.find(V=>V.id===b),$=[Y,te,...j].filter(Boolean).map(V=>V.ref.current);CY($)}}A.current=!1}),onBlur:tr(e.onBlur,()=>k(!1))})))}),zRe="RovingFocusGroupItem",jRe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=IMe(),s=BRe(zRe,n),l=s.currentTabStopId===a,u=xY(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),C.exports.createElement($8.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(uc.span,Dn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:tr(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:tr(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:tr(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=URe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let x=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const E=x.indexOf(m.currentTarget);x=s.loop?WRe(x,E+1):x.slice(E+1)}setTimeout(()=>CY(x))}})})))}),HRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VRe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function URe(e,t,n){const r=VRe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return HRe[r]}function CY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function WRe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const GRe=$Re,qRe=jRe,YRe=["Enter"," "],KRe=["ArrowDown","PageUp","Home"],_Y=["ArrowUp","PageDown","End"],XRe=[...KRe,..._Y],Qx="Menu",[F8,ZRe,QRe]=rY(Qx),[Cp,kY]=By(Qx,[QRe,vY,wY]),WP=vY(),EY=wY(),[JRe,Jx]=Cp(Qx),[eIe,GP]=Cp(Qx),tIe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=WP(t),[l,u]=C.exports.useState(null),f=C.exports.useRef(!1),p=fu(o),m=iY(i);return C.exports.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),C.exports.createElement(ERe,s,C.exports.createElement(JRe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(eIe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:a},r)))},nIe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=WP(n);return C.exports.createElement(PRe,Dn({},i,r,{ref:t}))}),rIe="MenuPortal",[Vze,iIe]=Cp(rIe,{forceMount:void 0}),Gd="MenuContent",[oIe,PY]=Cp(Gd),aIe=C.exports.forwardRef((e,t)=>{const n=iIe(Gd,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Jx(Gd,e.__scopeMenu),a=GP(Gd,e.__scopeMenu);return C.exports.createElement(F8.Provider,{scope:e.__scopeMenu},C.exports.createElement(SY,{present:r||o.open},C.exports.createElement(F8.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(sIe,Dn({},i,{ref:t})):C.exports.createElement(lIe,Dn({},i,{ref:t})))))}),sIe=C.exports.forwardRef((e,t)=>{const n=Jx(Gd,e.__scopeMenu),r=C.exports.useRef(null),i=gs(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return MH(o)},[]),C.exports.createElement(TY,Dn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:tr(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),lIe=C.exports.forwardRef((e,t)=>{const n=Jx(Gd,e.__scopeMenu);return C.exports.createElement(TY,Dn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),TY=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...b}=e,x=Jx(Gd,n),E=GP(Gd,n),k=WP(n),_=EY(n),T=ZRe(n),[A,R]=C.exports.useState(null),I=C.exports.useRef(null),D=gs(t,I,x.onContentChange),B=C.exports.useRef(0),z=C.exports.useRef(""),j=C.exports.useRef(0),Y=C.exports.useRef(null),te=C.exports.useRef("right"),G=C.exports.useRef(0),$=v?yV:C.exports.Fragment,V=v?{as:ny,allowPinchZoom:!0}:void 0,J=U=>{var X,le;const fe=z.current+U,Se=T().filter(Ye=>!Ye.disabled),Ae=document.activeElement,be=(X=Se.find(Ye=>Ye.ref.current===Ae))===null||X===void 0?void 0:X.textValue,ke=Se.map(Ye=>Ye.textValue),De=vIe(ke,fe,be),Je=(le=Se.find(Ye=>Ye.textValue===De))===null||le===void 0?void 0:le.ref.current;(function Ye(mt){z.current=mt,window.clearTimeout(B.current),mt!==""&&(B.current=window.setTimeout(()=>Ye(""),1e3))})(fe),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(B.current),[]),_Me();const Z=C.exports.useCallback(U=>{var X,le;return te.current===((X=Y.current)===null||X===void 0?void 0:X.side)&&bIe(U,(le=Y.current)===null||le===void 0?void 0:le.area)},[]);return C.exports.createElement(oIe,{scope:n,searchRef:z,onItemEnter:C.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),onItemLeave:C.exports.useCallback(U=>{var X;Z(U)||((X=I.current)===null||X===void 0||X.focus(),R(null))},[Z]),onTriggerLeave:C.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),pointerGraceTimerRef:j,onPointerGraceIntentChange:C.exports.useCallback(U=>{Y.current=U},[])},C.exports.createElement($,V,C.exports.createElement(kMe,{asChild:!0,trapped:i,onMountAutoFocus:tr(o,U=>{var X;U.preventDefault(),(X=I.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(xMe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m},C.exports.createElement(GRe,Dn({asChild:!0},_,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:R,onEntryFocus:U=>{E.isUsingKeyboardRef.current||U.preventDefault()}}),C.exports.createElement(TRe,Dn({role:"menu","aria-orientation":"vertical","data-state":pIe(x.open),"data-radix-menu-content":"",dir:E.dir},k,b,{ref:D,style:{outline:"none",...b.style},onKeyDown:tr(b.onKeyDown,U=>{const le=U.target.closest("[data-radix-menu-content]")===U.currentTarget,fe=U.ctrlKey||U.altKey||U.metaKey,Se=U.key.length===1;le&&(U.key==="Tab"&&U.preventDefault(),!fe&&Se&&J(U.key));const Ae=I.current;if(U.target!==Ae||!XRe.includes(U.key))return;U.preventDefault();const ke=T().filter(De=>!De.disabled).map(De=>De.ref.current);_Y.includes(U.key)&&ke.reverse(),gIe(ke)}),onBlur:tr(e.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(B.current),z.current="")}),onPointerMove:tr(e.onPointerMove,j8(U=>{const X=U.target,le=G.current!==U.clientX;if(U.currentTarget.contains(X)&&le){const fe=U.clientX>G.current?"right":"left";te.current=fe,G.current=U.clientX}}))})))))))}),z8="MenuItem",aN="menu.itemSelect",uIe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=GP(z8,e.__scopeMenu),s=PY(z8,e.__scopeMenu),l=gs(t,o),u=C.exports.useRef(!1),f=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(aN,{bubbles:!0,cancelable:!0});p.addEventListener(aN,v=>r==null?void 0:r(v),{once:!0}),nY(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(cIe,Dn({},i,{ref:l,disabled:n,onClick:tr(e.onClick,f),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:tr(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:tr(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||YRe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),cIe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=PY(z8,n),s=EY(n),l=C.exports.useRef(null),u=gs(t,l),[f,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var x;v(((x=b.textContent)!==null&&x!==void 0?x:"").trim())}},[o.children]),C.exports.createElement(F8.ItemSlot,{scope:n,disabled:r,textValue:i!=null?i:m},C.exports.createElement(qRe,Dn({asChild:!0},s,{focusable:!r}),C.exports.createElement(uc.div,Dn({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:tr(e.onPointerMove,j8(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:tr(e.onPointerLeave,j8(b=>a.onItemLeave(b))),onFocus:tr(e.onFocus,()=>p(!0)),onBlur:tr(e.onBlur,()=>p(!1))}))))}),dIe="MenuRadioGroup";Cp(dIe,{value:void 0,onValueChange:()=>{}});const fIe="MenuItemIndicator";Cp(fIe,{checked:!1});const hIe="MenuSub";Cp(hIe);function pIe(e){return e?"open":"closed"}function gIe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vIe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=mIe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function yIe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,f=t[a].y;l>r!=f>r&&n<(u-s)*(r-l)/(f-l)+s&&(i=!i)}return i}function bIe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yIe(n,t)}function j8(e){return t=>t.pointerType==="mouse"?e(t):void 0}const SIe=tIe,xIe=nIe,wIe=aIe,CIe=uIe,LY="ContextMenu",[_Ie,Uze]=By(LY,[kY]),ew=kY(),[kIe,AY]=_Ie(LY),EIe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=ew(t),u=fu(r),f=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(kIe,{scope:t,open:a,onOpenChange:f,modal:o},C.exports.createElement(SIe,Dn({},l,{dir:i,open:a,onOpenChange:f,modal:o}),n))},PIe="ContextMenuTrigger",TIe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=AY(PIe,n),o=ew(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),f=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(xIe,Dn({},o,{virtualRef:s})),C.exports.createElement(uc.span,Dn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:tr(e.onContextMenu,p=>{u(),f(p),p.preventDefault()}),onPointerDown:tr(e.onPointerDown,Hb(p=>{u(),l.current=window.setTimeout(()=>f(p),700)})),onPointerMove:tr(e.onPointerMove,Hb(u)),onPointerCancel:tr(e.onPointerCancel,Hb(u)),onPointerUp:tr(e.onPointerUp,Hb(u))})))}),LIe="ContextMenuContent",AIe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=AY(LIe,n),o=ew(n),a=C.exports.useRef(!1);return C.exports.createElement(wIe,Dn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),OIe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=ew(n);return C.exports.createElement(CIe,Dn({},i,r,{ref:t}))});function Hb(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const MIe=EIe,RIe=TIe,IIe=AIe,hd=OIe,DIe=lt([e=>e.gallery,e=>e.options,kr,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:f,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:x}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:f,galleryImageObjectFit:p,galleryGridTemplateColumns:x?"auto":`repeat(auto-fill, minmax(${f}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:b,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:x}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),NIe=lt([e=>e.options,e=>e.gallery,e=>e.system,_r],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:He.isEqual}}),BIe=e=>e.gallery,$Ie=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,FIe=C.exports.memo(e=>{var G,$,V,J,Z,U,X,le;const t=Be(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=ve(NIe),{image:l,isSelected:u}=e,{url:f,thumbnail:p,uuid:m,metadata:v}=l,[b,x]=C.exports.useState(!1),E=Ty(),{t:k}=Ke(),_=()=>x(!0),T=()=>x(!1),A=()=>{l.metadata&&t(mx(l.metadata.image.prompt)),E({title:k("toast:promptSet"),status:"success",duration:2500,isClosable:!0})},R=()=>{l.metadata&&t(Ly(l.metadata.image.seed)),E({title:k("toast:seedSet"),status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(Qu(!1)),t(C1(l)),n!=="img2img"&&t(Go("img2img")),E({title:k("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},D=()=>{a&&t(Qu(!1)),t(Sx(l)),t(bx()),n!=="unifiedCanvas"&&t(Go("unifiedCanvas")),E({title:k("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},B=()=>{v&&t(Z5e(v)),E({title:k("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})},z=async()=>{var fe;if((fe=v==null?void 0:v.image)!=null&&fe.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(Go("img2img")),t(K5e(v)),E({title:k("toast:initialImageSet"),status:"success",duration:2500,isClosable:!0});return}E({title:k("toast:initialImageNotSet"),description:k("toast:initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},j=()=>t(wR(l)),Y=fe=>{fe.dataTransfer.setData("invokeai/imageUuid",m),fe.dataTransfer.effectAllowed="move"},te=()=>{t(Qu(!0)),t(wR(l))};return K(MIe,{onOpenChange:fe=>{t($U(fe))},children:[y(RIe,{children:K(rl,{position:"relative",className:"hoverable-image",onMouseOver:_,onMouseOut:T,userSelect:"none",draggable:!0,onDragStart:Y,children:[y(nx,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:p||f,loading:"lazy"}),y("div",{className:"hoverable-image-content",onClick:j,children:u&&y($a,{width:"50%",height:"50%",as:aP,className:"hoverable-image-check"})}),b&&i>=64&&y("div",{className:"hoverable-image-delete-button",children:y(O8,{image:l,children:y(fs,{"aria-label":k("options:deleteImage"),icon:y(U8e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})]},m)}),K(IIe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:fe=>{fe.detail.originalEvent.preventDefault()},children:[y(hd,{onClickCapture:te,children:k("options:openInViewer")}),y(hd,{onClickCapture:A,disabled:(($=(G=l==null?void 0:l.metadata)==null?void 0:G.image)==null?void 0:$.prompt)===void 0,children:k("options:usePrompt")}),y(hd,{onClickCapture:R,disabled:((J=(V=l==null?void 0:l.metadata)==null?void 0:V.image)==null?void 0:J.seed)===void 0,children:k("options:useSeed")}),y(hd,{onClickCapture:B,disabled:!["txt2img","img2img"].includes((U=(Z=l==null?void 0:l.metadata)==null?void 0:Z.image)==null?void 0:U.type),children:k("options:useAll")}),y(hd,{onClickCapture:z,disabled:((le=(X=l==null?void 0:l.metadata)==null?void 0:X.image)==null?void 0:le.type)!=="img2img",children:k("options:useInitImg")}),y(hd,{onClickCapture:I,children:k("options:sendToImg2Img")}),y(hd,{onClickCapture:D,children:k("options:sendToUnifiedCanvas")}),y(hd,{"data-warning":!0,children:y(O8,{image:l,children:y("p",{children:k("options:deleteImage")})})})]})]})},$Ie),Vb=320,sN=40,zIe={txt2img:{galleryMinWidth:200,galleryMaxWidth:500},img2img:{galleryMinWidth:200,galleryMaxWidth:500},unifiedCanvas:{galleryMinWidth:200,galleryMaxWidth:200},nodes:{galleryMinWidth:200,galleryMaxWidth:500},postprocess:{galleryMinWidth:200,galleryMaxWidth:500},training:{galleryMinWidth:200,galleryMaxWidth:500}},lN=400;function OY(){const e=Be(),{t}=Ke(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:f,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:b,galleryWidth:x,isLightBoxOpen:E,isStaging:k,shouldEnableResize:_,shouldUseSingleGalleryColumn:T}=ve(DIe),{galleryMinWidth:A,galleryMaxWidth:R}=E?{galleryMinWidth:lN,galleryMaxWidth:lN}:zIe[f],[I,D]=C.exports.useState(x>=Vb),[B,z]=C.exports.useState(!1),[j,Y]=C.exports.useState(0),te=C.exports.useRef(null),G=C.exports.useRef(null),$=C.exports.useRef(null);C.exports.useEffect(()=>{x>=Vb&&D(!1)},[x]);const V=()=>{e(mSe(!o)),e(vi(!0))},J=()=>{a?U():Z()},Z=()=>{e(Vd(!0)),o&&e(vi(!0))},U=C.exports.useCallback(()=>{e(Vd(!1)),e($U(!1)),e(vSe(G.current?G.current.scrollTop:0)),setTimeout(()=>o&&e(vi(!0)),400)},[e,o]),X=()=>{e(c8(r))},le=be=>{e(ev(be))},fe=()=>{m||($.current=window.setTimeout(()=>U(),500))},Se=()=>{$.current&&window.clearTimeout($.current)};Ze("g",()=>{J()},[a,o]),Ze("left",()=>{e(VE())},{enabled:!k||f!=="unifiedCanvas"},[k]),Ze("right",()=>{e(HE())},{enabled:!k||f!=="unifiedCanvas"},[k]),Ze("shift+g",()=>{V()},[o]),Ze("esc",()=>{e(Vd(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Ae=32;return Ze("shift+up",()=>{if(l<256){const be=He.clamp(l+Ae,32,256);e(ev(be))}},[l]),Ze("shift+down",()=>{if(l>32){const be=He.clamp(l-Ae,32,256);e(ev(be))}},[l]),C.exports.useEffect(()=>{!G.current||(G.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{function be(ke){!o&&te.current&&!te.current.contains(ke.target)&&U()}return document.addEventListener("mousedown",be),()=>{document.removeEventListener("mousedown",be)}},[U,o]),y(Xq,{nodeRef:te,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:K("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:te,onMouseLeave:o?void 0:fe,onMouseEnter:o?void 0:Se,onMouseOver:o?void 0:Se,children:[K(kq,{minWidth:A,maxWidth:o?R:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:_},size:{width:x,height:o?"100%":"100vh"},onResizeStart:(be,ke,De)=>{Y(De.clientHeight),De.style.height=`${De.clientHeight}px`,o&&(De.style.position="fixed",De.style.right="1rem",z(!0))},onResizeStop:(be,ke,De,Je)=>{const Ye=o?He.clamp(Number(x)+Je.width,A,Number(R)):Number(x)+Je.width;e(SSe(Ye)),De.removeAttribute("data-resize-alert"),o&&(De.style.position="relative",De.style.removeProperty("right"),De.style.setProperty("height",o?"100%":"100vh"),z(!1),e(vi(!0)))},onResize:(be,ke,De,Je)=>{const Ye=He.clamp(Number(x)+Je.width,A,Number(o?R:.95*window.innerWidth));Ye>=Vb&&!I?D(!0):Ye<Vb&&I&&D(!1),l>Ye-sN&&e(ev(Ye-sN)),o&&(Ye>=R?De.setAttribute("data-resize-alert","true"):De.removeAttribute("data-resize-alert")),De.style.height=`${j}px`},children:[K("div",{className:"image-gallery-header",children:[y(io,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?K(fn,{children:[y(qr,{size:"sm","data-selected":r==="result",onClick:()=>e(gb("result")),children:t("gallery:generations")}),y(qr,{size:"sm","data-selected":r==="user",onClick:()=>e(gb("user")),children:t("gallery:uploads")})]}):K(fn,{children:[y(Qe,{"aria-label":t("gallery:showGenerations"),tooltip:t("gallery:showGenerations"),"data-selected":r==="result",icon:y(M8e,{}),onClick:()=>e(gb("result"))}),y(Qe,{"aria-label":t("gallery:showUploads"),tooltip:t("gallery:showUploads"),"data-selected":r==="user",icon:y(G8e,{}),onClick:()=>e(gb("user"))})]})}),K("div",{className:"image-gallery-header-right-icons",children:[y(Js,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:y(Qe,{size:"sm","aria-label":t("gallery:gallerySettings"),icon:y(cP,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:K("div",{className:"image-gallery-settings-popover",children:[K("div",{children:[y(Zo,{value:l,onChange:le,min:32,max:256,hideTooltip:!0,label:t("gallery:galleryImageSize")}),y(Qe,{size:"sm","aria-label":t("gallery:galleryImageResetSize"),tooltip:t("gallery:galleryImageResetSize"),onClick:()=>e(ev(64)),icon:y(Hx,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),y("div",{children:y(Qn,{label:t("gallery:maintainAspectRatio"),isChecked:p==="contain",onChange:()=>e(ySe(p==="contain"?"cover":"contain"))})}),y("div",{children:y(Qn,{label:t("gallery:autoSwitchNewImages"),isChecked:v,onChange:be=>e(bSe(be.target.checked))})}),y("div",{children:y(Qn,{label:t("gallery:singleColumnLayout"),isChecked:T,onChange:be=>e(xSe(be.target.checked))})})]})}),y(Qe,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery:pinGallery"),tooltip:`${t("gallery:pinGallery")} (Shift+G)`,onClick:V,icon:o?y(Gq,{}):y(qq,{})})]})]}),y("div",{className:"image-gallery-container",ref:G,children:n.length||b?K(fn,{children:[y("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(be=>{const{uuid:ke}=be;return y(FIe,{image:be,isSelected:i===ke},ke)})}),y(ds,{onClick:X,isDisabled:!b,className:"image-gallery-load-more-btn",children:t(b?"gallery:loadMore":"gallery:allImagesLoaded")})]}):K("div",{className:"image-gallery-container-placeholder",children:[y(wq,{}),y("p",{children:t("gallery:noImagesInGallery")})]})})]}),B&&y("div",{style:{width:x+"px",height:"100%"}})]})})}const jIe=lt(BIe,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),HIe=()=>{const{resultImages:e,userImages:t}=ve(jIe);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},VIe=lt([e=>e.options,_r],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),qP=e=>{const t=Be(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=ve(VIe),u=HIe(),f=()=>{t(lSe(!a)),t(vi(!0))},p=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),b=u(v);!b||(o==="img2img"?t(C1(b)):o==="unifiedCanvas"&&t(Sx(b)))};return y("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:K("div",{className:"workarea-main",children:[n,K("div",{className:"workarea-children-wrapper",onDrop:p,children:[r,l&&y(so,{label:"Toggle Split View",children:y("div",{className:"workarea-split-button","data-selected":a,onClick:f,children:y(uMe,{})})})]}),!s&&y(OY,{})]})})};function UIe(){return y(qP,{optionsPanel:y(QOe,{}),children:y(lMe,{})})}const WIe=()=>{const e=Be(),t=ve(i=>i.options.hiresFix),{t:n}=Ke(),r=i=>e(jE(i.target.checked));return y(at,{gap:2,direction:"column",children:y(os,{label:n("options:hiresOptim"),fontSize:"md",isChecked:t,onChange:r})})},GIe=()=>K(at,{gap:2,direction:"column",children:[y(Hq,{}),y(WIe,{})]});function qIe(){const{t:e}=Ke(),t={seed:{header:`${e("options:seed")}`,feature:oo.SEED,content:y(TP,{})},variations:{header:`${e("options:variations")}`,feature:oo.VARIATIONS,content:y(OP,{}),additionalHeaderComponents:y(AP,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:oo.FACE_CORRECTION,content:y(PP,{}),additionalHeaderComponents:y(zq,{})},upscale:{header:`${e("options:upscaling")}`,feature:oo.UPSCALE,content:y(LP,{}),additionalHeaderComponents:y(Vq,{})},other:{header:`${e("options:otherOptions")}`,feature:oo.OTHER,content:y(GIe,{})}};return K(FP,{children:[y(BP,{}),y(NP,{}),y(MP,{}),y(RP,{accordionInfo:t})]})}const YIe=()=>y("div",{className:"workarea-single-view",children:y("div",{className:"text-to-image-area",children:y(eY,{})})});function KIe(){return y(qP,{optionsPanel:y(qIe,{}),children:y(YIe,{})})}var H8=function(e,t){return H8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},H8(e,t)};function XIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");H8(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var su=function(){return su=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},su.apply(this,arguments)};function uN(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}var as=function(e,t){return Number(e.toFixed(t))},ZIe=function(e,t){return typeof e=="number"?e:t},Pi=function(e,t,n){n&&typeof n=="function"&&n(e,t)},QIe=function(e){return-Math.cos(e*Math.PI)/2+.5},JIe=function(e){return e},eDe=function(e){return e*e},tDe=function(e){return e*(2-e)},nDe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},rDe=function(e){return e*e*e},iDe=function(e){return--e*e*e+1},oDe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},aDe=function(e){return e*e*e*e},sDe=function(e){return 1- --e*e*e*e},lDe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},uDe=function(e){return e*e*e*e*e},cDe=function(e){return 1+--e*e*e*e*e},dDe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},MY={easeOut:QIe,linear:JIe,easeInQuad:eDe,easeOutQuad:tDe,easeInOutQuad:nDe,easeInCubic:rDe,easeOutCubic:iDe,easeInOutCubic:oDe,easeInQuart:aDe,easeOutQuart:sDe,easeInOutQuart:lDe,easeInQuint:uDe,easeOutQuint:cDe,easeInOutQuint:dDe},RY=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Gl=function(e){!e.mounted||(RY(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function IY(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;Gl(e),e.animation=function(){if(!e.mounted)return RY(e.animation);var a=new Date().getTime()-i,s=a/n,l=MY[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Sf(e,t,n,r){var i=fDe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,f=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):IY(e,r,n,function(v){var b=s+f*v,x=l+p*v,E=u+m*v;o(b,x,E)})}}function fDe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function hDe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,f=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:f}}var pDe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,f=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:f,minPositionY:p,maxPositionY:m}},YP=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=hDe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,f=o.newContentHeight,p=o.newDiffHeight,m=pDe(a,l,u,s,f,p,Boolean(i));return m},s1=function(e,t){var n=YP(e,t);return e.bounds=n,n};function tw(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,f=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=V8(e,s-p,u+p,r),b=V8(t,l-m,f+m,r);return{x:v,y:b}}var V8=function(e,t,n,r){return r?e<t?as(t,2):e>n?as(n,2):as(e,2):as(e,2)};function nw(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,f=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*f,m=u-n*f,v=tw(p,m,i,o,0,0,null);return v}function Fy(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var cN=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i==null?void 0:i.contains(o),s=r&&o&&a;if(!s)return!1;var l=rw(o,n);return!l},dN=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},gDe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},mDe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function vDe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var f=e.bounds,p=f.maxPositionX,m=f.minPositionX,v=f.maxPositionY,b=f.minPositionY,x=n>p||n<m,E=r>v||r<b,k=n>p?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=nw(e,k,_,i,e.bounds,s||l),A=T.x,R=T.y;return{scale:i,positionX:x?A:n,positionY:E?R:r}}}function yDe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,f=l.positionX,p=l.positionY,m=t!==f,v=n!==p,b=!m||!v;if(!(!a||b||!s)){var x=tw(t,n,s,o,r,i,a),E=x.x,k=x.y;e.setTransformState(u,E,k)}}var bDe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var f=t-r.x,p=n-r.y,m=a?l:f,v=s?u:p;return{x:m,y:v}},eS=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},SDe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},xDe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function wDe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function fN(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var f=a+(e-a)*u;return f>l?l:f<a?a:f}if(t<o&&n<o){var f=o+(e-o)*u;return f<s?s:f>o?o:f}}return r?t:V8(e,o,a,i)}function CDe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function _De(e,t){var n=SDe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=CDe(a,s),f=t.x-r.x,p=t.y-r.y,m=f/u,v=p/u,b=l-i,x=f*f+p*p,E=Math.sqrt(x)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function kDe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=xDe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,f=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,x=r.zoomAnimation,E=r.panning,k=E.lockAxisY,_=E.lockAxisX,T=x.animationType,A=b.sizeX,R=b.sizeY,I=b.velocityAlignmentTime,D=I,B=wDe(e,l),z=Math.max(B,D),j=eS(e,A),Y=eS(e,R),te=j*i.offsetWidth/100,G=Y*i.offsetHeight/100,$=u+te,V=f-te,J=p+G,Z=m-G,U=e.transformState,X=new Date().getTime();IY(e,T,z,function(le){var fe=e.transformState,Se=fe.scale,Ae=fe.positionX,be=fe.positionY,ke=new Date().getTime()-X,De=ke/D,Je=MY[b.animationType],Ye=1-Je(Math.min(1,De)),mt=1-le,_t=Ae+a*mt,dt=be+s*mt,vt=fN(_t,U.positionX,Ae,_,v,f,u,V,$,Ye),xt=fN(dt,U.positionY,be,k,v,m,p,Z,J,Ye);(Ae!==_t||be!==dt)&&e.setTransformState(Se,vt,xt)})}}function hN(e,t){var n=e.transformState.scale;Gl(e),s1(e,n),t.touches?mDe(e,t):gDe(e,t)}function pN(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=bDe(e,t,n),u=l.x,f=l.y,p=eS(e,a),m=eS(e,s);_De(e,{x:u,y:f}),yDe(e,u,f,p,m)}}function EDe(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r==null?void 0:r.getBoundingClientRect(),a=i==null?void 0:i.getBoundingClientRect(),s=(o==null?void 0:o.width)||0,l=(o==null?void 0:o.height)||0,u=(a==null?void 0:a.width)||0,f=(a==null?void 0:a.height)||0,p=s<u||l<f,m=!t&&n&&(n==null?void 0:n.total)>.1&&p;m?kDe(e):DY(e)}}function DY(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,f=o||t<r||!a&&!s;if(!f){var p=vDe(e);p&&Sf(e,p,l,u)}}function NY(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,f=l.animationTime,p=l.animationType,m=u||r>=a;if((r>=1||s)&&DY(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,x=KP(e,a,v,b);x&&Sf(e,x,f,p)}}function KP(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=Fy(as(t,2),o,a,0,!1),u=s1(e,l),f=nw(e,n,r,l,u,s),p=f.x,m=f.y;return{scale:l,positionX:p,positionY:m}}var cg={previousScale:1,scale:1,positionX:0,positionY:0},PDe=su(su({},cg),{setComponents:function(){},contextInstance:null}),dv={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},BY=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:cg.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:cg.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:cg.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:cg.positionY}},gN=function(e){var t=su({},dv);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof dv[n]<"u";if(i&&r){var o=Object.prototype.toString.call(dv[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=su(su({},dv[n]),e[n]):s?t[n]=uN(uN([],dv[n]),e[n]):t[n]=e[n]}}),t},$Y=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var f=r*Math.exp(t*n),p=Fy(as(f,3),s,a,u,!1);return p};function FY(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var f=o.offsetWidth,p=o.offsetHeight,m=(f/2-l)/s,v=(p/2-u)/s,b=$Y(e,t,n),x=KP(e,b,m,v);if(!x)return console.error("Error during zoom event. New transformation state was not calculated.");Sf(e,x,r,i)}function zY(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=BY(e.props),s=e.transformState,l=s.scale,u=s.positionX,f=s.positionY;if(!!i){var p=YP(e,a.scale),m=tw(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&f===a.positionY||Sf(e,v,t,n)}}function TDe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return cg;var l=r.getBoundingClientRect(),u=LDe(t),f=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,x=r.offsetHeight/v,E=Fy(n||Math.min(b,x),a,s,0,!1),k=(l.width-m*E)/2,_=(l.height-v*E)/2,T=(l.left-f)*E+k,A=(l.top-p)*E+_,R=YP(e,E),I=tw(T,A,R,o,0,0,r),D=I.x,B=I.y;return{positionX:D,positionY:B,scale:E}}function LDe(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function ADe(e){if(e){if((e==null?void 0:e.offsetWidth)===void 0||(e==null?void 0:e.offsetHeight)===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var ODe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),FY(e,1,t,n,r)}},MDe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),FY(e,-1,t,n,r)}},RDe=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,f=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!f||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Sf(e,v,i,o)}}},IDe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),zY(e,t,n)}},DDe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=jY(t||i.scale,o,a);Sf(e,s,n,r)}}},NDe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),Gl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&ADe(a)&&a&&o.contains(a)){var s=TDe(e,a,n);Sf(e,s,r,i)}}},ei=function(e){return{instance:e,state:e.transformState,zoomIn:ODe(e),zoomOut:MDe(e),setTransform:RDe(e),resetTransform:IDe(e),centerView:DDe(e),zoomToElement:NDe(e)}},BC=!1;function $C(){try{var e={get passive(){return BC=!0,!1}};return e}catch(t){return BC=!1,BC}}var rw=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},mN=function(e){e&&clearTimeout(e)},BDe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},jY=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},$De=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,f=s&&!l&&!r&&u;if(!f||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=rw(u,a);return!p};function FDe(e,t){var n=e?e.deltaY<0?1:-1:0,r=ZIe(t,n);return r}function HY(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var zDe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,f=s.zoomAnimation,p=f.size,m=f.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var b=r?!1:!m,x=Fy(as(v,3),u,l,p,b);return x},jDe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?r<o||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},HDe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=rw(a,i);return!l},VDe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},UDe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=as(i[0].clientX-r.left,5),a=as(i[0].clientY-r.top,5),s=as(i[1].clientX-r.left,5),l=as(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},VY=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},WDe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var f=t/r,p=f*n;return Fy(as(p,2),a,o,l,!u)},GDe=160,qDe=100,YDe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Gl(e),Pi(ei(e),t,r),Pi(ei(e),t,i))},KDe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,f=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,b=p.disabled,x=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=FDe(t,null),k=zDe(e,E,x,!t.ctrlKey);if(l!==k){var _=s1(e,k),T=HY(t,o,l),A=b||v===0||f,R=u&&A,I=nw(e,T.x,T.y,k,_,R),D=I.x,B=I.y;e.previousWheelEvent=t,e.setTransformState(k,D,B),Pi(ei(e),t,r),Pi(ei(e),t,i)}},XDe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;mN(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(NY(e,t.x,t.y),e.wheelAnimationTimer=null)},qDe);var o=jDe(e,t);o&&(mN(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,Pi(ei(e),t,r),Pi(ei(e),t,i))},GDe))},ZDe=function(e,t){var n=VY(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Gl(e)},QDe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,f=l.size;if(!(r===null||!n)){var p=UDe(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=VY(t),v=WDe(e,m);if(v!==i){var b=s1(e,v),x=u||f===0||s,E=a&&x,k=nw(e,p.x,p.y,v,b,E),_=k.x,T=k.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},JDe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,NY(e,t==null?void 0:t.x,t==null?void 0:t.y)};function eNe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return zY(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var f=i==="zoomOut"?-1:1,p=$Y(e,f,o),m=HY(t,u,l),v=KP(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Sf(e,v,a,s)}}var tNe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i==null?void 0:i.contains(l),f=n&&l&&u&&!a;if(!f)return!1;var p=rw(l,s);return!(p||!f)},UY=oe.createContext(PDe),nNe=function(e){XIe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=BY(n.props),n.setup=gN(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=$C();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=$De(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(YDe(n,r),KDe(n,r),XDe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=cN(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),Gl(n),hN(n,r),Pi(ei(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=dN(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),pN(n,r.clientX,r.clientY),Pi(ei(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(EDe(n),Pi(ei(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=HDe(n,r);!l||(ZDe(n,r),Gl(n),Pi(ei(n),r,a),Pi(ei(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=VDe(n);!l||(r.preventDefault(),r.stopPropagation(),QDe(n,r),Pi(ei(n),r,a),Pi(ei(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(JDe(n),Pi(ei(n),r,o),Pi(ei(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=cN(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Gl(n);var l=r.touches,u=l.length===1,f=l.length===2;u&&(Gl(n),hN(n,r),Pi(ei(n),r,o)),f&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=dN(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];pN(n,s.clientX,s.clientY),Pi(ei(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=tNe(n,r);!o||eNe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,s1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,Pi(ei(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=jY(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=BDe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(ei(n))},n}return t.prototype.componentDidMount=function(){var n=$C();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=$C();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),Gl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(s1(this,this.transformState.scale),this.setup=gN(this.props))},t.prototype.render=function(){var n=ei(this),r=this.props.children,i=typeof r=="function"?r(n):r;return y(UY.Provider,{value:su(su({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),rNe=oe.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),y(nNe,{...su({},e,{setRef:i})})});function iNe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var oNe=`.transform-component-module_wrapper__1_Fgj {
position: relative;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
overflow: hidden;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
margin: 0;
padding: 0;
}
.transform-component-module_content__2jYgh {
display: flex;
flex-wrap: wrap;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
margin: 0;
padding: 0;
transform-origin: 0% 0%;
}
.transform-component-module_content__2jYgh img {
pointer-events: none;
}
`,vN={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};iNe(oNe);var aNe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(UY).setComponents,u=C.exports.useRef(null),f=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=f.current;p!==null&&m!==null&&l&&l(p,m)},[]),y("div",{ref:u,className:"react-transform-wrapper "+vN.wrapper+" "+r,style:a,children:y("div",{ref:f,className:"react-transform-component "+vN.content+" "+o,style:s,children:t})})};function sNe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},f=()=>{s(!a)};return y(rNe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:b})=>K(fn,{children:[K("div",{className:"lightbox-image-options",children:[y(Qe,{icon:y(aLe,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),y(Qe,{icon:y(sLe,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),y(Qe,{icon:y(iLe,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),y(Qe,{icon:y(oLe,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),y(Qe,{icon:y(eLe,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:f,fontSize:20}),y(Qe,{icon:y(Hx,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),y(aNe,{wrapperStyle:{width:"100%",height:"100%"},children:y("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b(1,0,"easeOut")})})]})})}function lNe(){const e=Be(),t=ve(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ve(Jq),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},f=()=>{e(VE())},p=()=>{e(HE())};return Ze("Esc",()=>{t&&e(Qu(!1))},[t]),K("div",{className:"lightbox-container",children:[y(Qe,{icon:y(rLe,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Qu(!1))},fontSize:20}),K("div",{className:"lightbox-display-container",children:[K("div",{className:"lightbox-preview-wrapper",children:[y(Zq,{}),!r&&K("div",{className:"current-image-next-prev-buttons",children:[y("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&y(fs,{"aria-label":"Previous image",icon:y(DG,{className:"next-prev-button"}),variant:"unstyled",onClick:f})}),y("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&y(fs,{"aria-label":"Next image",icon:y(NG,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&K(fn,{children:[y(sNe,{image:n.url,styleClass:"lightbox-image"}),r&&y(Qq,{image:n})]})]}),y(OY,{})]})]})}const uNe=lt([dP],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),cNe=()=>{const e=Be(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=ve(uNe),{t:o}=Ke();return K(at,{direction:"column",gap:"1rem",children:[y(Zo,{sliderMarkRightOffset:-6,label:o("options:seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:a=>{e(yR(a))},handleReset:()=>e(yR(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),y(Zo,{sliderMarkRightOffset:-4,label:o("options:seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:a=>{e(vR(a))},handleReset:()=>{e(vR(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),y(Zo,{sliderMarkRightOffset:-7,label:o("options:seamStrength"),min:.01,max:.99,step:.01,value:r,onChange:a=>{e(SR(a))},handleReset:()=>{e(SR(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),y(Zo,{sliderMarkRightOffset:-4,label:o("options:seamSteps"),min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:a=>{e(bR(a))},handleReset:()=>{e(bR(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},dNe=lt(rn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),fNe=()=>{const e=Be(),{boundingBoxDimensions:t}=ve(dNe),{t:n}=Ke(),r=s=>{e(_v({...t,width:Math.floor(s)}))},i=s=>{e(_v({...t,height:Math.floor(s)}))},o=()=>{e(_v({...t,width:Math.floor(512)}))},a=()=>{e(_v({...t,height:Math.floor(512)}))};return K(at,{direction:"column",gap:"1rem",children:[y(Zo,{label:n("options:width"),min:64,max:1024,step:64,value:t.width,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),y(Zo,{label:n("options:height"),min:64,max:1024,step:64,value:t.height,onChange:i,handleReset:a,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},hNe=lt(rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function pNe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ve(hNe),n=Be(),{t:r}=Ke();return K(at,{alignItems:"center",columnGap:"1rem",children:[y(Zo,{label:r("options:inpaintReplace"),value:e,onChange:i=>{n(dI(i))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(dI(1)),isResetDisabled:!t}),y(os,{isChecked:t,onChange:i=>n(Wwe(i.target.checked)),marginTop:"1.25rem"})]})}const gNe=lt([dP,al,rn],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:a==="manual"}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),mNe=()=>{const e=Be(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=ve(gNe),{t:s}=Ke(),l=v=>{e(xb({...a,width:Math.floor(v)}))},u=v=>{e(xb({...a,height:Math.floor(v)}))},f=()=>{e(xb({...a,width:Math.floor(512)}))},p=()=>{e(xb({...a,height:Math.floor(512)}))},m=v=>{e($we(v.target.value))};return K(at,{direction:"column",gap:"1rem",children:[y(nl,{label:s("options:scaleBeforeProcessing"),validValues:xwe,value:i,onChange:m}),y(Zo,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("options:scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:l,handleReset:f,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),y(Zo,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("options:scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:u,handleReset:p,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),y(pNe,{}),y(nl,{label:s("options:infillMethod"),value:n,validValues:r,onChange:v=>e(kU(v.target.value))}),y(Zo,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:s("options:tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(xR(v))},handleReset:()=>{e(xR(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function vNe(){const{t:e}=Ke(),t={boundingBox:{header:`${e("options:boundingBoxHeader")}`,feature:oo.BOUNDING_BOX,content:y(fNe,{})},seamCorrection:{header:`${e("options:seamCorrectionHeader")}`,feature:oo.SEAM_CORRECTION,content:y(cNe,{})},infillAndScaling:{header:`${e("options:infillScalingHeader")}`,feature:oo.INFILL_AND_SCALING,content:y(mNe,{})},seed:{header:`${e("options:seed")}`,feature:oo.SEED,content:y(TP,{})},variations:{header:`${e("options:variations")}`,feature:oo.VARIATIONS,content:y(OP,{}),additionalHeaderComponents:y(AP,{})}};return K(FP,{children:[y(BP,{}),y(NP,{}),y(MP,{}),y(jq,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),y(RP,{accordionInfo:t})]})}const yNe=lt(rn,Uq,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),WY=()=>{const e=Be(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ve(yNe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Fwe({width:a,height:s})),e(i?Bwe():bx()),e(vi(!1))},0)},[e,r,t,n,i]),y("div",{ref:o,className:"inpainting-canvas-area",children:y(by,{thickness:"2px",speed:"1s",size:"xl"})})};var GY={exports:{}};/**
* @license React
* react-reconciler.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 bNe=function(t){var n={},r=C.exports,i=fg.exports,o=Object.assign;function a(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,S=1;S<arguments.length;S++)h+="&args[]="+encodeURIComponent(arguments[S]);return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),b=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),R=Symbol.iterator;function I(d){return d===null||typeof d!="object"?null:(d=R&&d[R]||d["@@iterator"],typeof d=="function"?d:null)}function D(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case f:return"Fragment";case u:return"Portal";case m:return"Profiler";case p:return"StrictMode";case E:return"Suspense";case k:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case b:return(d.displayName||"Context")+".Consumer";case v:return(d._context.displayName||"Context")+".Provider";case x:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case _:return h=d.displayName||null,h!==null?h:D(d.type)||"Memo";case T:h=d._payload,d=d._init;try{return D(d(h))}catch(S){}}return null}function B(d){var h=d.type;switch(d.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=h.render,d=d.displayName||d.name||"",h.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(h);case 8:return h===p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function z(d){var h=d,S=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(S=h.return),d=h.return;while(d)}return h.tag===3?S:null}function j(d){if(z(d)!==d)throw Error(a(188))}function Y(d){var h=d.alternate;if(!h){if(h=z(d),h===null)throw Error(a(188));return h!==d?null:d}for(var S=d,P=h;;){var L=S.return;if(L===null)break;var M=L.alternate;if(M===null){if(P=L.return,P!==null){S=P;continue}break}if(L.child===M.child){for(M=L.child;M;){if(M===S)return j(L),d;if(M===P)return j(L),h;M=M.sibling}throw Error(a(188))}if(S.return!==P.return)S=L,P=M;else{for(var W=!1,se=L.child;se;){if(se===S){W=!0,S=L,P=M;break}if(se===P){W=!0,P=L,S=M;break}se=se.sibling}if(!W){for(se=M.child;se;){if(se===S){W=!0,S=M,P=L;break}if(se===P){W=!0,P=M,S=L;break}se=se.sibling}if(!W)throw Error(a(189))}}if(S.alternate!==P)throw Error(a(190))}if(S.tag!==3)throw Error(a(188));return S.stateNode.current===S?d:h}function te(d){return d=Y(d),d!==null?G(d):null}function G(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var h=G(d);if(h!==null)return h;d=d.sibling}return null}function $(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){if(d.tag!==4){var h=$(d);if(h!==null)return h}d=d.sibling}return null}var V=Array.isArray,J=t.getPublicInstance,Z=t.getRootHostContext,U=t.getChildHostContext,X=t.prepareForCommit,le=t.resetAfterCommit,fe=t.createInstance,Se=t.appendInitialChild,Ae=t.finalizeInitialChildren,be=t.prepareUpdate,ke=t.shouldSetTextContent,De=t.createTextInstance,Je=t.scheduleTimeout,Ye=t.cancelTimeout,mt=t.noTimeout,_t=t.isPrimaryRenderer,dt=t.supportsMutation,vt=t.supportsPersistence,xt=t.supportsHydration,Le=t.getInstanceFromNode,ut=t.preparePortalMount,Rt=t.getCurrentEventPriority,ot=t.detachDeletedInstance,Ct=t.supportsMicrotasks,ln=t.scheduleMicrotask,ue=t.supportsTestSelectors,Ie=t.findFiberRoot,We=t.getBoundingRect,Xe=t.getTextContent,Ce=t.isHiddenSubtree,Ne=t.matchAccessibilityRole,kt=t.setFocusIfFocusable,Nt=t.setupIntersectionObserver,Te=t.appendChild,Et=t.appendChildToContainer,Ut=t.commitTextUpdate,Ve=t.commitMount,ft=t.commitUpdate,un=t.insertBefore,ze=t.insertInContainerBefore,St=t.removeChild,ct=t.removeChildFromContainer,Vt=t.resetTextContent,hn=t.hideInstance,Er=t.hideTextInstance,dr=t.unhideInstance,Kr=t.unhideTextInstance,ia=t.clearContainer,O1=t.cloneInstance,Fa=t.createContainerChildSet,kp=t.appendChildToContainerChildSet,M1=t.finalizeContainerChildren,wc=t.replaceContainerChildren,Ep=t.cloneHiddenInstance,Pp=t.cloneHiddenTextInstance,oa=t.canHydrateInstance,wf=t.canHydrateTextInstance,R1=t.canHydrateSuspenseInstance,Cc=t.isSuspenseInstancePending,Cf=t.isSuspenseInstanceFallback,I1=t.getSuspenseInstanceFallbackErrorDetails,sl=t.registerSuspenseInstanceRetry,_c=t.getNextHydratableSibling,D1=t.getFirstHydratableChild,N1=t.getFirstHydratableChildWithinContainer,B1=t.getFirstHydratableChildWithinSuspenseInstance,$1=t.hydrateInstance,ys=t.hydrateTextInstance,F1=t.hydrateSuspenseInstance,z1=t.getNextHydratableInstanceAfterSuspenseInstance,j1=t.commitHydratedContainer,H1=t.commitHydratedSuspenseInstance,V1=t.clearSuspenseBoundary,U1=t.clearSuspenseBoundaryFromContainer,ll=t.shouldDeleteUnhydratedTailInstances,W1=t.didNotMatchHydratedContainerTextInstance,bs=t.didNotMatchHydratedTextInstance,xu;function wu(d){if(xu===void 0)try{throw Error()}catch(S){var h=S.stack.trim().match(/\n( *(at )?)/);xu=h&&h[1]||""}return`
`+xu+d}var ul=!1;function Cu(d,h){if(!d||ul)return"";ul=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(je){var P=je}Reflect.construct(d,[],h)}else{try{h.call()}catch(je){P=je}d.call(h.prototype)}else{try{throw Error()}catch(je){P=je}d()}}catch(je){if(je&&P&&typeof je.stack=="string"){for(var L=je.stack.split(`
`),M=P.stack.split(`
`),W=L.length-1,se=M.length-1;1<=W&&0<=se&&L[W]!==M[se];)se--;for(;1<=W&&0<=se;W--,se--)if(L[W]!==M[se]){if(W!==1||se!==1)do if(W--,se--,0>se||L[W]!==M[se]){var pe=`
`+L[W].replace(" at new "," at ");return d.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",d.displayName)),pe}while(1<=W&&0<=se);break}}}finally{ul=!1,Error.prepareStackTrace=S}return(d=d?d.displayName||d.name:"")?wu(d):""}var Tp=Object.prototype.hasOwnProperty,kc=[],cl=-1;function aa(d){return{current:d}}function Mn(d){0>cl||(d.current=kc[cl],kc[cl]=null,cl--)}function kn(d,h){cl++,kc[cl]=d.current,d.current=h}var sa={},Br=aa(sa),ai=aa(!1),la=sa;function dl(d,h){var S=d.type.contextTypes;if(!S)return sa;var P=d.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===h)return P.__reactInternalMemoizedMaskedChildContext;var L={},M;for(M in S)L[M]=h[M];return P&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=L),L}function si(d){return d=d.childContextTypes,d!=null}function Ss(){Mn(ai),Mn(Br)}function _f(d,h,S){if(Br.current!==sa)throw Error(a(168));kn(Br,h),kn(ai,S)}function _u(d,h,S){var P=d.stateNode;if(h=h.childContextTypes,typeof P.getChildContext!="function")return S;P=P.getChildContext();for(var L in P)if(!(L in h))throw Error(a(108,B(d)||"Unknown",L));return o({},S,P)}function xs(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||sa,la=Br.current,kn(Br,d),kn(ai,ai.current),!0}function kf(d,h,S){var P=d.stateNode;if(!P)throw Error(a(169));S?(d=_u(d,h,la),P.__reactInternalMemoizedMergedChildContext=d,Mn(ai),Mn(Br),kn(Br,d)):Mn(ai),kn(ai,S)}var Oi=Math.clz32?Math.clz32:Ef,Lp=Math.log,Ap=Math.LN2;function Ef(d){return d>>>=0,d===0?32:31-(Lp(d)/Ap|0)|0}var fl=64,Ao=4194304;function hl(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function ku(d,h){var S=d.pendingLanes;if(S===0)return 0;var P=0,L=d.suspendedLanes,M=d.pingedLanes,W=S&268435455;if(W!==0){var se=W&~L;se!==0?P=hl(se):(M&=W,M!==0&&(P=hl(M)))}else W=S&~L,W!==0?P=hl(W):M!==0&&(P=hl(M));if(P===0)return 0;if(h!==0&&h!==P&&(h&L)===0&&(L=P&-P,M=h&-h,L>=M||L===16&&(M&4194240)!==0))return h;if((P&4)!==0&&(P|=S&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=P;0<h;)S=31-Oi(h),L=1<<S,P|=d[S],h&=~L;return P}function G1(d,h){switch(d){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ec(d,h){for(var S=d.suspendedLanes,P=d.pingedLanes,L=d.expirationTimes,M=d.pendingLanes;0<M;){var W=31-Oi(M),se=1<<W,pe=L[W];pe===-1?((se&S)===0||(se&P)!==0)&&(L[W]=G1(se,h)):pe<=h&&(d.expiredLanes|=se),M&=~se}}function Pc(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function Pf(){var d=fl;return fl<<=1,(fl&4194240)===0&&(fl=64),d}function Tc(d){for(var h=[],S=0;31>S;S++)h.push(d);return h}function za(d,h,S){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-Oi(h),d[h]=S}function Tf(d,h){var S=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var P=d.eventTimes;for(d=d.expirationTimes;0<S;){var L=31-Oi(S),M=1<<L;h[L]=0,P[L]=-1,d[L]=-1,S&=~M}}function Eu(d,h){var S=d.entangledLanes|=h;for(d=d.entanglements;S;){var P=31-Oi(S),L=1<<P;L&h|d[P]&h&&(d[P]|=h),S&=~L}}var Xt=0;function Op(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var Lc=i.unstable_scheduleCallback,Ac=i.unstable_cancelCallback,Mp=i.unstable_shouldYield,ua=i.unstable_requestPaint,Yn=i.unstable_now,Lf=i.unstable_ImmediatePriority,Rp=i.unstable_UserBlockingPriority,Af=i.unstable_NormalPriority,Ip=i.unstable_IdlePriority,mn=null,Zt=null;function Dp(d){if(Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(mn,d,void 0,(d.current.flags&128)===128)}catch(h){}}function q1(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var q=typeof Object.is=="function"?Object.is:q1,re=null,ge=!1,it=!1;function Gt(d){re===null?re=[d]:re.push(d)}function bn(d){ge=!0,Gt(d)}function Pt(){if(!it&&re!==null){it=!0;var d=0,h=Xt;try{var S=re;for(Xt=1;d<S.length;d++){var P=S[d];do P=P(!0);while(P!==null)}re=null,ge=!1}catch(L){throw re!==null&&(re=re.slice(d+1)),Lc(Lf,Pt),L}finally{Xt=h,it=!1}}return null}var Bt=[],Qt=0,Xr=null,Pr=0,Sn=[],li=0,Oo=null,lo=1,ja="";function pl(d,h){Bt[Qt++]=Pr,Bt[Qt++]=Xr,Xr=d,Pr=h}function Y1(d,h,S){Sn[li++]=lo,Sn[li++]=ja,Sn[li++]=Oo,Oo=d;var P=lo;d=ja;var L=32-Oi(P)-1;P&=~(1<<L),S+=1;var M=32-Oi(h)+L;if(30<M){var W=L-L%5;M=(P&(1<<W)-1).toString(32),P>>=W,L-=W,lo=1<<32-Oi(h)+L|S<<L|P,ja=M+d}else lo=1<<M|S<<L|P,ja=d}function Mi(d){d.return!==null&&(pl(d,1),Y1(d,1,0))}function K1(d){for(;d===Xr;)Xr=Bt[--Qt],Bt[Qt]=null,Pr=Bt[--Qt],Bt[Qt]=null;for(;d===Oo;)Oo=Sn[--li],Sn[li]=null,ja=Sn[--li],Sn[li]=null,lo=Sn[--li],Sn[li]=null}var Kn=null,Mo=null,Hn=!1,Ro=!1,Yi=null;function Np(d,h){var S=$o(5,null,null,0);S.elementType="DELETED",S.stateNode=h,S.return=d,h=d.deletions,h===null?(d.deletions=[S],d.flags|=16):h.push(S)}function Vn(d,h){switch(d.tag){case 5:return h=oa(h,d.type,d.pendingProps),h!==null?(d.stateNode=h,Kn=d,Mo=D1(h),!0):!1;case 6:return h=wf(h,d.pendingProps),h!==null?(d.stateNode=h,Kn=d,Mo=null,!0):!1;case 13:if(h=R1(h),h!==null){var S=Oo!==null?{id:lo,overflow:ja}:null;return d.memoizedState={dehydrated:h,treeContext:S,retryLane:1073741824},S=$o(18,null,null,0),S.stateNode=h,S.return=d,d.child=S,Kn=d,Mo=null,!0}return!1;default:return!1}}function Ha(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Of(d){if(Hn){var h=Mo;if(h){var S=h;if(!Vn(d,h)){if(Ha(d))throw Error(a(418));h=_c(S);var P=Kn;h&&Vn(d,h)?Np(P,S):(d.flags=d.flags&-4097|2,Hn=!1,Kn=d)}}else{if(Ha(d))throw Error(a(418));d.flags=d.flags&-4097|2,Hn=!1,Kn=d}}}function jy(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Kn=d}function Oc(d){if(!xt||d!==Kn)return!1;if(!Hn)return jy(d),Hn=!0,!1;if(d.tag!==3&&(d.tag!==5||ll(d.type)&&!ke(d.type,d.memoizedProps))){var h=Mo;if(h){if(Ha(d))throw Hy(),Error(a(418));for(;h;)Np(d,h),h=_c(h)}}if(jy(d),d.tag===13){if(!xt)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));Mo=z1(d)}else Mo=Kn?_c(d.stateNode):null;return!0}function Hy(){for(var d=Mo;d;)d=_c(d)}function Mc(){xt&&(Mo=Kn=null,Ro=Hn=!1)}function X1(d){Yi===null?Yi=[d]:Yi.push(d)}var Vy=s.ReactCurrentBatchConfig;function Pu(d,h){if(q(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var S=Object.keys(d),P=Object.keys(h);if(S.length!==P.length)return!1;for(P=0;P<S.length;P++){var L=S[P];if(!Tp.call(h,L)||!q(d[L],h[L]))return!1}return!0}function Rc(d){switch(d.tag){case 5:return wu(d.type);case 16:return wu("Lazy");case 13:return wu("Suspense");case 19:return wu("SuspenseList");case 0:case 2:case 15:return d=Cu(d.type,!1),d;case 11:return d=Cu(d.type.render,!1),d;case 1:return d=Cu(d.type,!0),d;default:return""}}function ca(d,h){if(d&&d.defaultProps){h=o({},h),d=d.defaultProps;for(var S in d)h[S]===void 0&&(h[S]=d[S]);return h}return h}var Mf=aa(null),Rf=null,gl=null,If=null;function Bp(){If=gl=Rf=null}function Uy(d,h,S){_t?(kn(Mf,h._currentValue),h._currentValue=S):(kn(Mf,h._currentValue2),h._currentValue2=S)}function Df(d){var h=Mf.current;Mn(Mf),_t?d._currentValue=h:d._currentValue2=h}function Nf(d,h,S){for(;d!==null;){var P=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,P!==null&&(P.childLanes|=h)):P!==null&&(P.childLanes&h)!==h&&(P.childLanes|=h),d===S)break;d=d.return}}function Ic(d,h){Rf=d,If=gl=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&h)!==0&&(Xi=!0),d.firstContext=null)}function uo(d){var h=_t?d._currentValue:d._currentValue2;if(If!==d)if(d={context:d,memoizedValue:h,next:null},gl===null){if(Rf===null)throw Error(a(308));gl=d,Rf.dependencies={lanes:0,firstContext:d}}else gl=gl.next=d;return h}var $r=null;function Bf(d){$r===null?$r=[d]:$r.push(d)}function Dc(d,h,S,P){var L=h.interleaved;return L===null?(S.next=S,Bf(h)):(S.next=L.next,L.next=S),h.interleaved=S,da(d,P)}function da(d,h){d.lanes|=h;var S=d.alternate;for(S!==null&&(S.lanes|=h),S=d,d=d.return;d!==null;)d.childLanes|=h,S=d.alternate,S!==null&&(S.childLanes|=h),S=d,d=d.return;return S.tag===3?S.stateNode:null}var ws=!1;function Z1(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wy(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function Cs(d,h){return{eventTime:d,lane:h,tag:0,payload:null,callback:null,next:null}}function ml(d,h,S){var P=d.updateQueue;if(P===null)return null;if(P=P.shared,(qt&2)!==0){var L=P.pending;return L===null?h.next=h:(h.next=L.next,L.next=h),P.pending=h,da(d,S)}return L=P.interleaved,L===null?(h.next=h,Bf(P)):(h.next=L.next,L.next=h),P.interleaved=h,da(d,S)}function $p(d,h,S){if(h=h.updateQueue,h!==null&&(h=h.shared,(S&4194240)!==0)){var P=h.lanes;P&=d.pendingLanes,S|=P,h.lanes=S,Eu(d,S)}}function Tu(d,h){var S=d.updateQueue,P=d.alternate;if(P!==null&&(P=P.updateQueue,S===P)){var L=null,M=null;if(S=S.firstBaseUpdate,S!==null){do{var W={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};M===null?L=M=W:M=M.next=W,S=S.next}while(S!==null);M===null?L=M=h:M=M.next=h}else L=M=h;S={baseState:P.baseState,firstBaseUpdate:L,lastBaseUpdate:M,shared:P.shared,effects:P.effects},d.updateQueue=S;return}d=S.lastBaseUpdate,d===null?S.firstBaseUpdate=h:d.next=h,S.lastBaseUpdate=h}function Fp(d,h,S,P){var L=d.updateQueue;ws=!1;var M=L.firstBaseUpdate,W=L.lastBaseUpdate,se=L.shared.pending;if(se!==null){L.shared.pending=null;var pe=se,je=pe.next;pe.next=null,W===null?M=je:W.next=je,W=pe;var ht=d.alternate;ht!==null&&(ht=ht.updateQueue,se=ht.lastBaseUpdate,se!==W&&(se===null?ht.firstBaseUpdate=je:se.next=je,ht.lastBaseUpdate=pe))}if(M!==null){var $t=L.baseState;W=0,ht=je=pe=null,se=M;do{var rt=se.lane,Un=se.eventTime;if((P&rt)===rt){ht!==null&&(ht=ht.next={eventTime:Un,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var Rn=d,lr=se;switch(rt=h,Un=S,lr.tag){case 1:if(Rn=lr.payload,typeof Rn=="function"){$t=Rn.call(Un,$t,rt);break e}$t=Rn;break e;case 3:Rn.flags=Rn.flags&-65537|128;case 0:if(Rn=lr.payload,rt=typeof Rn=="function"?Rn.call(Un,$t,rt):Rn,rt==null)break e;$t=o({},$t,rt);break e;case 2:ws=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,rt=L.effects,rt===null?L.effects=[se]:rt.push(se))}else Un={eventTime:Un,lane:rt,tag:se.tag,payload:se.payload,callback:se.callback,next:null},ht===null?(je=ht=Un,pe=$t):ht=ht.next=Un,W|=rt;if(se=se.next,se===null){if(se=L.shared.pending,se===null)break;rt=se,se=rt.next,rt.next=null,L.lastBaseUpdate=rt,L.shared.pending=null}}while(1);if(ht===null&&(pe=$t),L.baseState=pe,L.firstBaseUpdate=je,L.lastBaseUpdate=ht,h=L.shared.interleaved,h!==null){L=h;do W|=L.lane,L=L.next;while(L!==h)}else M===null&&(L.shared.lanes=0);wl|=W,d.lanes=W,d.memoizedState=$t}}function Gy(d,h,S){if(d=h.effects,h.effects=null,d!==null)for(h=0;h<d.length;h++){var P=d[h],L=P.callback;if(L!==null){if(P.callback=null,P=S,typeof L!="function")throw Error(a(191,L));L.call(P)}}}var zp=new r.Component().refs;function jp(d,h,S,P){h=d.memoizedState,S=S(P,h),S=S==null?h:o({},h,S),d.memoizedState=S,d.lanes===0&&(d.updateQueue.baseState=S)}var fa={isMounted:function(d){return(d=d._reactInternals)?z(d)===d:!1},enqueueSetState:function(d,h,S){d=d._reactInternals;var P=_i(),L=Hr(d),M=Cs(P,L);M.payload=h,S!=null&&(M.callback=S),h=ml(d,M,L),h!==null&&(Bo(h,d,L,P),$p(h,d,L))},enqueueReplaceState:function(d,h,S){d=d._reactInternals;var P=_i(),L=Hr(d),M=Cs(P,L);M.tag=1,M.payload=h,S!=null&&(M.callback=S),h=ml(d,M,L),h!==null&&(Bo(h,d,L,P),$p(h,d,L))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var S=_i(),P=Hr(d),L=Cs(S,P);L.tag=2,h!=null&&(L.callback=h),h=ml(d,L,P),h!==null&&(Bo(h,d,P,S),$p(h,d,P))}};function $f(d,h,S,P,L,M,W){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(P,M,W):h.prototype&&h.prototype.isPureReactComponent?!Pu(S,P)||!Pu(L,M):!0}function qy(d,h,S){var P=!1,L=sa,M=h.contextType;return typeof M=="object"&&M!==null?M=uo(M):(L=si(h)?la:Br.current,P=h.contextTypes,M=(P=P!=null)?dl(d,L):sa),h=new h(S,M),d.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=fa,d.stateNode=h,h._reactInternals=d,P&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=L,d.__reactInternalMemoizedMaskedChildContext=M),h}function Yy(d,h,S,P){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(S,P),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(S,P),h.state!==d&&fa.enqueueReplaceState(h,h.state,null)}function Q1(d,h,S,P){var L=d.stateNode;L.props=S,L.state=d.memoizedState,L.refs=zp,Z1(d);var M=h.contextType;typeof M=="object"&&M!==null?L.context=uo(M):(M=si(h)?la:Br.current,L.context=dl(d,M)),L.state=d.memoizedState,M=h.getDerivedStateFromProps,typeof M=="function"&&(jp(d,h,M,S),L.state=d.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(h=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),h!==L.state&&fa.enqueueReplaceState(L,L.state,null),Fp(d,S,L,P),L.state=d.memoizedState),typeof L.componentDidMount=="function"&&(d.flags|=4194308)}function Va(d,h,S){if(d=S.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(S._owner){if(S=S._owner,S){if(S.tag!==1)throw Error(a(309));var P=S.stateNode}if(!P)throw Error(a(147,d));var L=P,M=""+d;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===M?h.ref:(h=function(W){var se=L.refs;se===zp&&(se=L.refs={}),W===null?delete se[M]:se[M]=W},h._stringRef=M,h)}if(typeof d!="string")throw Error(a(284));if(!S._owner)throw Error(a(290,d))}return d}function Ki(d,h){throw d=Object.prototype.toString.call(h),Error(a(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d))}function J1(d){var h=d._init;return h(d._payload)}function Ky(d){function h(me,ce){if(d){var xe=me.deletions;xe===null?(me.deletions=[ce],me.flags|=16):xe.push(ce)}}function S(me,ce){if(!d)return null;for(;ce!==null;)h(me,ce),ce=ce.sibling;return null}function P(me,ce){for(me=new Map;ce!==null;)ce.key!==null?me.set(ce.key,ce):me.set(ce.index,ce),ce=ce.sibling;return me}function L(me,ce){return me=po(me,ce),me.index=0,me.sibling=null,me}function M(me,ce,xe){return me.index=xe,d?(xe=me.alternate,xe!==null?(xe=xe.index,xe<ce?(me.flags|=2,ce):xe):(me.flags|=2,ce)):(me.flags|=1048576,ce)}function W(me){return d&&me.alternate===null&&(me.flags|=2),me}function se(me,ce,xe,et){return ce===null||ce.tag!==6?(ce=v0(xe,me.mode,et),ce.return=me,ce):(ce=L(ce,xe),ce.return=me,ce)}function pe(me,ce,xe,et){var Me=xe.type;return Me===f?ht(me,ce,xe.props.children,et,xe.key):ce!==null&&(ce.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===T&&J1(Me)===ce.type)?(et=L(ce,xe.props),et.ref=Va(me,ce,xe),et.return=me,et):(et=nh(xe.type,xe.key,xe.props,null,me.mode,et),et.ref=Va(me,ce,xe),et.return=me,et)}function je(me,ce,xe,et){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==xe.containerInfo||ce.stateNode.implementation!==xe.implementation?(ce=Ll(xe,me.mode,et),ce.return=me,ce):(ce=L(ce,xe.children||[]),ce.return=me,ce)}function ht(me,ce,xe,et,Me){return ce===null||ce.tag!==7?(ce=Tl(xe,me.mode,et,Me),ce.return=me,ce):(ce=L(ce,xe),ce.return=me,ce)}function $t(me,ce,xe){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ce=v0(""+ce,me.mode,xe),ce.return=me,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:return xe=nh(ce.type,ce.key,ce.props,null,me.mode,xe),xe.ref=Va(me,null,ce),xe.return=me,xe;case u:return ce=Ll(ce,me.mode,xe),ce.return=me,ce;case T:var et=ce._init;return $t(me,et(ce._payload),xe)}if(V(ce)||I(ce))return ce=Tl(ce,me.mode,xe,null),ce.return=me,ce;Ki(me,ce)}return null}function rt(me,ce,xe,et){var Me=ce!==null?ce.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number")return Me!==null?null:se(me,ce,""+xe,et);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:return xe.key===Me?pe(me,ce,xe,et):null;case u:return xe.key===Me?je(me,ce,xe,et):null;case T:return Me=xe._init,rt(me,ce,Me(xe._payload),et)}if(V(xe)||I(xe))return Me!==null?null:ht(me,ce,xe,et,null);Ki(me,xe)}return null}function Un(me,ce,xe,et,Me){if(typeof et=="string"&&et!==""||typeof et=="number")return me=me.get(xe)||null,se(ce,me,""+et,Me);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case l:return me=me.get(et.key===null?xe:et.key)||null,pe(ce,me,et,Me);case u:return me=me.get(et.key===null?xe:et.key)||null,je(ce,me,et,Me);case T:var Ft=et._init;return Un(me,ce,xe,Ft(et._payload),Me)}if(V(et)||I(et))return me=me.get(xe)||null,ht(ce,me,et,Me,null);Ki(ce,et)}return null}function Rn(me,ce,xe,et){for(var Me=null,Ft=null,Dt=ce,Yt=ce=0,Qr=null;Dt!==null&&Yt<xe.length;Yt++){Dt.index>Yt?(Qr=Dt,Dt=null):Qr=Dt.sibling;var tn=rt(me,Dt,xe[Yt],et);if(tn===null){Dt===null&&(Dt=Qr);break}d&&Dt&&tn.alternate===null&&h(me,Dt),ce=M(tn,ce,Yt),Ft===null?Me=tn:Ft.sibling=tn,Ft=tn,Dt=Qr}if(Yt===xe.length)return S(me,Dt),Hn&&pl(me,Yt),Me;if(Dt===null){for(;Yt<xe.length;Yt++)Dt=$t(me,xe[Yt],et),Dt!==null&&(ce=M(Dt,ce,Yt),Ft===null?Me=Dt:Ft.sibling=Dt,Ft=Dt);return Hn&&pl(me,Yt),Me}for(Dt=P(me,Dt);Yt<xe.length;Yt++)Qr=Un(Dt,me,Yt,xe[Yt],et),Qr!==null&&(d&&Qr.alternate!==null&&Dt.delete(Qr.key===null?Yt:Qr.key),ce=M(Qr,ce,Yt),Ft===null?Me=Qr:Ft.sibling=Qr,Ft=Qr);return d&&Dt.forEach(function(As){return h(me,As)}),Hn&&pl(me,Yt),Me}function lr(me,ce,xe,et){var Me=I(xe);if(typeof Me!="function")throw Error(a(150));if(xe=Me.call(xe),xe==null)throw Error(a(151));for(var Ft=Me=null,Dt=ce,Yt=ce=0,Qr=null,tn=xe.next();Dt!==null&&!tn.done;Yt++,tn=xe.next()){Dt.index>Yt?(Qr=Dt,Dt=null):Qr=Dt.sibling;var As=rt(me,Dt,tn.value,et);if(As===null){Dt===null&&(Dt=Qr);break}d&&Dt&&As.alternate===null&&h(me,Dt),ce=M(As,ce,Yt),Ft===null?Me=As:Ft.sibling=As,Ft=As,Dt=Qr}if(tn.done)return S(me,Dt),Hn&&pl(me,Yt),Me;if(Dt===null){for(;!tn.done;Yt++,tn=xe.next())tn=$t(me,tn.value,et),tn!==null&&(ce=M(tn,ce,Yt),Ft===null?Me=tn:Ft.sibling=tn,Ft=tn);return Hn&&pl(me,Yt),Me}for(Dt=P(me,Dt);!tn.done;Yt++,tn=xe.next())tn=Un(Dt,me,Yt,tn.value,et),tn!==null&&(d&&tn.alternate!==null&&Dt.delete(tn.key===null?Yt:tn.key),ce=M(tn,ce,Yt),Ft===null?Me=tn:Ft.sibling=tn,Ft=tn);return d&&Dt.forEach(function(ki){return h(me,ki)}),Hn&&pl(me,Yt),Me}function ba(me,ce,xe,et){if(typeof xe=="object"&&xe!==null&&xe.type===f&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:e:{for(var Me=xe.key,Ft=ce;Ft!==null;){if(Ft.key===Me){if(Me=xe.type,Me===f){if(Ft.tag===7){S(me,Ft.sibling),ce=L(Ft,xe.props.children),ce.return=me,me=ce;break e}}else if(Ft.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===T&&J1(Me)===Ft.type){S(me,Ft.sibling),ce=L(Ft,xe.props),ce.ref=Va(me,Ft,xe),ce.return=me,me=ce;break e}S(me,Ft);break}else h(me,Ft);Ft=Ft.sibling}xe.type===f?(ce=Tl(xe.props.children,me.mode,et,xe.key),ce.return=me,me=ce):(et=nh(xe.type,xe.key,xe.props,null,me.mode,et),et.ref=Va(me,ce,xe),et.return=me,me=et)}return W(me);case u:e:{for(Ft=xe.key;ce!==null;){if(ce.key===Ft)if(ce.tag===4&&ce.stateNode.containerInfo===xe.containerInfo&&ce.stateNode.implementation===xe.implementation){S(me,ce.sibling),ce=L(ce,xe.children||[]),ce.return=me,me=ce;break e}else{S(me,ce);break}else h(me,ce);ce=ce.sibling}ce=Ll(xe,me.mode,et),ce.return=me,me=ce}return W(me);case T:return Ft=xe._init,ba(me,ce,Ft(xe._payload),et)}if(V(xe))return Rn(me,ce,xe,et);if(I(xe))return lr(me,ce,xe,et);Ki(me,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"?(xe=""+xe,ce!==null&&ce.tag===6?(S(me,ce.sibling),ce=L(ce,xe),ce.return=me,me=ce):(S(me,ce),ce=v0(xe,me.mode,et),ce.return=me,me=ce),W(me)):S(me,ce)}return ba}var Nc=Ky(!0),Xy=Ky(!1),Ff={},Io=aa(Ff),Ua=aa(Ff),ie=aa(Ff);function we(d){if(d===Ff)throw Error(a(174));return d}function ye(d,h){kn(ie,h),kn(Ua,d),kn(Io,Ff),d=Z(h),Mn(Io),kn(Io,d)}function nt(){Mn(Io),Mn(Ua),Mn(ie)}function It(d){var h=we(ie.current),S=we(Io.current);h=U(S,d.type,h),S!==h&&(kn(Ua,d),kn(Io,h))}function on(d){Ua.current===d&&(Mn(Io),Mn(Ua))}var zt=aa(0);function vn(d){for(var h=d;h!==null;){if(h.tag===13){var S=h.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||Cc(S)||Cf(S)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var zf=[];function em(){for(var d=0;d<zf.length;d++){var h=zf[d];_t?h._workInProgressVersionPrimary=null:h._workInProgressVersionSecondary=null}zf.length=0}var Ri=s.ReactCurrentDispatcher,Bc=s.ReactCurrentBatchConfig,Lu=0,En=null,sr=null,fr=null,cn=!1,jf=!1,$c=0,Hp=0;function Si(){throw Error(a(321))}function tm(d,h){if(h===null)return!1;for(var S=0;S<h.length&&S<d.length;S++)if(!q(d[S],h[S]))return!1;return!0}function nm(d,h,S,P,L,M){if(Lu=M,En=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,Ri.current=d===null||d.memoizedState===null?sw:lw,d=S(P,L),jf){M=0;do{if(jf=!1,$c=0,25<=M)throw Error(a(301));M+=1,fr=sr=null,h.updateQueue=null,Ri.current=uw,d=S(P,L)}while(jf)}if(Ri.current=_s,h=sr!==null&&sr.next!==null,Lu=0,fr=sr=En=null,cn=!1,h)throw Error(a(300));return d}function Fc(){var d=$c!==0;return $c=0,d}function ui(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fr===null?En.memoizedState=fr=d:fr=fr.next=d,fr}function Ii(){if(sr===null){var d=En.alternate;d=d!==null?d.memoizedState:null}else d=sr.next;var h=fr===null?En.memoizedState:fr.next;if(h!==null)fr=h,sr=d;else{if(d===null)throw Error(a(310));sr=d,d={memoizedState:sr.memoizedState,baseState:sr.baseState,baseQueue:sr.baseQueue,queue:sr.queue,next:null},fr===null?En.memoizedState=fr=d:fr=fr.next=d}return fr}function zc(d,h){return typeof h=="function"?h(d):h}function jc(d){var h=Ii(),S=h.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=d;var P=sr,L=P.baseQueue,M=S.pending;if(M!==null){if(L!==null){var W=L.next;L.next=M.next,M.next=W}P.baseQueue=L=M,S.pending=null}if(L!==null){M=L.next,P=P.baseState;var se=W=null,pe=null,je=M;do{var ht=je.lane;if((Lu&ht)===ht)pe!==null&&(pe=pe.next={lane:0,action:je.action,hasEagerState:je.hasEagerState,eagerState:je.eagerState,next:null}),P=je.hasEagerState?je.eagerState:d(P,je.action);else{var $t={lane:ht,action:je.action,hasEagerState:je.hasEagerState,eagerState:je.eagerState,next:null};pe===null?(se=pe=$t,W=P):pe=pe.next=$t,En.lanes|=ht,wl|=ht}je=je.next}while(je!==null&&je!==M);pe===null?W=P:pe.next=se,q(P,h.memoizedState)||(Xi=!0),h.memoizedState=P,h.baseState=W,h.baseQueue=pe,S.lastRenderedState=P}if(d=S.interleaved,d!==null){L=d;do M=L.lane,En.lanes|=M,wl|=M,L=L.next;while(L!==d)}else L===null&&(S.lanes=0);return[h.memoizedState,S.dispatch]}function Vp(d){var h=Ii(),S=h.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=d;var P=S.dispatch,L=S.pending,M=h.memoizedState;if(L!==null){S.pending=null;var W=L=L.next;do M=d(M,W.action),W=W.next;while(W!==L);q(M,h.memoizedState)||(Xi=!0),h.memoizedState=M,h.baseQueue===null&&(h.baseState=M),S.lastRenderedState=M}return[M,P]}function rm(){}function Hf(d,h){var S=En,P=Ii(),L=h(),M=!q(P.memoizedState,L);if(M&&(P.memoizedState=L,Xi=!0),P=P.queue,Up(vl.bind(null,S,P,d),[d]),P.getSnapshot!==h||M||fr!==null&&fr.memoizedState.tag&1){if(S.flags|=2048,Uf(9,Hc.bind(null,S,P,L,h),void 0,null),Zr===null)throw Error(a(349));(Lu&30)!==0||im(S,h,L)}return L}function im(d,h,S){d.flags|=16384,d={getSnapshot:h,value:S},h=En.updateQueue,h===null?(h={lastEffect:null,stores:null},En.updateQueue=h,h.stores=[d]):(S=h.stores,S===null?h.stores=[d]:S.push(d))}function Hc(d,h,S,P){h.value=S,h.getSnapshot=P,Vf(h)&&Zy(d)}function vl(d,h,S){return S(function(){Vf(h)&&Zy(d)})}function Vf(d){var h=d.getSnapshot;d=d.value;try{var S=h();return!q(d,S)}catch(P){return!0}}function Zy(d){var h=da(d,1);h!==null&&Bo(h,d,1,-1)}function Qy(d){var h=ui();return typeof d=="function"&&(d=d()),h.memoizedState=h.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zc,lastRenderedState:d},h.queue=d,d=d.dispatch=Wc.bind(null,En,d),[h.memoizedState,d]}function Uf(d,h,S,P){return d={tag:d,create:h,destroy:S,deps:P,next:null},h=En.updateQueue,h===null?(h={lastEffect:null,stores:null},En.updateQueue=h,h.lastEffect=d.next=d):(S=h.lastEffect,S===null?h.lastEffect=d.next=d:(P=S.next,S.next=d,d.next=P,h.lastEffect=d)),d}function Wf(){return Ii().memoizedState}function Au(d,h,S,P){var L=ui();En.flags|=d,L.memoizedState=Uf(1|h,S,void 0,P===void 0?null:P)}function Vc(d,h,S,P){var L=Ii();P=P===void 0?null:P;var M=void 0;if(sr!==null){var W=sr.memoizedState;if(M=W.destroy,P!==null&&tm(P,W.deps)){L.memoizedState=Uf(h,S,M,P);return}}En.flags|=d,L.memoizedState=Uf(1|h,S,M,P)}function Jy(d,h){return Au(8390656,8,d,h)}function Up(d,h){return Vc(2048,8,d,h)}function e3(d,h){return Vc(4,2,d,h)}function t3(d,h){return Vc(4,4,d,h)}function Tr(d,h){if(typeof h=="function")return d=d(),h(d),function(){h(null)};if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function ci(d,h,S){return S=S!=null?S.concat([d]):null,Vc(4,4,Tr.bind(null,h,d),S)}function om(){}function n3(d,h){var S=Ii();h=h===void 0?null:h;var P=S.memoizedState;return P!==null&&h!==null&&tm(h,P[1])?P[0]:(S.memoizedState=[d,h],d)}function am(d,h){var S=Ii();h=h===void 0?null:h;var P=S.memoizedState;return P!==null&&h!==null&&tm(h,P[1])?P[0]:(d=d(),S.memoizedState=[d,h],d)}function r3(d,h,S){return(Lu&21)===0?(d.baseState&&(d.baseState=!1,Xi=!0),d.memoizedState=S):(q(S,h)||(S=Pf(),En.lanes|=S,wl|=S,d.baseState=!0),h)}function sm(d,h){var S=Xt;Xt=S!==0&&4>S?S:4,d(!0);var P=Bc.transition;Bc.transition={};try{d(!1),h()}finally{Xt=S,Bc.transition=P}}function Uc(){return Ii().memoizedState}function lm(d,h,S){var P=Hr(d);if(S={lane:P,action:S,hasEagerState:!1,eagerState:null,next:null},Gc(d))qc(h,S);else if(S=Dc(d,h,S,P),S!==null){var L=_i();Bo(S,d,P,L),Gf(S,h,P)}}function Wc(d,h,S){var P=Hr(d),L={lane:P,action:S,hasEagerState:!1,eagerState:null,next:null};if(Gc(d))qc(h,L);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=h.lastRenderedReducer,M!==null))try{var W=h.lastRenderedState,se=M(W,S);if(L.hasEagerState=!0,L.eagerState=se,q(se,W)){var pe=h.interleaved;pe===null?(L.next=L,Bf(h)):(L.next=pe.next,pe.next=L),h.interleaved=L;return}}catch(je){}finally{}S=Dc(d,h,L,P),S!==null&&(L=_i(),Bo(S,d,P,L),Gf(S,h,P))}}function Gc(d){var h=d.alternate;return d===En||h!==null&&h===En}function qc(d,h){jf=cn=!0;var S=d.pending;S===null?h.next=h:(h.next=S.next,S.next=h),d.pending=h}function Gf(d,h,S){if((S&4194240)!==0){var P=h.lanes;P&=d.pendingLanes,S|=P,h.lanes=S,Eu(d,S)}}var _s={readContext:uo,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},sw={readContext:uo,useCallback:function(d,h){return ui().memoizedState=[d,h===void 0?null:h],d},useContext:uo,useEffect:Jy,useImperativeHandle:function(d,h,S){return S=S!=null?S.concat([d]):null,Au(4194308,4,Tr.bind(null,h,d),S)},useLayoutEffect:function(d,h){return Au(4194308,4,d,h)},useInsertionEffect:function(d,h){return Au(4,2,d,h)},useMemo:function(d,h){var S=ui();return h=h===void 0?null:h,d=d(),S.memoizedState=[d,h],d},useReducer:function(d,h,S){var P=ui();return h=S!==void 0?S(h):h,P.memoizedState=P.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},P.queue=d,d=d.dispatch=lm.bind(null,En,d),[P.memoizedState,d]},useRef:function(d){var h=ui();return d={current:d},h.memoizedState=d},useState:Qy,useDebugValue:om,useDeferredValue:function(d){return ui().memoizedState=d},useTransition:function(){var d=Qy(!1),h=d[0];return d=sm.bind(null,d[1]),ui().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,S){var P=En,L=ui();if(Hn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=h(),Zr===null)throw Error(a(349));(Lu&30)!==0||im(P,h,S)}L.memoizedState=S;var M={value:S,getSnapshot:h};return L.queue=M,Jy(vl.bind(null,P,M,d),[d]),P.flags|=2048,Uf(9,Hc.bind(null,P,M,S,h),void 0,null),S},useId:function(){var d=ui(),h=Zr.identifierPrefix;if(Hn){var S=ja,P=lo;S=(P&~(1<<32-Oi(P)-1)).toString(32)+S,h=":"+h+"R"+S,S=$c++,0<S&&(h+="H"+S.toString(32)),h+=":"}else S=Hp++,h=":"+h+"r"+S.toString(32)+":";return d.memoizedState=h},unstable_isNewReconciler:!1},lw={readContext:uo,useCallback:n3,useContext:uo,useEffect:Up,useImperativeHandle:ci,useInsertionEffect:e3,useLayoutEffect:t3,useMemo:am,useReducer:jc,useRef:Wf,useState:function(){return jc(zc)},useDebugValue:om,useDeferredValue:function(d){var h=Ii();return r3(h,sr.memoizedState,d)},useTransition:function(){var d=jc(zc)[0],h=Ii().memoizedState;return[d,h]},useMutableSource:rm,useSyncExternalStore:Hf,useId:Uc,unstable_isNewReconciler:!1},uw={readContext:uo,useCallback:n3,useContext:uo,useEffect:Up,useImperativeHandle:ci,useInsertionEffect:e3,useLayoutEffect:t3,useMemo:am,useReducer:Vp,useRef:Wf,useState:function(){return Vp(zc)},useDebugValue:om,useDeferredValue:function(d){var h=Ii();return sr===null?h.memoizedState=d:r3(h,sr.memoizedState,d)},useTransition:function(){var d=Vp(zc)[0],h=Ii().memoizedState;return[d,h]},useMutableSource:rm,useSyncExternalStore:Hf,useId:Uc,unstable_isNewReconciler:!1};function Yc(d,h){try{var S="",P=h;do S+=Rc(P),P=P.return;while(P);var L=S}catch(M){L=`
Error generating stack: `+M.message+`
`+M.stack}return{value:d,source:h,stack:L,digest:null}}function um(d,h,S){return{value:d,source:null,stack:S!=null?S:null,digest:h!=null?h:null}}function Kc(d,h){try{console.error(h.value)}catch(S){setTimeout(function(){throw S})}}var qf=typeof WeakMap=="function"?WeakMap:Map;function cm(d,h,S){S=Cs(-1,S),S.tag=3,S.payload={element:null};var P=h.value;return S.callback=function(){Zf||(Zf=!0,Qf=P),Kc(d,h)},S}function F(d,h,S){S=Cs(-1,S),S.tag=3;var P=d.type.getDerivedStateFromError;if(typeof P=="function"){var L=h.value;S.payload=function(){return P(L)},S.callback=function(){Kc(d,h)}}var M=d.stateNode;return M!==null&&typeof M.componentDidCatch=="function"&&(S.callback=function(){Kc(d,h),typeof P!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var W=h.stack;this.componentDidCatch(h.value,{componentStack:W!==null?W:""})}),S}function Ou(d,h,S){var P=d.pingCache;if(P===null){P=d.pingCache=new qf;var L=new Set;P.set(h,L)}else L=P.get(h),L===void 0&&(L=new Set,P.set(h,L));L.has(S)||(L.add(S),d=m3.bind(null,d,h,S),h.then(d,d))}function Yf(d){do{var h;if((h=d.tag===13)&&(h=d.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return d;d=d.return}while(d!==null);return null}function co(d,h,S,P,L){return(d.mode&1)===0?(d===h?d.flags|=65536:(d.flags|=128,S.flags|=131072,S.flags&=-52805,S.tag===1&&(S.alternate===null?S.tag=17:(h=Cs(-1,1),h.tag=2,ml(S,h,1))),S.lanes|=1),d):(d.flags|=65536,d.lanes=L,d)}var Jt=s.ReactCurrentOwner,Xi=!1;function Di(d,h,S,P){h.child=d===null?Xy(h,null,S,P):Nc(h,d.child,S,P)}function i3(d,h,S,P,L){S=S.render;var M=h.ref;return Ic(h,L),P=nm(d,h,S,P,M,L),S=Fc(),d!==null&&!Xi?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~L,ks(d,h,L)):(Hn&&S&&Mi(h),h.flags|=1,Di(d,h,P,L),h.child)}function yl(d,h,S,P,L){if(d===null){var M=S.type;return typeof M=="function"&&!Om(M)&&M.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(h.tag=15,h.type=M,o3(d,h,M,P,L)):(d=nh(S.type,null,P,h,h.mode,L),d.ref=h.ref,d.return=h,h.child=d)}if(M=d.child,(d.lanes&L)===0){var W=M.memoizedProps;if(S=S.compare,S=S!==null?S:Pu,S(W,P)&&d.ref===h.ref)return ks(d,h,L)}return h.flags|=1,d=po(M,P),d.ref=h.ref,d.return=h,h.child=d}function o3(d,h,S,P,L){if(d!==null){var M=d.memoizedProps;if(Pu(M,P)&&d.ref===h.ref)if(Xi=!1,h.pendingProps=P=M,(d.lanes&L)!==0)(d.flags&131072)!==0&&(Xi=!0);else return h.lanes=d.lanes,ks(d,h,L)}return dm(d,h,S,P,L)}function a3(d,h,S){var P=h.pendingProps,L=P.children,M=d!==null?d.memoizedState:null;if(P.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},kn(xl,fo),fo|=S;else{if((S&1073741824)===0)return d=M!==null?M.baseLanes|S:S,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null,transitions:null},h.updateQueue=null,kn(xl,fo),fo|=d,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},P=M!==null?M.baseLanes:S,kn(xl,fo),fo|=P}else M!==null?(P=M.baseLanes|S,h.memoizedState=null):P=S,kn(xl,fo),fo|=P;return Di(d,h,L,S),h.child}function s3(d,h){var S=h.ref;(d===null&&S!==null||d!==null&&d.ref!==S)&&(h.flags|=512,h.flags|=2097152)}function dm(d,h,S,P,L){var M=si(S)?la:Br.current;return M=dl(h,M),Ic(h,L),S=nm(d,h,S,P,M,L),P=Fc(),d!==null&&!Xi?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~L,ks(d,h,L)):(Hn&&P&&Mi(h),h.flags|=1,Di(d,h,S,L),h.child)}function l3(d,h,S,P,L){if(si(S)){var M=!0;xs(h)}else M=!1;if(Ic(h,L),h.stateNode===null)Wa(d,h),qy(h,S,P),Q1(h,S,P,L),P=!0;else if(d===null){var W=h.stateNode,se=h.memoizedProps;W.props=se;var pe=W.context,je=S.contextType;typeof je=="object"&&je!==null?je=uo(je):(je=si(S)?la:Br.current,je=dl(h,je));var ht=S.getDerivedStateFromProps,$t=typeof ht=="function"||typeof W.getSnapshotBeforeUpdate=="function";$t||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(se!==P||pe!==je)&&Yy(h,W,P,je),ws=!1;var rt=h.memoizedState;W.state=rt,Fp(h,P,W,L),pe=h.memoizedState,se!==P||rt!==pe||ai.current||ws?(typeof ht=="function"&&(jp(h,S,ht,P),pe=h.memoizedState),(se=ws||$f(h,S,se,P,rt,pe,je))?($t||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(h.flags|=4194308)):(typeof W.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=P,h.memoizedState=pe),W.props=P,W.state=pe,W.context=je,P=se):(typeof W.componentDidMount=="function"&&(h.flags|=4194308),P=!1)}else{W=h.stateNode,Wy(d,h),se=h.memoizedProps,je=h.type===h.elementType?se:ca(h.type,se),W.props=je,$t=h.pendingProps,rt=W.context,pe=S.contextType,typeof pe=="object"&&pe!==null?pe=uo(pe):(pe=si(S)?la:Br.current,pe=dl(h,pe));var Un=S.getDerivedStateFromProps;(ht=typeof Un=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(se!==$t||rt!==pe)&&Yy(h,W,P,pe),ws=!1,rt=h.memoizedState,W.state=rt,Fp(h,P,W,L);var Rn=h.memoizedState;se!==$t||rt!==Rn||ai.current||ws?(typeof Un=="function"&&(jp(h,S,Un,P),Rn=h.memoizedState),(je=ws||$f(h,S,je,P,rt,Rn,pe)||!1)?(ht||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(P,Rn,pe),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(P,Rn,pe)),typeof W.componentDidUpdate=="function"&&(h.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof W.componentDidUpdate!="function"||se===d.memoizedProps&&rt===d.memoizedState||(h.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&rt===d.memoizedState||(h.flags|=1024),h.memoizedProps=P,h.memoizedState=Rn),W.props=P,W.state=Rn,W.context=pe,P=je):(typeof W.componentDidUpdate!="function"||se===d.memoizedProps&&rt===d.memoizedState||(h.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&rt===d.memoizedState||(h.flags|=1024),P=!1)}return ha(d,h,S,P,M,L)}function ha(d,h,S,P,L,M){s3(d,h);var W=(h.flags&128)!==0;if(!P&&!W)return L&&kf(h,S,!1),ks(d,h,M);P=h.stateNode,Jt.current=h;var se=W&&typeof S.getDerivedStateFromError!="function"?null:P.render();return h.flags|=1,d!==null&&W?(h.child=Nc(h,d.child,null,M),h.child=Nc(h,null,se,M)):Di(d,h,se,M),h.memoizedState=P.state,L&&kf(h,S,!0),h.child}function u3(d){var h=d.stateNode;h.pendingContext?_f(d,h.pendingContext,h.pendingContext!==h.context):h.context&&_f(d,h.context,!1),ye(d,h.containerInfo)}function c3(d,h,S,P,L){return Mc(),X1(L),h.flags|=256,Di(d,h,S,P),h.child}var fm={dehydrated:null,treeContext:null,retryLane:0};function hm(d){return{baseLanes:d,cachePool:null,transitions:null}}function d3(d,h,S){var P=h.pendingProps,L=zt.current,M=!1,W=(h.flags&128)!==0,se;if((se=W)||(se=d!==null&&d.memoizedState===null?!1:(L&2)!==0),se?(M=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(L|=1),kn(zt,L&1),d===null)return Of(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((h.mode&1)===0?h.lanes=1:Cf(d)?h.lanes=8:h.lanes=1073741824,null):(W=P.children,d=P.fallback,M?(P=h.mode,M=h.child,W={mode:"hidden",children:W},(P&1)===0&&M!==null?(M.childLanes=0,M.pendingProps=W):M=m0(W,P,0,null),d=Tl(d,P,S,null),M.return=h,d.return=h,M.sibling=d,h.child=M,h.child.memoizedState=hm(S),h.memoizedState=fm,d):pa(h,W));if(L=d.memoizedState,L!==null&&(se=L.dehydrated,se!==null))return cw(d,h,W,P,se,L,S);if(M){M=P.fallback,W=h.mode,L=d.child,se=L.sibling;var pe={mode:"hidden",children:P.children};return(W&1)===0&&h.child!==L?(P=h.child,P.childLanes=0,P.pendingProps=pe,h.deletions=null):(P=po(L,pe),P.subtreeFlags=L.subtreeFlags&14680064),se!==null?M=po(se,M):(M=Tl(M,W,S,null),M.flags|=2),M.return=h,P.return=h,P.sibling=M,h.child=P,P=M,M=h.child,W=d.child.memoizedState,W=W===null?hm(S):{baseLanes:W.baseLanes|S,cachePool:null,transitions:W.transitions},M.memoizedState=W,M.childLanes=d.childLanes&~S,h.memoizedState=fm,P}return M=d.child,d=M.sibling,P=po(M,{mode:"visible",children:P.children}),(h.mode&1)===0&&(P.lanes=S),P.return=h,P.sibling=null,d!==null&&(S=h.deletions,S===null?(h.deletions=[d],h.flags|=16):S.push(d)),h.child=P,h.memoizedState=null,P}function pa(d,h){return h=m0({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function Wp(d,h,S,P){return P!==null&&X1(P),Nc(h,d.child,null,S),d=pa(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function cw(d,h,S,P,L,M,W){if(S)return h.flags&256?(h.flags&=-257,P=um(Error(a(422))),Wp(d,h,W,P)):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(M=P.fallback,L=h.mode,P=m0({mode:"visible",children:P.children},L,0,null),M=Tl(M,L,W,null),M.flags|=2,P.return=h,M.return=h,P.sibling=M,h.child=P,(h.mode&1)!==0&&Nc(h,d.child,null,W),h.child.memoizedState=hm(W),h.memoizedState=fm,M);if((h.mode&1)===0)return Wp(d,h,W,null);if(Cf(L))return P=I1(L).digest,M=Error(a(419)),P=um(M,P,void 0),Wp(d,h,W,P);if(S=(W&d.childLanes)!==0,Xi||S){if(P=Zr,P!==null){switch(W&-W){case 4:L=2;break;case 16:L=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:L=32;break;case 536870912:L=268435456;break;default:L=0}L=(L&(P.suspendedLanes|W))!==0?0:L,L!==0&&L!==M.retryLane&&(M.retryLane=L,da(d,L),Bo(P,d,L,-1))}return th(),P=um(Error(a(421))),Wp(d,h,W,P)}return Cc(L)?(h.flags|=128,h.child=d.child,h=mw.bind(null,d),sl(L,h),null):(d=M.treeContext,xt&&(Mo=B1(L),Kn=h,Hn=!0,Yi=null,Ro=!1,d!==null&&(Sn[li++]=lo,Sn[li++]=ja,Sn[li++]=Oo,lo=d.id,ja=d.overflow,Oo=h)),h=pa(h,P.children),h.flags|=4096,h)}function f3(d,h,S){d.lanes|=h;var P=d.alternate;P!==null&&(P.lanes|=h),Nf(d.return,h,S)}function pm(d,h,S,P,L){var M=d.memoizedState;M===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:P,tail:S,tailMode:L}:(M.isBackwards=h,M.rendering=null,M.renderingStartTime=0,M.last=P,M.tail=S,M.tailMode=L)}function h3(d,h,S){var P=h.pendingProps,L=P.revealOrder,M=P.tail;if(Di(d,h,P.children,S),P=zt.current,(P&2)!==0)P=P&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&f3(d,S,h);else if(d.tag===19)f3(d,S,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}P&=1}if(kn(zt,P),(h.mode&1)===0)h.memoizedState=null;else switch(L){case"forwards":for(S=h.child,L=null;S!==null;)d=S.alternate,d!==null&&vn(d)===null&&(L=S),S=S.sibling;S=L,S===null?(L=h.child,h.child=null):(L=S.sibling,S.sibling=null),pm(h,!1,L,S,M);break;case"backwards":for(S=null,L=h.child,h.child=null;L!==null;){if(d=L.alternate,d!==null&&vn(d)===null){h.child=L;break}d=L.sibling,L.sibling=S,S=L,L=d}pm(h,!0,S,null,M);break;case"together":pm(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Wa(d,h){(h.mode&1)===0&&d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2)}function ks(d,h,S){if(d!==null&&(h.dependencies=d.dependencies),wl|=h.lanes,(S&h.childLanes)===0)return null;if(d!==null&&h.child!==d.child)throw Error(a(153));if(h.child!==null){for(d=h.child,S=po(d,d.pendingProps),h.child=S,S.return=h;d.sibling!==null;)d=d.sibling,S=S.sibling=po(d,d.pendingProps),S.return=h;S.sibling=null}return h.child}function dw(d,h,S){switch(h.tag){case 3:u3(h),Mc();break;case 5:It(h);break;case 1:si(h.type)&&xs(h);break;case 4:ye(h,h.stateNode.containerInfo);break;case 10:Uy(h,h.type._context,h.memoizedProps.value);break;case 13:var P=h.memoizedState;if(P!==null)return P.dehydrated!==null?(kn(zt,zt.current&1),h.flags|=128,null):(S&h.child.childLanes)!==0?d3(d,h,S):(kn(zt,zt.current&1),d=ks(d,h,S),d!==null?d.sibling:null);kn(zt,zt.current&1);break;case 19:if(P=(S&h.childLanes)!==0,(d.flags&128)!==0){if(P)return h3(d,h,S);h.flags|=128}var L=h.memoizedState;if(L!==null&&(L.rendering=null,L.tail=null,L.lastEffect=null),kn(zt,zt.current),P)break;return null;case 22:case 23:return h.lanes=0,a3(d,h,S)}return ks(d,h,S)}function Lr(d){d.flags|=4}function p3(d,h){if(d!==null&&d.child===h.child)return!0;if((h.flags&16)!==0)return!1;for(d=h.child;d!==null;){if((d.flags&12854)!==0||(d.subtreeFlags&12854)!==0)return!1;d=d.sibling}return!0}var Kf,Xf,Gp,qp;if(dt)Kf=function(d,h){for(var S=h.child;S!==null;){if(S.tag===5||S.tag===6)Se(d,S.stateNode);else if(S.tag!==4&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===h)break;for(;S.sibling===null;){if(S.return===null||S.return===h)return;S=S.return}S.sibling.return=S.return,S=S.sibling}},Xf=function(){},Gp=function(d,h,S,P,L){if(d=d.memoizedProps,d!==P){var M=h.stateNode,W=we(Io.current);S=be(M,S,d,P,L,W),(h.updateQueue=S)&&Lr(h)}},qp=function(d,h,S,P){S!==P&&Lr(h)};else if(vt){Kf=function(d,h,S,P){for(var L=h.child;L!==null;){if(L.tag===5){var M=L.stateNode;S&&P&&(M=Ep(M,L.type,L.memoizedProps,L)),Se(d,M)}else if(L.tag===6)M=L.stateNode,S&&P&&(M=Pp(M,L.memoizedProps,L)),Se(d,M);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)M=L.child,M!==null&&(M.return=L),Kf(d,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===h)break;for(;L.sibling===null;){if(L.return===null||L.return===h)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};var gm=function(d,h,S,P){for(var L=h.child;L!==null;){if(L.tag===5){var M=L.stateNode;S&&P&&(M=Ep(M,L.type,L.memoizedProps,L)),kp(d,M)}else if(L.tag===6)M=L.stateNode,S&&P&&(M=Pp(M,L.memoizedProps,L)),kp(d,M);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)M=L.child,M!==null&&(M.return=L),gm(d,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===h)break;for(;L.sibling===null;){if(L.return===null||L.return===h)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};Xf=function(d,h){var S=h.stateNode;if(!p3(d,h)){d=S.containerInfo;var P=Fa(d);gm(P,h,!1,!1),S.pendingChildren=P,Lr(h),M1(d,P)}},Gp=function(d,h,S,P,L){var M=d.stateNode,W=d.memoizedProps;if((d=p3(d,h))&&W===P)h.stateNode=M;else{var se=h.stateNode,pe=we(Io.current),je=null;W!==P&&(je=be(se,S,W,P,L,pe)),d&&je===null?h.stateNode=M:(M=O1(M,je,S,W,P,h,d,se),Ae(M,S,P,L,pe)&&Lr(h),h.stateNode=M,d?Lr(h):Kf(M,h,!1,!1))}},qp=function(d,h,S,P){S!==P?(d=we(ie.current),S=we(Io.current),h.stateNode=De(P,d,S,h),Lr(h)):h.stateNode=d.stateNode}}else Xf=function(){},Gp=function(){},qp=function(){};function Xc(d,h){if(!Hn)switch(d.tailMode){case"hidden":h=d.tail;for(var S=null;h!==null;)h.alternate!==null&&(S=h),h=h.sibling;S===null?d.tail=null:S.sibling=null;break;case"collapsed":S=d.tail;for(var P=null;S!==null;)S.alternate!==null&&(P=S),S=S.sibling;P===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:P.sibling=null}}function xi(d){var h=d.alternate!==null&&d.alternate.child===d.child,S=0,P=0;if(h)for(var L=d.child;L!==null;)S|=L.lanes|L.childLanes,P|=L.subtreeFlags&14680064,P|=L.flags&14680064,L.return=d,L=L.sibling;else for(L=d.child;L!==null;)S|=L.lanes|L.childLanes,P|=L.subtreeFlags,P|=L.flags,L.return=d,L=L.sibling;return d.subtreeFlags|=P,d.childLanes=S,h}function fw(d,h,S){var P=h.pendingProps;switch(K1(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xi(h),null;case 1:return si(h.type)&&Ss(),xi(h),null;case 3:return S=h.stateNode,nt(),Mn(ai),Mn(Br),em(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(d===null||d.child===null)&&(Oc(h)?Lr(h):d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,Yi!==null&&(f0(Yi),Yi=null))),Xf(d,h),xi(h),null;case 5:on(h),S=we(ie.current);var L=h.type;if(d!==null&&h.stateNode!=null)Gp(d,h,L,P,S),d.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!P){if(h.stateNode===null)throw Error(a(166));return xi(h),null}if(d=we(Io.current),Oc(h)){if(!xt)throw Error(a(175));d=$1(h.stateNode,h.type,h.memoizedProps,S,d,h,!Ro),h.updateQueue=d,d!==null&&Lr(h)}else{var M=fe(L,P,S,d,h);Kf(M,h,!1,!1),h.stateNode=M,Ae(M,L,P,S,d)&&Lr(h)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return xi(h),null;case 6:if(d&&h.stateNode!=null)qp(d,h,d.memoizedProps,P);else{if(typeof P!="string"&&h.stateNode===null)throw Error(a(166));if(d=we(ie.current),S=we(Io.current),Oc(h)){if(!xt)throw Error(a(176));if(d=h.stateNode,S=h.memoizedProps,(P=ys(d,S,h,!Ro))&&(L=Kn,L!==null))switch(L.tag){case 3:W1(L.stateNode.containerInfo,d,S,(L.mode&1)!==0);break;case 5:bs(L.type,L.memoizedProps,L.stateNode,d,S,(L.mode&1)!==0)}P&&Lr(h)}else h.stateNode=De(P,d,S,h)}return xi(h),null;case 13:if(Mn(zt),P=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Hn&&Mo!==null&&(h.mode&1)!==0&&(h.flags&128)===0)Hy(),Mc(),h.flags|=98560,L=!1;else if(L=Oc(h),P!==null&&P.dehydrated!==null){if(d===null){if(!L)throw Error(a(318));if(!xt)throw Error(a(344));if(L=h.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(a(317));F1(L,h)}else Mc(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;xi(h),L=!1}else Yi!==null&&(f0(Yi),Yi=null),L=!0;if(!L)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=S,h):(S=P!==null,S!==(d!==null&&d.memoizedState!==null)&&S&&(h.child.flags|=8192,(h.mode&1)!==0&&(d===null||(zt.current&1)!==0?Or===0&&(Or=3):th())),h.updateQueue!==null&&(h.flags|=4),xi(h),null);case 4:return nt(),Xf(d,h),d===null&&ut(h.stateNode.containerInfo),xi(h),null;case 10:return Df(h.type._context),xi(h),null;case 17:return si(h.type)&&Ss(),xi(h),null;case 19:if(Mn(zt),L=h.memoizedState,L===null)return xi(h),null;if(P=(h.flags&128)!==0,M=L.rendering,M===null)if(P)Xc(L,!1);else{if(Or!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(M=vn(d),M!==null){for(h.flags|=128,Xc(L,!1),d=M.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),h.subtreeFlags=0,d=S,S=h.child;S!==null;)P=S,L=d,P.flags&=14680066,M=P.alternate,M===null?(P.childLanes=0,P.lanes=L,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=M.childLanes,P.lanes=M.lanes,P.child=M.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=M.memoizedProps,P.memoizedState=M.memoizedState,P.updateQueue=M.updateQueue,P.type=M.type,L=M.dependencies,P.dependencies=L===null?null:{lanes:L.lanes,firstContext:L.firstContext}),S=S.sibling;return kn(zt,zt.current&1|2),h.child}d=d.sibling}L.tail!==null&&Yn()>s0&&(h.flags|=128,P=!0,Xc(L,!1),h.lanes=4194304)}else{if(!P)if(d=vn(M),d!==null){if(h.flags|=128,P=!0,d=d.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),Xc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!M.alternate&&!Hn)return xi(h),null}else 2*Yn()-L.renderingStartTime>s0&&S!==1073741824&&(h.flags|=128,P=!0,Xc(L,!1),h.lanes=4194304);L.isBackwards?(M.sibling=h.child,h.child=M):(d=L.last,d!==null?d.sibling=M:h.child=M,L.last=M)}return L.tail!==null?(h=L.tail,L.rendering=h,L.tail=h.sibling,L.renderingStartTime=Yn(),h.sibling=null,d=zt.current,kn(zt,P?d&1|2:d&1),h):(xi(h),null);case 22:case 23:return od(),S=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==S&&(h.flags|=8192),S&&(h.mode&1)!==0?(fo&1073741824)!==0&&(xi(h),dt&&h.subtreeFlags&6&&(h.flags|=8192)):xi(h),null;case 24:return null;case 25:return null}throw Error(a(156,h.tag))}function mm(d,h){switch(K1(h),h.tag){case 1:return si(h.type)&&Ss(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return nt(),Mn(ai),Mn(Br),em(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 5:return on(h),null;case 13:if(Mn(zt),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(a(340));Mc()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return Mn(zt),null;case 4:return nt(),null;case 10:return Df(h.type._context),null;case 22:case 23:return od(),null;case 24:return null;default:return null}}var bl=!1,Fr=!1,hw=typeof WeakSet=="function"?WeakSet:Set,st=null;function Zc(d,h){var S=d.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(P){Xn(d,h,P)}else S.current=null}function ga(d,h,S){try{S()}catch(P){Xn(d,h,P)}}var Yp=!1;function Mu(d,h){for(X(d.containerInfo),st=h;st!==null;)if(d=st,h=d.child,(d.subtreeFlags&1028)!==0&&h!==null)h.return=d,st=h;else for(;st!==null;){d=st;try{var S=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var P=S.memoizedProps,L=S.memoizedState,M=d.stateNode,W=M.getSnapshotBeforeUpdate(d.elementType===d.type?P:ca(d.type,P),L);M.__reactInternalSnapshotBeforeUpdate=W}break;case 3:dt&&ia(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Xn(d,d.return,se)}if(h=d.sibling,h!==null){h.return=d.return,st=h;break}st=d.return}return S=Yp,Yp=!1,S}function wi(d,h,S){var P=h.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var L=P=P.next;do{if((L.tag&d)===d){var M=L.destroy;L.destroy=void 0,M!==void 0&&ga(h,S,M)}L=L.next}while(L!==P)}}function Kp(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var S=h=h.next;do{if((S.tag&d)===d){var P=S.create;S.destroy=P()}S=S.next}while(S!==h)}}function Xp(d){var h=d.ref;if(h!==null){var S=d.stateNode;switch(d.tag){case 5:d=J(S);break;default:d=S}typeof h=="function"?h(d):h.current=d}}function vm(d){var h=d.alternate;h!==null&&(d.alternate=null,vm(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&ot(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function Qc(d){return d.tag===5||d.tag===3||d.tag===4}function Es(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||Qc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Zp(d,h,S){var P=d.tag;if(P===5||P===6)d=d.stateNode,h?ze(S,d,h):Et(S,d);else if(P!==4&&(d=d.child,d!==null))for(Zp(d,h,S),d=d.sibling;d!==null;)Zp(d,h,S),d=d.sibling}function ym(d,h,S){var P=d.tag;if(P===5||P===6)d=d.stateNode,h?un(S,d,h):Te(S,d);else if(P!==4&&(d=d.child,d!==null))for(ym(d,h,S),d=d.sibling;d!==null;)ym(d,h,S),d=d.sibling}var Ar=null,ma=!1;function va(d,h,S){for(S=S.child;S!==null;)zr(d,h,S),S=S.sibling}function zr(d,h,S){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(mn,S)}catch(se){}switch(S.tag){case 5:Fr||Zc(S,h);case 6:if(dt){var P=Ar,L=ma;Ar=null,va(d,h,S),Ar=P,ma=L,Ar!==null&&(ma?ct(Ar,S.stateNode):St(Ar,S.stateNode))}else va(d,h,S);break;case 18:dt&&Ar!==null&&(ma?U1(Ar,S.stateNode):V1(Ar,S.stateNode));break;case 4:dt?(P=Ar,L=ma,Ar=S.stateNode.containerInfo,ma=!0,va(d,h,S),Ar=P,ma=L):(vt&&(P=S.stateNode.containerInfo,L=Fa(P),wc(P,L)),va(d,h,S));break;case 0:case 11:case 14:case 15:if(!Fr&&(P=S.updateQueue,P!==null&&(P=P.lastEffect,P!==null))){L=P=P.next;do{var M=L,W=M.destroy;M=M.tag,W!==void 0&&((M&2)!==0||(M&4)!==0)&&ga(S,h,W),L=L.next}while(L!==P)}va(d,h,S);break;case 1:if(!Fr&&(Zc(S,h),P=S.stateNode,typeof P.componentWillUnmount=="function"))try{P.props=S.memoizedProps,P.state=S.memoizedState,P.componentWillUnmount()}catch(se){Xn(S,h,se)}va(d,h,S);break;case 21:va(d,h,S);break;case 22:S.mode&1?(Fr=(P=Fr)||S.memoizedState!==null,va(d,h,S),Fr=P):va(d,h,S);break;default:va(d,h,S)}}function Qp(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var S=d.stateNode;S===null&&(S=d.stateNode=new hw),h.forEach(function(P){var L=v3.bind(null,d,P);S.has(P)||(S.add(P),P.then(L,L))})}}function Do(d,h){var S=h.deletions;if(S!==null)for(var P=0;P<S.length;P++){var L=S[P];try{var M=d,W=h;if(dt){var se=W;e:for(;se!==null;){switch(se.tag){case 5:Ar=se.stateNode,ma=!1;break e;case 3:Ar=se.stateNode.containerInfo,ma=!0;break e;case 4:Ar=se.stateNode.containerInfo,ma=!0;break e}se=se.return}if(Ar===null)throw Error(a(160));zr(M,W,L),Ar=null,ma=!1}else zr(M,W,L);var pe=L.alternate;pe!==null&&(pe.return=null),L.return=null}catch(je){Xn(L,h,je)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)ya(h,d),h=h.sibling}function ya(d,h){var S=d.alternate,P=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(Do(h,d),No(d),P&4){try{wi(3,d,d.return),Kp(3,d)}catch(rt){Xn(d,d.return,rt)}try{wi(5,d,d.return)}catch(rt){Xn(d,d.return,rt)}}break;case 1:Do(h,d),No(d),P&512&&S!==null&&Zc(S,S.return);break;case 5:if(Do(h,d),No(d),P&512&&S!==null&&Zc(S,S.return),dt){if(d.flags&32){var L=d.stateNode;try{Vt(L)}catch(rt){Xn(d,d.return,rt)}}if(P&4&&(L=d.stateNode,L!=null)){var M=d.memoizedProps;if(S=S!==null?S.memoizedProps:M,P=d.type,h=d.updateQueue,d.updateQueue=null,h!==null)try{ft(L,h,P,S,M,d)}catch(rt){Xn(d,d.return,rt)}}}break;case 6:if(Do(h,d),No(d),P&4&&dt){if(d.stateNode===null)throw Error(a(162));L=d.stateNode,M=d.memoizedProps,S=S!==null?S.memoizedProps:M;try{Ut(L,S,M)}catch(rt){Xn(d,d.return,rt)}}break;case 3:if(Do(h,d),No(d),P&4){if(dt&&xt&&S!==null&&S.memoizedState.isDehydrated)try{j1(h.containerInfo)}catch(rt){Xn(d,d.return,rt)}if(vt){L=h.containerInfo,M=h.pendingChildren;try{wc(L,M)}catch(rt){Xn(d,d.return,rt)}}}break;case 4:if(Do(h,d),No(d),P&4&&vt){M=d.stateNode,L=M.containerInfo,M=M.pendingChildren;try{wc(L,M)}catch(rt){Xn(d,d.return,rt)}}break;case 13:Do(h,d),No(d),L=d.child,L.flags&8192&&(M=L.memoizedState!==null,L.stateNode.isHidden=M,!M||L.alternate!==null&&L.alternate.memoizedState!==null||(_m=Yn())),P&4&&Qp(d);break;case 22:var W=S!==null&&S.memoizedState!==null;if(d.mode&1?(Fr=(S=Fr)||W,Do(h,d),Fr=S):Do(h,d),No(d),P&8192){if(S=d.memoizedState!==null,(d.stateNode.isHidden=S)&&!W&&(d.mode&1)!==0)for(st=d,P=d.child;P!==null;){for(h=st=P;st!==null;){W=st;var se=W.child;switch(W.tag){case 0:case 11:case 14:case 15:wi(4,W,W.return);break;case 1:Zc(W,W.return);var pe=W.stateNode;if(typeof pe.componentWillUnmount=="function"){var je=W,ht=W.return;try{var $t=je;pe.props=$t.memoizedProps,pe.state=$t.memoizedState,pe.componentWillUnmount()}catch(rt){Xn(je,ht,rt)}}break;case 5:Zc(W,W.return);break;case 22:if(W.memoizedState!==null){Ci(h);continue}}se!==null?(se.return=W,st=se):Ci(h)}P=P.sibling}if(dt){e:if(P=null,dt)for(h=d;;){if(h.tag===5){if(P===null){P=h;try{L=h.stateNode,S?hn(L):dr(h.stateNode,h.memoizedProps)}catch(rt){Xn(d,d.return,rt)}}}else if(h.tag===6){if(P===null)try{M=h.stateNode,S?Er(M):Kr(M,h.memoizedProps)}catch(rt){Xn(d,d.return,rt)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;P===h&&(P=null),h=h.return}P===h&&(P=null),h.sibling.return=h.return,h=h.sibling}}}break;case 19:Do(h,d),No(d),P&4&&Qp(d);break;case 21:break;default:Do(h,d),No(d)}}function No(d){var h=d.flags;if(h&2){try{if(dt){e:{for(var S=d.return;S!==null;){if(Qc(S)){var P=S;break e}S=S.return}throw Error(a(160))}switch(P.tag){case 5:var L=P.stateNode;P.flags&32&&(Vt(L),P.flags&=-33);var M=Es(d);ym(d,M,L);break;case 3:case 4:var W=P.stateNode.containerInfo,se=Es(d);Zp(d,se,W);break;default:throw Error(a(161))}}}catch(pe){Xn(d,d.return,pe)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function Jp(d,h,S){st=d,Sl(d)}function Sl(d,h,S){for(var P=(d.mode&1)!==0;st!==null;){var L=st,M=L.child;if(L.tag===22&&P){var W=L.memoizedState!==null||bl;if(!W){var se=L.alternate,pe=se!==null&&se.memoizedState!==null||Fr;se=bl;var je=Fr;if(bl=W,(Fr=pe)&&!je)for(st=L;st!==null;)W=st,pe=W.child,W.tag===22&&W.memoizedState!==null?e0(L):pe!==null?(pe.return=W,st=pe):e0(L);for(;M!==null;)st=M,Sl(M),M=M.sibling;st=L,bl=se,Fr=je}bm(d)}else(L.subtreeFlags&8772)!==0&&M!==null?(M.return=L,st=M):bm(d)}}function bm(d){for(;st!==null;){var h=st;if((h.flags&8772)!==0){var S=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:Fr||Kp(5,h);break;case 1:var P=h.stateNode;if(h.flags&4&&!Fr)if(S===null)P.componentDidMount();else{var L=h.elementType===h.type?S.memoizedProps:ca(h.type,S.memoizedProps);P.componentDidUpdate(L,S.memoizedState,P.__reactInternalSnapshotBeforeUpdate)}var M=h.updateQueue;M!==null&&Gy(h,M,P);break;case 3:var W=h.updateQueue;if(W!==null){if(S=null,h.child!==null)switch(h.child.tag){case 5:S=J(h.child.stateNode);break;case 1:S=h.child.stateNode}Gy(h,W,S)}break;case 5:var se=h.stateNode;S===null&&h.flags&4&&Ve(se,h.type,h.memoizedProps,h);break;case 6:break;case 4:break;case 12:break;case 13:if(xt&&h.memoizedState===null){var pe=h.alternate;if(pe!==null){var je=pe.memoizedState;if(je!==null){var ht=je.dehydrated;ht!==null&&H1(ht)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Fr||h.flags&512&&Xp(h)}catch($t){Xn(h,h.return,$t)}}if(h===d){st=null;break}if(S=h.sibling,S!==null){S.return=h.return,st=S;break}st=h.return}}function Ci(d){for(;st!==null;){var h=st;if(h===d){st=null;break}var S=h.sibling;if(S!==null){S.return=h.return,st=S;break}st=h.return}}function e0(d){for(;st!==null;){var h=st;try{switch(h.tag){case 0:case 11:case 15:var S=h.return;try{Kp(4,h)}catch(pe){Xn(h,S,pe)}break;case 1:var P=h.stateNode;if(typeof P.componentDidMount=="function"){var L=h.return;try{P.componentDidMount()}catch(pe){Xn(h,L,pe)}}var M=h.return;try{Xp(h)}catch(pe){Xn(h,M,pe)}break;case 5:var W=h.return;try{Xp(h)}catch(pe){Xn(h,W,pe)}}}catch(pe){Xn(h,h.return,pe)}if(h===d){st=null;break}var se=h.sibling;if(se!==null){se.return=h.return,st=se;break}st=h.return}}var t0=0,n0=1,r0=2,Jc=3,i0=4;if(typeof Symbol=="function"&&Symbol.for){var Ps=Symbol.for;t0=Ps("selector.component"),n0=Ps("selector.has_pseudo_class"),r0=Ps("selector.role"),Jc=Ps("selector.test_id"),i0=Ps("selector.text")}function o0(d){var h=Le(d);if(h!=null){if(typeof h.memoizedProps["data-testname"]!="string")throw Error(a(364));return h}if(d=Ie(d),d===null)throw Error(a(362));return d.stateNode.current}function Sm(d,h){switch(h.$$typeof){case t0:if(d.type===h.value)return!0;break;case n0:e:{h=h.value,d=[d,0];for(var S=0;S<d.length;){var P=d[S++],L=d[S++],M=h[L];if(P.tag!==5||!Ce(P)){for(;M!=null&&Sm(P,M);)L++,M=h[L];if(L===h.length){h=!0;break e}else for(P=P.child;P!==null;)d.push(P,L),P=P.sibling}}h=!1}return h;case r0:if(d.tag===5&&Ne(d.stateNode,h.value))return!0;break;case i0:if((d.tag===5||d.tag===6)&&(d=Xe(d),d!==null&&0<=d.indexOf(h.value)))return!0;break;case Jc:if(d.tag===5&&(d=d.memoizedProps["data-testname"],typeof d=="string"&&d.toLowerCase()===h.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function xm(d){switch(d.$$typeof){case t0:return"<"+(D(d.value)||"Unknown")+">";case n0:return":has("+(xm(d)||"")+")";case r0:return'[role="'+d.value+'"]';case i0:return'"'+d.value+'"';case Jc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function ed(d,h){var S=[];d=[d,0];for(var P=0;P<d.length;){var L=d[P++],M=d[P++],W=h[M];if(L.tag!==5||!Ce(L)){for(;W!=null&&Sm(L,W);)M++,W=h[M];if(M===h.length)S.push(L);else for(L=L.child;L!==null;)d.push(L,M),L=L.sibling}}return S}function wm(d,h){if(!ue)throw Error(a(363));d=o0(d),d=ed(d,h),h=[],d=Array.from(d);for(var S=0;S<d.length;){var P=d[S++];if(P.tag===5)Ce(P)||h.push(P.stateNode);else for(P=P.child;P!==null;)d.push(P),P=P.sibling}return h}var pw=Math.ceil,td=s.ReactCurrentDispatcher,a0=s.ReactCurrentOwner,hr=s.ReactCurrentBatchConfig,qt=0,Zr=null,pr=null,jr=0,fo=0,xl=aa(0),Or=0,nd=null,wl=0,Ru=0,Cm=0,rd=null,Ni=null,_m=0,s0=1/0,Ts=null;function Cl(){s0=Yn()+500}var Zf=!1,Qf=null,_l=null,id=!1,Mt=null,l0=0,Jf=0,Iu=null,eh=-1,u0=0;function _i(){return(qt&6)!==0?Yn():eh!==-1?eh:eh=Yn()}function Hr(d){return(d.mode&1)===0?1:(qt&2)!==0&&jr!==0?jr&-jr:Vy.transition!==null?(u0===0&&(u0=Pf()),u0):(d=Xt,d!==0?d:Rt())}function Bo(d,h,S,P){if(50<Jf)throw Jf=0,Iu=null,Error(a(185));za(d,S,P),((qt&2)===0||d!==Zr)&&(d===Zr&&((qt&2)===0&&(Ru|=S),Or===4&&Bi(d,jr)),di(d,P),S===1&&qt===0&&(h.mode&1)===0&&(Cl(),ge&&Pt()))}function di(d,h){var S=d.callbackNode;Ec(d,h);var P=ku(d,d===Zr?jr:0);if(P===0)S!==null&&Ac(S),d.callbackNode=null,d.callbackPriority=0;else if(h=P&-P,d.callbackPriority!==h){if(S!=null&&Ac(S),h===1)d.tag===0?bn(h0.bind(null,d)):Gt(h0.bind(null,d)),Ct?ln(function(){(qt&6)===0&&Pt()}):Lc(Lf,Pt),S=null;else{switch(Op(P)){case 1:S=Lf;break;case 4:S=Rp;break;case 16:S=Af;break;case 536870912:S=Ip;break;default:S=Af}S=$i(S,c0.bind(null,d))}d.callbackPriority=h,d.callbackNode=S}}function c0(d,h){if(eh=-1,u0=0,(qt&6)!==0)throw Error(a(327));var S=d.callbackNode;if(Du()&&d.callbackNode!==S)return null;var P=ku(d,d===Zr?jr:0);if(P===0)return null;if((P&30)!==0||(P&d.expiredLanes)!==0||h)h=ad(d,P);else{h=P;var L=qt;qt|=2;var M=Em();(Zr!==d||jr!==h)&&(Ts=null,Cl(),kl(d,h));do try{gw();break}catch(se){p0(d,se)}while(1);Bp(),td.current=M,qt=L,pr!==null?h=0:(Zr=null,jr=0,h=Or)}if(h!==0){if(h===2&&(L=Pc(d),L!==0&&(P=L,h=d0(d,L))),h===1)throw S=nd,kl(d,0),Bi(d,P),di(d,Yn()),S;if(h===6)Bi(d,P);else{if(L=d.current.alternate,(P&30)===0&&!ho(L)&&(h=ad(d,P),h===2&&(M=Pc(d),M!==0&&(P=M,h=d0(d,M))),h===1))throw S=nd,kl(d,0),Bi(d,P),di(d,Yn()),S;switch(d.finishedWork=L,d.finishedLanes=P,h){case 0:case 1:throw Error(a(345));case 2:Pl(d,Ni,Ts);break;case 3:if(Bi(d,P),(P&130023424)===P&&(h=_m+500-Yn(),10<h)){if(ku(d,0)!==0)break;if(L=d.suspendedLanes,(L&P)!==P){_i(),d.pingedLanes|=d.suspendedLanes&L;break}d.timeoutHandle=Je(Pl.bind(null,d,Ni,Ts),h);break}Pl(d,Ni,Ts);break;case 4:if(Bi(d,P),(P&4194240)===P)break;for(h=d.eventTimes,L=-1;0<P;){var W=31-Oi(P);M=1<<W,W=h[W],W>L&&(L=W),P&=~M}if(P=L,P=Yn()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*pw(P/1960))-P,10<P){d.timeoutHandle=Je(Pl.bind(null,d,Ni,Ts),P);break}Pl(d,Ni,Ts);break;case 5:Pl(d,Ni,Ts);break;default:throw Error(a(329))}}}return di(d,Yn()),d.callbackNode===S?c0.bind(null,d):null}function d0(d,h){var S=rd;return d.current.memoizedState.isDehydrated&&(kl(d,h).flags|=256),d=ad(d,h),d!==2&&(h=Ni,Ni=S,h!==null&&f0(h)),d}function f0(d){Ni===null?Ni=d:Ni.push.apply(Ni,d)}function ho(d){for(var h=d;;){if(h.flags&16384){var S=h.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var P=0;P<S.length;P++){var L=S[P],M=L.getSnapshot;L=L.value;try{if(!q(M(),L))return!1}catch(W){return!1}}}if(S=h.child,h.subtreeFlags&16384&&S!==null)S.return=h,h=S;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Bi(d,h){for(h&=~Cm,h&=~Ru,d.suspendedLanes|=h,d.pingedLanes&=~h,d=d.expirationTimes;0<h;){var S=31-Oi(h),P=1<<S;d[S]=-1,h&=~P}}function h0(d){if((qt&6)!==0)throw Error(a(327));Du();var h=ku(d,0);if((h&1)===0)return di(d,Yn()),null;var S=ad(d,h);if(d.tag!==0&&S===2){var P=Pc(d);P!==0&&(h=P,S=d0(d,P))}if(S===1)throw S=nd,kl(d,0),Bi(d,h),di(d,Yn()),S;if(S===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=h,Pl(d,Ni,Ts),di(d,Yn()),null}function km(d){Mt!==null&&Mt.tag===0&&(qt&6)===0&&Du();var h=qt;qt|=1;var S=hr.transition,P=Xt;try{if(hr.transition=null,Xt=1,d)return d()}finally{Xt=P,hr.transition=S,qt=h,(qt&6)===0&&Pt()}}function od(){fo=xl.current,Mn(xl)}function kl(d,h){d.finishedWork=null,d.finishedLanes=0;var S=d.timeoutHandle;if(S!==mt&&(d.timeoutHandle=mt,Ye(S)),pr!==null)for(S=pr.return;S!==null;){var P=S;switch(K1(P),P.tag){case 1:P=P.type.childContextTypes,P!=null&&Ss();break;case 3:nt(),Mn(ai),Mn(Br),em();break;case 5:on(P);break;case 4:nt();break;case 13:Mn(zt);break;case 19:Mn(zt);break;case 10:Df(P.type._context);break;case 22:case 23:od()}S=S.return}if(Zr=d,pr=d=po(d.current,null),jr=fo=h,Or=0,nd=null,Cm=Ru=wl=0,Ni=rd=null,$r!==null){for(h=0;h<$r.length;h++)if(S=$r[h],P=S.interleaved,P!==null){S.interleaved=null;var L=P.next,M=S.pending;if(M!==null){var W=M.next;M.next=L,P.next=W}S.pending=P}$r=null}return d}function p0(d,h){do{var S=pr;try{if(Bp(),Ri.current=_s,cn){for(var P=En.memoizedState;P!==null;){var L=P.queue;L!==null&&(L.pending=null),P=P.next}cn=!1}if(Lu=0,fr=sr=En=null,jf=!1,$c=0,a0.current=null,S===null||S.return===null){Or=1,nd=h,pr=null;break}e:{var M=d,W=S.return,se=S,pe=h;if(h=jr,se.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var je=pe,ht=se,$t=ht.tag;if((ht.mode&1)===0&&($t===0||$t===11||$t===15)){var rt=ht.alternate;rt?(ht.updateQueue=rt.updateQueue,ht.memoizedState=rt.memoizedState,ht.lanes=rt.lanes):(ht.updateQueue=null,ht.memoizedState=null)}var Un=Yf(W);if(Un!==null){Un.flags&=-257,co(Un,W,se,M,h),Un.mode&1&&Ou(M,je,h),h=Un,pe=je;var Rn=h.updateQueue;if(Rn===null){var lr=new Set;lr.add(pe),h.updateQueue=lr}else Rn.add(pe);break e}else{if((h&1)===0){Ou(M,je,h),th();break e}pe=Error(a(426))}}else if(Hn&&se.mode&1){var ba=Yf(W);if(ba!==null){(ba.flags&65536)===0&&(ba.flags|=256),co(ba,W,se,M,h),X1(Yc(pe,se));break e}}M=pe=Yc(pe,se),Or!==4&&(Or=2),rd===null?rd=[M]:rd.push(M),M=W;do{switch(M.tag){case 3:M.flags|=65536,h&=-h,M.lanes|=h;var me=cm(M,pe,h);Tu(M,me);break e;case 1:se=pe;var ce=M.type,xe=M.stateNode;if((M.flags&128)===0&&(typeof ce.getDerivedStateFromError=="function"||xe!==null&&typeof xe.componentDidCatch=="function"&&(_l===null||!_l.has(xe)))){M.flags|=65536,h&=-h,M.lanes|=h;var et=F(M,se,h);Tu(M,et);break e}}M=M.return}while(M!==null)}Pm(S)}catch(Me){h=Me,pr===S&&S!==null&&(pr=S=S.return);continue}break}while(1)}function Em(){var d=td.current;return td.current=_s,d===null?_s:d}function th(){(Or===0||Or===3||Or===2)&&(Or=4),Zr===null||(wl&268435455)===0&&(Ru&268435455)===0||Bi(Zr,jr)}function ad(d,h){var S=qt;qt|=2;var P=Em();(Zr!==d||jr!==h)&&(Ts=null,kl(d,h));do try{El();break}catch(L){p0(d,L)}while(1);if(Bp(),qt=S,td.current=P,pr!==null)throw Error(a(261));return Zr=null,jr=0,Or}function El(){for(;pr!==null;)Ls(pr)}function gw(){for(;pr!==null&&!Mp();)Ls(pr)}function Ls(d){var h=Am(d.alternate,d,fo);d.memoizedProps=d.pendingProps,h===null?Pm(d):pr=h,a0.current=null}function Pm(d){var h=d;do{var S=h.alternate;if(d=h.return,(h.flags&32768)===0){if(S=fw(S,h,fo),S!==null){pr=S;return}}else{if(S=mm(S,h),S!==null){S.flags&=32767,pr=S;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Or=6,pr=null;return}}if(h=h.sibling,h!==null){pr=h;return}pr=h=d}while(h!==null);Or===0&&(Or=5)}function Pl(d,h,S){var P=Xt,L=hr.transition;try{hr.transition=null,Xt=1,Tm(d,h,S,P)}finally{hr.transition=L,Xt=P}return null}function Tm(d,h,S,P){do Du();while(Mt!==null);if((qt&6)!==0)throw Error(a(327));S=d.finishedWork;var L=d.finishedLanes;if(S===null)return null;if(d.finishedWork=null,d.finishedLanes=0,S===d.current)throw Error(a(177));d.callbackNode=null,d.callbackPriority=0;var M=S.lanes|S.childLanes;if(Tf(d,M),d===Zr&&(pr=Zr=null,jr=0),(S.subtreeFlags&2064)===0&&(S.flags&2064)===0||id||(id=!0,$i(Af,function(){return Du(),null})),M=(S.flags&15990)!==0,(S.subtreeFlags&15990)!==0||M){M=hr.transition,hr.transition=null;var W=Xt;Xt=1;var se=qt;qt|=4,a0.current=null,Mu(d,S),ya(S,d),le(d.containerInfo),d.current=S,Jp(S),ua(),qt=se,Xt=W,hr.transition=M}else d.current=S;if(id&&(id=!1,Mt=d,l0=L),M=d.pendingLanes,M===0&&(_l=null),Dp(S.stateNode),di(d,Yn()),h!==null)for(P=d.onRecoverableError,S=0;S<h.length;S++)L=h[S],P(L.value,{componentStack:L.stack,digest:L.digest});if(Zf)throw Zf=!1,d=Qf,Qf=null,d;return(l0&1)!==0&&d.tag!==0&&Du(),M=d.pendingLanes,(M&1)!==0?d===Iu?Jf++:(Jf=0,Iu=d):Jf=0,Pt(),null}function Du(){if(Mt!==null){var d=Op(l0),h=hr.transition,S=Xt;try{if(hr.transition=null,Xt=16>d?16:d,Mt===null)var P=!1;else{if(d=Mt,Mt=null,l0=0,(qt&6)!==0)throw Error(a(331));var L=qt;for(qt|=4,st=d.current;st!==null;){var M=st,W=M.child;if((st.flags&16)!==0){var se=M.deletions;if(se!==null){for(var pe=0;pe<se.length;pe++){var je=se[pe];for(st=je;st!==null;){var ht=st;switch(ht.tag){case 0:case 11:case 15:wi(8,ht,M)}var $t=ht.child;if($t!==null)$t.return=ht,st=$t;else for(;st!==null;){ht=st;var rt=ht.sibling,Un=ht.return;if(vm(ht),ht===je){st=null;break}if(rt!==null){rt.return=Un,st=rt;break}st=Un}}}var Rn=M.alternate;if(Rn!==null){var lr=Rn.child;if(lr!==null){Rn.child=null;do{var ba=lr.sibling;lr.sibling=null,lr=ba}while(lr!==null)}}st=M}}if((M.subtreeFlags&2064)!==0&&W!==null)W.return=M,st=W;else e:for(;st!==null;){if(M=st,(M.flags&2048)!==0)switch(M.tag){case 0:case 11:case 15:wi(9,M,M.return)}var me=M.sibling;if(me!==null){me.return=M.return,st=me;break e}st=M.return}}var ce=d.current;for(st=ce;st!==null;){W=st;var xe=W.child;if((W.subtreeFlags&2064)!==0&&xe!==null)xe.return=W,st=xe;else e:for(W=ce;st!==null;){if(se=st,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:Kp(9,se)}}catch(Me){Xn(se,se.return,Me)}if(se===W){st=null;break e}var et=se.sibling;if(et!==null){et.return=se.return,st=et;break e}st=se.return}}if(qt=L,Pt(),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(mn,d)}catch(Me){}P=!0}return P}finally{Xt=S,hr.transition=h}}return!1}function g3(d,h,S){h=Yc(S,h),h=cm(d,h,1),d=ml(d,h,1),h=_i(),d!==null&&(za(d,1,h),di(d,h))}function Xn(d,h,S){if(d.tag===3)g3(d,d,S);else for(;h!==null;){if(h.tag===3){g3(h,d,S);break}else if(h.tag===1){var P=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof P.componentDidCatch=="function"&&(_l===null||!_l.has(P))){d=Yc(S,d),d=F(h,d,1),h=ml(h,d,1),d=_i(),h!==null&&(za(h,1,d),di(h,d));break}}h=h.return}}function m3(d,h,S){var P=d.pingCache;P!==null&&P.delete(h),h=_i(),d.pingedLanes|=d.suspendedLanes&S,Zr===d&&(jr&S)===S&&(Or===4||Or===3&&(jr&130023424)===jr&&500>Yn()-_m?kl(d,0):Cm|=S),di(d,h)}function Lm(d,h){h===0&&((d.mode&1)===0?h=1:(h=Ao,Ao<<=1,(Ao&130023424)===0&&(Ao=4194304)));var S=_i();d=da(d,h),d!==null&&(za(d,h,S),di(d,S))}function mw(d){var h=d.memoizedState,S=0;h!==null&&(S=h.retryLane),Lm(d,S)}function v3(d,h){var S=0;switch(d.tag){case 13:var P=d.stateNode,L=d.memoizedState;L!==null&&(S=L.retryLane);break;case 19:P=d.stateNode;break;default:throw Error(a(314))}P!==null&&P.delete(h),Lm(d,S)}var Am;Am=function(d,h,S){if(d!==null)if(d.memoizedProps!==h.pendingProps||ai.current)Xi=!0;else{if((d.lanes&S)===0&&(h.flags&128)===0)return Xi=!1,dw(d,h,S);Xi=(d.flags&131072)!==0}else Xi=!1,Hn&&(h.flags&1048576)!==0&&Y1(h,Pr,h.index);switch(h.lanes=0,h.tag){case 2:var P=h.type;Wa(d,h),d=h.pendingProps;var L=dl(h,Br.current);Ic(h,S),L=nm(null,h,P,d,L,S);var M=Fc();return h.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,si(P)?(M=!0,xs(h)):M=!1,h.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,Z1(h),L.updater=fa,h.stateNode=L,L._reactInternals=h,Q1(h,P,d,S),h=ha(null,h,P,!0,M,S)):(h.tag=0,Hn&&M&&Mi(h),Di(null,h,L,S),h=h.child),h;case 16:P=h.elementType;e:{switch(Wa(d,h),d=h.pendingProps,L=P._init,P=L(P._payload),h.type=P,L=h.tag=g0(P),d=ca(P,d),L){case 0:h=dm(null,h,P,d,S);break e;case 1:h=l3(null,h,P,d,S);break e;case 11:h=i3(null,h,P,d,S);break e;case 14:h=yl(null,h,P,ca(P.type,d),S);break e}throw Error(a(306,P,""))}return h;case 0:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:ca(P,L),dm(d,h,P,L,S);case 1:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:ca(P,L),l3(d,h,P,L,S);case 3:e:{if(u3(h),d===null)throw Error(a(387));P=h.pendingProps,M=h.memoizedState,L=M.element,Wy(d,h),Fp(h,P,null,S);var W=h.memoizedState;if(P=W.element,xt&&M.isDehydrated)if(M={element:P,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},h.updateQueue.baseState=M,h.memoizedState=M,h.flags&256){L=Yc(Error(a(423)),h),h=c3(d,h,P,S,L);break e}else if(P!==L){L=Yc(Error(a(424)),h),h=c3(d,h,P,S,L);break e}else for(xt&&(Mo=N1(h.stateNode.containerInfo),Kn=h,Hn=!0,Yi=null,Ro=!1),S=Xy(h,null,P,S),h.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(Mc(),P===L){h=ks(d,h,S);break e}Di(d,h,P,S)}h=h.child}return h;case 5:return It(h),d===null&&Of(h),P=h.type,L=h.pendingProps,M=d!==null?d.memoizedProps:null,W=L.children,ke(P,L)?W=null:M!==null&&ke(P,M)&&(h.flags|=32),s3(d,h),Di(d,h,W,S),h.child;case 6:return d===null&&Of(h),null;case 13:return d3(d,h,S);case 4:return ye(h,h.stateNode.containerInfo),P=h.pendingProps,d===null?h.child=Nc(h,null,P,S):Di(d,h,P,S),h.child;case 11:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:ca(P,L),i3(d,h,P,L,S);case 7:return Di(d,h,h.pendingProps,S),h.child;case 8:return Di(d,h,h.pendingProps.children,S),h.child;case 12:return Di(d,h,h.pendingProps.children,S),h.child;case 10:e:{if(P=h.type._context,L=h.pendingProps,M=h.memoizedProps,W=L.value,Uy(h,P,W),M!==null)if(q(M.value,W)){if(M.children===L.children&&!ai.current){h=ks(d,h,S);break e}}else for(M=h.child,M!==null&&(M.return=h);M!==null;){var se=M.dependencies;if(se!==null){W=M.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===P){if(M.tag===1){pe=Cs(-1,S&-S),pe.tag=2;var je=M.updateQueue;if(je!==null){je=je.shared;var ht=je.pending;ht===null?pe.next=pe:(pe.next=ht.next,ht.next=pe),je.pending=pe}}M.lanes|=S,pe=M.alternate,pe!==null&&(pe.lanes|=S),Nf(M.return,S,h),se.lanes|=S;break}pe=pe.next}}else if(M.tag===10)W=M.type===h.type?null:M.child;else if(M.tag===18){if(W=M.return,W===null)throw Error(a(341));W.lanes|=S,se=W.alternate,se!==null&&(se.lanes|=S),Nf(W,S,h),W=M.sibling}else W=M.child;if(W!==null)W.return=M;else for(W=M;W!==null;){if(W===h){W=null;break}if(M=W.sibling,M!==null){M.return=W.return,W=M;break}W=W.return}M=W}Di(d,h,L.children,S),h=h.child}return h;case 9:return L=h.type,P=h.pendingProps.children,Ic(h,S),L=uo(L),P=P(L),h.flags|=1,Di(d,h,P,S),h.child;case 14:return P=h.type,L=ca(P,h.pendingProps),L=ca(P.type,L),yl(d,h,P,L,S);case 15:return o3(d,h,h.type,h.pendingProps,S);case 17:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:ca(P,L),Wa(d,h),h.tag=1,si(P)?(d=!0,xs(h)):d=!1,Ic(h,S),qy(h,P,L),Q1(h,P,L,S),ha(null,h,P,!0,d,S);case 19:return h3(d,h,S);case 22:return a3(d,h,S)}throw Error(a(156,h.tag))};function $i(d,h){return Lc(d,h)}function Ga(d,h,S,P){this.tag=d,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $o(d,h,S,P){return new Ga(d,h,S,P)}function Om(d){return d=d.prototype,!(!d||!d.isReactComponent)}function g0(d){if(typeof d=="function")return Om(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===_)return 14}return 2}function po(d,h){var S=d.alternate;return S===null?(S=$o(d.tag,h,d.key,d.mode),S.elementType=d.elementType,S.type=d.type,S.stateNode=d.stateNode,S.alternate=d,d.alternate=S):(S.pendingProps=h,S.type=d.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=d.flags&14680064,S.childLanes=d.childLanes,S.lanes=d.lanes,S.child=d.child,S.memoizedProps=d.memoizedProps,S.memoizedState=d.memoizedState,S.updateQueue=d.updateQueue,h=d.dependencies,S.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},S.sibling=d.sibling,S.index=d.index,S.ref=d.ref,S}function nh(d,h,S,P,L,M){var W=2;if(P=d,typeof d=="function")Om(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case f:return Tl(S.children,L,M,h);case p:W=8,L|=8;break;case m:return d=$o(12,S,h,L|2),d.elementType=m,d.lanes=M,d;case E:return d=$o(13,S,h,L),d.elementType=E,d.lanes=M,d;case k:return d=$o(19,S,h,L),d.elementType=k,d.lanes=M,d;case A:return m0(S,L,M,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case b:W=9;break e;case x:W=11;break e;case _:W=14;break e;case T:W=16,P=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return h=$o(W,S,h,L),h.elementType=d,h.type=P,h.lanes=M,h}function Tl(d,h,S,P){return d=$o(7,d,P,h),d.lanes=S,d}function m0(d,h,S,P){return d=$o(22,d,P,h),d.elementType=A,d.lanes=S,d.stateNode={isHidden:!1},d}function v0(d,h,S){return d=$o(6,d,null,h),d.lanes=S,d}function Ll(d,h,S){return h=$o(4,d.children!==null?d.children:[],d.key,h),h.lanes=S,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function rh(d,h,S,P,L){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=mt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tc(0),this.expirationTimes=Tc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tc(0),this.identifierPrefix=P,this.onRecoverableError=L,xt&&(this.mutableSourceEagerHydrationData=null)}function y3(d,h,S,P,L,M,W,se,pe){return d=new rh(d,h,S,se,pe),h===1?(h=1,M===!0&&(h|=8)):h=0,M=$o(3,null,null,h),d.current=M,M.stateNode=d,M.memoizedState={element:P,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},Z1(M),d}function Mm(d){if(!d)return sa;d=d._reactInternals;e:{if(z(d)!==d||d.tag!==1)throw Error(a(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(si(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(a(171))}if(d.tag===1){var S=d.type;if(si(S))return _u(d,S,h)}return h}function Rm(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=te(h),d===null?null:d.stateNode}function ih(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var S=d.retryLane;d.retryLane=S!==0&&S<h?S:h}}function oh(d,h){ih(d,h),(d=d.alternate)&&ih(d,h)}function y0(d){return d=te(d),d===null?null:d.stateNode}function Im(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var h=da(d,134217728);if(h!==null){var S=_i();Bo(h,d,134217728,S)}oh(d,134217728)}},n.attemptDiscreteHydration=function(d){if(d.tag===13){var h=da(d,1);if(h!==null){var S=_i();Bo(h,d,1,S)}oh(d,1)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var h=Hr(d),S=da(d,h);if(S!==null){var P=_i();Bo(S,d,h,P)}oh(d,h)}},n.attemptSynchronousHydration=function(d){switch(d.tag){case 3:var h=d.stateNode;if(h.current.memoizedState.isDehydrated){var S=hl(h.pendingLanes);S!==0&&(Eu(h,S|1),di(h,Yn()),(qt&6)===0&&(Cl(),Pt()))}break;case 13:km(function(){var P=da(d,1);if(P!==null){var L=_i();Bo(P,d,1,L)}}),oh(d,1)}},n.batchedUpdates=function(d,h){var S=qt;qt|=1;try{return d(h)}finally{qt=S,qt===0&&(Cl(),ge&&Pt())}},n.createComponentSelector=function(d){return{$$typeof:t0,value:d}},n.createContainer=function(d,h,S,P,L,M,W){return y3(d,h,!1,null,S,P,L,M,W)},n.createHasPseudoClassSelector=function(d){return{$$typeof:n0,value:d}},n.createHydrationContainer=function(d,h,S,P,L,M,W,se,pe){return d=y3(S,P,!0,d,L,M,W,se,pe),d.context=Mm(null),S=d.current,P=_i(),L=Hr(S),M=Cs(P,L),M.callback=h!=null?h:null,ml(S,M,L),d.current.lanes=L,za(d,L,P),di(d,P),d},n.createPortal=function(d,h,S){var P=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:P==null?null:""+P,children:d,containerInfo:h,implementation:S}},n.createRoleSelector=function(d){return{$$typeof:r0,value:d}},n.createTestNameSelector=function(d){return{$$typeof:Jc,value:d}},n.createTextSelector=function(d){return{$$typeof:i0,value:d}},n.deferredUpdates=function(d){var h=Xt,S=hr.transition;try{return hr.transition=null,Xt=16,d()}finally{Xt=h,hr.transition=S}},n.discreteUpdates=function(d,h,S,P,L){var M=Xt,W=hr.transition;try{return hr.transition=null,Xt=1,d(h,S,P,L)}finally{Xt=M,hr.transition=W,qt===0&&Cl()}},n.findAllNodes=wm,n.findBoundingRects=function(d,h){if(!ue)throw Error(a(363));h=wm(d,h),d=[];for(var S=0;S<h.length;S++)d.push(We(h[S]));for(h=d.length-1;0<h;h--){S=d[h];for(var P=S.x,L=P+S.width,M=S.y,W=M+S.height,se=h-1;0<=se;se--)if(h!==se){var pe=d[se],je=pe.x,ht=je+pe.width,$t=pe.y,rt=$t+pe.height;if(P>=je&&M>=$t&&L<=ht&&W<=rt){d.splice(h,1);break}else if(P!==je||S.width!==pe.width||rt<M||$t>W){if(!(M!==$t||S.height!==pe.height||ht<P||je>L)){je>P&&(pe.width+=je-P,pe.x=P),ht<L&&(pe.width=L-je),d.splice(h,1);break}}else{$t>M&&(pe.height+=$t-M,pe.y=M),rt<W&&(pe.height=W-$t),d.splice(h,1);break}}}return d},n.findHostInstance=Rm,n.findHostInstanceWithNoPortals=function(d){return d=Y(d),d=d!==null?$(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return Rm(d)},n.flushControlled=function(d){var h=qt;qt|=1;var S=hr.transition,P=Xt;try{hr.transition=null,Xt=1,d()}finally{Xt=P,hr.transition=S,qt=h,qt===0&&(Cl(),Pt())}},n.flushPassiveEffects=Du,n.flushSync=km,n.focusWithin=function(d,h){if(!ue)throw Error(a(363));for(d=o0(d),h=ed(d,h),h=Array.from(h),d=0;d<h.length;){var S=h[d++];if(!Ce(S)){if(S.tag===5&&kt(S.stateNode))return!0;for(S=S.child;S!==null;)h.push(S),S=S.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Xt},n.getFindAllNodesFailureDescription=function(d,h){if(!ue)throw Error(a(363));var S=0,P=[];d=[o0(d),0];for(var L=0;L<d.length;){var M=d[L++],W=d[L++],se=h[W];if((M.tag!==5||!Ce(M))&&(Sm(M,se)&&(P.push(xm(se)),W++,W>S&&(S=W)),W<h.length))for(M=M.child;M!==null;)d.push(M,W),M=M.sibling}if(S<h.length){for(d=[];S<h.length;S++)d.push(xm(h[S]));return`findAllNodes was able to match part of the selector:
`+(P.join(" > ")+`
No matching component was found for:
`)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return J(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:y0,findFiberByHostInstance:d.findFiberByHostInstance||Im,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)d=!0;else{try{mn=h.inject(d),Zt=h}catch(S){}d=!!h.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,h,S,P){if(!ue)throw Error(a(363));d=wm(d,h);var L=Nt(d,S,P).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,h){var S=h._getVersion;S=S(h._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[h,S]:d.mutableSourceEagerHydrationData.push(h,S)},n.runWithPriority=function(d,h){var S=Xt;try{return Xt=d,h()}finally{Xt=S}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,h,S,P){var L=h.current,M=_i(),W=Hr(L);return S=Mm(S),h.context===null?h.context=S:h.pendingContext=S,h=Cs(M,W),h.payload={element:d},P=P===void 0?null:P,P!==null&&(h.callback=P),d=ml(L,h,W),d!==null&&(Bo(d,L,W,M),$p(d,L,W)),W},n};(function(e){e.exports=bNe})(GY);const SNe=Q8(GY.exports);var XP={exports:{}},_p={};/**
* @license React
* react-reconciler-constants.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.
*/_p.ConcurrentRoot=1;_p.ContinuousEventPriority=4;_p.DefaultEventPriority=16;_p.DiscreteEventPriority=1;_p.IdleEventPriority=536870912;_p.LegacyRoot=0;(function(e){e.exports=_p})(XP);const yN={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let bN=!1,SN=!1;const ZP=".react-konva-event",xNe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,wNe=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,CNe={};function iw(e,t,n=CNe){if(!bN&&"zIndex"in t&&(console.warn(wNe),bN=!0),!SN&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(xNe),SN=!0)}for(var o in n)if(!yN[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var f=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!yN[o]){var a=o.slice(0,2)==="on",b=n[o]!==t[o];if(a&&b){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||f&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),xf(e));for(var l in v)e.on(l+ZP,v[l])}function xf(e){if(!gt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const qY={},_Ne={};rp.Node.prototype._applyProps=iw;function kNe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),xf(e)}function ENe(e,t,n){let r=rp[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=rp.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return iw(l,o),l}function PNe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function TNe(e,t,n){return!1}function LNe(e){return e}function ANe(){return null}function ONe(){return null}function MNe(e,t,n,r){return _Ne}function RNe(){}function INe(e){}function DNe(e,t){return!1}function NNe(){return qY}function BNe(){return qY}const $Ne=setTimeout,FNe=clearTimeout,zNe=-1;function jNe(e,t){return!1}const HNe=!1,VNe=!0,UNe=!0;function WNe(e,t){t.parent===e?t.moveToTop():e.add(t),xf(e)}function GNe(e,t){t.parent===e?t.moveToTop():e.add(t),xf(e)}function YY(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),xf(e)}function qNe(e,t,n){YY(e,t,n)}function YNe(e,t){t.destroy(),t.off(ZP),xf(e)}function KNe(e,t){t.destroy(),t.off(ZP),xf(e)}function XNe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function ZNe(e,t,n){}function QNe(e,t,n,r,i){iw(e,i,r)}function JNe(e){e.hide(),xf(e)}function eBe(e){}function tBe(e,t){(t.visible==null||t.visible)&&e.show()}function nBe(e,t){}function rBe(e){}function iBe(){}const oBe=()=>XP.exports.DefaultEventPriority,aBe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:kNe,createInstance:ENe,createTextInstance:PNe,finalizeInitialChildren:TNe,getPublicInstance:LNe,prepareForCommit:ANe,preparePortalMount:ONe,prepareUpdate:MNe,resetAfterCommit:RNe,resetTextContent:INe,shouldDeprioritizeSubtree:DNe,getRootHostContext:NNe,getChildHostContext:BNe,scheduleTimeout:$Ne,cancelTimeout:FNe,noTimeout:zNe,shouldSetTextContent:jNe,isPrimaryRenderer:HNe,warnsIfNotActing:VNe,supportsMutation:UNe,appendChild:WNe,appendChildToContainer:GNe,insertBefore:YY,insertInContainerBefore:qNe,removeChild:YNe,removeChildFromContainer:KNe,commitTextUpdate:XNe,commitMount:ZNe,commitUpdate:QNe,hideInstance:JNe,hideTextInstance:eBe,unhideInstance:tBe,unhideTextInstance:nBe,clearContainer:rBe,detachDeletedInstance:iBe,getCurrentEventPriority:oBe,now:fg.exports.unstable_now,idlePriority:fg.exports.unstable_IdlePriority,run:fg.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var sBe=Object.defineProperty,lBe=Object.defineProperties,uBe=Object.getOwnPropertyDescriptors,xN=Object.getOwnPropertySymbols,cBe=Object.prototype.hasOwnProperty,dBe=Object.prototype.propertyIsEnumerable,wN=(e,t,n)=>t in e?sBe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CN=(e,t)=>{for(var n in t||(t={}))cBe.call(t,n)&&wN(e,n,t[n]);if(xN)for(var n of xN(t))dBe.call(t,n)&&wN(e,n,t[n]);return e},fBe=(e,t)=>lBe(e,uBe(t));function QP(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=QP(r,t,n);if(i)return i;r=t?null:r.sibling}}function KY(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch(t){return e}}const JP=KY(C.exports.createContext(null));class XY extends C.exports.Component{render(){return y(JP.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:hBe,ReactCurrentDispatcher:pBe}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function gBe(){const e=C.exports.useContext(JP);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=hBe.current)!=null?r:QP(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const fv=[],_N=new WeakMap;function mBe(){var e;const t=gBe();fv.splice(0,fv.length),QP(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==JP&&fv.push(KY(i))});for(const n of fv){const r=(e=pBe.current)==null?void 0:e.readContext(n);_N.set(n,r)}return C.exports.useMemo(()=>fv.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,fBe(CN({},i),{value:_N.get(r)}))),n=>y(XY,{...CN({},n)})),[])}function vBe(e){const t=oe.useRef();return oe.useLayoutEffect(()=>{t.current=e}),t.current}const yBe=e=>{const t=oe.useRef(),n=oe.useRef(),r=oe.useRef(),i=vBe(e),o=mBe(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return oe.useLayoutEffect(()=>(n.current=new rp.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Ov.createContainer(n.current,XP.exports.LegacyRoot,!1,null),Ov.updateContainer(y(o,{children:e.children}),r.current),()=>{!rp.isBrowser||(a(null),Ov.updateContainer(null,r.current,null),n.current.destroy())}),[]),oe.useLayoutEffect(()=>{a(n.current),iw(n.current,e,i),Ov.updateContainer(y(o,{children:e.children}),r.current,null)}),y("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},hv="Layer",fc="Group",hc="Rect",hh="Circle",tS="Line",ZY="Image",bBe="Transformer",Ov=SNe(aBe);Ov.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:oe.version,rendererPackageName:"react-konva"});const SBe=oe.forwardRef((e,t)=>y(XY,{children:y(yBe,{...e,forwardedRef:t})})),xBe=lt([rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:He.isEqual}}),wBe=e=>{const{...t}=e,{objects:n}=ve(xBe);return y(fc,{listening:!1,...t,children:n.filter(WE).map((r,i)=>y(tS,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},Wh=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},CBe=lt(rn,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:f,stageScale:p,stageDimensions:m,boundingBoxCoordinates:v,boundingBoxDimensions:b,shouldRestrictStrokesToBox:x}=e,E=x?{clipX:v.x,clipY:v.y,clipWidth:b.width,clipHeight:b.height}:{};return{cursorPosition:t,brushX:t?t.x:m.width/2,brushY:t?t.y:m.height/2,radius:n/2,colorPickerOuterRadius:uI/p,colorPickerInnerRadius:(uI-r8+1)/p,maskColorString:Wh({...i,a:.5}),brushColorString:Wh(o),colorPickerColorString:Wh(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||f||!t)&&l,strokeWidth:1.5/p,dotRadius:1.5/p,clip:E}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),_Be=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:f,brushColorString:p,colorPickerColorString:m,colorPickerInnerRadius:v,colorPickerOuterRadius:b,clip:x}=ve(CBe);return l?K(fc,{listening:!1,...x,...t,children:[a==="colorPicker"?K(fn,{children:[y(hh,{x:n,y:r,radius:b,stroke:p,strokeWidth:r8,strokeScaleEnabled:!1}),y(hh,{x:n,y:r,radius:v,stroke:m,strokeWidth:r8,strokeScaleEnabled:!1})]}):K(fn,{children:[y(hh,{x:n,y:r,radius:i,fill:s==="mask"?o:p,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),y(hh,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:f*2,strokeEnabled:!0,listening:!1}),y(hh,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:f,strokeEnabled:!0,listening:!1})]}),y(hh,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),y(hh,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},kBe=lt(rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:o,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:a,isTransformingBoundingBox:o,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),EBe=e=>{const{...t}=e,n=Be(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:f,hitStrokeWidth:p}=ve(kBe),m=C.exports.useRef(null),v=C.exports.useRef(null),[b,x]=C.exports.useState(!1);C.exports.useEffect(()=>{var te;!m.current||!v.current||(m.current.nodes([v.current]),(te=m.current.getLayer())==null||te.batchDraw())},[]);const E=64*l,k=C.exports.useCallback(te=>{if(!u){n(fC({x:Math.floor(te.target.x()),y:Math.floor(te.target.y())}));return}const G=te.target.x(),$=te.target.y(),V=Xl(G,64),J=Xl($,64);te.target.x(V),te.target.y(J),n(fC({x:V,y:J}))},[n,u]),_=C.exports.useCallback(()=>{if(!v.current)return;const te=v.current,G=te.scaleX(),$=te.scaleY(),V=Math.round(te.width()*G),J=Math.round(te.height()*$),Z=Math.round(te.x()),U=Math.round(te.y());n(_v({width:V,height:J})),n(fC({x:u?Od(Z,64):Z,y:u?Od(U,64):U})),te.scaleX(1),te.scaleY(1)},[n,u]),T=C.exports.useCallback((te,G,$)=>{const V=te.x%E,J=te.y%E;return{x:Od(G.x,E)+V,y:Od(G.y,E)+J}},[E]),A=()=>{n(pC(!0))},R=()=>{n(pC(!1)),n(hC(!1)),n(Sb(!1)),x(!1)},I=()=>{n(hC(!0))},D=()=>{n(pC(!1)),n(hC(!1)),n(Sb(!1)),x(!1)},B=()=>{x(!0)},z=()=>{!s&&!a&&x(!1)},j=()=>{n(Sb(!0))},Y=()=>{n(Sb(!1))};return K(fc,{...t,children:[y(hc,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:j,onMouseOver:j,onMouseLeave:Y,onMouseOut:Y}),y(hc,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:p,listening:!o&&f==="move",onDragStart:I,onDragEnd:D,onDragMove:k,onMouseDown:I,onMouseOut:z,onMouseOver:B,onMouseEnter:B,onMouseUp:D,onTransform:_,onTransformEnd:R,ref:v,stroke:b?"rgba(255,255,255,0.7)":"white",strokeWidth:(b?8:1)/l,width:i.width,x:r.x,y:r.y}),y(bBe,{anchorCornerRadius:3,anchorDragBoundFunc:T,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:f==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&f==="move",onDragStart:I,onDragEnd:D,onMouseDown:A,onMouseUp:R,onTransformEnd:R,ref:m,rotateEnabled:!1})]})},PBe=lt([rn,_r,kr],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),TBe=()=>{const e=Be(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:o,shouldSnapToGrid:a}=ve(PBe),s=C.exports.useRef(null),l=bG(),u=()=>e(GE());Ze(["shift+c"],()=>{u()},{enabled:()=>!i,preventDefault:!0},[]);const f=()=>e(Oy(!o));Ze(["h"],()=>{f()},{enabled:()=>!i,preventDefault:!0},[o]),Ze(["n"],()=>{e(W5(!a))},{enabled:!0,preventDefault:!0},[a]),Ze("esc",()=>{e(Nwe())},{enabled:()=>!0,preventDefault:!0}),Ze("shift+h",()=>{e(Vwe(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),Ze(["space"],p=>{p.repeat||(l==null||l.container().focus(),r!=="move"&&(s.current=r,e(iu("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(iu(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},LBe=lt(rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:Wh(t)}}),kN=e=>`data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),ABe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ve(LBe),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),f=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=kN(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=kN(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!gi.exports.isNumber(r.x)||!gi.exports.isNumber(r.y)||!gi.exports.isNumber(o)||!gi.exports.isNumber(i.width)||!gi.exports.isNumber(i.height)?null:y(hc,{ref:f,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:gi.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},OBe=lt([rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),MBe=e=>{const t=Be(),{isMoveStageKeyHeld:n,stageScale:r}=ve(OBe);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=He.clamp(r*vwe**s,ywe,bwe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Gwe(l)),t(SW(u))},[e,n,r,t])},eT=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},QY=()=>{const e=Be(),t=tl(),n=bG();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=F0.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(zwe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(Lwe())}}},RBe=lt([_r,rn,kr],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),IBe=e=>{const t=Be(),{tool:n,isStaging:r}=ve(RBe),{commitColorUnderCursor:i}=QY();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(V5(!0));return}if(n==="colorPicker"){i();return}const a=eT(e.current);!a||(o.evt.preventDefault(),t(dW(!0)),t(Twe([a.x,a.y])))},[e,n,r,t,i])},DBe=lt([_r,rn,kr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),NBe=(e,t)=>{const n=Be(),{tool:r,isDrawing:i,isStaging:o}=ve(DBe);return C.exports.useCallback(()=>{if(r==="move"||o){n(V5(!1));return}if(!t.current&&i&&e.current){const a=eT(e.current);if(!a)return;n(lW([a.x,a.y]))}else t.current=!1;n(dW(!1))},[t,n,i,o,e,r])},BBe=lt([_r,rn,kr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),$Be=(e,t,n)=>{const r=Be(),{isDrawing:i,tool:o,isStaging:a}=ve(BBe),{updateColorUnderCursor:s}=QY();return C.exports.useCallback(()=>{if(!e.current)return;const l=eT(e.current);if(!!l){if(r(jwe(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(lW([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},FBe=()=>{const e=Be();return C.exports.useCallback(()=>{e(Mwe())},[e])},zBe=lt([rn,kr],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),jBe=()=>{const e=Be(),{tool:t,isStaging:n,isMovingBoundingBox:r}=ve(zBe);return{handleDragStart:C.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(V5(!0))},[e,r,n,t]),handleDragMove:C.exports.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(SW(o))},[e,r,n,t]),handleDragEnd:C.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(V5(!1))},[e,r,n,t])}};var ph=C.exports,HBe=function(t,n,r){const i=ph.useRef("loading"),o=ph.useRef(),[a,s]=ph.useState(0),l=ph.useRef(),u=ph.useRef(),f=ph.useRef();return(l.current!==t||u.current!==n||f.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,f.current=r),ph.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const JY=e=>{const{url:t,x:n,y:r}=e,[i]=HBe(t);return y(ZY,{x:n,y:r,image:i,listening:!1})},VBe=lt([rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),UBe=()=>{const{objects:e}=ve(VBe);return e?y(fc,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(H5(t))return y(JY,{x:t.x,y:t.y,url:t.image.url},n);if(wwe(t)){const r=y(tS,{points:t.points,stroke:t.color?Wh(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?y(fc,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(Cwe(t))return y(hc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Wh(t.color)},n);if(_we(t))return y(hc,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},WBe=lt([rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),GBe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},qBe=()=>{const{colorMode:e}=uy(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ve(WBe),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=GBe[e],{width:l,height:u}=r,{x:f,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(f),y:a(p)}},v={x:Math.ceil(a(f)/64)*64,y:Math.ceil(a(p)/64)*64},b={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,b.x1),y1:Math.min(m.y1,b.y1),x2:Math.max(m.x2,b.x2),y2:Math.max(m.y2,b.y2)},k=E.x2-E.x1,_=E.y2-E.y1,T=Math.round(k/64)+1,A=Math.round(_/64)+1,R=He.range(0,T).map(D=>y(tS,{x:E.x1+D*64,y:E.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${D}`)),I=He.range(0,A).map(D=>y(tS,{x:E.x1,y:E.y1+D*64,points:[0,0,k,0],stroke:s,strokeWidth:1},`y_${D}`));o(R.concat(I))},[t,n,r,e,a]),y(fc,{children:i})},YBe=lt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:He.isEqual}}),KBe=e=>{const{...t}=e,n=ve(YBe),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?y(ZY,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},dg=e=>Math.round(e*100)/100,XBe=lt([rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${dg(n)}, ${dg(r)})`}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function ZBe(){const{cursorCoordinatesString:e}=ve(XBe),{t}=Ke();return y("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const QBe=lt([rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:f},stageScale:p,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:b}=e;let x="inherit";return(b==="none"&&(o<512||a<512)||b==="manual"&&s*l<512*512)&&(x="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:x,boundingBoxCoordinatesString:`(${dg(u)}, ${dg(f)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${dg(r)}\xD7${dg(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(p*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:b!=="auto",shouldShowScaledBoundingBox:b!=="none"}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),JBe=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:f,shouldShowBoundingBox:p}=ve(QBe),{t:m}=Ke();return K("div",{className:"canvas-status-text",children:[y("div",{style:{color:e},children:`${m("unifiedcanvas:activeLayer")}: ${t}`}),y("div",{children:`${m("unifiedcanvas:canvasScale")}: ${u}%`}),p&&y("div",{style:{color:n},children:`${m("unifiedcanvas:boundingBox")}: ${i}`}),a&&y("div",{style:{color:n},children:`${m("unifiedcanvas:scaledBoundingBox")}: ${o}`}),f&&K(fn,{children:[y("div",{children:`${m("unifiedcanvas:boundingBoxPosition")}: ${r}`}),y("div",{children:`${m("unifiedcanvas:canvasDimensions")}: ${l}`}),y("div",{children:`${m("unifiedcanvas:canvasPosition")}: ${s}`}),y(ZBe,{})]})]})},e$e=lt([rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:o,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),t$e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=ve(e$e);return K(fc,{...t,children:[r&&n&&y(JY,{url:n.image.url,x:o,y:a}),i&&K(fc,{children:[y(hc,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),y(hc,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},n$e=lt([rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),r$e=()=>{const e=Be(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ve(n$e),{t:o}=Ke(),a=C.exports.useCallback(()=>{e(fI(!0))},[e]),s=C.exports.useCallback(()=>{e(fI(!1))},[e]);Ze(["left"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),Ze(["right"],()=>{u()},{enabled:()=>!0,preventDefault:!0}),Ze(["enter"],()=>{f()},{enabled:()=>!0,preventDefault:!0});const l=()=>e(Iwe()),u=()=>e(Rwe()),f=()=>e(Awe());return r?y(at,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:a,onMouseOut:s,children:K(io,{isAttached:!0,children:[y(Qe,{tooltip:`${o("unifiedcanvas:previous")} (Left)`,"aria-label":`${o("unifiedcanvas:previous")} (Left)`,icon:y(w8e,{}),onClick:l,"data-selected":!0,isDisabled:t}),y(Qe,{tooltip:`${o("unifiedcanvas:next")} (Right)`,"aria-label":`${o("unifiedcanvas:next")} (Right)`,icon:y(C8e,{}),onClick:u,"data-selected":!0,isDisabled:n}),y(Qe,{tooltip:`${o("unifiedcanvas:accept")} (Enter)`,"aria-label":`${o("unifiedcanvas:accept")} (Enter)`,icon:y(aP,{}),onClick:f,"data-selected":!0}),y(Qe,{tooltip:o("unifiedcanvas:showHide"),"aria-label":o("unifiedcanvas:showHide"),"data-alert":!i,icon:i?y(A8e,{}):y(L8e,{}),onClick:()=>e(Uwe(!i)),"data-selected":!0}),y(Qe,{tooltip:o("unifiedcanvas:saveToGallery"),"aria-label":o("unifiedcanvas:saveToGallery"),icon:y(lP,{}),onClick:()=>e(Q6e(r.image.url)),"data-selected":!0}),y(Qe,{tooltip:o("unifiedcanvas:discardAll"),"aria-label":o("unifiedcanvas:discardAll"),icon:y(Iy,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(Owe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},i$e=lt(rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),o$e=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ve(i$e);return K(fc,{children:[y(hc,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),y(hc,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},a$e=lt([rn,kr],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:f,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v,shouldRestrictStrokesToBox:b}=e;let x="none";return f==="move"||t?p?x="grabbing":x="grab":o?x=void 0:b&&!a&&(x="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:x,stageDimensions:l,stageScale:r,tool:f,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),eK=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:f}=ve(a$e);TBe();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(z=>{S9e(z),p.current=z},[]),b=C.exports.useCallback(z=>{b9e(z),m.current=z},[]),x=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),k=MBe(p),_=IBe(p),T=NBe(p,E),A=$Be(p,E,x),R=FBe(),{handleDragStart:I,handleDragMove:D,handleDragEnd:B}=jBe();return y("div",{className:"inpainting-canvas-container",children:K("div",{className:"inpainting-canvas-wrapper",children:[K(SBe,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:_,onTouchMove:A,onTouchEnd:T,onMouseDown:_,onMouseLeave:R,onMouseMove:A,onMouseUp:T,onDragStart:I,onDragMove:D,onDragEnd:B,onContextMenu:z=>z.evt.preventDefault(),onWheel:k,draggable:(l==="move"||u)&&!t,children:[y(hv,{id:"grid",visible:r,children:y(qBe,{})}),y(hv,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:y(UBe,{})}),K(hv,{id:"mask",visible:e,listening:!1,children:[y(wBe,{visible:!0,listening:!1}),y(ABe,{listening:!1})]}),y(hv,{children:y(o$e,{})}),K(hv,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&y(_Be,{visible:l!=="move",listening:!1}),y(t$e,{visible:u}),f&&y(KBe,{}),y(EBe,{visible:n&&!u})]})]}),y(JBe,{}),y(r$e,{})]})})},s$e=lt([rn,_r,al],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function tK(){const e=Be(),{t}=Ke(),{canUndo:n,activeTabName:r}=ve(s$e),i=()=>{e(qwe())};return Ze(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),y(Qe,{"aria-label":`${t("unifiedcanvas:undo")} (Ctrl+Z)`,tooltip:`${t("unifiedcanvas:undo")} (Ctrl+Z)`,icon:y(W8e,{}),onClick:i,isDisabled:!n})}const l$e=lt([rn,_r,al],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function nK(){const e=Be(),{canRedo:t,activeTabName:n}=ve(l$e),{t:r}=Ke(),i=()=>{e(Dwe())};return Ze(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),y(Qe,{"aria-label":`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,icon:y(j8e,{}),onClick:i,isDisabled:!t})}const rK=()=>{const e=ve(kr),t=Be(),{t:n}=Ke(),r=()=>{t(J6e()),t(qE()),t(uW())};return K(CP,{title:n("unifiedcanvas:emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedcanvas:emptyFolder"),triggerComponent:y(qr,{leftIcon:y(yp,{}),size:"sm",isDisabled:e,children:n("unifiedcanvas:emptyTempImageFolder")}),children:[y("p",{children:n("unifiedcanvas:emptyTempImagesFolderMessage")}),y("br",{}),y("p",{children:n("unifiedcanvas:emptyTempImagesFolderConfirm")})]})},iK=()=>{const e=ve(kr),t=Be(),{t:n}=Ke();return K(CP,{title:n("unifiedcanvas:clearCanvasHistory"),acceptCallback:()=>t(uW()),acceptButtonText:n("unifiedcanvas:clearHistory"),triggerComponent:y(qr,{size:"sm",leftIcon:y(yp,{}),isDisabled:e,children:n("unifiedcanvas:clearCanvasHistory")}),children:[y("p",{children:n("unifiedcanvas:clearCanvasHistoryMessage")}),y("br",{}),y("p",{children:n("unifiedcanvas:clearCanvasHistoryConfirm")})]})},u$e=lt([rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),c$e=()=>{const e=Be(),{t}=Ke(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:o,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:u}=ve(u$e);Ze(["n"],()=>{e(W5(!l))},{enabled:!0,preventDefault:!0},[l]);const f=p=>e(W5(p.target.checked));return y(Js,{trigger:"hover",triggerComponent:y(Qe,{tooltip:t("unifiedcanvas:canvasSettings"),"aria-label":t("unifiedcanvas:canvasSettings"),icon:y(cP,{})}),children:K(at,{direction:"column",gap:"0.5rem",children:[y(Qn,{label:t("unifiedcanvas:showIntermediates"),isChecked:s,onChange:p=>e(bW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:showGrid"),isChecked:a,onChange:p=>e(yW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:snapToGrid"),isChecked:l,onChange:f}),y(Qn,{label:t("unifiedcanvas:darkenOutsideSelection"),isChecked:i,onChange:p=>e(gW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:p=>e(hW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:p=>e(pW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:limitStrokesToBox"),isChecked:u,onChange:p=>e(xW(p.target.checked))}),y(Qn,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:o,onChange:p=>e(vW(p.target.checked))}),y(iK,{}),y(rK,{})]})})};function ow(){return(ow=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}).apply(this,arguments)}function oK(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function U8(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var l1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},u2=function(e){return"touches"in e},W8=function(e){return e&&e.ownerDocument.defaultView||self},EN=function(e,t,n){var r=e.getBoundingClientRect(),i=u2(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:l1((i.pageX-(r.left+W8(e).pageXOffset))/r.width),top:l1((i.pageY-(r.top+W8(e).pageYOffset))/r.height)}},PN=function(e){!u2(e)&&e.preventDefault()},tT=oe.memo(function(e){var t=e.onMove,n=e.onKey,r=oK(e,["onMove","onKey"]),i=C.exports.useRef(null),o=U8(t),a=U8(n),s=C.exports.useRef(null),l=C.exports.useRef(!1),u=C.exports.useMemo(function(){var v=function(E){PN(E),(u2(E)?E.touches.length>0:E.buttons>0)&&i.current?o(EN(i.current,E,s.current)):x(!1)},b=function(){return x(!1)};function x(E){var k=l.current,_=W8(i.current),T=E?_.addEventListener:_.removeEventListener;T(k?"touchmove":"mousemove",v),T(k?"touchend":"mouseup",b)}return[function(E){var k=E.nativeEvent,_=i.current;if(_&&(PN(k),!function(A,R){return R&&!u2(A)}(k,l.current)&&_)){if(u2(k)){l.current=!0;var T=k.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(EN(_,k,s.current)),x(!0)}},function(E){var k=E.which||E.keyCode;k<37||k>40||(E.preventDefault(),a({left:k===39?.05:k===37?-.05:0,top:k===40?.05:k===38?-.05:0}))},x]},[a,o]),f=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),y("div",{...ow({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),aw=function(e){return e.filter(Boolean).join(" ")},nT=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=aw(["react-colorful__pointer",e.className]);return y("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:y("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},Co=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},aK=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Co(e.h),s:Co(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Co(i/2),a:Co(r,2)}},G8=function(e){var t=aK(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},FC=function(e){var t=aK(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},d$e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:Co(255*[r,s,a,a,l,r][u]),g:Co(255*[l,r,r,s,a,a][u]),b:Co(255*[a,a,l,r,r,s][u]),a:Co(i,2)}},f$e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Co(60*(s<0?s+6:s)),s:Co(o?a/o*100:0),v:Co(o/255*100),a:i}},h$e=oe.memo(function(e){var t=e.hue,n=e.onChange,r=aw(["react-colorful__hue",e.className]);return oe.createElement("div",{className:r},oe.createElement(tT,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:l1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Co(t),"aria-valuemax":"360","aria-valuemin":"0"},oe.createElement(nT,{className:"react-colorful__hue-pointer",left:t/360,color:G8({h:t,s:100,v:100,a:1})})))}),p$e=oe.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G8({h:t.h,s:100,v:100,a:1})};return oe.createElement("div",{className:"react-colorful__saturation",style:r},oe.createElement(tT,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:l1(t.s+100*i.left,0,100),v:l1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Co(t.s)+"%, Brightness "+Co(t.v)+"%"},oe.createElement(nT,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G8(t)})))}),sK=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function g$e(e,t,n){var r=U8(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;sK(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(f){return Object.assign({},f,u)})},[]);return[o,l]}var m$e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,v$e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},TN=new Map,y$e=function(e){m$e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!TN.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,TN.set(t,n);var r=v$e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},b$e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+FC(Object.assign({},n,{a:0}))+", "+FC(Object.assign({},n,{a:1}))+")"},o=aw(["react-colorful__alpha",t]),a=Co(100*n.a);return oe.createElement("div",{className:o},y("div",{className:"react-colorful__alpha-gradient",style:i}),oe.createElement(tT,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:l1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},oe.createElement(nT,{className:"react-colorful__alpha-pointer",left:n.a,color:FC(n)})))},S$e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=oK(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);y$e(s);var l=g$e(n,i,o),u=l[0],f=l[1],p=aw(["react-colorful",t]);return oe.createElement("div",ow({},a,{ref:s,className:p}),y(p$e,{hsva:u,onChange:f}),y(h$e,{hue:u.h,onChange:f}),oe.createElement(b$e,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},x$e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:f$e,fromHsva:d$e,equal:sK},w$e=function(e){return oe.createElement(S$e,ow({},e,{colorModel:x$e}))};const nS=e=>{const{styleClass:t,...n}=e;return y(w$e,{className:`invokeai__color-picker ${t}`,...n})},C$e=lt([rn,kr],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:Wh(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),_$e=()=>{const e=Be(),{t}=Ke(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:a}=ve(C$e);Ze(["q"],()=>{s()},{enabled:()=>!a,preventDefault:!0},[n]),Ze(["shift+c"],()=>{l()},{enabled:()=>!a,preventDefault:!0},[]),Ze(["h"],()=>{u()},{enabled:()=>!a,preventDefault:!0},[i]);const s=()=>{e(U5(n==="mask"?"base":"mask"))},l=()=>e(GE()),u=()=>e(Oy(!i));return y(Js,{trigger:"hover",triggerComponent:y(io,{children:y(Qe,{"aria-label":t("unifiedcanvas:maskingOptions"),tooltip:t("unifiedcanvas:maskingOptions"),icon:y(D8e,{}),style:n==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:K(at,{direction:"column",gap:"0.5rem",children:[y(Qn,{label:`${t("unifiedcanvas:enableMask")} (H)`,isChecked:i,onChange:u}),y(Qn,{label:t("unifiedcanvas:preserveMaskedArea"),isChecked:o,onChange:f=>e(mW(f.target.checked))}),y(nS,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:f=>e(fW(f))}),K(qr,{size:"sm",leftIcon:y(yp,{}),onClick:l,children:[t("unifiedcanvas:clearMask")," (Shift+C)"]})]})})},k$e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),f=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(f);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},E$e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},P$e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},T$e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Rd=(e=T$e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(gwe("Exporting Image")),t(sg(!1));const u=n(),{stageScale:f,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=tl();if(!b){t(Ws(!1)),t(sg(!0));return}const{dataURL:x,boundingBox:E}=k$e(b,f,v,i?{...p,...m}:void 0);if(!x){t(Ws(!1)),t(sg(!0));return}const k=new FormData;k.append("data",JSON.stringify({dataURL:x,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:k})).json(),{url:A,width:R,height:I}=T,D={uuid:lg(),category:o?"result":"user",...T};a&&(E$e(A),t(Rh({title:Ht.t("toast:downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(P$e(A,R,I),t(Rh({title:Ht.t("toast:imageCopied"),status:"success",duration:2500,isClosable:!0}))),o&&(t(ag({image:D,category:"result"})),t(Rh({title:Ht.t("toast:imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(Hwe({kind:"image",layer:"base",...E,image:D})),t(Rh({title:Ht.t("toast:canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(Ws(!1)),t(_4(Ht.t("common:statusConnected"))),t(sg(!0))},L$e=lt([rn,kr,al],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),A$e=()=>{const e=Be(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=ve(L$e),{t:o}=Ke();Ze(["b"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[]),Ze(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),Ze(["c"],()=>{l()},{enabled:()=>!i,preventDefault:!0},[t]),Ze(["shift+f"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),Ze(["delete","backspace"],()=>{f()},{enabled:()=>!i,preventDefault:!0}),Ze(["BracketLeft"],()=>{e(Bg(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),Ze(["BracketRight"],()=>{e(Bg(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),Ze(["shift+BracketLeft"],()=>{e(Ng({...n,a:He.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),Ze(["shift+BracketRight"],()=>{e(Ng({...n,a:He.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const a=()=>e(iu("brush")),s=()=>e(iu("eraser")),l=()=>e(iu("colorPicker")),u=()=>e(sW()),f=()=>e(aW());return K(io,{isAttached:!0,children:[y(Qe,{"aria-label":`${o("unifiedcanvas:brush")} (B)`,tooltip:`${o("unifiedcanvas:brush")} (B)`,icon:y(UG,{}),"data-selected":t==="brush"&&!i,onClick:a,isDisabled:i}),y(Qe,{"aria-label":`${o("unifiedcanvas:eraser")} (E)`,tooltip:`${o("unifiedcanvas:eraser")} (E)`,icon:y(zG,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:s}),y(Qe,{"aria-label":`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:y(HG,{}),isDisabled:i,onClick:u}),y(Qe,{"aria-label":`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:y(Iy,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:f}),y(Qe,{"aria-label":`${o("unifiedcanvas:colorPicker")} (C)`,tooltip:`${o("unifiedcanvas:colorPicker")} (C)`,icon:y(jG,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:l}),y(Js,{trigger:"hover",triggerComponent:y(Qe,{"aria-label":o("unifiedcanvas:brushOptions"),tooltip:o("unifiedcanvas:brushOptions"),icon:y(uP,{})}),children:K(at,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[y(at,{gap:"1rem",justifyContent:"space-between",children:y(Zo,{label:o("unifiedcanvas:brushSize"),value:r,withInput:!0,onChange:p=>e(Bg(p)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),y(nS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:p=>e(Ng(p))})]})})]})};let LN;const rT=()=>({setOpenUploader:e=>{e&&(LN=e)},openUploader:LN}),O$e=lt([al,rn,kr],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),M$e=()=>{const e=Be(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=ve(O$e),s=tl(),{t:l}=Ke(),{openUploader:u}=rT();Ze(["v"],()=>{f()},{enabled:()=>!n,preventDefault:!0},[]),Ze(["r"],()=>{p()},{enabled:()=>!0,preventDefault:!0},[s]),Ze(["shift+m"],()=>{v()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ze(["shift+s"],()=>{b()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ze(["meta+c","ctrl+c"],()=>{x()},{enabled:()=>!n,preventDefault:!0},[s,t]),Ze(["shift+d"],()=>{E()},{enabled:()=>!n,preventDefault:!0},[s,t]);const f=()=>e(iu("move")),p=()=>{const _=tl();if(!_)return;const T=_.getClientRect({skipTransform:!0});e(cW({contentRect:T}))},m=()=>{e(qE()),e(bx())},v=()=>{e(Rd({cropVisible:!1,shouldSetAsInitialImage:!0}))},b=()=>{e(Rd({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},x=()=>{e(Rd({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},E=()=>{e(Rd({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))},k=_=>{const T=_.target.value;e(U5(T)),T==="mask"&&!r&&e(Oy(!0))};return K("div",{className:"inpainting-settings",children:[y(nl,{tooltip:`${l("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:iW,onChange:k,isDisabled:n}),y(_$e,{}),y(A$e,{}),K(io,{isAttached:!0,children:[y(Qe,{"aria-label":`${l("unifiedcanvas:move")} (V)`,tooltip:`${l("unifiedcanvas:move")} (V)`,icon:y(BG,{}),"data-selected":o==="move"||n,onClick:f}),y(Qe,{"aria-label":`${l("unifiedcanvas:resetView")} (R)`,tooltip:`${l("unifiedcanvas:resetView")} (R)`,icon:y(FG,{}),onClick:p})]}),K(io,{isAttached:!0,children:[y(Qe,{"aria-label":`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:y(VG,{}),onClick:v,isDisabled:n}),y(Qe,{"aria-label":`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:y(lP,{}),onClick:b,isDisabled:n}),y(Qe,{"aria-label":`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:y(Ry,{}),onClick:x,isDisabled:n}),y(Qe,{"aria-label":`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:y(sP,{}),onClick:E,isDisabled:n})]}),K(io,{isAttached:!0,children:[y(tK,{}),y(nK,{})]}),K(io,{isAttached:!0,children:[y(Qe,{"aria-label":`${l("common:upload")}`,tooltip:`${l("common:upload")}`,icon:y(Nx,{}),onClick:u,isDisabled:n}),y(Qe,{"aria-label":`${l("unifiedcanvas:clearCanvas")}`,tooltip:`${l("unifiedcanvas:clearCanvas")}`,icon:y(yp,{}),onClick:m,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),y(io,{isAttached:!0,children:y(c$e,{})})]})},R$e=lt([rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),I$e=()=>{const e=Be(),{doesCanvasNeedScaling:t}=ve(R$e);return C.exports.useLayoutEffect(()=>{e(vi(!0));const n=He.debounce(()=>{e(vi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),y("div",{className:"workarea-single-view",children:y("div",{className:"workarea-split-view-left",children:K("div",{className:"inpainting-main-area",children:[y(M$e,{}),y("div",{className:"inpainting-canvas-area",children:t?y(WY,{}):y(eK,{})})]})})})},D$e=lt([rn,kr],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function N$e(){const e=Be(),{t}=Ke(),{layer:n,isMaskEnabled:r,isStaging:i}=ve(D$e),o=()=>{e(U5(n==="mask"?"base":"mask"))};Ze(["q"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[n]);const a=s=>{const l=s.target.value;e(U5(l)),l==="mask"&&!r&&e(Oy(!0))};return y(nl,{tooltip:`${t("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:iW,onChange:a,isDisabled:i})}const B$e=lt([rn,kr,al],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),$$e=()=>{const e=Be(),{t}=Ke(),{tool:n,isStaging:r}=ve(B$e);Ze(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),Ze(["e"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),Ze(["c"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),Ze(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),Ze(["delete","backspace"],()=>{l()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(iu("brush")),o=()=>e(iu("eraser")),a=()=>e(iu("colorPicker")),s=()=>e(sW()),l=()=>e(aW());return K(at,{flexDirection:"column",gap:"0.5rem",children:[K(io,{children:[y(Qe,{"aria-label":`${t("unifiedcanvas:brush")} (B)`,tooltip:`${t("unifiedcanvas:brush")} (B)`,icon:y(UG,{}),"data-selected":n==="brush"&&!r,onClick:i,isDisabled:r}),y(Qe,{"aria-label":`${t("unifiedcanvas:eraser")} (E)`,tooltip:`${t("unifiedcanvas:eraser")} (B)`,icon:y(zG,{}),"data-selected":n==="eraser"&&!r,isDisabled:r,onClick:o})]}),K(io,{children:[y(Qe,{"aria-label":`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:y(HG,{}),isDisabled:r,onClick:s}),y(Qe,{"aria-label":`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:y(Iy,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),y(Qe,{"aria-label":`${t("unifiedcanvas:colorPicker")} (C)`,tooltip:`${t("unifiedcanvas:colorPicker")} (C)`,icon:y(jG,{}),"data-selected":n==="colorPicker"&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},F$e=lt([rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),z$e=()=>{const e=Be(),{t}=Ke(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:o}=ve(F$e);return y(Js,{trigger:"hover",triggerComponent:y(Qe,{tooltip:t("unifiedcanvas:canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedcanvas:canvasSettings"),icon:y(cP,{})}),children:K(at,{direction:"column",gap:"0.5rem",children:[y(Qn,{label:t("unifiedcanvas:showIntermediates"),isChecked:o,onChange:a=>e(bW(a.target.checked))}),y(Qn,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:a=>e(hW(a.target.checked))}),y(Qn,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:a=>e(pW(a.target.checked))}),y(Qn,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:i,onChange:a=>e(vW(a.target.checked))}),y(iK,{}),y(rK,{})]})})};function j$e(){const e=ve(o=>o.canvas.tool),t=ve(kr),n=Be(),{t:r}=Ke();Ze(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(iu("move"));return y(Qe,{"aria-label":`${r("unifiedcanvas:move")} (V)`,tooltip:`${r("unifiedcanvas:move")} (V)`,icon:y(BG,{}),"data-selected":e==="move"||t,onClick:i})}function H$e(){const e=tl(),t=Be(),{t:n}=Ke();Ze(["r"],()=>{r()},{enabled:()=>!0,preventDefault:!0},[e]);const r=()=>{const i=tl();if(!i)return;const o=i.getClientRect({skipTransform:!0});t(cW({contentRect:o}))};return y(Qe,{"aria-label":`${n("unifiedcanvas:resetView")} (R)`,tooltip:`${n("unifiedcanvas:resetView")} (R)`,icon:y(FG,{}),onClick:r})}function V$e(){const e=Be(),{t}=Ke(),n=tl(),r=ve(kr),i=ve(a=>a.system.isProcessing);Ze(["shift+m"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(Rd({cropVisible:!1,shouldSetAsInitialImage:!0}))};return y(Qe,{"aria-label":`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:y(VG,{}),onClick:o,isDisabled:r})}function U$e(){const e=ve(kr),t=tl(),n=ve(s=>s.system.isProcessing),r=ve(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Be(),{t:o}=Ke();Ze(["shift+s"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Rd({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return y(Qe,{"aria-label":`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:y(lP,{}),onClick:a,isDisabled:e})}function W$e(){const e=ve(kr),t=tl(),n=ve(s=>s.system.isProcessing),r=ve(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Be(),{t:o}=Ke();Ze(["meta+c","ctrl+c"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(Rd({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return y(Qe,{"aria-label":`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:y(Ry,{}),onClick:a,isDisabled:e})}function G$e(){const e=Be(),{t}=Ke(),n=tl(),r=ve(kr),i=ve(s=>s.system.isProcessing),o=ve(s=>s.canvas.shouldCropToBoundingBoxOnSave);Ze(["shift+d"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(Rd({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))};return y(Qe,{"aria-label":`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:y(sP,{}),onClick:a,isDisabled:r})}function q$e(){const e=ve(kr),{openUploader:t}=rT(),{t:n}=Ke();return y(Qe,{"aria-label":n("common:upload"),tooltip:n("common:upload"),icon:y(Nx,{}),onClick:t,isDisabled:e})}function Y$e(){const e=Be(),{t}=Ke(),n=ve(kr),r=()=>{e(qE()),e(bx())};return y(Qe,{"aria-label":t("unifiedcanvas:clearCanvas"),tooltip:t("unifiedcanvas:clearCanvas"),icon:y(yp,{}),onClick:r,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function K$e(){const e=ve(i=>i.options.shouldPinOptionsPanel),t=Be(),{t:n}=Ke(),r=()=>{t(Ju(!0)),e&&setTimeout(()=>t(vi(!0)),400)};return K(at,{flexDirection:"column",gap:"0.5rem",children:[y(Qe,{tooltip:`${n("options:showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("options:showOptionsPanel"),onClick:r,children:y(uP,{})}),y(at,{children:y(IP,{iconButton:!0})}),y(at,{children:y(DP,{width:"100%",height:"40px"})})]})}const X$e=()=>{const e=ve(t=>t.options.shouldShowOptionsPanel);return K(at,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[y(N$e,{}),y($$e,{}),K(at,{gap:"0.5rem",children:[y(j$e,{}),y(H$e,{})]}),K(at,{columnGap:"0.5rem",children:[y(V$e,{}),y(U$e,{})]}),K(at,{columnGap:"0.5rem",children:[y(W$e,{}),y(G$e,{})]}),K(at,{gap:"0.5rem",children:[y(tK,{}),y(nK,{})]}),K(at,{gap:"0.5rem",children:[y(q$e,{}),y(Y$e,{})]}),y(z$e,{}),!e&&y(K$e,{})]})};function Z$e(){const e=Be(),t=ve(i=>i.canvas.brushSize),{t:n}=Ke(),r=ve(kr);return Ze(["BracketLeft"],()=>{e(Bg(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),Ze(["BracketRight"],()=>{e(Bg(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),y(Zo,{label:n("unifiedcanvas:brushSize"),value:t,withInput:!0,onChange:i=>e(Bg(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}const Q$e=lt([rn,kr],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function J$e(){const e=Be(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=ve(Q$e),o=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return Ze(["shift+BracketLeft"],()=>{e(Ng({...t,a:He.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),Ze(["shift+BracketRight"],()=>{e(Ng({...t,a:He.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),y(Js,{trigger:"hover",triggerComponent:y(rl,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:o(),cursor:"pointer"}}),children:K(at,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[r==="base"&&y(nS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:a=>e(Ng(a))}),r==="mask"&&y(nS,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:a=>e(fW(a))})]})})}function lK(){return K(at,{columnGap:"1rem",alignItems:"center",children:[y(Z$e,{}),y(J$e,{})]})}function eFe(){const e=Be(),t=ve(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=Ke();return y(Qn,{label:n("unifiedcanvas:betaLimitToBox"),isChecked:t,onChange:r=>e(xW(r.target.checked))})}function tFe(){return K(at,{gap:"1rem",alignItems:"center",children:[y(lK,{}),y(eFe,{})]})}function nFe(){const e=Be(),{t}=Ke();return y(qr,{size:"sm",leftIcon:y(yp,{}),onClick:()=>e(GE()),tooltip:`${t("unifiedcanvas:clearMask")} (Shift+C)`,children:t("unifiedcanvas:betaClear")})}function rFe(){const e=ve(i=>i.canvas.isMaskEnabled),t=Be(),{t:n}=Ke(),r=()=>t(Oy(!e));return y(Qn,{label:`${n("unifiedcanvas:enableMask")} (H)`,isChecked:e,onChange:r})}function iFe(){const e=Be(),{t}=Ke(),n=ve(r=>r.canvas.shouldPreserveMaskedArea);return y(Qn,{label:t("unifiedcanvas:betaPreserveMasked"),isChecked:n,onChange:r=>e(mW(r.target.checked))})}function oFe(){return K(at,{gap:"1rem",alignItems:"center",children:[y(lK,{}),y(rFe,{}),y(iFe,{}),y(nFe,{})]})}function aFe(){const e=ve(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Be(),{t:n}=Ke();return y(Qn,{label:n("unifiedcanvas:betaDarkenOutside"),isChecked:e,onChange:r=>t(gW(r.target.checked))})}function sFe(){const e=ve(r=>r.canvas.shouldShowGrid),t=Be(),{t:n}=Ke();return y(Qn,{label:n("unifiedcanvas:showGrid"),isChecked:e,onChange:r=>t(yW(r.target.checked))})}function lFe(){const e=ve(i=>i.canvas.shouldSnapToGrid),t=Be(),{t:n}=Ke(),r=i=>t(W5(i.target.checked));return y(Qn,{label:`${n("unifiedcanvas:snapToGrid")} (N)`,isChecked:e,onChange:r})}function uFe(){return K(at,{alignItems:"center",gap:"1rem",children:[y(sFe,{}),y(lFe,{}),y(aFe,{})]})}const cFe=lt([rn],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:He.isEqual}});function dFe(){const{tool:e,layer:t}=ve(cFe);return K(at,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&y(tFe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&y(oFe,{}),e=="move"&&y(uFe,{})]})}const fFe=lt([rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),hFe=()=>{const e=Be(),{doesCanvasNeedScaling:t}=ve(fFe);return C.exports.useLayoutEffect(()=>{e(vi(!0));const n=He.debounce(()=>{e(vi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),y("div",{className:"workarea-single-view",children:K(at,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[y(X$e,{}),K(at,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[y(dFe,{}),t?y(WY,{}):y(eK,{})]})]})})};function pFe(){const e=ve(t=>t.options.shouldUseCanvasBetaLayout);return y(qP,{optionsPanel:y(vNe,{}),styleClass:"inpainting-workarea-overrides",children:e?y(hFe,{}):y(I$e,{})})}const gFe=bt({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:y("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})});function mFe(){const{t:e}=Ke();return K("div",{className:"work-in-progress nodes-work-in-progress",children:[y("h1",{children:e("common:training")}),K("p",{children:[e("common:trainingDesc1"),y("br",{}),y("br",{}),e("common:trainingDesc2")]})]})}const vFe=bt({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:y("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M0,768.593L0,2774.71C0,2930.6 78.519,3068.3 198.135,3150.37C273.059,3202.68 364.177,3233.38 462.407,3233.38C462.407,3233.38 3080.9,3233.38 3080.9,3233.38C3179.13,3233.38 3270.25,3202.68 3345.17,3150.37C3464.79,3068.3 3543.31,2930.6 3543.31,2774.71L3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593ZM3427.88,775.73L3427.88,2770.97C3427.88,2962.47 3272.4,3117.95 3080.9,3117.95L462.407,3117.95C270.906,3117.95 115.431,2962.47 115.431,2770.97C115.431,2770.97 115.431,775.73 115.431,775.73C115.431,584.229 270.906,428.755 462.407,428.755C462.407,428.755 3080.9,428.755 3080.9,428.755C3272.4,428.755 3427.88,584.229 3427.88,775.73ZM796.24,1322.76L796.24,1250.45C796.24,1199.03 836.16,1157.27 885.331,1157.27C885.331,1157.27 946.847,1157.27 946.847,1157.27C996.017,1157.27 1035.94,1199.03 1035.94,1250.45L1035.94,1644.81L2507.37,1644.81L2507.37,1250.45C2507.37,1199.03 2547.29,1157.27 2596.46,1157.27C2596.46,1157.27 2657.98,1157.27 2657.98,1157.27C2707.15,1157.27 2747.07,1199.03 2747.07,1250.45L2747.07,1322.76C2756.66,1319.22 2767.02,1317.29 2777.83,1317.29C2777.83,1317.29 2839.34,1317.29 2839.34,1317.29C2888.51,1317.29 2928.43,1357.21 2928.43,1406.38L2928.43,1527.32C2933.51,1526.26 2938.77,1525.71 2944.16,1525.71L2995.3,1525.71C3036.18,1525.71 3069.37,1557.59 3069.37,1596.86C3069.37,1596.86 3069.37,1946.44 3069.37,1946.44C3069.37,1985.72 3036.18,2017.6 2995.3,2017.6C2995.3,2017.6 2944.16,2017.6 2944.16,2017.6C2938.77,2017.6 2933.51,2017.04 2928.43,2015.99L2928.43,2136.92C2928.43,2186.09 2888.51,2226.01 2839.34,2226.01L2777.83,2226.01C2767.02,2226.01 2756.66,2224.08 2747.07,2220.55L2747.07,2292.85C2747.07,2344.28 2707.15,2386.03 2657.98,2386.03C2657.98,2386.03 2596.46,2386.03 2596.46,2386.03C2547.29,2386.03 2507.37,2344.28 2507.37,2292.85L2507.37,1898.5L1035.94,1898.5L1035.94,2292.85C1035.94,2344.28 996.017,2386.03 946.847,2386.03C946.847,2386.03 885.331,2386.03 885.331,2386.03C836.16,2386.03 796.24,2344.28 796.24,2292.85L796.24,2220.55C786.651,2224.08 776.29,2226.01 765.482,2226.01L703.967,2226.01C654.796,2226.01 614.876,2186.09 614.876,2136.92L614.876,2015.99C609.801,2017.04 604.539,2017.6 599.144,2017.6C599.144,2017.6 548.003,2017.6 548.003,2017.6C507.125,2017.6 473.937,1985.72 473.937,1946.44C473.937,1946.44 473.937,1596.86 473.937,1596.86C473.937,1557.59 507.125,1525.71 548.003,1525.71L599.144,1525.71C604.539,1525.71 609.801,1526.26 614.876,1527.32L614.876,1406.38C614.876,1357.21 654.796,1317.29 703.967,1317.29C703.967,1317.29 765.482,1317.29 765.482,1317.29C776.29,1317.29 786.651,1319.22 796.24,1322.76ZM977.604,1250.45C977.604,1232.7 963.822,1218.29 946.847,1218.29L885.331,1218.29C868.355,1218.29 854.573,1232.7 854.573,1250.45L854.573,2292.85C854.573,2310.61 868.355,2325.02 885.331,2325.02L946.847,2325.02C963.822,2325.02 977.604,2310.61 977.604,2292.85L977.604,1250.45ZM2565.7,1250.45C2565.7,1232.7 2579.49,1218.29 2596.46,1218.29L2657.98,1218.29C2674.95,1218.29 2688.73,1232.7 2688.73,1250.45L2688.73,2292.85C2688.73,2310.61 2674.95,2325.02 2657.98,2325.02L2596.46,2325.02C2579.49,2325.02 2565.7,2310.61 2565.7,2292.85L2565.7,1250.45ZM673.209,1406.38L673.209,2136.92C673.209,2153.9 686.991,2167.68 703.967,2167.68L765.482,2167.68C782.458,2167.68 796.24,2153.9 796.24,2136.92L796.24,1406.38C796.24,1389.41 782.458,1375.63 765.482,1375.63L703.967,1375.63C686.991,1375.63 673.209,1389.41 673.209,1406.38ZM2870.1,1406.38L2870.1,2136.92C2870.1,2153.9 2856.32,2167.68 2839.34,2167.68L2777.83,2167.68C2760.85,2167.68 2747.07,2153.9 2747.07,2136.92L2747.07,1406.38C2747.07,1389.41 2760.85,1375.63 2777.83,1375.63L2839.34,1375.63C2856.32,1375.63 2870.1,1389.41 2870.1,1406.38ZM614.876,1577.5C610.535,1574.24 605.074,1572.3 599.144,1572.3L548.003,1572.3C533.89,1572.3 522.433,1583.3 522.433,1596.86L522.433,1946.44C522.433,1960 533.89,1971.01 548.003,1971.01L599.144,1971.01C605.074,1971.01 610.535,1969.07 614.876,1965.81L614.876,1577.5ZM2928.43,1965.81L2928.43,1577.5C2932.77,1574.24 2938.23,1572.3 2944.16,1572.3L2995.3,1572.3C3009.42,1572.3 3020.87,1583.3 3020.87,1596.86L3020.87,1946.44C3020.87,1960 3009.42,1971.01 2995.3,1971.01L2944.16,1971.01C2938.23,1971.01 2932.77,1969.07 2928.43,1965.81ZM2507.37,1703.14L1035.94,1703.14L1035.94,1840.16L2507.37,1840.16L2507.37,1898.38L2507.37,1659.46L2507.37,1703.14Z"})});function yFe(e){const{i18n:t}=Ke(),n=localStorage.getItem("i18nextLng");oe.useEffect(()=>{e()},[e]),oe.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const ts={txt2img:{title:y(gOe,{fill:"black",boxSize:"2.5rem"}),workarea:y(KIe,{}),tooltip:"Text To Image"},img2img:{title:y(fOe,{fill:"black",boxSize:"2.5rem"}),workarea:y(UIe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:y(gFe,{fill:"black",boxSize:"2.5rem"}),workarea:y(pFe,{}),tooltip:"Unified Canvas"},nodes:{title:y(hOe,{fill:"black",boxSize:"2.5rem"}),workarea:y(cOe,{}),tooltip:"Nodes"},postprocess:{title:y(pOe,{fill:"black",boxSize:"2.5rem"}),workarea:y(dOe,{}),tooltip:"Post Processing"},training:{title:y(vFe,{fill:"black",boxSize:"2.5rem"}),workarea:y(mFe,{}),tooltip:"Training"}};function bFe(){ts.txt2img.tooltip=Ht.t("common:text2img"),ts.img2img.tooltip=Ht.t("common:img2img"),ts.unifiedCanvas.tooltip=Ht.t("common:unifiedCanvas"),ts.nodes.tooltip=Ht.t("common:nodes"),ts.postprocess.tooltip=Ht.t("common:postProcessing"),ts.training.tooltip=Ht.t("common:training")}function SFe(){const e=ve(o=>o.options.activeTab),t=ve(o=>o.options.isLightBoxOpen);yFe(bFe);const n=Be();Ze("1",()=>{n(Go(0))}),Ze("2",()=>{n(Go(1))}),Ze("3",()=>{n(Go(2))}),Ze("4",()=>{n(Go(3))}),Ze("5",()=>{n(Go(4))}),Ze("6",()=>{n(Go(5))}),Ze("z",()=>{n(Qu(!t))},[t]);const r=()=>{const o=[];return Object.keys(ts).forEach(a=>{o.push(y(so,{hasArrow:!0,label:ts[a].tooltip,placement:"right",children:y(XV,{children:ts[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(ts).forEach(a=>{o.push(y(YV,{className:"app-tabs-panel",children:ts[a].workarea},a))}),o};return K(qV,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(Go(o))},children:[y("div",{className:"app-tabs-list",children:r()}),y(KV,{className:"app-tabs-panels",children:t?y(lNe,{}):i()})]})}var xFe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function zy(e,t){var n=wFe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function wFe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=xFe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var CFe=[".DS_Store","Thumbs.db"];function _Fe(e){return m1(this,void 0,void 0,function(){return v1(this,function(t){return rS(e)&&kFe(e.dataTransfer)?[2,LFe(e.dataTransfer,e.type)]:EFe(e)?[2,PFe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,TFe(e)]:[2,[]]})})}function kFe(e){return rS(e)}function EFe(e){return rS(e)&&rS(e.target)}function rS(e){return typeof e=="object"&&e!==null}function PFe(e){return q8(e.target.files).map(function(t){return zy(t)})}function TFe(e){return m1(this,void 0,void 0,function(){var t;return v1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return zy(r)})]}})})}function LFe(e,t){return m1(this,void 0,void 0,function(){var n,r;return v1(this,function(i){switch(i.label){case 0:return e.items?(n=q8(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(AFe))]):[3,2];case 1:return r=i.sent(),[2,AN(uK(r))];case 2:return[2,AN(q8(e.files).map(function(o){return zy(o)}))]}})})}function AN(e){return e.filter(function(t){return CFe.indexOf(t.name)===-1})}function q8(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function AFe(e){if(typeof e.webkitGetAsEntry!="function")return ON(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?cK(t):ON(e)}function uK(e){return e.reduce(function(t,n){return b9(b9([],cM(t),!1),cM(Array.isArray(n)?uK(n):[n]),!1)},[])}function ON(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=zy(t);return Promise.resolve(n)}function OFe(e){return m1(this,void 0,void 0,function(){return v1(this,function(t){return[2,e.isDirectory?cK(e):MFe(e)]})})}function cK(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return m1(a,void 0,void 0,function(){var l,u,f;return v1(this,function(p){switch(p.label){case 0:if(s.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=p.sent(),n(l),[3,4];case 3:return u=p.sent(),r(u),[3,4];case 4:return[3,6];case 5:f=Promise.all(s.map(OFe)),i.push(f),o(),p.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function MFe(e){return m1(this,void 0,void 0,function(){return v1(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=zy(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var RFe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function MN(e){return NFe(e)||DFe(e)||fK(e)||IFe()}function IFe(){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 DFe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NFe(e){if(Array.isArray(e))return Y8(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RN(Object(n),!0).forEach(function(r){dK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ry(e,t){return FFe(e)||$Fe(e,t)||fK(e,t)||BFe()}function BFe(){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 fK(e,t){if(!!e){if(typeof e=="string")return Y8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y8(e,t)}}function Y8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $Fe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function FFe(e){if(Array.isArray(e))return e}var zFe="file-invalid-type",jFe="file-too-large",HFe="file-too-small",VFe="too-many-files",UFe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:zFe,message:"File type must be ".concat(n)}},DN=function(t){return{code:jFe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},NN=function(t){return{code:HFe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},WFe={code:VFe,message:"Too many files"};function hK(e,t){var n=e.type==="application/x-moz-file"||RFe(e,t);return[n,n?null:UFe(t)]}function pK(e,t,n){if(kh(e.size))if(kh(t)&&kh(n)){if(e.size>n)return[!1,DN(n)];if(e.size<t)return[!1,NN(t)]}else{if(kh(t)&&e.size<t)return[!1,NN(t)];if(kh(n)&&e.size>n)return[!1,DN(n)]}return[!0,null]}function kh(e){return e!=null}function GFe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=hK(l,n),f=ry(u,1),p=f[0],m=pK(l,r,i),v=ry(m,1),b=v[0],x=s?s(l):null;return p&&b&&!x})}function iS(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ub(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function BN(e){e.preventDefault()}function qFe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YFe(e){return e.indexOf("Edge/")!==-1}function KFe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return qFe(e)||YFe(e)}function Nl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!iS(r)&&s&&s.apply(void 0,[r].concat(o)),iS(r)})}}function XFe(){return"showOpenFilePicker"in window}function ZFe(e){if(kh(e)){var t=Object.entries(e).filter(function(n){var r=ry(n,2),i=r[0],o=r[1],a=!0;return gK(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(mK))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=ry(r,2),o=i[0],a=i[1];return IN(IN({},n),{},dK({},o,a))},{});return[{description:"Files",accept:t}]}return e}function QFe(e){if(kh(e))return Object.entries(e).reduce(function(t,n){var r=ry(n,2),i=r[0],o=r[1];return[].concat(MN(t),[i],MN(o))},[]).filter(function(t){return gK(t)||mK(t)}).join(",")}function JFe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function eze(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function gK(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function mK(e){return/^.*\.[\w]+$/.test(e)}var tze=["children"],nze=["open"],rze=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ize=["refKey","onChange","onClick"];function oze(e){return lze(e)||sze(e)||vK(e)||aze()}function aze(){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 sze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lze(e){if(Array.isArray(e))return K8(e)}function zC(e,t){return dze(e)||cze(e,t)||vK(e,t)||uze()}function uze(){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 vK(e,t){if(!!e){if(typeof e=="string")return K8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(e,t)}}function K8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function dze(e){if(Array.isArray(e))return e}function $N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$N(Object(n),!0).forEach(function(r){X8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$N(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oS(e,t){if(e==null)return{};var n=fze(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function fze(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var iT=C.exports.forwardRef(function(e,t){var n=e.children,r=oS(e,tze),i=bK(r),o=i.open,a=oS(i,nze);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),y(C.exports.Fragment,{children:n(mr(mr({},a),{},{open:o}))})});iT.displayName="Dropzone";var yK={disabled:!1,getFilesFromEvent:_Fe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};iT.defaultProps=yK;iT.propTypes={children:Fn.exports.func,accept:Fn.exports.objectOf(Fn.exports.arrayOf(Fn.exports.string)),multiple:Fn.exports.bool,preventDropOnDocument:Fn.exports.bool,noClick:Fn.exports.bool,noKeyboard:Fn.exports.bool,noDrag:Fn.exports.bool,noDragEventsBubbling:Fn.exports.bool,minSize:Fn.exports.number,maxSize:Fn.exports.number,maxFiles:Fn.exports.number,disabled:Fn.exports.bool,getFilesFromEvent:Fn.exports.func,onFileDialogCancel:Fn.exports.func,onFileDialogOpen:Fn.exports.func,useFsAccessApi:Fn.exports.bool,autoFocus:Fn.exports.bool,onDragEnter:Fn.exports.func,onDragLeave:Fn.exports.func,onDragOver:Fn.exports.func,onDrop:Fn.exports.func,onDropAccepted:Fn.exports.func,onDropRejected:Fn.exports.func,onError:Fn.exports.func,validator:Fn.exports.func};var Z8={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function bK(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=mr(mr({},yK),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,x=t.onFileDialogCancel,E=t.onFileDialogOpen,k=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,A=t.noClick,R=t.noKeyboard,I=t.noDrag,D=t.noDragEventsBubbling,B=t.onError,z=t.validator,j=C.exports.useMemo(function(){return QFe(n)},[n]),Y=C.exports.useMemo(function(){return ZFe(n)},[n]),te=C.exports.useMemo(function(){return typeof E=="function"?E:FN},[E]),G=C.exports.useMemo(function(){return typeof x=="function"?x:FN},[x]),$=C.exports.useRef(null),V=C.exports.useRef(null),J=C.exports.useReducer(hze,Z8),Z=zC(J,2),U=Z[0],X=Z[1],le=U.isFocused,fe=U.isFileDialogActive,Se=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&k&&XFe()),Ae=function(){!Se.current&&fe&&setTimeout(function(){if(V.current){var Ne=V.current.files;Ne.length||(X({type:"closeDialog"}),G())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Ae,!1),function(){window.removeEventListener("focus",Ae,!1)}},[V,fe,G,Se]);var be=C.exports.useRef([]),ke=function(Ne){$.current&&$.current.contains(Ne.target)||(Ne.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",BN,!1),document.addEventListener("drop",ke,!1)),function(){T&&(document.removeEventListener("dragover",BN),document.removeEventListener("drop",ke))}},[$,T]),C.exports.useEffect(function(){return!r&&_&&$.current&&$.current.focus(),function(){}},[$,_,r]);var De=C.exports.useCallback(function(Ce){B?B(Ce):console.error(Ce)},[B]),Je=C.exports.useCallback(function(Ce){Ce.preventDefault(),Ce.persist(),ue(Ce),be.current=[].concat(oze(be.current),[Ce.target]),Ub(Ce)&&Promise.resolve(i(Ce)).then(function(Ne){if(!(iS(Ce)&&!D)){var kt=Ne.length,Nt=kt>0&&GFe({files:Ne,accept:j,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:z}),Te=kt>0&&!Nt;X({isDragAccept:Nt,isDragReject:Te,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Ce)}}).catch(function(Ne){return De(Ne)})},[i,u,De,D,j,a,o,s,l,z]),Ye=C.exports.useCallback(function(Ce){Ce.preventDefault(),Ce.persist(),ue(Ce);var Ne=Ub(Ce);if(Ne&&Ce.dataTransfer)try{Ce.dataTransfer.dropEffect="copy"}catch(kt){}return Ne&&p&&p(Ce),!1},[p,D]),mt=C.exports.useCallback(function(Ce){Ce.preventDefault(),Ce.persist(),ue(Ce);var Ne=be.current.filter(function(Nt){return $.current&&$.current.contains(Nt)}),kt=Ne.indexOf(Ce.target);kt!==-1&&Ne.splice(kt,1),be.current=Ne,!(Ne.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ub(Ce)&&f&&f(Ce))},[$,f,D]),_t=C.exports.useCallback(function(Ce,Ne){var kt=[],Nt=[];Ce.forEach(function(Te){var Et=hK(Te,j),Ut=zC(Et,2),Ve=Ut[0],ft=Ut[1],un=pK(Te,a,o),ze=zC(un,2),St=ze[0],ct=ze[1],Vt=z?z(Te):null;if(Ve&&St&&!Vt)kt.push(Te);else{var hn=[ft,ct];Vt&&(hn=hn.concat(Vt)),Nt.push({file:Te,errors:hn.filter(function(Er){return Er})})}}),(!s&&kt.length>1||s&&l>=1&&kt.length>l)&&(kt.forEach(function(Te){Nt.push({file:Te,errors:[WFe]})}),kt.splice(0)),X({acceptedFiles:kt,fileRejections:Nt,type:"setFiles"}),m&&m(kt,Nt,Ne),Nt.length>0&&b&&b(Nt,Ne),kt.length>0&&v&&v(kt,Ne)},[X,s,j,a,o,l,m,v,b,z]),dt=C.exports.useCallback(function(Ce){Ce.preventDefault(),Ce.persist(),ue(Ce),be.current=[],Ub(Ce)&&Promise.resolve(i(Ce)).then(function(Ne){iS(Ce)&&!D||_t(Ne,Ce)}).catch(function(Ne){return De(Ne)}),X({type:"reset"})},[i,_t,De,D]),vt=C.exports.useCallback(function(){if(Se.current){X({type:"openDialog"}),te();var Ce={multiple:s,types:Y};window.showOpenFilePicker(Ce).then(function(Ne){return i(Ne)}).then(function(Ne){_t(Ne,null),X({type:"closeDialog"})}).catch(function(Ne){JFe(Ne)?(G(Ne),X({type:"closeDialog"})):eze(Ne)?(Se.current=!1,V.current?(V.current.value=null,V.current.click()):De(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):De(Ne)});return}V.current&&(X({type:"openDialog"}),te(),V.current.value=null,V.current.click())},[X,te,G,k,_t,De,Y,s]),xt=C.exports.useCallback(function(Ce){!$.current||!$.current.isEqualNode(Ce.target)||(Ce.key===" "||Ce.key==="Enter"||Ce.keyCode===32||Ce.keyCode===13)&&(Ce.preventDefault(),vt())},[$,vt]),Le=C.exports.useCallback(function(){X({type:"focus"})},[]),ut=C.exports.useCallback(function(){X({type:"blur"})},[]),Rt=C.exports.useCallback(function(){A||(KFe()?setTimeout(vt,0):vt())},[A,vt]),ot=function(Ne){return r?null:Ne},Ct=function(Ne){return R?null:ot(Ne)},ln=function(Ne){return I?null:ot(Ne)},ue=function(Ne){D&&Ne.stopPropagation()},Ie=C.exports.useMemo(function(){return function(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=Ce.refKey,kt=Ne===void 0?"ref":Ne,Nt=Ce.role,Te=Ce.onKeyDown,Et=Ce.onFocus,Ut=Ce.onBlur,Ve=Ce.onClick,ft=Ce.onDragEnter,un=Ce.onDragOver,ze=Ce.onDragLeave,St=Ce.onDrop,ct=oS(Ce,rze);return mr(mr(X8({onKeyDown:Ct(Nl(Te,xt)),onFocus:Ct(Nl(Et,Le)),onBlur:Ct(Nl(Ut,ut)),onClick:ot(Nl(Ve,Rt)),onDragEnter:ln(Nl(ft,Je)),onDragOver:ln(Nl(un,Ye)),onDragLeave:ln(Nl(ze,mt)),onDrop:ln(Nl(St,dt)),role:typeof Nt=="string"&&Nt!==""?Nt:"presentation"},kt,$),!r&&!R?{tabIndex:0}:{}),ct)}},[$,xt,Le,ut,Rt,Je,Ye,mt,dt,R,I,r]),We=C.exports.useCallback(function(Ce){Ce.stopPropagation()},[]),Xe=C.exports.useMemo(function(){return function(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ne=Ce.refKey,kt=Ne===void 0?"ref":Ne,Nt=Ce.onChange,Te=Ce.onClick,Et=oS(Ce,ize),Ut=X8({accept:j,multiple:s,type:"file",style:{display:"none"},onChange:ot(Nl(Nt,dt)),onClick:ot(Nl(Te,We)),tabIndex:-1},kt,V);return mr(mr({},Ut),Et)}},[V,n,s,dt,r]);return mr(mr({},U),{},{isFocused:le&&!r,getRootProps:Ie,getInputProps:Xe,rootRef:$,inputRef:V,open:ot(vt)})}function hze(e,t){switch(t.type){case"focus":return mr(mr({},e),{},{isFocused:!0});case"blur":return mr(mr({},e),{},{isFocused:!1});case"openDialog":return mr(mr({},Z8),{},{isFileDialogActive:!0});case"closeDialog":return mr(mr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mr(mr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mr(mr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return mr({},Z8);default:return e}}function FN(){}const pze=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return Ze("esc",()=>{i(!1)}),K("div",{className:"dropzone-container",children:[t&&y("div",{className:"dropzone-overlay is-drag-accept",children:K(Hh,{size:"lg",children:["Upload Image",r]})}),n&&K("div",{className:"dropzone-overlay is-drag-reject",children:[y(Hh,{size:"lg",children:"Invalid Upload"}),y(Hh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},zN=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=_r(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:lg(),category:"user",...l};t(ag({image:u,category:"user"})),o==="unifiedCanvas"?t(Sx(u)):o==="img2img"&&t(C1(u))},gze=e=>{const{children:t}=e,n=Be(),r=ve(_r),i=Ty({}),{t:o}=Ke(),[a,s]=C.exports.useState(!1),{setOpenUploader:l}=rT(),u=C.exports.useCallback(T=>{s(!0);const A=T.errors.reduce((R,I)=>R+`
`+I.message,"");i({title:o("toast:uploadFailed"),description:A,status:"error",isClosable:!0})},[o,i]),f=C.exports.useCallback(async T=>{n(zN({imageFile:T}))},[n]),p=C.exports.useCallback((T,A)=>{A.forEach(R=>{u(R)}),T.forEach(R=>{f(R)})},[f,u]),{getRootProps:m,getInputProps:v,isDragAccept:b,isDragReject:x,isDragActive:E,open:k}=bK({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:p,onDragOver:()=>s(!0),maxFiles:1});l(k),C.exports.useEffect(()=>{const T=A=>{var B;const R=(B=A.clipboardData)==null?void 0:B.items;if(!R)return;const I=[];for(const z of R)z.kind==="file"&&["image/png","image/jpg"].includes(z.type)&&I.push(z);if(!I.length)return;if(A.stopImmediatePropagation(),I.length>1){i({description:o("toast:uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const D=I[0].getAsFile();if(!D){i({description:o("toast:uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(zN({imageFile:D}))};return document.addEventListener("paste",T),()=>{document.removeEventListener("paste",T)}},[o,n,i,r]);const _=["img2img","unifiedCanvas"].includes(r)?` to ${ts[r].tooltip}`:"";return y(zP.Provider,{value:k,children:K("div",{...m({style:{}}),onKeyDown:T=>{T.key},children:[y("input",{...v()}),t,E&&a&&y(pze,{isDragAccept:b,isDragReject:x,overlaySecondaryText:_,setIsHandlingUpload:s})]})})},mze=()=>{const e=Be(),t=ve(K8e),n=Ty();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(pwe())},[e,n,t])},SK=lt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o,shouldUseCanvasBetaLayout:a}=e,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:u}=t,f=a&&n==="unifiedCanvas",p=!f&&!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),m=!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!f&&(!r||!i),shouldShowOptionsPanelButton:p,shouldShowOptionsPanel:i,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:m}},{memoizeOptions:{resultEqualityCheck:He.isEqual}}),vze=()=>{const e=Be(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=ve(SK),s=()=>{e(Ju(!0)),i&&setTimeout(()=>e(vi(!0)),400)};return Ze("f",()=>{o||t?(e(Ju(!1)),e(Vd(!1))):(e(Ju(!0)),e(Vd(!0))),(a||i)&&setTimeout(()=>e(vi(!0)),400)},[o,t]),n?K("div",{className:"show-hide-button-options",children:[y(Qe,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:y(uP,{})}),r&&K(fn,{children:[y(IP,{iconButton:!0}),y(DP,{})]})]}):null},yze=()=>{const e=Be(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=ve(SK),a=()=>{e(Vd(!0)),r&&e(vi(!0))};return Ze("f",()=>{t||i?(e(Ju(!1)),e(Vd(!1))):(e(Ju(!0)),e(Vd(!0))),(r||o)&&setTimeout(()=>e(vi(!0)),400)},[t,i]),n?y(Qe,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:y(wq,{})}):null};uOe();const bze=()=>(mze(),K("div",{className:"App",children:[K(gze,{children:[y(m8e,{}),K("div",{className:"app-content",children:[y(vLe,{}),y(SFe,{})]}),y("div",{className:"app-console",children:y(lOe,{})})]}),y(vze,{}),y(yze,{})]}));const Sze=SF({key:"invokeai-style-cache",prepend:!0});HC.createRoot(document.getElementById("root")).render(y(oe.StrictMode,{children:y(s8e,{store:xG,children:y(OG,{loading:y(XI,{}),persistor:MG,children:y(Lie,{value:Sze,children:y(_4e,{children:y(oe.Suspense,{fallback:y(XI,{}),children:y(bze,{})})})})})})}));export{wze as __vite_legacy_guard};