From d44112c209b6f9cfdfba1009f3fa0ad2cb63e259 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:42:44 +1100 Subject: [PATCH] Builds fresh bundle --- frontend/dist/assets/index.8659b949.js | 623 +++++++++++++++++++++++++ frontend/dist/assets/index.99dfa618.js | 623 ------------------------- frontend/dist/index.html | 2 +- 3 files changed, 624 insertions(+), 624 deletions(-) create mode 100644 frontend/dist/assets/index.8659b949.js delete mode 100644 frontend/dist/assets/index.99dfa618.js diff --git a/frontend/dist/assets/index.8659b949.js b/frontend/dist/assets/index.8659b949.js new file mode 100644 index 0000000000..911f1fe87e --- /dev/null +++ b/frontend/dist/assets/index.8659b949.js @@ -0,0 +1,623 @@ +function Uq(e,t){for(var n=0;nr[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 bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** + * @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 Wv=Symbol.for("react.element"),Gq=Symbol.for("react.portal"),jq=Symbol.for("react.fragment"),Yq=Symbol.for("react.strict_mode"),qq=Symbol.for("react.profiler"),Kq=Symbol.for("react.provider"),Xq=Symbol.for("react.context"),Zq=Symbol.for("react.forward_ref"),Qq=Symbol.for("react.suspense"),Jq=Symbol.for("react.memo"),eK=Symbol.for("react.lazy"),kE=Symbol.iterator;function tK(e){return e===null||typeof e!="object"?null:(e=kE&&e[kE]||e["@@iterator"],typeof e=="function"?e:null)}var qI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KI=Object.assign,XI={};function r1(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}r1.prototype.isReactComponent={};r1.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")};r1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZI(){}ZI.prototype=r1.prototype;function K7(e,t,n){this.props=e,this.context=t,this.refs=XI,this.updater=n||qI}var X7=K7.prototype=new ZI;X7.constructor=K7;KI(X7,r1.prototype);X7.isPureReactComponent=!0;var EE=Array.isArray,QI=Object.prototype.hasOwnProperty,Z7={current:null},JI={key:!0,ref:!0,__self:!0,__source:!0};function eO(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)QI.call(t,r)&&!JI.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(Ie,ce))Wei(De,Ie)?(G[me]=De,G[We]=ce,me=We):(G[me]=Ie,G[be]=ce,me=be);else if(Wei(De,ce))G[me]=De,G[We]=ce,me=We;else break e}}return X}function i(G,X){var ce=G.sortIndex-X.sortIndex;return ce!==0?ce:G.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=[],h=1,g=null,m=3,v=!1,b=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=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(G){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=G)r(u),X.sortIndex=X.expirationTime,t(l,X);else break;X=n(u)}}function M(G){if(w=!1,T(G),!b)if(n(l)!==null)b=!0,J(O);else{var X=n(u);X!==null&&K(M,X.startTime-G)}}function O(G,X){b=!1,w&&(w=!1,P(z),z=-1),v=!0;var ce=m;try{for(T(X),g=n(l);g!==null&&(!(g.expirationTime>X)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(X)}else r(l);g=n(l)}if(g!==null)var xe=!0;else{var be=n(u);be!==null&&K(M,be.startTime-X),xe=!1}return xe}finally{g=null,m=ce,v=!1}}var R=!1,N=null,z=-1,V=5,$=-1;function j(){return!(e.unstable_now()-$G||125me?(G.sortIndex=ce,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,K(M,ce-me))):(G.sortIndex=Me,t(l,G),b||v||(b=!0,J(O))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var X=m;return function(){var ce=m;m=X;try{return G.apply(this,arguments)}finally{m=ce}}}})(tO);(function(e){e.exports=tO})(s0);/** + * @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 nO=C.exports,da=s0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jw=Object.prototype.hasOwnProperty,aK=/^[: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]*$/,TE={},LE={};function sK(e){return Jw.call(LE,e)?!0:Jw.call(TE,e)?!1:aK.test(e)?LE[e]=!0:(TE[e]=!0,!1)}function lK(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 uK(e,t,n,r){if(t===null||typeof t>"u"||lK(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 ao(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 Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new ao(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){Ii[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var J7=/[\-:]([a-z])/g;function e9(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(J7,e9);Ii[t]=new ao(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(J7,e9);Ii[t]=new ao(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(J7,e9);Ii[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function t9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rm(e):""}function cK(e){switch(e.tag){case 5:return rm(e.type);case 16:return rm("Lazy");case 13:return rm("Suspense");case 19:return rm("SuspenseList");case 0:case 2:case 15:return e=nx(e.type,!1),e;case 11:return e=nx(e.type.render,!1),e;case 1:return e=nx(e.type,!0),e;default:return""}}function r6(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 Wp:return"Fragment";case Hp:return"Portal";case e6:return"Profiler";case n9:return"StrictMode";case t6:return"Suspense";case n6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oO:return(e.displayName||"Context")+".Consumer";case iO:return(e._context.displayName||"Context")+".Provider";case r9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i9:return t=e.displayName||null,t!==null?t:r6(e.type)||"Memo";case Ic:t=e._payload,e=e._init;try{return r6(e(t))}catch{}}return null}function dK(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 r6(t);case 8:return t===n9?"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 sd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fK(e){var t=sO(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 ly(e){e._valueTracker||(e._valueTracker=fK(e))}function lO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function u5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function i6(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ME(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sd(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 uO(e,t){t=t.checked,t!=null&&t9(e,"checked",t,!1)}function o6(e,t){uO(e,t);var n=sd(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")?a6(e,t.type,n):t.hasOwnProperty("defaultValue")&&a6(e,t.type,sd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function IE(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 a6(e,t,n){(t!=="number"||u5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var im=Array.isArray;function l0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=uy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wm={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},hK=["Webkit","ms","Moz","O"];Object.keys(wm).forEach(function(e){hK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wm[t]=wm[e]})});function hO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wm.hasOwnProperty(e)&&wm[e]?(""+t).trim():t+"px"}function pO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pK=hr({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 u6(e,t){if(t){if(pK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function c6(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 d6=null;function o9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var f6=null,u0=null,c0=null;function NE(e){if(e=Gv(e)){if(typeof f6!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=M4(t),f6(e.stateNode,e.type,t))}}function gO(e){u0?c0?c0.push(e):c0=[e]:u0=e}function mO(){if(u0){var e=u0,t=c0;if(c0=u0=null,NE(e),t)for(e=0;e>>=0,e===0?32:31-(kK(e)/EK|0)|0}var cy=64,dy=4194304;function om(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 h5(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=om(s):(o&=a,o!==0&&(r=om(o)))}else a=n&~i,a!==0?r=om(a):o!==0&&(r=om(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;0n;n++)t.push(e);return t}function Vv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cs(t),e[t]=n}function AK(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=_m),UE=String.fromCharCode(32),GE=!1;function DO(e,t){switch(e){case"keyup":return iX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vp=!1;function aX(e,t){switch(e){case"compositionend":return zO(t);case"keypress":return t.which!==32?null:(GE=!0,UE);case"textInput":return e=t.data,e===UE&&GE?null:e;default:return null}}function sX(e,t){if(Vp)return e==="compositionend"||!h9&&DO(e,t)?(e=RO(),C3=c9=$c=null,Vp=!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)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=KE(n)}}function HO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WO(){for(var e=window,t=u5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=u5(e.document)}return t}function p9(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 mX(e){var t=WO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&HO(n.ownerDocument.documentElement,n)){if(r!==null&&p9(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=XE(n,o);var a=XE(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=document.documentMode,Up=null,y6=null,Em=null,b6=!1;function ZE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;b6||Up==null||Up!==u5(r)||(r=Up,"selectionStart"in r&&p9(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}),Em&&ov(Em,r)||(Em=r,r=m5(y6,"onSelect"),0Yp||(e.current=k6[Yp],k6[Yp]=null,Yp--)}function qn(e,t){Yp++,k6[Yp]=e.current,e.current=t}var ld={},Wi=vd(ld),Ao=vd(!1),th=ld;function D0(e,t){var n=e.type.contextTypes;if(!n)return ld;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 Mo(e){return e=e.childContextTypes,e!=null}function y5(){Qn(Ao),Qn(Wi)}function iP(e,t,n){if(Wi.current!==ld)throw Error(Re(168));qn(Wi,t),qn(Ao,n)}function ZO(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(Re(108,dK(e)||"Unknown",i));return hr({},n,r)}function b5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ld,th=Wi.current,qn(Wi,e),qn(Ao,Ao.current),!0}function oP(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=ZO(e,t,th),r.__reactInternalMemoizedMergedChildContext=e,Qn(Ao),Qn(Wi),qn(Wi,e)):Qn(Ao),qn(Ao,n)}var fu=null,I4=!1,mx=!1;function QO(e){fu===null?fu=[e]:fu.push(e)}function TX(e){I4=!0,QO(e)}function yd(){if(!mx&&fu!==null){mx=!0;var e=0,t=Tn;try{var n=fu;for(Tn=1;e>=a,i-=a,pu=1<<32-Cs(t)+i|n<z?(V=N,N=null):V=N.sibling;var $=m(P,N,T[z],M);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(P,N),k=o($,k,z),R===null?O=$:R.sibling=$,R=$,N=V}if(z===T.length)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;zz?(V=N,N=null):V=N.sibling;var j=m(P,N,$.value,M);if(j===null){N===null&&(N=V);break}e&&N&&j.alternate===null&&t(P,N),k=o(j,k,z),R===null?O=j:R.sibling=j,R=j,N=V}if($.done)return n(P,N),ir&&Cf(P,z),O;if(N===null){for(;!$.done;z++,$=T.next())$=g(P,$.value,M),$!==null&&(k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return ir&&Cf(P,z),O}for(N=r(P,N);!$.done;z++,$=T.next())$=v(N,P,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),k=o($,k,z),R===null?O=$:R.sibling=$,R=$);return e&&N.forEach(function(ue){return t(P,ue)}),ir&&Cf(P,z),O}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Wp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case sy:e:{for(var O=T.key,R=k;R!==null;){if(R.key===O){if(O=T.type,O===Wp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Ic&&fP(O)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Ng(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Wp?(k=jf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=M3(T.type,T.key,T.props,null,P.mode,M),M.ref=Ng(P,k,T),M.return=P,P=M)}return a(P);case Hp:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=_x(T,P.mode,M),k.return=P,P=k}return a(P);case Ic:return R=T._init,E(P,k,R(T._payload),M)}if(im(T))return b(P,k,T,M);if(Ag(T))return w(P,k,T,M);yy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=Cx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var B0=aR(!0),sR=aR(!1),jv={},Cl=vd(jv),uv=vd(jv),cv=vd(jv);function Df(e){if(e===jv)throw Error(Re(174));return e}function C9(e,t){switch(qn(cv,t),qn(uv,e),qn(Cl,jv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:l6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=l6(t,e)}Qn(Cl),qn(Cl,t)}function F0(){Qn(Cl),Qn(uv),Qn(cv)}function lR(e){Df(cv.current);var t=Df(Cl.current),n=l6(t,e.type);t!==n&&(qn(uv,e),qn(Cl,n))}function _9(e){uv.current===e&&(Qn(Cl),Qn(uv))}var cr=vd(0);function k5(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 vx=[];function k9(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{Tn=n,yx.transition=r}}function _R(){return Ha().memoizedState}function IX(e,t,n){var r=Jc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kR(e))ER(t,n);else if(n=nR(e,t,n,r),n!==null){var i=ro();_s(n,e,r,i),PR(n,t,r)}}function OX(e,t,n){var r=Jc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kR(e))ER(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,Ls(s,a)){var l=t.interleaved;l===null?(i.next=i,x9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=nR(e,t,i,r),n!==null&&(i=ro(),_s(n,e,r,i),PR(n,t,r))}}function kR(e){var t=e.alternate;return e===fr||t!==null&&t===fr}function ER(e,t){Pm=E5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s9(e,n)}}var P5={readContext:$a,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},RX={readContext:$a,useCallback:function(e,t){return ul().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:pP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,P3(4194308,4,bR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return P3(4194308,4,e,t)},useInsertionEffect:function(e,t){return P3(4,2,e,t)},useMemo:function(e,t){var n=ul();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ul();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=IX.bind(null,fr,e),[r.memoizedState,e]},useRef:function(e){var t=ul();return e={current:e},t.memoizedState=e},useState:hP,useDebugValue:A9,useDeferredValue:function(e){return ul().memoizedState=e},useTransition:function(){var e=hP(!1),t=e[0];return e=MX.bind(null,e[1]),ul().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fr,i=ul();if(ir){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),hi===null)throw Error(Re(349));(rh&30)!==0||dR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pP(hR.bind(null,r,o,e),[e]),r.flags|=2048,hv(9,fR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ul(),t=hi.identifierPrefix;if(ir){var n=gu,r=pu;n=(r&~(1<<32-Cs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=dv++,0<\/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[ml]=t,e[lv]=r,DR(e,t,!1,!1),t.stateNode=e;e:{switch(a=c6(n,r),n){case"dialog":Xn("cancel",e),Xn("close",e),i=r;break;case"iframe":case"object":case"embed":Xn("load",e),i=r;break;case"video":case"audio":for(i=0;iH0&&(t.flags|=128,r=!0,Dg(o,!1),t.lanes=4194304)}else{if(!r)if(e=k5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Bi(t),null}else 2*Rr()-o.renderingStartTime>H0&&n!==1073741824&&(t.flags|=128,r=!0,Dg(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=Rr(),t.sibling=null,n=cr.current,qn(cr,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return D9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(na&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function WX(e,t){switch(m9(t),t.tag){case 1:return Mo(t.type)&&y5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return F0(),Qn(Ao),Qn(Wi),k9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _9(t),null;case 13:if(Qn(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));z0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qn(cr),null;case 4:return F0(),null;case 10:return S9(t.type._context),null;case 22:case 23:return D9(),null;case 24:return null;default:return null}}var Sy=!1,Hi=!1,VX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Zp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wr(e,t,r)}else n.current=null}function z6(e,t,n){try{n()}catch(r){wr(e,t,r)}}var CP=!1;function UX(e,t){if(S6=p5,e=WO(),p9(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{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(x6={focusedElem:e,selectionRange:n},p5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;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 w=b.memoizedProps,E=b.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:gs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}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(Re(163))}}catch(M){wr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return b=CP,CP=!1,b}function Tm(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&&z6(t,n,o)}i=i.next}while(i!==r)}}function N4(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 B6(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 FR(e){var t=e.alternate;t!==null&&(e.alternate=null,FR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ml],delete t[lv],delete t[_6],delete t[EX],delete t[PX])),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 $R(e){return e.tag===5||e.tag===3||e.tag===4}function _P(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$R(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 F6(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=v5));else if(r!==4&&(e=e.child,e!==null))for(F6(e,t,n),e=e.sibling;e!==null;)F6(e,t,n),e=e.sibling}function $6(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($6(e,t,n),e=e.sibling;e!==null;)$6(e,t,n),e=e.sibling}var Pi=null,ms=!1;function kc(e,t,n){for(n=n.child;n!==null;)HR(e,t,n),n=n.sibling}function HR(e,t,n){if(wl&&typeof wl.onCommitFiberUnmount=="function")try{wl.onCommitFiberUnmount(P4,n)}catch{}switch(n.tag){case 5:Hi||Zp(n,t);case 6:var r=Pi,i=ms;Pi=null,kc(e,t,n),Pi=r,ms=i,Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ms?(e=Pi,n=n.stateNode,e.nodeType===8?gx(e.parentNode,n):e.nodeType===1&&gx(e,n),rv(e)):gx(Pi,n.stateNode));break;case 4:r=Pi,i=ms,Pi=n.stateNode.containerInfo,ms=!0,kc(e,t,n),Pi=r,ms=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(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)&&z6(n,t,a),i=i.next}while(i!==r)}kc(e,t,n);break;case 1:if(!Hi&&(Zp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wr(n,t,s)}kc(e,t,n);break;case 21:kc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,kc(e,t,n),Hi=r):kc(e,t,n);break;default:kc(e,t,n)}}function kP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VX),t.forEach(function(r){var i=JX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function cs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Rr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jX(r/1960))-r,10e?16:e,Hc===null)var r=!1;else{if(e=Hc,Hc=null,A5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lRr()-R9?Gf(e,0):O9|=n),Io(e,t)}function KR(e,t){t===0&&((e.mode&1)===0?t=1:(t=dy,dy<<=1,(dy&130023424)===0&&(dy=4194304)));var n=ro();e=xu(e,t),e!==null&&(Vv(e,t,n),Io(e,n))}function QX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KR(e,n)}function JX(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(Re(314))}r!==null&&r.delete(t),KR(e,n)}var XR;XR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Lo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Lo=!1,$X(e,t,n);Lo=(e.flags&131072)!==0}else Lo=!1,ir&&(t.flags&1048576)!==0&&JO(t,x5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;T3(e,t),e=t.pendingProps;var i=D0(t,Wi.current);f0(t,n),i=P9(null,t,r,e,i,n);var o=T9();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,Mo(r)?(o=!0,b5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w9(t),i.updater=O4,t.stateNode=i,i._reactInternals=t,A6(t,r,e,n),t=O6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&g9(t),Ji(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(T3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=tZ(r),e=gs(r,e),i){case 0:t=I6(null,t,r,e,n);break e;case 1:t=SP(null,t,r,e,n);break e;case 11:t=yP(null,t,r,e,n);break e;case 14:t=bP(null,t,r,gs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),I6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),SP(e,t,r,i,n);case 3:e:{if(OR(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,rR(e,t),_5(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=$0(Error(Re(423)),t),t=xP(e,t,r,n,i);break e}else if(r!==i){i=$0(Error(Re(424)),t),t=xP(e,t,r,n,i);break e}else for(aa=Xc(t.stateNode.containerInfo.firstChild),sa=t,ir=!0,ys=null,n=sR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(z0(),r===i){t=wu(e,t,n);break e}Ji(e,t,r,n)}t=t.child}return t;case 5:return lR(t),e===null&&P6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,w6(r,i)?a=null:o!==null&&w6(r,o)&&(t.flags|=32),IR(e,t),Ji(e,t,a,n),t.child;case 6:return e===null&&P6(t),null;case 13:return RR(e,t,n);case 4:return C9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=B0(t,null,r,n):Ji(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),yP(e,t,r,i,n);case 7:return Ji(e,t,t.pendingProps,n),t.child;case 8:return Ji(e,t,t.pendingProps.children,n),t.child;case 12:return Ji(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,qn(w5,r._currentValue),r._currentValue=a,o!==null)if(Ls(o.value,a)){if(o.children===i.children&&!Ao.current){t=wu(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=vu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),T6(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(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),T6(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}Ji(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,f0(t,n),i=$a(i),r=r(i),t.flags|=1,Ji(e,t,r,n),t.child;case 14:return r=t.type,i=gs(r,t.pendingProps),i=gs(r.type,i),bP(e,t,r,i,n);case 15:return AR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),T3(e,t),t.tag=1,Mo(r)?(e=!0,b5(t)):e=!1,f0(t,n),oR(t,r,i),A6(t,r,i,n),O6(null,t,r,!0,e,n);case 19:return NR(e,t,n);case 22:return MR(e,t,n)}throw Error(Re(156,t.tag))};function ZR(e,t){return CO(e,t)}function eZ(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 Na(e,t,n,r){return new eZ(e,t,n,r)}function B9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tZ(e){if(typeof e=="function")return B9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r9)return 11;if(e===i9)return 14}return 2}function ed(e,t){var n=e.alternate;return n===null?(n=Na(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 M3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")B9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wp:return jf(n.children,i,o,t);case n9:a=8,i|=8;break;case e6:return e=Na(12,n,t,i|2),e.elementType=e6,e.lanes=o,e;case t6:return e=Na(13,n,t,i),e.elementType=t6,e.lanes=o,e;case n6:return e=Na(19,n,t,i),e.elementType=n6,e.lanes=o,e;case aO:return z4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iO:a=10;break e;case oO:a=9;break e;case r9:a=11;break e;case i9:a=14;break e;case Ic:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Na(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jf(e,t,n,r){return e=Na(7,e,r,t),e.lanes=n,e}function z4(e,t,n,r){return e=Na(22,e,r,t),e.elementType=aO,e.lanes=n,e.stateNode={isHidden:!1},e}function Cx(e,t,n){return e=Na(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Na(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nZ(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=ix(0),this.expirationTimes=ix(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ix(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F9(e,t,n,r,i,o,a,s,l){return e=new nZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Na(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w9(o),e}function rZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=pa})(Dl);const Cy=q7(Dl.exports);var OP=Dl.exports;Qw.createRoot=OP.createRoot,Qw.hydrateRoot=OP.hydrateRoot;var ks=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,W4={exports:{}},V4={};/** + * @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 lZ=C.exports,uZ=Symbol.for("react.element"),cZ=Symbol.for("react.fragment"),dZ=Object.prototype.hasOwnProperty,fZ=lZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hZ={key:!0,ref:!0,__self:!0,__source:!0};function tN(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)dZ.call(t,r)&&!hZ.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:uZ,type:e,key:o,ref:a,props:i,_owner:fZ.current}}V4.Fragment=cZ;V4.jsx=tN;V4.jsxs=tN;(function(e){e.exports=V4})(W4);const Wn=W4.exports.Fragment,x=W4.exports.jsx,ee=W4.exports.jsxs;var V9=C.exports.createContext({});V9.displayName="ColorModeContext";function Yv(){const e=C.exports.useContext(V9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var _y={light:"chakra-ui-light",dark:"chakra-ui-dark"};function pZ(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?.()},setClassName(r){document.body.classList.add(r?_y.dark:_y.light),document.body.classList.remove(r?_y.light:_y.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??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 gZ="chakra-ui-color-mode";function mZ(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var vZ=mZ(gZ),RP=()=>{};function NP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function nN(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=vZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>NP(a,s)),[h,g]=C.exports.useState(()=>NP(a)),{getSystemTheme:m,setClassName:v,setDataset:b,addListener:w}=C.exports.useMemo(()=>pZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const O=M==="system"?m():M;u(O),v(O==="dark"),b(O),a.set(O)},[a,m,v,b]);ks(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?RP:k,setColorMode:t?RP:P,forced:t!==void 0}),[E,k,P,t]);return x(V9.Provider,{value:T,children:n})}nN.displayName="ColorModeProvider";var G6={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]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",O="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",V="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",ue="[object Float64Array]",W="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",J="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,xe={};xe[j]=xe[ue]=xe[W]=xe[Q]=xe[ne]=xe[J]=xe[K]=xe[G]=xe[X]=!0,xe[s]=xe[l]=xe[V]=xe[h]=xe[$]=xe[g]=xe[m]=xe[v]=xe[w]=xe[E]=xe[k]=xe[M]=xe[O]=xe[R]=xe[z]=!1;var be=typeof bs=="object"&&bs&&bs.Object===Object&&bs,Ie=typeof self=="object"&&self&&self.Object===Object&&self,We=be||Ie||Function("return this")(),De=t&&!t.nodeType&&t,Qe=De&&!0&&e&&!e.nodeType&&e,st=Qe&&Qe.exports===De,Ct=st&&be.process,ft=function(){try{var U=Qe&&Qe.require&&Qe.require("util").types;return U||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),ut=ft&&ft.isTypedArray;function vt(U,te,he){switch(he.length){case 0:return U.call(te);case 1:return U.call(te,he[0]);case 2:return U.call(te,he[0],he[1]);case 3:return U.call(te,he[0],he[1],he[2])}return U.apply(te,he)}function Ee(U,te){for(var he=-1,Ye=Array(U);++he-1}function E1(U,te){var he=this.__data__,Ye=Xa(he,U);return Ye<0?(++this.size,he.push([U,te])):he[Ye][1]=te,this}Do.prototype.clear=Md,Do.prototype.delete=k1,Do.prototype.get=$u,Do.prototype.has=Id,Do.prototype.set=E1;function Rs(U){var te=-1,he=U==null?0:U.length;for(this.clear();++te1?he[zt-1]:void 0,yt=zt>2?he[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Oh(he[0],he[1],yt)&&(fn=zt<3?void 0:fn,zt=1),te=Object(te);++Ye-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Gu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ba(U,te){return U===te||U!==U&&te!==te}var zd=Vl(function(){return arguments}())?Vl:function(U){return Un(U)&&yn.call(U,"callee")&&!He.call(U,"callee")},jl=Array.isArray;function Ht(U){return U!=null&&Nh(U.length)&&!Yu(U)}function Rh(U){return Un(U)&&Ht(U)}var ju=Zt||F1;function Yu(U){if(!$o(U))return!1;var te=Ds(U);return te==v||te==b||te==u||te==T}function Nh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function $o(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Un(U){return U!=null&&typeof U=="object"}function Bd(U){if(!Un(U)||Ds(U)!=k)return!1;var te=ln(U);if(te===null)return!0;var he=yn.call(te,"constructor")&&te.constructor;return typeof he=="function"&&he instanceof he&&sn.call(he)==Xt}var Dh=ut?Je(ut):Wu;function Fd(U){return jr(U,zh(U))}function zh(U){return Ht(U)?D1(U,!0):zs(U)}var un=Za(function(U,te,he,Ye){zo(U,te,he,Ye)});function Wt(U){return function(){return U}}function Bh(U){return U}function F1(){return!1}e.exports=un})(G6,G6.exports);const Sl=G6.exports;function Es(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zf(e,...t){return yZ(e)?e(...t):e}var yZ=e=>typeof e=="function",bZ=e=>/!(important)?$/.test(e),DP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,j6=(e,t)=>n=>{const r=String(t),i=bZ(r),o=DP(r),a=e?`${e}.${o}`:o;let s=Es(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=DP(s),i?`${s} !important`:s};function gv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=j6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var ky=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ds(e,t){return n=>{const r={property:n,scale:e};return r.transform=gv({scale:e,transform:t}),r}}var SZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function xZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:SZ(t),transform:n?gv({scale:n,compose:r}):r}}var rN=["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 wZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rN].join(" ")}function CZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rN].join(" ")}var _Z={"--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(" ")},kZ={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 EZ(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 PZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},iN="& > :not(style) ~ :not(style)",TZ={[iN]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},LZ={[iN]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Y6={"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"},AZ=new Set(Object.values(Y6)),oN=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),MZ=e=>e.trim();function IZ(e,t){var n;if(e==null||oN.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(MZ).filter(Boolean);if(l?.length===0)return e;const u=s in Y6?Y6[s]:s;l.unshift(u);const h=l.map(g=>{if(AZ.has(g))return g;const m=g.indexOf(" "),[v,b]=m!==-1?[g.substr(0,m),g.substr(m+1)]:[g],w=aN(b)?b:b&&b.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var aN=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),OZ=(e,t)=>IZ(e,t??{});function RZ(e){return/^var\(--.+\)$/.test(e)}var NZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ol=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:_Z},backdropFilter(e){return e!=="auto"?e:kZ},ring(e){return EZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wZ():e==="auto-gpu"?CZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=NZ(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(RZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:OZ,blur:ol("blur"),opacity:ol("opacity"),brightness:ol("brightness"),contrast:ol("contrast"),dropShadow:ol("drop-shadow"),grayscale:ol("grayscale"),hueRotate:ol("hue-rotate"),invert:ol("invert"),saturate:ol("saturate"),sepia:ol("sepia"),bgImage(e){return e==null||aN(e)||oN.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){const{space:t,divide:n}=PZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ie={borderWidths:ds("borderWidths"),borderStyles:ds("borderStyles"),colors:ds("colors"),borders:ds("borders"),radii:ds("radii",rn.px),space:ds("space",ky(rn.vh,rn.px)),spaceT:ds("space",ky(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:gv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ds("sizes",ky(rn.vh,rn.px)),sizesT:ds("sizes",ky(rn.vh,rn.fraction)),shadows:ds("shadows"),logical:xZ,blur:ds("blur",rn.blur)},I3={background:ie.colors("background"),backgroundColor:ie.colors("backgroundColor"),backgroundImage:ie.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ie.prop("backgroundSize"),bgPosition:ie.prop("backgroundPosition"),bg:ie.colors("background"),bgColor:ie.colors("backgroundColor"),bgPos:ie.prop("backgroundPosition"),bgRepeat:ie.prop("backgroundRepeat"),bgAttachment:ie.prop("backgroundAttachment"),bgGradient:ie.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(I3,{bgImage:I3.backgroundImage,bgImg:I3.backgroundImage});var pn={border:ie.borders("border"),borderWidth:ie.borderWidths("borderWidth"),borderStyle:ie.borderStyles("borderStyle"),borderColor:ie.colors("borderColor"),borderRadius:ie.radii("borderRadius"),borderTop:ie.borders("borderTop"),borderBlockStart:ie.borders("borderBlockStart"),borderTopLeftRadius:ie.radii("borderTopLeftRadius"),borderStartStartRadius:ie.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ie.radii("borderTopRightRadius"),borderStartEndRadius:ie.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ie.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ie.borders("borderRight"),borderInlineEnd:ie.borders("borderInlineEnd"),borderBottom:ie.borders("borderBottom"),borderBlockEnd:ie.borders("borderBlockEnd"),borderBottomLeftRadius:ie.radii("borderBottomLeftRadius"),borderBottomRightRadius:ie.radii("borderBottomRightRadius"),borderLeft:ie.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ie.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ie.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ie.borders(["borderLeft","borderRight"]),borderInline:ie.borders("borderInline"),borderY:ie.borders(["borderTop","borderBottom"]),borderBlock:ie.borders("borderBlock"),borderTopWidth:ie.borderWidths("borderTopWidth"),borderBlockStartWidth:ie.borderWidths("borderBlockStartWidth"),borderTopColor:ie.colors("borderTopColor"),borderBlockStartColor:ie.colors("borderBlockStartColor"),borderTopStyle:ie.borderStyles("borderTopStyle"),borderBlockStartStyle:ie.borderStyles("borderBlockStartStyle"),borderBottomWidth:ie.borderWidths("borderBottomWidth"),borderBlockEndWidth:ie.borderWidths("borderBlockEndWidth"),borderBottomColor:ie.colors("borderBottomColor"),borderBlockEndColor:ie.colors("borderBlockEndColor"),borderBottomStyle:ie.borderStyles("borderBottomStyle"),borderBlockEndStyle:ie.borderStyles("borderBlockEndStyle"),borderLeftWidth:ie.borderWidths("borderLeftWidth"),borderInlineStartWidth:ie.borderWidths("borderInlineStartWidth"),borderLeftColor:ie.colors("borderLeftColor"),borderInlineStartColor:ie.colors("borderInlineStartColor"),borderLeftStyle:ie.borderStyles("borderLeftStyle"),borderInlineStartStyle:ie.borderStyles("borderInlineStartStyle"),borderRightWidth:ie.borderWidths("borderRightWidth"),borderInlineEndWidth:ie.borderWidths("borderInlineEndWidth"),borderRightColor:ie.colors("borderRightColor"),borderInlineEndColor:ie.colors("borderInlineEndColor"),borderRightStyle:ie.borderStyles("borderRightStyle"),borderInlineEndStyle:ie.borderStyles("borderInlineEndStyle"),borderTopRadius:ie.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ie.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ie.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ie.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var DZ={color:ie.colors("color"),textColor:ie.colors("color"),fill:ie.colors("fill"),stroke:ie.colors("stroke")},q6={boxShadow:ie.shadows("boxShadow"),mixBlendMode:!0,blendMode:ie.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ie.prop("backgroundBlendMode"),opacity:!0};Object.assign(q6,{shadow:q6.boxShadow});var zZ={filter:{transform:rn.filter},blur:ie.blur("--chakra-blur"),brightness:ie.propT("--chakra-brightness",rn.brightness),contrast:ie.propT("--chakra-contrast",rn.contrast),hueRotate:ie.degreeT("--chakra-hue-rotate"),invert:ie.propT("--chakra-invert",rn.invert),saturate:ie.propT("--chakra-saturate",rn.saturate),dropShadow:ie.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ie.blur("--chakra-backdrop-blur"),backdropBrightness:ie.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ie.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ie.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ie.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ie.propT("--chakra-backdrop-saturate",rn.saturate)},O5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:TZ,transform:gv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:LZ,transform:gv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ie.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ie.space("gap"),rowGap:ie.space("rowGap"),columnGap:ie.space("columnGap")};Object.assign(O5,{flexDir:O5.flexDirection});var sN={gridGap:ie.space("gridGap"),gridColumnGap:ie.space("gridColumnGap"),gridRowGap:ie.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},BZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ie.colors("outlineColor")},La={width:ie.sizesT("width"),inlineSize:ie.sizesT("inlineSize"),height:ie.sizes("height"),blockSize:ie.sizes("blockSize"),boxSize:ie.sizes(["width","height"]),minWidth:ie.sizes("minWidth"),minInlineSize:ie.sizes("minInlineSize"),minHeight:ie.sizes("minHeight"),minBlockSize:ie.sizes("minBlockSize"),maxWidth:ie.sizes("maxWidth"),maxInlineSize:ie.sizes("maxInlineSize"),maxHeight:ie.sizes("maxHeight"),maxBlockSize:ie.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ie.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(La,{w:La.width,h:La.height,minW:La.minWidth,maxW:La.maxWidth,minH:La.minHeight,maxH:La.maxHeight,overscroll:La.overscrollBehavior,overscrollX:La.overscrollBehaviorX,overscrollY:La.overscrollBehaviorY});var FZ={listStyleType:!0,listStylePosition:!0,listStylePos:ie.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ie.prop("listStyleImage")};function $Z(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},WZ=HZ($Z),VZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},UZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},kx=(e,t,n)=>{const r={},i=WZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},GZ={srOnly:{transform(e){return e===!0?VZ:e==="focusable"?UZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>kx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>kx(t,e,n)}},Mm={position:!0,pos:ie.prop("position"),zIndex:ie.prop("zIndex","zIndices"),inset:ie.spaceT("inset"),insetX:ie.spaceT(["left","right"]),insetInline:ie.spaceT("insetInline"),insetY:ie.spaceT(["top","bottom"]),insetBlock:ie.spaceT("insetBlock"),top:ie.spaceT("top"),insetBlockStart:ie.spaceT("insetBlockStart"),bottom:ie.spaceT("bottom"),insetBlockEnd:ie.spaceT("insetBlockEnd"),left:ie.spaceT("left"),insetInlineStart:ie.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ie.spaceT("right"),insetInlineEnd:ie.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Mm,{insetStart:Mm.insetInlineStart,insetEnd:Mm.insetInlineEnd});var jZ={ring:{transform:rn.ring},ringColor:ie.colors("--chakra-ring-color"),ringOffset:ie.prop("--chakra-ring-offset-width"),ringOffsetColor:ie.colors("--chakra-ring-offset-color"),ringInset:ie.prop("--chakra-ring-inset")},Zn={margin:ie.spaceT("margin"),marginTop:ie.spaceT("marginTop"),marginBlockStart:ie.spaceT("marginBlockStart"),marginRight:ie.spaceT("marginRight"),marginInlineEnd:ie.spaceT("marginInlineEnd"),marginBottom:ie.spaceT("marginBottom"),marginBlockEnd:ie.spaceT("marginBlockEnd"),marginLeft:ie.spaceT("marginLeft"),marginInlineStart:ie.spaceT("marginInlineStart"),marginX:ie.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ie.spaceT("marginInline"),marginY:ie.spaceT(["marginTop","marginBottom"]),marginBlock:ie.spaceT("marginBlock"),padding:ie.space("padding"),paddingTop:ie.space("paddingTop"),paddingBlockStart:ie.space("paddingBlockStart"),paddingRight:ie.space("paddingRight"),paddingBottom:ie.space("paddingBottom"),paddingBlockEnd:ie.space("paddingBlockEnd"),paddingLeft:ie.space("paddingLeft"),paddingInlineStart:ie.space("paddingInlineStart"),paddingInlineEnd:ie.space("paddingInlineEnd"),paddingX:ie.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ie.space("paddingInline"),paddingY:ie.space(["paddingTop","paddingBottom"]),paddingBlock:ie.space("paddingBlock")};Object.assign(Zn,{m:Zn.margin,mt:Zn.marginTop,mr:Zn.marginRight,me:Zn.marginInlineEnd,marginEnd:Zn.marginInlineEnd,mb:Zn.marginBottom,ml:Zn.marginLeft,ms:Zn.marginInlineStart,marginStart:Zn.marginInlineStart,mx:Zn.marginX,my:Zn.marginY,p:Zn.padding,pt:Zn.paddingTop,py:Zn.paddingY,px:Zn.paddingX,pb:Zn.paddingBottom,pl:Zn.paddingLeft,ps:Zn.paddingInlineStart,paddingStart:Zn.paddingInlineStart,pr:Zn.paddingRight,pe:Zn.paddingInlineEnd,paddingEnd:Zn.paddingInlineEnd});var YZ={textDecorationColor:ie.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ie.shadows("textShadow")},qZ={clipPath:!0,transform:ie.propT("transform",rn.transform),transformOrigin:!0,translateX:ie.spaceT("--chakra-translate-x"),translateY:ie.spaceT("--chakra-translate-y"),skewX:ie.degreeT("--chakra-skew-x"),skewY:ie.degreeT("--chakra-skew-y"),scaleX:ie.prop("--chakra-scale-x"),scaleY:ie.prop("--chakra-scale-y"),scale:ie.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ie.degreeT("--chakra-rotate")},KZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ie.prop("transitionDuration","transition.duration"),transitionProperty:ie.prop("transitionProperty","transition.property"),transitionTimingFunction:ie.prop("transitionTimingFunction","transition.easing")},XZ={fontFamily:ie.prop("fontFamily","fonts"),fontSize:ie.prop("fontSize","fontSizes",rn.px),fontWeight:ie.prop("fontWeight","fontWeights"),lineHeight:ie.prop("lineHeight","lineHeights"),letterSpacing:ie.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"}},ZZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ie.spaceT("scrollMargin"),scrollMarginTop:ie.spaceT("scrollMarginTop"),scrollMarginBottom:ie.spaceT("scrollMarginBottom"),scrollMarginLeft:ie.spaceT("scrollMarginLeft"),scrollMarginRight:ie.spaceT("scrollMarginRight"),scrollMarginX:ie.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ie.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ie.spaceT("scrollPadding"),scrollPaddingTop:ie.spaceT("scrollPaddingTop"),scrollPaddingBottom:ie.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ie.spaceT("scrollPaddingLeft"),scrollPaddingRight:ie.spaceT("scrollPaddingRight"),scrollPaddingX:ie.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ie.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function lN(e){return Es(e)&&e.reference?e.reference:String(e)}var U4=(e,...t)=>t.map(lN).join(` ${e} `).replace(/calc/g,""),zP=(...e)=>`calc(${U4("+",...e)})`,BP=(...e)=>`calc(${U4("-",...e)})`,K6=(...e)=>`calc(${U4("*",...e)})`,FP=(...e)=>`calc(${U4("/",...e)})`,$P=e=>{const t=lN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:K6(t,-1)},Af=Object.assign(e=>({add:(...t)=>Af(zP(e,...t)),subtract:(...t)=>Af(BP(e,...t)),multiply:(...t)=>Af(K6(e,...t)),divide:(...t)=>Af(FP(e,...t)),negate:()=>Af($P(e)),toString:()=>e.toString()}),{add:zP,subtract:BP,multiply:K6,divide:FP,negate:$P});function QZ(e,t="-"){return e.replace(/\s+/g,t)}function JZ(e){const t=QZ(e.toString());return tQ(eQ(t))}function eQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function tQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function nQ(e,t=""){return[t,e].filter(Boolean).join("-")}function rQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function iQ(e,t=""){return JZ(`--${nQ(e,t)}`)}function Nn(e,t,n){const r=iQ(e,n);return{variable:r,reference:rQ(r,t)}}function oQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function aQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function X6(e){if(e==null)return e;const{unitless:t}=aQ(e);return t||typeof e=="number"?`${e}px`:e}var uN=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,U9=e=>Object.fromEntries(Object.entries(e).sort(uN));function HP(e){const t=U9(e);return Object.assign(Object.values(t),t)}function sQ(e){const t=Object.keys(U9(e));return new Set(t)}function WP(e){if(!e)return e;e=X6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function sm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${X6(e)})`),t&&n.push("and",`(max-width: ${X6(t)})`),n.join(" ")}function lQ(e){if(!e)return null;e.base=e.base??"0px";const t=HP(e),n=Object.entries(e).sort(uN).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?WP(u):void 0,{_minW:WP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:sm(null,u),minWQuery:sm(a),minMaxQuery:sm(a,u)}}),r=sQ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:U9(e),asArray:HP(e),details:n,media:[null,...t.map(o=>sm(o)).slice(1)],toArrayValue(o){if(!Es(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;oQ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var ki={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}`},Ec=e=>cN(t=>e(t,"&"),"[role=group]","[data-group]",".group"),au=e=>cN(t=>e(t,"~ &"),"[data-peer]",".peer"),cN=(e,...t)=>t.map(e).join(", "),G4={_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:Ec(ki.hover),_peerHover:au(ki.hover),_groupFocus:Ec(ki.focus),_peerFocus:au(ki.focus),_groupFocusVisible:Ec(ki.focusVisible),_peerFocusVisible:au(ki.focusVisible),_groupActive:Ec(ki.active),_peerActive:au(ki.active),_groupDisabled:Ec(ki.disabled),_peerDisabled:au(ki.disabled),_groupInvalid:Ec(ki.invalid),_peerInvalid:au(ki.invalid),_groupChecked:Ec(ki.checked),_peerChecked:au(ki.checked),_groupFocusWithin:Ec(ki.focusWithin),_peerFocusWithin:au(ki.focusWithin),_peerPlaceholderShown:au(ki.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]"},uQ=Object.keys(G4);function VP(e,t){return Nn(String(e).replace(/\./g,"-"),void 0,t)}function cQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=VP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...b]=m,w=`${v}.-${b.join(".")}`,E=Af.negate(s),P=Af.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:E}=VP(b,t?.cssVarPrefix);return E},g=Es(s)?s:{default:s};n=Sl(n,Object.entries(g).reduce((m,[v,b])=>{var w;const E=h(b);if(v==="default")return m[l]=E,m;const P=((w=G4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function dQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function fQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var hQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function pQ(e){return fQ(e,hQ)}function gQ(e){return e.semanticTokens}function mQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function vQ({tokens:e,semanticTokens:t}){const n=Object.entries(Z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(Z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function Z6(e,t=1/0){return!Es(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Es(i)||Array.isArray(i)?Object.entries(Z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function yQ(e){var t;const n=mQ(e),r=pQ(n),i=gQ(n),o=vQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=cQ(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:lQ(n.breakpoints)}),n}var G9=Sl({},I3,pn,DZ,O5,La,zZ,jZ,BZ,sN,GZ,Mm,q6,Zn,ZZ,XZ,YZ,qZ,FZ,KZ),bQ=Object.assign({},Zn,La,O5,sN,Mm),SQ=Object.keys(bQ),xQ=[...Object.keys(G9),...uQ],wQ={...G9,...G4},CQ=e=>e in wQ,_Q=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zf(e[a],t);if(s==null)continue;if(s=Es(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;ue.startsWith("--")&&typeof t=="string"&&!EQ(t),TQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=kQ(t);return t=n(i)??r(o)??r(t),t};function LQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=zf(o,r),u=_Q(l)(r);let h={};for(let g in u){const m=u[g];let v=zf(m,r);g in n&&(g=n[g]),PQ(g,v)&&(v=TQ(r,v));let b=t[g];if(b===!0&&(b={property:g}),Es(v)){h[g]=h[g]??{},h[g]=Sl({},h[g],i(v,!0));continue}let w=((s=b?.transform)==null?void 0:s.call(b,v,r,l))??v;w=b?.processResult?i(w,!0):w;const E=zf(b?.property,r);if(!a&&b?.static){const P=zf(b.static,r);h=Sl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&Es(w)?h=Sl({},h,w):h[E]=w;continue}if(Es(w)){h=Sl({},h,w);continue}h[g]=w}return h};return i}var dN=e=>t=>LQ({theme:t,pseudos:G4,configs:G9})(e);function Jn(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function AQ(e,t){if(Array.isArray(e))return e;if(Es(e))return t(e);if(e!=null)return[e]}function MQ(e,t){for(let n=t+1;n{Sl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?Sl(u,k):u[P]=k;continue}u[P]=k}}return u}}function OQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=IQ(i);return Sl({},zf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function RQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return dQ(e,["styleConfig","size","variant","colorScheme"])}function NQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(a1,--No):0,W0--,Hr===10&&(W0=1,Y4--),Hr}function la(){return Hr=No2||vv(Hr)>3?"":" "}function YQ(e,t){for(;--t&&la()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return qv(e,O3()+(t<6&&_l()==32&&la()==32))}function J6(e){for(;la();)switch(Hr){case e:return No;case 34:case 39:e!==34&&e!==39&&J6(Hr);break;case 40:e===41&&J6(e);break;case 92:la();break}return No}function qQ(e,t){for(;la()&&e+Hr!==47+10;)if(e+Hr===42+42&&_l()===47)break;return"/*"+qv(t,No-1)+"*"+j4(e===47?e:la())}function KQ(e){for(;!vv(_l());)la();return qv(e,No)}function XQ(e){return vN(N3("",null,null,null,[""],e=mN(e),0,[0],e))}function N3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,b=0,w=1,E=1,P=1,k=0,T="",M=i,O=o,R=r,N=T;E;)switch(b=k,k=la()){case 40:if(b!=108&&Ti(N,g-1)==58){Q6(N+=wn(R3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=R3(k);break;case 9:case 10:case 13:case 32:N+=jQ(b);break;case 92:N+=YQ(O3()-1,7);continue;case 47:switch(_l()){case 42:case 47:Ey(ZQ(qQ(la(),O3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=hl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&hl(N)-g&&Ey(v>32?GP(N+";",r,n,g-1):GP(wn(N," ","")+";",r,n,g-2),l);break;case 59:N+=";";default:if(Ey(R=UP(N,t,n,u,h,i,s,T,M=[],O=[],g),o),k===123)if(h===0)N3(N,t,R,R,M,o,g,s,O);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:N3(e,R,R,r&&Ey(UP(e,R,R,0,0,i,s,T,i,M=[],g),O),i,O,g,s,r?M:O);break;default:N3(N,R,R,R,[""],O,0,s,O)}}u=h=v=0,w=P=1,T=N="",g=a;break;case 58:g=1+hl(N),v=b;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&GQ()==125)continue}switch(N+=j4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(hl(N)-1)*P,P=1;break;case 64:_l()===45&&(N+=R3(la())),m=_l(),h=g=hl(T=N+=KQ(O3())),k++;break;case 45:b===45&&hl(N)==2&&(w=0)}}return o}function UP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=q9(m),b=0,w=0,E=0;b0?m[P]+" "+k:wn(k,/&\f/g,m[P])))&&(l[E++]=T);return q4(e,t,n,i===0?j9:s,l,u,h)}function ZQ(e,t,n){return q4(e,t,n,fN,j4(UQ()),mv(e,2,-2),0)}function GP(e,t,n,r){return q4(e,t,n,Y9,mv(e,0,r),mv(e,r+1,-1),r)}function p0(e,t){for(var n="",r=q9(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+R5+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Q6(e,"stretch")?bN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,hl(e)-3-(~Q6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var aJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Y9:t.return=bN(t.value,t.length);break;case hN:return p0([Bg(t,{value:wn(t.value,"@","@"+gn)})],i);case j9:if(t.length)return VQ(t.props,function(o){switch(WQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return p0([Bg(t,{props:[wn(o,/:(read-\w+)/,":"+R5+"$1")]})],i);case"::placeholder":return p0([Bg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,":"+R5+"$1")]}),Bg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},sJ=[aJ],SN=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(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||sJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=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 yJ={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},bJ=/[A-Z]|^ms/g,SJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PN=function(t){return t.charCodeAt(1)===45},qP=function(t){return t!=null&&typeof t!="boolean"},Ex=yN(function(e){return PN(e)?e:e.replace(bJ,"-$&").toLowerCase()}),KP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(SJ,function(r,i,o){return pl={name:i,styles:o,next:pl},i})}return yJ[t]!==1&&!PN(t)&&typeof n=="number"&&n!==0?n+"px":n};function yv(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 pl={name:n.name,styles:n.styles,next:pl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)pl={name:r.name,styles:r.styles,next:pl},r=r.next;var i=n.styles+";";return i}return xJ(e,t,n)}case"function":{if(e!==void 0){var o=pl,a=n(e);return pl=o,yv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function xJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function BJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},RN=FJ(BJ);function NN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var DN=e=>NN(e,t=>t!=null);function $J(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var HJ=$J();function zN(e,...t){return DJ(e)?e(...t):e}function WJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function VJ(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 UJ=/^((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)-.*))$/,GJ=yN(function(e){return UJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jJ=GJ,YJ=function(t){return t!=="theme"},JP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?jJ:YJ},eT=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},qJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return kN(n,r,i),CJ(function(){return EN(n,r,i)}),null},KJ=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=eT(t,n,r),l=s||JP(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var ZJ=Cn("accordion").parts("root","container","button","panel").extend("icon"),QJ=Cn("alert").parts("title","description","container").extend("icon","spinner"),JJ=Cn("avatar").parts("label","badge","container").extend("excessLabel","group"),eee=Cn("breadcrumb").parts("link","item","container").extend("separator");Cn("button").parts();var tee=Cn("checkbox").parts("control","icon","container").extend("label");Cn("progress").parts("track","filledTrack").extend("label");var nee=Cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ree=Cn("editable").parts("preview","input","textarea"),iee=Cn("form").parts("container","requiredIndicator","helperText"),oee=Cn("formError").parts("text","icon"),aee=Cn("input").parts("addon","field","element"),see=Cn("list").parts("container","item","icon"),lee=Cn("menu").parts("button","list","item").extend("groupTitle","command","divider"),uee=Cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),cee=Cn("numberinput").parts("root","field","stepperGroup","stepper");Cn("pininput").parts("field");var dee=Cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),fee=Cn("progress").parts("label","filledTrack","track"),hee=Cn("radio").parts("container","control","label"),pee=Cn("select").parts("field","icon"),gee=Cn("slider").parts("container","track","thumb","filledTrack","mark"),mee=Cn("stat").parts("container","label","helpText","number","icon"),vee=Cn("switch").parts("container","track","thumb"),yee=Cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),bee=Cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),See=Cn("tag").parts("container","label","closeButton"),xee=Cn("card").parts("container","header","body","footer");function Mi(e,t){wee(e)&&(e="100%");var n=Cee(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 Py(e){return Math.min(1,Math.max(0,e))}function wee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Cee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function BN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ty(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bf(e){return e.length===1?"0"+e:String(e)}function _ee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function tT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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+(t1&&(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 kee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(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=Px(s,a,e+1/3),i=Px(s,a,e),o=Px(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function nT(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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>16,g:(e&65280)>>8,b:e&255}}var rC={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 Aee(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=Oee(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=_ee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(r=Ty(e.s),i=Ty(e.v),t=Eee(e.h,r,i),a=!0,s="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(r=Ty(e.s),o=Ty(e.l),t=kee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=BN(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 Mee="[-\\+]?\\d+%?",Iee="[-\\+]?\\d*\\.\\d+%?",Wc="(?:".concat(Iee,")|(?:").concat(Mee,")"),Tx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),Lx="[\\s|\\(]+(".concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")[,|\\s]+(").concat(Wc,")\\s*\\)?"),ps={CSS_UNIT:new RegExp(Wc),rgb:new RegExp("rgb"+Tx),rgba:new RegExp("rgba"+Lx),hsl:new RegExp("hsl"+Tx),hsla:new RegExp("hsla"+Lx),hsv:new RegExp("hsv"+Tx),hsva:new RegExp("hsva"+Lx),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 Oee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(rC[e])e=rC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ps.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ps.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ps.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ps.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ps.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ps.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ps.hex8.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),a:iT(n[4]),format:t?"name":"hex8"}:(n=ps.hex6.exec(e),n?{r:ta(n[1]),g:ta(n[2]),b:ta(n[3]),format:t?"name":"hex"}:(n=ps.hex4.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),a:iT(n[4]+n[4]),format:t?"name":"hex8"}:(n=ps.hex3.exec(e),n?{r:ta(n[1]+n[1]),g:ta(n[2]+n[2]),b:ta(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return Boolean(ps.CSS_UNIT.exec(String(e)))}var Kv=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=Lee(t)),this.originalInput=t;var i=Aee(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=BN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=nT(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=nT(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=tT(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=tT(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),rT(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),Pee(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(Mi(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(Mi(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="#"+rT(this.r,this.g,this.b,!1),n=0,r=Object.entries(rC);n=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=Py(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=Py(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=Py(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=Py(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;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(FN(e));return e.count=t,n}var r=Ree(e.hue,e.seed),i=Nee(r,e),o=Dee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Kv(a)}function Ree(e,t){var n=Bee(e),r=N5(n,t);return r<0&&(r=360+r),r}function Nee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return N5([0,100],t.seed);var n=$N(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 N5([r,i],t.seed)}function Dee(e,t,n){var r=zee(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 N5([r,i],n.seed)}function zee(e,t){for(var n=$N(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Bee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=WN.find(function(a){return a.name===e});if(n){var r=HN(n);if(r.hueRange)return r.hueRange}var i=new Kv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function $N(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=WN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function N5(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 HN(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 WN=[{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 Fee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,to=(e,t,n)=>{const r=Fee(e,`colors.${t}`,t),{isValid:i}=new Kv(r);return i?r:n},Hee=e=>t=>{const n=to(t,e);return new Kv(n).isDark()?"dark":"light"},Wee=e=>t=>Hee(e)(t)==="dark",V0=(e,t)=>n=>{const r=to(n,e);return new Kv(r).setAlpha(t).toRgbString()};function oT(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 Vee(e){const t=FN().toHexString();return!e||$ee(e)?t:e.string&&e.colors?Gee(e.string,e.colors):e.string&&!e.colors?Uee(e.string):e.colors&&!e.string?jee(e.colors):t}function Uee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Gee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function e8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function VN(e){return Yee(e)&&e.reference?e.reference:String(e)}var sb=(e,...t)=>t.map(VN).join(` ${e} `).replace(/calc/g,""),aT=(...e)=>`calc(${sb("+",...e)})`,sT=(...e)=>`calc(${sb("-",...e)})`,iC=(...e)=>`calc(${sb("*",...e)})`,lT=(...e)=>`calc(${sb("/",...e)})`,uT=e=>{const t=VN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:iC(t,-1)},hu=Object.assign(e=>({add:(...t)=>hu(aT(e,...t)),subtract:(...t)=>hu(sT(e,...t)),multiply:(...t)=>hu(iC(e,...t)),divide:(...t)=>hu(lT(e,...t)),negate:()=>hu(uT(e)),toString:()=>e.toString()}),{add:aT,subtract:sT,multiply:iC,divide:lT,negate:uT});function qee(e){return!Number.isInteger(parseFloat(e.toString()))}function Kee(e,t="-"){return e.replace(/\s+/g,t)}function UN(e){const t=Kee(e.toString());return t.includes("\\.")?e:qee(e)?t.replace(".","\\."):e}function Xee(e,t=""){return[t,UN(e)].filter(Boolean).join("-")}function Zee(e,t){return`var(${UN(e)}${t?`, ${t}`:""})`}function Qee(e,t=""){return`--${Xee(e,t)}`}function ni(e,t){const n=Qee(e,t?.prefix);return{variable:n,reference:Zee(n,Jee(t?.fallback))}}function Jee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:ete,defineMultiStyleConfig:tte}=Jn(ZJ.keys),nte={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},rte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},ite={pt:"2",px:"4",pb:"5"},ote={fontSize:"1.25em"},ate=ete({container:nte,button:rte,panel:ite,icon:ote}),ste=tte({baseStyle:ate}),{definePartsStyle:Xv,defineMultiStyleConfig:lte}=Jn(QJ.keys),ua=Nn("alert-fg"),Cu=Nn("alert-bg"),ute=Xv({container:{bg:Cu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ua.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function t8(e){const{theme:t,colorScheme:n}=e,r=V0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var cte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark}}}}),dte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ua.reference}}}),fte=Xv(e=>{const{colorScheme:t}=e,n=t8(e);return{container:{[ua.variable]:`colors.${t}.500`,[Cu.variable]:n.light,_dark:{[ua.variable]:`colors.${t}.200`,[Cu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ua.reference}}}),hte=Xv(e=>{const{colorScheme:t}=e;return{container:{[ua.variable]:"colors.white",[Cu.variable]:`colors.${t}.500`,_dark:{[ua.variable]:"colors.gray.900",[Cu.variable]:`colors.${t}.200`},color:ua.reference}}}),pte={subtle:cte,"left-accent":dte,"top-accent":fte,solid:hte},gte=lte({baseStyle:ute,variants:pte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),GN={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"},mte={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"},vte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},yte={...GN,...mte,container:vte},jN=yte,bte=e=>typeof e=="function";function io(e,...t){return bte(e)?e(...t):e}var{definePartsStyle:YN,defineMultiStyleConfig:Ste}=Jn(JJ.keys),g0=Nn("avatar-border-color"),Ax=Nn("avatar-bg"),xte={borderRadius:"full",border:"0.2em solid",[g0.variable]:"white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference},wte={[Ax.variable]:"colors.gray.200",_dark:{[Ax.variable]:"colors.whiteAlpha.400"},bgColor:Ax.reference},cT=Nn("avatar-background"),Cte=e=>{const{name:t,theme:n}=e,r=t?Vee({string:t}):"colors.gray.400",i=Wee(r)(n);let o="white";return i||(o="gray.800"),{bg:cT.reference,"&:not([data-loaded])":{[cT.variable]:r},color:o,[g0.variable]:"colors.white",_dark:{[g0.variable]:"colors.gray.800"},borderColor:g0.reference,verticalAlign:"top"}},_te=YN(e=>({badge:io(xte,e),excessLabel:io(wte,e),container:io(Cte,e)}));function Pc(e){const t=e!=="100%"?jN[e]:void 0;return YN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var kte={"2xs":Pc(4),xs:Pc(6),sm:Pc(8),md:Pc(12),lg:Pc(16),xl:Pc(24),"2xl":Pc(32),full:Pc("100%")},Ete=Ste({baseStyle:_te,sizes:kte,defaultProps:{size:"md"}}),Pte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},m0=Nn("badge-bg"),xl=Nn("badge-color"),Tte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.500`,.6)(n);return{[m0.variable]:`colors.${t}.500`,[xl.variable]:"colors.white",_dark:{[m0.variable]:r,[xl.variable]:"colors.whiteAlpha.800"},bg:m0.reference,color:xl.reference}},Lte=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.16)(n);return{[m0.variable]:`colors.${t}.100`,[xl.variable]:`colors.${t}.800`,_dark:{[m0.variable]:r,[xl.variable]:`colors.${t}.200`},bg:m0.reference,color:xl.reference}},Ate=e=>{const{colorScheme:t,theme:n}=e,r=V0(`${t}.200`,.8)(n);return{[xl.variable]:`colors.${t}.500`,_dark:{[xl.variable]:r},color:xl.reference,boxShadow:`inset 0 0 0px 1px ${xl.reference}`}},Mte={solid:Tte,subtle:Lte,outline:Ate},Om={baseStyle:Pte,variants:Mte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Ite,definePartsStyle:Ote}=Jn(eee.keys),Rte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Nte=Ote({link:Rte}),Dte=Ite({baseStyle:Nte}),zte={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"}}},qN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:bt("inherit","whiteAlpha.900")(e),_hover:{bg:bt("gray.100","whiteAlpha.200")(e)},_active:{bg:bt("gray.200","whiteAlpha.300")(e)}};const r=V0(`${t}.200`,.12)(n),i=V0(`${t}.200`,.24)(n);return{color:bt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:bt(`${t}.50`,r)(e)},_active:{bg:bt(`${t}.100`,i)(e)}}},Bte=e=>{const{colorScheme:t}=e,n=bt("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"},...io(qN,e)}},Fte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},$te=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=bt("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:bt("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:bt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=Fte[t]??{},a=bt(n,`${t}.200`)(e);return{bg:a,color:bt(r,"gray.800")(e),_hover:{bg:bt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:bt(o,`${t}.400`)(e)}}},Hte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:bt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:bt(`${t}.700`,`${t}.500`)(e)}}},Wte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Vte={ghost:qN,outline:Bte,solid:$te,link:Hte,unstyled:Wte},Ute={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"}},Gte={baseStyle:zte,variants:Vte,sizes:Ute,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yf,defineMultiStyleConfig:jte}=Jn(xee.keys),D5=Nn("card-bg"),v0=Nn("card-padding"),Yte=Yf({container:{[D5.variable]:"chakra-body-bg",backgroundColor:D5.reference,color:"chakra-body-text"},body:{padding:v0.reference,flex:"1 1 0%"},header:{padding:v0.reference},footer:{padding:v0.reference}}),qte={sm:Yf({container:{borderRadius:"base",[v0.variable]:"space.3"}}),md:Yf({container:{borderRadius:"md",[v0.variable]:"space.5"}}),lg:Yf({container:{borderRadius:"xl",[v0.variable]:"space.7"}})},Kte={elevated:Yf({container:{boxShadow:"base",_dark:{[D5.variable]:"colors.gray.700"}}}),outline:Yf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yf({container:{[D5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Xte=jte({baseStyle:Yte,variants:Kte,sizes:qte,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:D3,defineMultiStyleConfig:Zte}=Jn(tee.keys),Rm=Nn("checkbox-size"),Qte=e=>{const{colorScheme:t}=e;return{w:Rm.reference,h:Rm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e),_hover:{bg:bt(`${t}.600`,`${t}.300`)(e),borderColor:bt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:bt("gray.200","transparent")(e),bg:bt("gray.200","whiteAlpha.300")(e),color:bt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:bt(`${t}.500`,`${t}.200`)(e),borderColor:bt(`${t}.500`,`${t}.200`)(e),color:bt("white","gray.900")(e)},_disabled:{bg:bt("gray.100","whiteAlpha.100")(e),borderColor:bt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:bt("red.500","red.300")(e)}}},Jte={_disabled:{cursor:"not-allowed"}},ene={userSelect:"none",_disabled:{opacity:.4}},tne={transitionProperty:"transform",transitionDuration:"normal"},nne=D3(e=>({icon:tne,container:Jte,control:io(Qte,e),label:ene})),rne={sm:D3({control:{[Rm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:D3({control:{[Rm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:D3({control:{[Rm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},z5=Zte({baseStyle:nne,sizes:rne,defaultProps:{size:"md",colorScheme:"blue"}}),Nm=ni("close-button-size"),Fg=ni("close-button-bg"),ine={w:[Nm.reference],h:[Nm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Fg.variable]:"colors.blackAlpha.100",_dark:{[Fg.variable]:"colors.whiteAlpha.100"}},_active:{[Fg.variable]:"colors.blackAlpha.200",_dark:{[Fg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Fg.reference},one={lg:{[Nm.variable]:"sizes.10",fontSize:"md"},md:{[Nm.variable]:"sizes.8",fontSize:"xs"},sm:{[Nm.variable]:"sizes.6",fontSize:"2xs"}},ane={baseStyle:ine,sizes:one,defaultProps:{size:"md"}},{variants:sne,defaultProps:lne}=Om,une={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},cne={baseStyle:une,variants:sne,defaultProps:lne},dne={w:"100%",mx:"auto",maxW:"prose",px:"4"},fne={baseStyle:dne},hne={opacity:.6,borderColor:"inherit"},pne={borderStyle:"solid"},gne={borderStyle:"dashed"},mne={solid:pne,dashed:gne},vne={baseStyle:hne,variants:mne,defaultProps:{variant:"solid"}},{definePartsStyle:oC,defineMultiStyleConfig:yne}=Jn(nee.keys),Mx=Nn("drawer-bg"),Ix=Nn("drawer-box-shadow");function kp(e){return oC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var bne={bg:"blackAlpha.600",zIndex:"overlay"},Sne={display:"flex",zIndex:"modal",justifyContent:"center"},xne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Mx.variable]:"colors.white",[Ix.variable]:"shadows.lg",_dark:{[Mx.variable]:"colors.gray.700",[Ix.variable]:"shadows.dark-lg"},bg:Mx.reference,boxShadow:Ix.reference}},wne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Cne={position:"absolute",top:"2",insetEnd:"3"},_ne={px:"6",py:"2",flex:"1",overflow:"auto"},kne={px:"6",py:"4"},Ene=oC(e=>({overlay:bne,dialogContainer:Sne,dialog:io(xne,e),header:wne,closeButton:Cne,body:_ne,footer:kne})),Pne={xs:kp("xs"),sm:kp("md"),md:kp("lg"),lg:kp("2xl"),xl:kp("4xl"),full:kp("full")},Tne=yne({baseStyle:Ene,sizes:Pne,defaultProps:{size:"xs"}}),{definePartsStyle:Lne,defineMultiStyleConfig:Ane}=Jn(ree.keys),Mne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Ine={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},One={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Rne=Lne({preview:Mne,input:Ine,textarea:One}),Nne=Ane({baseStyle:Rne}),{definePartsStyle:Dne,defineMultiStyleConfig:zne}=Jn(iee.keys),y0=Nn("form-control-color"),Bne={marginStart:"1",[y0.variable]:"colors.red.500",_dark:{[y0.variable]:"colors.red.300"},color:y0.reference},Fne={mt:"2",[y0.variable]:"colors.gray.600",_dark:{[y0.variable]:"colors.whiteAlpha.600"},color:y0.reference,lineHeight:"normal",fontSize:"sm"},$ne=Dne({container:{width:"100%",position:"relative"},requiredIndicator:Bne,helperText:Fne}),Hne=zne({baseStyle:$ne}),{definePartsStyle:Wne,defineMultiStyleConfig:Vne}=Jn(oee.keys),b0=Nn("form-error-color"),Une={[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Gne={marginEnd:"0.5em",[b0.variable]:"colors.red.500",_dark:{[b0.variable]:"colors.red.300"},color:b0.reference},jne=Wne({text:Une,icon:Gne}),Yne=Vne({baseStyle:jne}),qne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Kne={baseStyle:qne},Xne={fontFamily:"heading",fontWeight:"bold"},Zne={"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}},Qne={baseStyle:Xne,sizes:Zne,defaultProps:{size:"xl"}},{definePartsStyle:mu,defineMultiStyleConfig:Jne}=Jn(aee.keys),ere=mu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Tc={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"}},tre={lg:mu({field:Tc.lg,addon:Tc.lg}),md:mu({field:Tc.md,addon:Tc.md}),sm:mu({field:Tc.sm,addon:Tc.sm}),xs:mu({field:Tc.xs,addon:Tc.xs})};function n8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||bt("blue.500","blue.300")(e),errorBorderColor:n||bt("red.500","red.300")(e)}}var nre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:bt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0 0 0 1px ${to(t,r)}`},_focusVisible:{zIndex:1,borderColor:to(t,n),boxShadow:`0 0 0 1px ${to(t,n)}`}},addon:{border:"1px solid",borderColor:bt("inherit","whiteAlpha.50")(e),bg:bt("gray.100","whiteAlpha.300")(e)}}}),rre=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e),_hover:{bg:bt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r)},_focusVisible:{bg:"transparent",borderColor:to(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:bt("gray.100","whiteAlpha.50")(e)}}}),ire=mu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:to(t,r),boxShadow:`0px 1px 0px 0px ${to(t,r)}`},_focusVisible:{borderColor:to(t,n),boxShadow:`0px 1px 0px 0px ${to(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),ore=mu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),are={outline:nre,filled:rre,flushed:ire,unstyled:ore},mn=Jne({baseStyle:ere,sizes:tre,variants:are,defaultProps:{size:"md",variant:"outline"}}),Ox=Nn("kbd-bg"),sre={[Ox.variable]:"colors.gray.100",_dark:{[Ox.variable]:"colors.whiteAlpha.100"},bg:Ox.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},lre={baseStyle:sre},ure={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},cre={baseStyle:ure},{defineMultiStyleConfig:dre,definePartsStyle:fre}=Jn(see.keys),hre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},pre=fre({icon:hre}),gre=dre({baseStyle:pre}),{defineMultiStyleConfig:mre,definePartsStyle:vre}=Jn(lee.keys),fl=Nn("menu-bg"),Rx=Nn("menu-shadow"),yre={[fl.variable]:"#fff",[Rx.variable]:"shadows.sm",_dark:{[fl.variable]:"colors.gray.700",[Rx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:fl.reference,boxShadow:Rx.reference},bre={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_active:{[fl.variable]:"colors.gray.200",_dark:{[fl.variable]:"colors.whiteAlpha.200"}},_expanded:{[fl.variable]:"colors.gray.100",_dark:{[fl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:fl.reference},Sre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},xre={opacity:.6},wre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Cre={transitionProperty:"common",transitionDuration:"normal"},_re=vre({button:Cre,list:yre,item:bre,groupTitle:Sre,command:xre,divider:wre}),kre=mre({baseStyle:_re}),{defineMultiStyleConfig:Ere,definePartsStyle:aC}=Jn(uee.keys),Pre={bg:"blackAlpha.600",zIndex:"modal"},Tre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Lre=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:bt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:bt("lg","dark-lg")(e)}},Are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mre={position:"absolute",top:"2",insetEnd:"3"},Ire=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Ore={px:"6",py:"4"},Rre=aC(e=>({overlay:Pre,dialogContainer:io(Tre,e),dialog:io(Lre,e),header:Are,closeButton:Mre,body:io(Ire,e),footer:Ore}));function fs(e){return aC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Nre={xs:fs("xs"),sm:fs("sm"),md:fs("md"),lg:fs("lg"),xl:fs("xl"),"2xl":fs("2xl"),"3xl":fs("3xl"),"4xl":fs("4xl"),"5xl":fs("5xl"),"6xl":fs("6xl"),full:fs("full")},Dre=Ere({baseStyle:Rre,sizes:Nre,defaultProps:{size:"md"}}),zre={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"}},KN=zre,{defineMultiStyleConfig:Bre,definePartsStyle:XN}=Jn(cee.keys),r8=ni("number-input-stepper-width"),ZN=ni("number-input-input-padding"),Fre=hu(r8).add("0.5rem").toString(),Nx=ni("number-input-bg"),Dx=ni("number-input-color"),zx=ni("number-input-border-color"),$re={[r8.variable]:"sizes.6",[ZN.variable]:Fre},Hre=e=>{var t;return((t=io(mn.baseStyle,e))==null?void 0:t.field)??{}},Wre={width:r8.reference},Vre={borderStart:"1px solid",borderStartColor:zx.reference,color:Dx.reference,bg:Nx.reference,[Dx.variable]:"colors.chakra-body-text",[zx.variable]:"colors.chakra-border-color",_dark:{[Dx.variable]:"colors.whiteAlpha.800",[zx.variable]:"colors.whiteAlpha.300"},_active:{[Nx.variable]:"colors.gray.200",_dark:{[Nx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Ure=XN(e=>({root:$re,field:io(Hre,e)??{},stepperGroup:Wre,stepper:Vre}));function Ly(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=KN.fontSizes[o];return XN({field:{...r.field,paddingInlineEnd:ZN.reference,verticalAlign:"top"},stepper:{fontSize:hu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Gre={xs:Ly("xs"),sm:Ly("sm"),md:Ly("md"),lg:Ly("lg")},jre=Bre({baseStyle:Ure,sizes:Gre,variants:mn.variants,defaultProps:mn.defaultProps}),dT,Yre={...(dT=mn.baseStyle)==null?void 0:dT.field,textAlign:"center"},qre={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"}},fT,Kre={outline:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=io((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((fT=mn.variants)==null?void 0:fT.unstyled.field)??{}},Xre={baseStyle:Yre,sizes:qre,variants:Kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=Jn(dee.keys),Ay=ni("popper-bg"),Jre=ni("popper-arrow-bg"),hT=ni("popper-arrow-shadow-color"),eie={zIndex:10},tie={[Ay.variable]:"colors.white",bg:Ay.reference,[Jre.variable]:Ay.reference,[hT.variable]:"colors.gray.200",_dark:{[Ay.variable]:"colors.gray.700",[hT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},nie={px:3,py:2,borderBottomWidth:"1px"},rie={px:3,py:2},iie={px:3,py:2,borderTopWidth:"1px"},oie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},aie=Qre({popper:eie,content:tie,header:nie,body:rie,footer:iie,closeButton:oie}),sie=Zre({baseStyle:aie}),{defineMultiStyleConfig:lie,definePartsStyle:lm}=Jn(fee.keys),uie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=bt(oT(),oT("1rem","rgba(0,0,0,0.1)"))(e),a=bt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${to(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},cie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},die=e=>({bg:bt("gray.100","whiteAlpha.300")(e)}),fie=e=>({transitionProperty:"common",transitionDuration:"slow",...uie(e)}),hie=lm(e=>({label:cie,filledTrack:fie(e),track:die(e)})),pie={xs:lm({track:{h:"1"}}),sm:lm({track:{h:"2"}}),md:lm({track:{h:"3"}}),lg:lm({track:{h:"4"}})},gie=lie({sizes:pie,baseStyle:hie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:mie,definePartsStyle:z3}=Jn(hee.keys),vie=e=>{var t;const n=(t=io(z5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},yie=z3(e=>{var t,n,r,i;return{label:(n=(t=z5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=z5).baseStyle)==null?void 0:i.call(r,e).container,control:vie(e)}}),bie={md:z3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:z3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:z3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Sie=mie({baseStyle:yie,sizes:bie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:xie,definePartsStyle:wie}=Jn(pee.keys),My=Nn("select-bg"),pT,Cie={...(pT=mn.baseStyle)==null?void 0:pT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:My.reference,[My.variable]:"colors.white",_dark:{[My.variable]:"colors.gray.700"},"> option, > optgroup":{bg:My.reference}},_ie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},kie=wie({field:Cie,icon:_ie}),Iy={paddingInlineEnd:"8"},gT,mT,vT,yT,bT,ST,xT,wT,Eie={lg:{...(gT=mn.sizes)==null?void 0:gT.lg,field:{...(mT=mn.sizes)==null?void 0:mT.lg.field,...Iy}},md:{...(vT=mn.sizes)==null?void 0:vT.md,field:{...(yT=mn.sizes)==null?void 0:yT.md.field,...Iy}},sm:{...(bT=mn.sizes)==null?void 0:bT.sm,field:{...(ST=mn.sizes)==null?void 0:ST.sm.field,...Iy}},xs:{...(xT=mn.sizes)==null?void 0:xT.xs,field:{...(wT=mn.sizes)==null?void 0:wT.xs.field,...Iy},icon:{insetEnd:"1"}}},Pie=xie({baseStyle:kie,sizes:Eie,variants:mn.variants,defaultProps:mn.defaultProps}),Bx=Nn("skeleton-start-color"),Fx=Nn("skeleton-end-color"),Tie={[Bx.variable]:"colors.gray.100",[Fx.variable]:"colors.gray.400",_dark:{[Bx.variable]:"colors.gray.800",[Fx.variable]:"colors.gray.600"},background:Bx.reference,borderColor:Fx.reference,opacity:.7,borderRadius:"sm"},Lie={baseStyle:Tie},$x=Nn("skip-link-bg"),Aie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},bg:$x.reference}},Mie={baseStyle:Aie},{defineMultiStyleConfig:Iie,definePartsStyle:lb}=Jn(gee.keys),xv=Nn("slider-thumb-size"),wv=Nn("slider-track-size"),zc=Nn("slider-bg"),Oie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...e8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Rie=e=>({...e8({orientation:e.orientation,horizontal:{h:wv.reference},vertical:{w:wv.reference}}),overflow:"hidden",borderRadius:"sm",[zc.variable]:"colors.gray.200",_dark:{[zc.variable]:"colors.whiteAlpha.200"},_disabled:{[zc.variable]:"colors.gray.300",_dark:{[zc.variable]:"colors.whiteAlpha.300"}},bg:zc.reference}),Nie=e=>{const{orientation:t}=e;return{...e8({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:xv.reference,h:xv.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"}}},Die=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[zc.variable]:`colors.${t}.500`,_dark:{[zc.variable]:`colors.${t}.200`},bg:zc.reference}},zie=lb(e=>({container:Oie(e),track:Rie(e),thumb:Nie(e),filledTrack:Die(e)})),Bie=lb({container:{[xv.variable]:"sizes.4",[wv.variable]:"sizes.1"}}),Fie=lb({container:{[xv.variable]:"sizes.3.5",[wv.variable]:"sizes.1"}}),$ie=lb({container:{[xv.variable]:"sizes.2.5",[wv.variable]:"sizes.0.5"}}),Hie={lg:Bie,md:Fie,sm:$ie},Wie=Iie({baseStyle:zie,sizes:Hie,defaultProps:{size:"md",colorScheme:"blue"}}),Mf=ni("spinner-size"),Vie={width:[Mf.reference],height:[Mf.reference]},Uie={xs:{[Mf.variable]:"sizes.3"},sm:{[Mf.variable]:"sizes.4"},md:{[Mf.variable]:"sizes.6"},lg:{[Mf.variable]:"sizes.8"},xl:{[Mf.variable]:"sizes.12"}},Gie={baseStyle:Vie,sizes:Uie,defaultProps:{size:"md"}},{defineMultiStyleConfig:jie,definePartsStyle:QN}=Jn(mee.keys),Yie={fontWeight:"medium"},qie={opacity:.8,marginBottom:"2"},Kie={verticalAlign:"baseline",fontWeight:"semibold"},Xie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Zie=QN({container:{},label:Yie,helpText:qie,number:Kie,icon:Xie}),Qie={md:QN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Jie=jie({baseStyle:Zie,sizes:Qie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:eoe,definePartsStyle:B3}=Jn(vee.keys),Dm=ni("switch-track-width"),qf=ni("switch-track-height"),Hx=ni("switch-track-diff"),toe=hu.subtract(Dm,qf),sC=ni("switch-thumb-x"),$g=ni("switch-bg"),noe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Dm.reference],height:[qf.reference],transitionProperty:"common",transitionDuration:"fast",[$g.variable]:"colors.gray.300",_dark:{[$g.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[$g.variable]:`colors.${t}.500`,_dark:{[$g.variable]:`colors.${t}.200`}},bg:$g.reference}},roe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qf.reference],height:[qf.reference],_checked:{transform:`translateX(${sC.reference})`}},ioe=B3(e=>({container:{[Hx.variable]:toe,[sC.variable]:Hx.reference,_rtl:{[sC.variable]:hu(Hx).negate().toString()}},track:noe(e),thumb:roe})),ooe={sm:B3({container:{[Dm.variable]:"1.375rem",[qf.variable]:"sizes.3"}}),md:B3({container:{[Dm.variable]:"1.875rem",[qf.variable]:"sizes.4"}}),lg:B3({container:{[Dm.variable]:"2.875rem",[qf.variable]:"sizes.6"}})},aoe=eoe({baseStyle:ioe,sizes:ooe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:S0}=Jn(yee.keys),loe=S0({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"}}),B5={"&[data-is-numeric=true]":{textAlign:"end"}},uoe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),coe=S0(e=>{const{colorScheme:t}=e;return{th:{color:bt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},td:{borderBottom:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e),...B5},caption:{color:bt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:bt(`${t}.100`,`${t}.700`)(e)},td:{background:bt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),doe={simple:uoe,striped:coe,unstyled:{}},foe={sm:S0({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:S0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:S0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},hoe=soe({baseStyle:loe,variants:doe,sizes:foe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),To=Nn("tabs-color"),Ss=Nn("tabs-bg"),Oy=Nn("tabs-border-color"),{defineMultiStyleConfig:poe,definePartsStyle:kl}=Jn(bee.keys),goe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},moe=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}}},voe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},yoe={p:4},boe=kl(e=>({root:goe(e),tab:moe(e),tablist:voe(e),tabpanel:yoe})),Soe={sm:kl({tab:{py:1,px:4,fontSize:"sm"}}),md:kl({tab:{fontSize:"md",py:2,px:4}}),lg:kl({tab:{fontSize:"lg",py:3,px:4}})},xoe=kl(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:{[To.variable]:`colors.${t}.600`,_dark:{[To.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ss.variable]:"colors.gray.200",_dark:{[Ss.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:To.reference,bg:Ss.reference}}}),woe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Oy.reference]:"transparent",_selected:{[To.variable]:`colors.${t}.600`,[Oy.variable]:"colors.white",_dark:{[To.variable]:`colors.${t}.300`,[Oy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Oy.reference},color:To.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Coe=kl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ss.variable]:"colors.gray.50",_dark:{[Ss.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ss.variable]:"colors.white",[To.variable]:`colors.${t}.600`,_dark:{[Ss.variable]:"colors.gray.800",[To.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:To.reference,bg:Ss.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),_oe=kl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:to(n,`${t}.700`),bg:to(n,`${t}.100`)}}}}),koe=kl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[To.variable]:"colors.gray.600",_dark:{[To.variable]:"inherit"},_selected:{[To.variable]:"colors.white",[Ss.variable]:`colors.${t}.600`,_dark:{[To.variable]:"colors.gray.800",[Ss.variable]:`colors.${t}.300`}},color:To.reference,bg:Ss.reference}}}),Eoe=kl({}),Poe={line:xoe,enclosed:woe,"enclosed-colored":Coe,"soft-rounded":_oe,"solid-rounded":koe,unstyled:Eoe},Toe=poe({baseStyle:boe,sizes:Soe,variants:Poe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Loe,definePartsStyle:Kf}=Jn(See.keys),Aoe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Moe={lineHeight:1.2,overflow:"visible"},Ioe={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}},Ooe=Kf({container:Aoe,label:Moe,closeButton:Ioe}),Roe={sm:Kf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Kf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Noe={subtle:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.subtle(e)}}),solid:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.solid(e)}}),outline:Kf(e=>{var t;return{container:(t=Om.variants)==null?void 0:t.outline(e)}})},Doe=Loe({variants:Noe,baseStyle:Ooe,sizes:Roe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),CT,zoe={...(CT=mn.baseStyle)==null?void 0:CT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},_T,Boe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((_T=mn.variants)==null?void 0:_T.unstyled.field)??{}},kT,ET,PT,TT,Foe={xs:((kT=mn.sizes)==null?void 0:kT.xs.field)??{},sm:((ET=mn.sizes)==null?void 0:ET.sm.field)??{},md:((PT=mn.sizes)==null?void 0:PT.md.field)??{},lg:((TT=mn.sizes)==null?void 0:TT.lg.field)??{}},$oe={baseStyle:zoe,sizes:Foe,variants:Boe,defaultProps:{size:"md",variant:"outline"}},Ry=ni("tooltip-bg"),Wx=ni("tooltip-fg"),Hoe=ni("popper-arrow-bg"),Woe={bg:Ry.reference,color:Wx.reference,[Ry.variable]:"colors.gray.700",[Wx.variable]:"colors.whiteAlpha.900",_dark:{[Ry.variable]:"colors.gray.300",[Wx.variable]:"colors.gray.900"},[Hoe.variable]:Ry.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Voe={baseStyle:Woe},Uoe={Accordion:ste,Alert:gte,Avatar:Ete,Badge:Om,Breadcrumb:Dte,Button:Gte,Checkbox:z5,CloseButton:ane,Code:cne,Container:fne,Divider:vne,Drawer:Tne,Editable:Nne,Form:Hne,FormError:Yne,FormLabel:Kne,Heading:Qne,Input:mn,Kbd:lre,Link:cre,List:gre,Menu:kre,Modal:Dre,NumberInput:jre,PinInput:Xre,Popover:sie,Progress:gie,Radio:Sie,Select:Pie,Skeleton:Lie,SkipLink:Mie,Slider:Wie,Spinner:Gie,Stat:Jie,Switch:aoe,Table:hoe,Tabs:Toe,Tag:Doe,Textarea:$oe,Tooltip:Voe,Card:Xte},Goe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},joe=Goe,Yoe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},qoe=Yoe,Koe={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"}},Xoe=Koe,Zoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Qoe=Zoe,Joe={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"},eae=Joe,tae={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"},nae={"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)"},rae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},iae={property:tae,easing:nae,duration:rae},oae=iae,aae={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},sae=aae,lae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},uae=lae,cae={breakpoints:qoe,zIndices:sae,radii:Qoe,blur:uae,colors:Xoe,...KN,sizes:jN,shadows:eae,space:GN,borders:joe,transition:oae},dae={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"}}},fae={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"}}},hae="ltr",pae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},gae={semanticTokens:dae,direction:hae,...cae,components:Uoe,styles:fae,config:pae},mae=typeof Element<"u",vae=typeof Map=="function",yae=typeof Set=="function",bae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function F3(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(!F3(e[r],t[r]))return!1;return!0}var o;if(vae&&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(!F3(r.value[1],t.get(r.value[0])))return!1;return!0}if(yae&&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(bae&&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(mae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!F3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Sae=function(t,n){try{return F3(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 s1(){const e=C.exports.useContext(bv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function JN(){const e=Yv(),t=s1();return{...e,theme:t}}function xae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function wae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Cae(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)=>{if(e==="breakpoints")return xae(o,l,a[u]??l);const h=`${e}.${l}`;return wae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function _ae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>yQ(n),[n]);return ee(PJ,{theme:i,children:[x(kae,{root:t}),r]})}function kae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(ob,{styles:n=>({[t]:n.__cssVars})})}VJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Eae(){const{colorMode:e}=Yv();return x(ob,{styles:t=>{const n=RN(t,"styles.global"),r=zN(n,{theme:t,colorMode:e});return r?dN(r)(t):void 0}})}var Pae=new Set([...xQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Tae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Lae(e){return Tae.has(e)||!Pae.has(e)}var Aae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=NN(a,(g,m)=>CQ(m)),l=zN(e,t),u=Object.assign({},i,l,DN(s),o),h=dN(u)(t.theme);return r?[h,r]:h};function Vx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Lae);const i=Aae({baseStyle:n}),o=nC(e,r)(i);return ae.forwardRef(function(l,u){const{colorMode:h,forced:g}=Yv();return ae.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function ke(e){return C.exports.forwardRef(e)}function eD(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=JN(),a=e?RN(i,`components.${e}`):void 0,s=n||a,l=Sl({theme:i,colorMode:o},s?.defaultProps??{},DN(zJ(r,["children"]))),u=C.exports.useRef({});if(s){const g=OQ(s)(l);Sae(u.current,g)||(u.current=g)}return u.current}function so(e,t={}){return eD(e,t)}function Oi(e,t={}){return eD(e,t)}function Mae(){const e=new Map;return new Proxy(Vx,{apply(t,n,r){return Vx(...r)},get(t,n){return e.has(n)||e.set(n,Vx(n)),e.get(n)}})}var Se=Mae();function Iae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function _n(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 h=new Error(o??Iae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function Oae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Hn(...e){return t=>{e.forEach(n=>{Oae(n,t)})}}function Rae(...e){return C.exports.useMemo(()=>Hn(...e),e)}function LT(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 Nae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function AT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function MT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var lC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,F5=e=>e,Dae=class{descendants=new Map;register=e=>{if(e!=null)return Nae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=LT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=AT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=AT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=MT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=MT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=LT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function zae(){const e=C.exports.useRef(new Dae);return lC(()=>()=>e.current.destroy()),e.current}var[Bae,tD]=_n({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Fae(e){const t=tD(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);lC(()=>()=>{!i.current||t.unregister(i.current)},[]),lC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=F5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Hn(o,i)}}function nD(){return[F5(Bae),()=>F5(tD()),()=>zae(),i=>Fae(i)]}var Nr=(...e)=>e.filter(Boolean).join(" "),IT={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},va=ke((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Nr("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r??IT.viewBox;if(n&&typeof n!="string")return ae.createElement(Se.svg,{as:n,...m,...u});const b=a??IT.path;return ae.createElement(Se.svg,{verticalAlign:"middle",viewBox:v,...m,...u},b)});va.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=ke((s,l)=>x(va,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function dr(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 ub(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=dr(r),a=dr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=dr(m=>{const b=typeof m=="function"?m(h):m;!a(h,b)||(u||l(b),o(b))},[u,o,h,a]);return[h,g]}const i8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),cb=C.exports.createContext({});function $ae(){return C.exports.useContext(cb).visualElement}const l1=C.exports.createContext(null),ph=typeof document<"u",$5=ph?C.exports.useLayoutEffect:C.exports.useEffect,rD=C.exports.createContext({strict:!1});function Hae(e,t,n,r){const i=$ae(),o=C.exports.useContext(rD),a=C.exports.useContext(l1),s=C.exports.useContext(i8).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 $5(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),$5(()=>()=>u&&u.notify("Unmount"),[]),u}function Jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wae(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):Jp(n)&&(n.current=r))},[t])}function Cv(e){return typeof e=="string"||Array.isArray(e)}function db(e){return typeof e=="object"&&typeof e.start=="function"}const Vae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function fb(e){return db(e.animate)||Vae.some(t=>Cv(e[t]))}function iD(e){return Boolean(fb(e)||e.variants)}function Uae(e,t){if(fb(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cv(n)?n:void 0,animate:Cv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Gae(e){const{initial:t,animate:n}=Uae(e,C.exports.useContext(cb));return C.exports.useMemo(()=>({initial:t,animate:n}),[OT(t),OT(n)])}function OT(e){return Array.isArray(e)?e.join(" "):e}const lu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),_v={measureLayout:lu(["layout","layoutId","drag"]),animation:lu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:lu(["exit"]),drag:lu(["drag","dragControls"]),focus:lu(["whileFocus"]),hover:lu(["whileHover","onHoverStart","onHoverEnd"]),tap:lu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:lu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:lu(["whileInView","onViewportEnter","onViewportLeave"])};function jae(e){for(const t in e)t==="projectionNodeConstructor"?_v.projectionNodeConstructor=e[t]:_v[t].Component=e[t]}function hb(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const zm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Yae=1;function qae(){return hb(()=>{if(zm.hasEverUpdated)return Yae++})}const o8=C.exports.createContext({});class Kae extends ae.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const oD=C.exports.createContext({}),Xae=Symbol.for("motionComponentSymbol");function Zae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&jae(e);function a(l,u){const h={...C.exports.useContext(i8),...l,layoutId:Qae(l)},{isStatic:g}=h;let m=null;const v=Gae(l),b=g?void 0:qae(),w=i(l,g);if(!g&&ph){v.visualElement=Hae(o,w,h,t);const E=C.exports.useContext(rD).strict,P=C.exports.useContext(oD);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,b,n||_v.projectionNodeConstructor,P))}return ee(Kae,{visualElement:v.visualElement,props:h,children:[m,x(cb.Provider,{value:v,children:r(o,l,b,Wae(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Xae]=o,s}function Qae({layoutId:e}){const t=C.exports.useContext(o8).id;return t&&e!==void 0?t+"-"+e:e}function Jae(e){function t(r,i={}){return Zae(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 ese=["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 a8(e){return typeof e!="string"||e.includes("-")?!1:!!(ese.indexOf(e)>-1||/[A-Z]/.test(e))}const H5={};function tse(e){Object.assign(H5,e)}const W5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],u1=new Set(W5);function aD(e,{layout:t,layoutId:n}){return u1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H5[e]||e==="opacity")}const Ml=e=>!!e?.getVelocity,nse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rse=(e,t)=>W5.indexOf(e)-W5.indexOf(t);function ise({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(rse);for(const s of t)a+=`${nse[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 sD(e){return e.startsWith("--")}const ose=(e,t)=>t&&typeof e=="number"?t.transform(e):e,lD=(e,t)=>n=>Math.max(Math.min(n,t),e),Bm=e=>e%1?Number(e.toFixed(5)):e,kv=/(-)?([\d]*\.?[\d])+/g,uC=/(#[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,ase=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zv(e){return typeof e=="string"}const gh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fm=Object.assign(Object.assign({},gh),{transform:lD(0,1)}),Ny=Object.assign(Object.assign({},gh),{default:1}),Qv=e=>({test:t=>Zv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lc=Qv("deg"),El=Qv("%"),wt=Qv("px"),sse=Qv("vh"),lse=Qv("vw"),RT=Object.assign(Object.assign({},El),{parse:e=>El.parse(e)/100,transform:e=>El.transform(e*100)}),s8=(e,t)=>n=>Boolean(Zv(n)&&ase.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),uD=(e,t,n)=>r=>{if(!Zv(r))return r;const[i,o,a,s]=r.match(kv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ff={test:s8("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+El.transform(Bm(t))+", "+El.transform(Bm(n))+", "+Bm(Fm.transform(r))+")"},use=lD(0,255),Ux=Object.assign(Object.assign({},gh),{transform:e=>Math.round(use(e))}),Vc={test:s8("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ux.transform(e)+", "+Ux.transform(t)+", "+Ux.transform(n)+", "+Bm(Fm.transform(r))+")"};function cse(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 cC={test:s8("#"),parse:cse,transform:Vc.transform},Qi={test:e=>Vc.test(e)||cC.test(e)||Ff.test(e),parse:e=>Vc.test(e)?Vc.parse(e):Ff.test(e)?Ff.parse(e):cC.parse(e),transform:e=>Zv(e)?e:e.hasOwnProperty("red")?Vc.transform(e):Ff.transform(e)},cD="${c}",dD="${n}";function dse(e){var t,n,r,i;return isNaN(e)&&Zv(e)&&((n=(t=e.match(kv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(uC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function fD(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(uC);r&&(n=r.length,e=e.replace(uC,cD),t.push(...r.map(Qi.parse)));const i=e.match(kv);return i&&(e=e.replace(kv,dD),t.push(...i.map(gh.parse))),{values:t,numColors:n,tokenised:e}}function hD(e){return fD(e).values}function pD(e){const{values:t,numColors:n,tokenised:r}=fD(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function hse(e){const t=hD(e);return pD(e)(t.map(fse))}const _u={test:dse,parse:hD,createTransformer:pD,getAnimatableNone:hse},pse=new Set(["brightness","contrast","saturate","opacity"]);function gse(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kv)||[];if(!r)return e;const i=n.replace(r,"");let o=pse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const mse=/([a-z-]*)\(.*?\)/g,dC=Object.assign(Object.assign({},_u),{getAnimatableNone:e=>{const t=e.match(mse);return t?t.map(gse).join(" "):e}}),NT={...gh,transform:Math.round},gD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Lc,rotateX:Lc,rotateY:Lc,rotateZ:Lc,scale:Ny,scaleX:Ny,scaleY:Ny,scaleZ:Ny,skew:Lc,skewX:Lc,skewY:Lc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Fm,originX:RT,originY:RT,originZ:wt,zIndex:NT,fillOpacity:Fm,strokeOpacity:Fm,numOctaves:NT};function l8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(sD(m)){o[m]=v;continue}const b=gD[m],w=ose(v,b);if(u1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(b.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=ise(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:b=0}=l;i.transformOrigin=`${m} ${v} ${b}`}}const u8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function mD(e,t,n){for(const r in t)!Ml(t[r])&&!aD(r,n)&&(e[r]=t[r])}function vse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=u8();return l8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function yse(e,t,n){const r=e.style||{},i={};return mD(i,r,e),Object.assign(i,vse(e,t,n)),e.transformValues?e.transformValues(i):i}function bse(e,t,n){const r={},i=yse(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 Sse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],xse=["whileTap","onTap","onTapStart","onTapCancel"],wse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Cse=["whileInView","onViewportEnter","onViewportLeave","viewport"],_se=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",...Cse,...xse,...Sse,...wse]);function V5(e){return _se.has(e)}let vD=e=>!V5(e);function kse(e){!e||(vD=t=>t.startsWith("on")?!V5(t):e(t))}try{kse(require("@emotion/is-prop-valid").default)}catch{}function Ese(e,t,n){const r={};for(const i in e)(vD(i)||n===!0&&V5(i)||!t&&!V5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function DT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Pse(e,t,n){const r=DT(t,e.x,e.width),i=DT(n,e.y,e.height);return`${r} ${i}`}const Tse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lse={offset:"strokeDashoffset",array:"strokeDasharray"};function Ase(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Tse:Lse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function c8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){l8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Pse(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Ase(g,o,a,s,!1)}const yD=()=>({...u8(),attrs:{}});function Mse(e,t){const n=C.exports.useMemo(()=>{const r=yD();return c8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};mD(r,e.style,e),n.style={...r,...n.style}}return n}function Ise(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(a8(n)?Mse:bse)(r,a,s),g={...Ese(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const bD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SD(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 xD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function wD(e,t,n,r){SD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(xD.has(i)?i:bD(i),t.attrs[i])}function d8(e){const{style:t}=e,n={};for(const r in t)(Ml(t[r])||aD(r,e))&&(n[r]=t[r]);return n}function CD(e){const t=d8(e);for(const n in e)if(Ml(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function f8(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 Ev=e=>Array.isArray(e),Ose=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),_D=e=>Ev(e)?e[e.length-1]||0:e;function $3(e){const t=Ml(e)?e.get():e;return Ose(t)?t.toValue():t}function Rse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Nse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const kD=e=>(t,n)=>{const r=C.exports.useContext(cb),i=C.exports.useContext(l1),o=()=>Rse(e,t,r,i);return n?o():hb(o)};function Nse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=$3(o[m]);let{initial:a,animate:s}=e;const l=fb(e),u=iD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!db(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const b=f8(e,v);if(!b)return;const{transitionEnd:w,transition:E,...P}=b;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const Dse={useVisualState:kD({scrapeMotionValuesFromProps:CD,createRenderState:yD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}c8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),wD(t,n)}})},zse={useVisualState:kD({scrapeMotionValuesFromProps:d8,createRenderState:u8})};function Bse(e,{forwardMotionProps:t=!1},n,r,i){return{...a8(e)?Dse:zse,preloadedFeatures:n,useRender:Ise(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Yn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Yn||(Yn={}));function pb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return pb(i,t,n,r)},[e,t,n,r])}function Fse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Yn.Focus,!0)},i=()=>{n&&n.setActive(Yn.Focus,!1)};fC(t,"focus",e?r:void 0),fC(t,"blur",e?i:void 0)}function ED(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function PD(e){return!!e.touches}function $se(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Hse={pageX:0,pageY:0};function Wse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Hse;return{x:r[t+"X"],y:r[t+"Y"]}}function Vse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function h8(e,t="page"){return{point:PD(e)?Wse(e,t):Vse(e,t)}}const TD=(e,t=!1)=>{const n=r=>e(r,h8(r));return t?$se(n):n},Use=()=>ph&&window.onpointerdown===null,Gse=()=>ph&&window.ontouchstart===null,jse=()=>ph&&window.onmousedown===null,Yse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},qse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function LD(e){return Use()?e:Gse()?qse[e]:jse()?Yse[e]:e}function x0(e,t,n,r){return pb(e,LD(t),TD(n,t==="pointerdown"),r)}function U5(e,t,n,r){return fC(e,LD(t),n&&TD(n,t==="pointerdown"),r)}function AD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zT=AD("dragHorizontal"),BT=AD("dragVertical");function MD(e){let t=!1;if(e==="y")t=BT();else if(e==="x")t=zT();else{const n=zT(),r=BT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ID(){const e=MD(!0);return e?(e(),!1):!0}function FT(e,t,n){return(r,i)=>{!ED(r)||ID()||(e.animationState&&e.animationState.setActive(Yn.Hover,t),n&&n(r,i))}}function Kse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){U5(r,"pointerenter",e||n?FT(r,!0,e):void 0,{passive:!e}),U5(r,"pointerleave",t||n?FT(r,!1,t):void 0,{passive:!t})}const OD=(e,t)=>t?e===t?!0:OD(e,t.parentElement):!1;function p8(e){return C.exports.useEffect(()=>()=>e(),[])}function RD(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);iMath.min(Math.max(n,e),t),Gx=.001,Zse=.01,$T=10,Qse=.05,Jse=1;function ele({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Xse(e<=$T*1e3);let a=1-t;a=j5(Qse,Jse,a),e=j5(Zse,$T,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=hC(u,a),b=Math.exp(-g);return Gx-m/v*b},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,b=Math.exp(-g),w=hC(Math.pow(u,2),a);return(-i(u)+Gx>0?-1:1)*((m-v)*b)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Gx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=nle(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 tle=12;function nle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ole(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!HT(e,ile)&&HT(e,rle)){const n=ele(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function g8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=RD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ole(o),v=WT,b=WT;function w(){const E=h?-(h/1e3):0,P=n-t,k=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)),k<1){const M=hC(T,k);v=O=>{const R=Math.exp(-k*T*O);return n-R*((E+k*T*P)/M*Math.sin(M*O)+P*Math.cos(M*O))},b=O=>{const R=Math.exp(-k*T*O);return k*T*R*(Math.sin(M*O)*(E+k*T*P)/M+P*Math.cos(M*O))-R*(Math.cos(M*O)*(E+k*T*P)-M*P*Math.sin(M*O))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=O=>{const R=Math.exp(-k*T*O),N=Math.min(M*O,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const k=b(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}g8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const WT=e=>0,Pv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Cr=(e,t,n)=>-n*e+n*t+e;function jx(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 VT({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=jx(l,s,e+1/3),o=jx(l,s,e),a=jx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const ale=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},sle=[cC,Vc,Ff],UT=e=>sle.find(t=>t.test(e)),ND=(e,t)=>{let n=UT(e),r=UT(t),i=n.parse(e),o=r.parse(t);n===Ff&&(i=VT(i),n=Vc),r===Ff&&(o=VT(o),r=Vc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=ale(i[l],o[l],s));return a.alpha=Cr(i.alpha,o.alpha,s),n.transform(a)}},pC=e=>typeof e=="number",lle=(e,t)=>n=>t(e(n)),gb=(...e)=>e.reduce(lle);function DD(e,t){return pC(e)?n=>Cr(e,t,n):Qi.test(e)?ND(e,t):BD(e,t)}const zD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>DD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=DD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function GT(e){const t=_u.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=_u.createTransformer(t),r=GT(e),i=GT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?gb(zD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},cle=(e,t)=>n=>Cr(e,t,n);function dle(e){if(typeof e=="number")return cle;if(typeof e=="string")return Qi.test(e)?ND:BD;if(Array.isArray(e))return zD;if(typeof e=="object")return ule}function fle(e,t,n){const r=[],i=n||dle(e[0]),o=e.length-1;for(let a=0;an(Pv(e,t,r))}function ple(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(;li||l===r);l++);o=l-1}const s=Pv(e[o],e[o+1],i);return t[o](s)}}function FD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;G5(o===t.length),G5(!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=fle(t,r,i),s=o===2?hle(e,a):ple(e,a);return n?l=>s(j5(e[0],e[o-1],l)):s}const mb=e=>t=>1-e(1-t),m8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gle=e=>t=>Math.pow(t,e),$D=e=>t=>t*t*((e+1)*t-e),mle=e=>{const t=$D(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},HD=1.525,vle=4/11,yle=8/11,ble=9/10,v8=e=>e,y8=gle(2),Sle=mb(y8),WD=m8(y8),VD=e=>1-Math.sin(Math.acos(e)),b8=mb(VD),xle=m8(b8),S8=$D(HD),wle=mb(S8),Cle=m8(S8),_le=mle(HD),kle=4356/361,Ele=35442/1805,Ple=16061/1805,Y5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Y5(1-e*2)):.5*Y5(e*2-1)+.5;function Ale(e,t){return e.map(()=>t||WD).splice(0,e.length-1)}function Mle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Ile(e,t){return e.map(n=>n*t)}function H3({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=Ile(r&&r.length===a.length?r:Mle(a),i);function l(){return FD(s,a,{ease:Array.isArray(n)?n:Ale(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Ole({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:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const jT={keyframes:H3,spring:g8,decay:Ole};function Rle(e){if(Array.isArray(e.to))return H3;if(jT[e.type])return jT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?H3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?g8:H3}const UD=1/60*1e3,Nle=typeof performance<"u"?()=>performance.now():()=>Date.now(),GD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Nle()),UD);function Dle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&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(e[t]=Dle(()=>Tv=!0),e),{}),Ble=Jv.reduce((e,t)=>{const n=vb[t];return e[t]=(r,i=!1,o=!1)=>(Tv||Hle(),n.schedule(r,i,o)),e},{}),Fle=Jv.reduce((e,t)=>(e[t]=vb[t].cancel,e),{});Jv.reduce((e,t)=>(e[t]=()=>vb[t].process(w0),e),{});const $le=e=>vb[e].process(w0),jD=e=>{Tv=!1,w0.delta=gC?UD:Math.max(Math.min(e-w0.timestamp,zle),1),w0.timestamp=e,mC=!0,Jv.forEach($le),mC=!1,Tv&&(gC=!1,GD(jD))},Hle=()=>{Tv=!0,gC=!0,mC||GD(jD)},Wle=()=>w0;function YD(e,t,n=0){return e-t-n}function Vle(e,t,n=0,r=!0){return r?YD(t+-e,t,n):t-(e-t)+n}function Ule(e,t,n,r){return r?e>=t+n:e<=-n}const Gle=e=>{const t=({delta:n})=>e(n);return{start:()=>Ble.update(t,!0),stop:()=>Fle.update(t)}};function qD(e){var t,n,{from:r,autoplay:i=!0,driver:o=Gle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=RD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,O=!1,R=!0,N;const z=Rle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=FD([0,100],[r,E],{clamp:!1}),r=0,E=100);const V=z(Object.assign(Object.assign({},w),{from:r,to:E}));function $(){k++,l==="reverse"?(R=k%2===0,a=Vle(a,T,u,R)):(a=YD(a,T,u),l==="mirror"&&V.flipTarget()),O=!1,v&&v()}function j(){P.stop(),m&&m()}function ue(Q){if(R||(Q=-Q),a+=Q,!O){const ne=V.next(Math.max(0,a));M=ne.value,N&&(M=N(M)),O=R?ne.done:a<=0}b?.(M),O&&(k===0&&(T??(T=a)),k{g?.(),P.stop()}}}function KD(e,t){return t?e*(1e3/t):0}function jle({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:h,onUpdate:g,onComplete:m,onStop:v}){let b;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var O;g?.(M),(O=T.onUpdate)===null||O===void 0||O.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),O=M===n?-1:1;let R,N;const z=V=>{R=N,N=V,t=KD(V-R,Wle().delta),(O===1&&V>M||O===-1&&Vb?.stop()}}const vC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),YT=e=>vC(e)&&e.hasOwnProperty("z"),Dy=(e,t)=>Math.abs(e-t);function x8(e,t){if(pC(e)&&pC(t))return Dy(e,t);if(vC(e)&&vC(t)){const n=Dy(e.x,t.x),r=Dy(e.y,t.y),i=YT(e)&&YT(t)?Dy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const XD=(e,t)=>1-3*t+3*e,ZD=(e,t)=>3*t-6*e,QD=e=>3*e,q5=(e,t,n)=>((XD(t,n)*e+ZD(t,n))*e+QD(t))*e,JD=(e,t,n)=>3*XD(t,n)*e*e+2*ZD(t,n)*e+QD(t),Yle=1e-7,qle=10;function Kle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=q5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Yle&&++s=Zle?Qle(a,g,e,n):m===0?g:Kle(a,s,s+zy,e,n)}return a=>a===0||a===1?a:q5(o(a),t,r)}function eue({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 h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Yn.Tap,!1),!ID()}function g(b,w){!h()||(OD(i.current,b.target)?e&&e(b,w):n&&n(b,w))}function m(b,w){!h()||n&&n(b,w)}function v(b,w){u(),!a.current&&(a.current=!0,s.current=gb(x0(window,"pointerup",g,l),x0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Yn.Tap,!0),t&&t(b,w))}U5(i,"pointerdown",o?v:void 0,l),p8(u)}const tue="production",ez=typeof process>"u"||process.env===void 0?tue:"production",qT=new Set;function tz(e,t,n){e||qT.has(t)||(console.warn(t),n&&console.warn(n),qT.add(t))}const yC=new WeakMap,Yx=new WeakMap,nue=e=>{const t=yC.get(e.target);t&&t(e)},rue=e=>{e.forEach(nue)};function iue({root:e,...t}){const n=e||document;Yx.has(n)||Yx.set(n,{});const r=Yx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rue,{root:e,...t})),r[i]}function oue(e,t,n){const r=iue(t);return yC.set(e,n),r.observe(e),()=>{yC.delete(e),r.unobserve(e)}}function aue({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"?uue:lue)(a,o.current,e,i)}const sue={some:0,all:1};function lue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:sue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Yn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return oue(n.current,s,l)},[e,r,i,o])}function uue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(ez!=="production"&&tz(!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(Yn.InView,!0)}))},[e])}const Uc=e=>t=>(e(t),null),cue={inView:Uc(aue),tap:Uc(eue),focus:Uc(Fse),hover:Uc(Kse)};function w8(){const e=C.exports.useContext(l1);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 due(){return fue(C.exports.useContext(l1))}function fue(e){return e===null?!0:e.isPresent}function nz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,hue={linear:v8,easeIn:y8,easeInOut:WD,easeOut:Sle,circIn:VD,circInOut:xle,circOut:b8,backIn:S8,backInOut:Cle,backOut:wle,anticipate:_le,bounceIn:Tle,bounceInOut:Lle,bounceOut:Y5},KT=e=>{if(Array.isArray(e)){G5(e.length===4);const[t,n,r,i]=e;return Jle(t,n,r,i)}else if(typeof e=="string")return hue[e];return e},pue=e=>Array.isArray(e)&&typeof e[0]!="number",XT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&_u.test(t)&&!t.startsWith("url(")),yf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),By=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qx=()=>({type:"keyframes",ease:"linear",duration:.3}),gue=e=>({type:"keyframes",duration:.8,values:e}),ZT={x:yf,y:yf,z:yf,rotate:yf,rotateX:yf,rotateY:yf,rotateZ:yf,scaleX:By,scaleY:By,scale:By,opacity:qx,backgroundColor:qx,color:qx,default:By},mue=(e,t)=>{let n;return Ev(t)?n=gue:n=ZT[e]||ZT.default,{to:t,...n(t)}},vue={...gD,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:dC,WebkitFilter:dC},C8=e=>vue[e];function _8(e,t){var n;let r=C8(e);return r!==dC&&(r=_u),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const yue={current:!1},rz=1/60*1e3,bue=typeof performance<"u"?()=>performance.now():()=>Date.now(),iz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(bue()),rz);function Sue(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&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(e[t]=Sue(()=>Lv=!0),e),{}),Ps=e2.reduce((e,t)=>{const n=yb[t];return e[t]=(r,i=!1,o=!1)=>(Lv||Cue(),n.schedule(r,i,o)),e},{}),ah=e2.reduce((e,t)=>(e[t]=yb[t].cancel,e),{}),Kx=e2.reduce((e,t)=>(e[t]=()=>yb[t].process(C0),e),{}),wue=e=>yb[e].process(C0),oz=e=>{Lv=!1,C0.delta=bC?rz:Math.max(Math.min(e-C0.timestamp,xue),1),C0.timestamp=e,SC=!0,e2.forEach(wue),SC=!1,Lv&&(bC=!1,iz(oz))},Cue=()=>{Lv=!0,bC=!0,SC||iz(oz)},xC=()=>C0;function az(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ah.read(r),e(o-t))};return Ps.read(r,!0),()=>ah.read(r)}function _ue({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 kue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=K5(o.duration)),o.repeatDelay&&(a.repeatDelay=K5(o.repeatDelay)),e&&(a.ease=pue(e)?e.map(KT):KT(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 Eue(e,t){var n,r;return(r=(n=(k8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Pue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Tue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Pue(t),_ue(e)||(e={...e,...mue(n,t.to)}),{...t,...kue(e)}}function Lue(e,t,n,r,i){const o=k8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=XT(e,n);a==="none"&&s&&typeof n=="string"?a=_8(e,n):QT(a)&&typeof n=="string"?a=JT(n):!Array.isArray(n)&&QT(n)&&typeof a=="string"&&(n=JT(a));const l=XT(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?jle({...g,...o}):qD({...Tue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=_D(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function QT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function JT(e){return typeof e=="number"?0:_8("",e)}function k8(e,t){return e[t]||e.default||e}function E8(e,t,n,r={}){return yue.current&&(r={type:!1}),t.start(i=>{let o;const a=Lue(e,t,n,r,i),s=Eue(r,e),l=()=>o=a();let u;return s?u=az(l,K5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Aue=e=>/^\-?\d*\.?\d+$/.test(e),Mue=e=>/^0[^.\s]+$/.test(e);function P8(e,t){e.indexOf(t)===-1&&e.push(t)}function T8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $m{constructor(){this.subscriptions=[]}add(t){return P8(this.subscriptions,t),()=>T8(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!isNaN(parseFloat(e));class Oue{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new $m,this.velocityUpdateSubscribers=new $m,this.renderSubscribers=new $m,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=xC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ps.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=()=>Ps.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=Iue(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?KD(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 U0(e){return new Oue(e)}const sz=e=>t=>t.test(e),Rue={test:e=>e==="auto",parse:e=>e},lz=[gh,wt,El,Lc,lse,sse,Rue],Hg=e=>lz.find(sz(e)),Nue=[...lz,Qi,_u],Due=e=>Nue.find(sz(e));function zue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Bue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function bb(e,t,n){const r=e.getProps();return f8(r,t,n!==void 0?n:r.custom,zue(e),Bue(e))}function Fue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,U0(n))}function $ue(e,t){const n=bb(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=_D(o[a]);Fue(e,a,s)}}function Hue(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;swC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=wC(e,t,n);else{const i=typeof t=="function"?bb(e,t,n.custom):t;r=uz(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function wC(e,t,n={}){var r;const i=bb(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>uz(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return Gue(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function uz(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 h=[],g=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||g&&Yue(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&u1.has(m)&&(w={...w,type:!1,delay:0});let E=E8(m,v,b,w);X5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&$ue(e,s)})}function Gue(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(jue).forEach((u,h)=>{a.push(wC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function jue(e,t){return e.sortNodePosition(t)}function Yue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const L8=[Yn.Animate,Yn.InView,Yn.Focus,Yn.Hover,Yn.Tap,Yn.Drag,Yn.Exit],que=[...L8].reverse(),Kue=L8.length;function Xue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Uue(e,n,r)))}function Zue(e){let t=Xue(e);const n=Jue();let r=!0;const i=(l,u)=>{const h=bb(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],b=new Set;let w={},E=1/0;for(let k=0;kE&&R;const j=Array.isArray(O)?O:[O];let ue=j.reduce(i,{});N===!1&&(ue={});const{prevResolvedValues:W={}}=M,Q={...W,...ue},ne=J=>{$=!0,b.delete(J),M.needsAnimating[J]=!0};for(const J in Q){const K=ue[J],G=W[J];w.hasOwnProperty(J)||(K!==G?Ev(K)&&Ev(G)?!nz(K,G)||V?ne(J):M.protectedKeys[J]=!0:K!==void 0?ne(J):b.add(J):K!==void 0&&b.has(J)?ne(J):M.protectedKeys[J]=!0)}M.prevProp=O,M.prevResolvedValues=ue,M.isActive&&(w={...w,...ue}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(b.size){const k={};b.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.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(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Que(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nz(t,e):!1}function bf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jue(){return{[Yn.Animate]:bf(!0),[Yn.InView]:bf(),[Yn.Hover]:bf(),[Yn.Tap]:bf(),[Yn.Drag]:bf(),[Yn.Focus]:bf(),[Yn.Exit]:bf()}}const ece={animation:Uc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Zue(e)),db(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Uc(e=>{const{custom:t,visualElement:n}=e,[r,i]=w8(),o=C.exports.useContext(l1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Yn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class cz{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=Zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=x8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=xC();this.history.push({...m,timestamp:v});const{onStart:b,onMove:w}=this.handlers;h||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Xx(h,this.transformPagePoint),ED(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ps.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Zx(Xx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},PD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=h8(t),o=Xx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=xC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Zx(o,this.history)),this.removeListeners=gb(x0(window,"pointermove",this.handlePointerMove),x0(window,"pointerup",this.handlePointerUp),x0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ah.update(this.updatePoint)}}function Xx(e,t){return t?{point:t(e.point)}:e}function eL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx({point:e},t){return{point:e,delta:eL(e,dz(t)),offset:eL(e,tce(t)),velocity:nce(t,.1)}}function tce(e){return e[0]}function dz(e){return e[e.length-1]}function nce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=dz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>K5(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 fa(e){return e.max-e.min}function tL(e,t=0,n=.01){return x8(e,t)n&&(e=r?Cr(n,e,r.max):Math.min(e,n)),e}function oL(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 oce(e,{top:t,left:n,bottom:r,right:i}){return{x:oL(e.x,n,i),y:oL(e.y,t,r)}}function aL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pv(t.min,t.max-r,e.min):r>i&&(n=Pv(e.min,e.max-i,t.min)),j5(0,1,n)}function lce(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 CC=.35;function uce(e=CC){return e===!1?e=0:e===!0&&(e=CC),{x:sL(e,"left","right"),y:sL(e,"top","bottom")}}function sL(e,t,n){return{min:lL(e,t),max:lL(e,n)}}function lL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const uL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vm=()=>({x:uL(),y:uL()}),cL=()=>({min:0,max:0}),Zr=()=>({x:cL(),y:cL()});function cl(e){return[e("x"),e("y")]}function fz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dce(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 Qx(e){return e===void 0||e===1}function _C({scale:e,scaleX:t,scaleY:n}){return!Qx(e)||!Qx(t)||!Qx(n)}function kf(e){return _C(e)||hz(e)||e.z||e.rotate||e.rotateX||e.rotateY}function hz(e){return dL(e.x)||dL(e.y)}function dL(e){return e&&e!=="0%"}function Z5(e,t,n){const r=e-n,i=t*r;return n+i}function fL(e,t,n,r,i){return i!==void 0&&(e=Z5(e,i,r)),Z5(e,n,r)+t}function kC(e,t=0,n=1,r,i){e.min=fL(e.min,t,n,r,i),e.max=fL(e.max,t,n,r,i)}function pz(e,{x:t,y:n}){kC(e.x,t.translate,t.scale,t.originPoint),kC(e.y,n.translate,n.scale,n.originPoint)}function fce(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{this.stopAnimation(),n&&this.snapToCursor(h8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=MD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(v=>{var b,w;let E=this.getAxisMotionValue(v).get()||0;if(El.test(E)){const P=(w=(b=this.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=fa(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Yn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=yce(v),this.currentDirection!==null&&g?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new cz(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?.(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(Yn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Fy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=ice(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&&Jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oce(r.layoutBox,t):this.constraints=!1,this.elastic=uce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&cl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=lce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=gce(r,i.root,this.visualElement.getTransformPagePoint());let a=ace(i.layout.layoutBox,o);if(n){const s=n(cce(a));this.hasMutatedConstraints=!!s,s&&(a=fz(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=cl(h=>{var g;if(!Fy(h,n,this.currentDirection))return;let m=(g=l?.[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return E8(t,r,0,n)}stopAnimation(){cl(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){cl(n=>{const{drag:r}=this.getProps();if(!Fy(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]-Cr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=sce({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(),cl(s=>{if(!Fy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(Cr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;mce.set(this.visualElement,this);const n=this.visualElement.current,r=x0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Jp(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=pb(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(cl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=CC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Fy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function bce(e){const{dragControls:t,visualElement:n}=e,r=hb(()=>new vce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Sce({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(i8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new cz(h,l,{transformPagePoint:s})}U5(i,"pointerdown",o&&u),p8(()=>a.current&&a.current.end())}const xce={pan:Uc(Sce),drag:Uc(bce)};function EC(e){return typeof e=="string"&&e.startsWith("var(--")}const mz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wce(e){const t=mz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function PC(e,t,n=1){const[r,i]=wce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():EC(i)?PC(i,t,n+1):i}function Cce(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(!EC(o))return;const a=PC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!EC(o))continue;const a=PC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const _ce=new Set(["width","height","top","left","right","bottom","x","y"]),vz=e=>_ce.has(e),kce=e=>Object.keys(e).some(vz),yz=(e,t)=>{e.set(t,!1),e.set(t)},pL=e=>e===gh||e===wt;var gL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(gL||(gL={}));const mL=(e,t)=>parseFloat(e.split(", ")[t]),vL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return mL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?mL(o[1],e):0}},Ece=new Set(["x","y","z"]),Pce=W5.filter(e=>!Ece.has(e));function Tce(e){const t=[];return Pce.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 yL={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:vL(4,13),y:vL(5,14)},Lce=(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]=yL[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);yz(h,s[u]),e[u]=yL[u](l,o)}),e},Ace=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=Hg(h);const m=t[l];let v;if(Ev(m)){const b=m.length,w=m[0]===null?1:0;h=m[w],g=Hg(h);for(let E=w;E=0?window.pageYOffset:null,u=Lce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),ph&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Mce(e,t,n,r){return kce(t)?Ace(e,t,n,r):{target:t,transitionEnd:r}}const Ice=(e,t,n,r)=>{const i=Cce(e,t,r);return t=i.target,r=i.transitionEnd,Mce(e,t,n,r)},TC={current:null},bz={current:!1};function Oce(){if(bz.current=!0,!!ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>TC.current=e.matches;e.addListener(t),t()}else TC.current=!1}function Rce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Ml(o))e.addValue(i,o),X5(r)&&r.add(i);else if(Ml(a))e.addValue(i,U0(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,U0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Sz=Object.keys(_v),Nce=Sz.length,bL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dce{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=()=>Ps.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=fb(n),this.isVariantNode=iD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Ml(g)&&(g.set(a[h],!1),X5(l)&&l.add(h))}}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)),bz.current||Oce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:TC.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(),ah.update(this.notifyUpdate),ah.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=u1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ps.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;lthis.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):Zr()}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;nr.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=U0(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=f8(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&&!Ml(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 $m),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const xz=["initial",...L8],zce=xz.length;class wz extends Dce{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=Vue(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Hue(this,r,a);const s=Ice(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Bce(e){return window.getComputedStyle(e)}class Fce extends wz{readValueFromInstance(t,n){if(u1.has(n)){const r=C8(n);return r&&r.default||0}else{const r=Bce(t),i=(sD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gz(t,n)}build(t,n,r,i){l8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return d8(t)}renderInstance(t,n,r,i){SD(t,n,r,i)}}class $ce extends wz{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return u1.has(n)?((r=C8(n))===null||r===void 0?void 0:r.default)||0:(n=xD.has(n)?n:bD(n),t.getAttribute(n))}measureInstanceViewportBox(){return Zr()}scrapeMotionValuesFromProps(t){return CD(t)}build(t,n,r,i){c8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){wD(t,n,r,i)}}const Hce=(e,t)=>a8(e)?new $ce(t,{enableHardwareAcceleration:!1}):new Fce(t,{enableHardwareAcceleration:!0});function SL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=SL(e,t.target.x),r=SL(e,t.target.y);return`${n}% ${r}%`}},xL="_$css",Wce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(mz,v=>(o.push(v),xL)));const a=_u.parse(e);if(a.length>5)return r;const s=_u.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=Cr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(xL,()=>{const b=o[v];return v++,b})}return m}};class Vce extends ae.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tse(Gce),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()})),zm.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()||Ps.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?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function Uce(e){const[t,n]=w8(),r=C.exports.useContext(o8);return x(Vce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(oD),isPresent:t,safeToRemove:n})}const Gce={borderRadius:{...Wg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wg,borderTopRightRadius:Wg,borderBottomLeftRadius:Wg,borderBottomRightRadius:Wg,boxShadow:Wce},jce={measureLayout:Uce};function Yce(e,t,n={}){const r=Ml(e)?e:U0(e);return E8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const Cz=["TopLeft","TopRight","BottomLeft","BottomRight"],qce=Cz.length,wL=e=>typeof e=="string"?parseFloat(e):e,CL=e=>typeof e=="number"||wt.test(e);function Kce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Cr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Xce(r)),e.opacityExit=Cr((s=t.opacity)!==null&&s!==void 0?s:1,0,Zce(r))):o&&(e.opacity=Cr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Pv(e,t,r))}function kL(e,t){e.min=t.min,e.max=t.max}function hs(e,t){kL(e.x,t.x),kL(e.y,t.y)}function EL(e,t,n,r,i){return e-=t,e=Z5(e,1/n,r),i!==void 0&&(e=Z5(e,1/i,r)),e}function Qce(e,t=0,n=1,r=.5,i,o=e,a=e){if(El.test(t)&&(t=parseFloat(t),t=Cr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Cr(o.min,o.max,r);e===o&&(s-=t),e.min=EL(e.min,t,n,s,i),e.max=EL(e.max,t,n,s,i)}function PL(e,t,[n,r,i],o,a){Qce(e,t[n],t[r],t[i],t.scale,o,a)}const Jce=["x","scaleX","originX"],ede=["y","scaleY","originY"];function TL(e,t,n,r){PL(e.x,t,Jce,n?.x,r?.x),PL(e.y,t,ede,n?.y,r?.y)}function LL(e){return e.translate===0&&e.scale===1}function kz(e){return LL(e.x)&&LL(e.y)}function Ez(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 AL(e){return fa(e.x)/fa(e.y)}function tde(e,t,n=.1){return x8(e,t)<=n}class nde{constructor(){this.members=[]}add(t){P8(this.members,t),t.scheduleRender()}remove(t){if(T8(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 ML(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:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}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 rde=(e,t)=>e.depth-t.depth;class ide{constructor(){this.children=[],this.isDirty=!1}add(t){P8(this.children,t),this.isDirty=!0}remove(t){T8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rde),this.isDirty=!1,this.children.forEach(t)}}const IL=["","X","Y","Z"],OL=1e3;let ode=0;function Pz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.id=ode++,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(cde),this.nodes.forEach(dde)},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;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=az(v,250),zm.hasAnimatedSinceResize&&(zm.hasAnimatedSinceResize=!1,this.nodes.forEach(NL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:b,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:mde,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=g.getProps(),z=!this.targetLayout||!Ez(this.targetLayout,w)||b,V=!v&&b;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||V||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,V);const $={...k8(O,"layout"),onPlay:R,onComplete:N};g.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&NL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}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,ah.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(fde),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.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{var T;const M=k/1e3;DL(v.x,a.x,M),DL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(Wm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pde(this.relativeTarget,this.relativeTargetOrigin,b,M)),w&&(this.animationValues=m,Kce(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},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&&(ah.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ps.update(()=>{zm.hasAnimatedSinceResize=!0,this.currentAnimation=Yce(0,OL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.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,OL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&Tz(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Zr();const g=fa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=fa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}hs(s,l),e0(s,h),Hm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new nde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.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 h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(RL),this.root.sharedNodes.clear()}}}function ade(e){e.updateLayout()}function sde(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"?cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(b);b.min=o[v].min,b.max=b.min+w}):Tz(s,i.layoutBox,o)&&cl(v=>{const b=l?i.measuredBox[v]:i.layoutBox[v],w=fa(o[v]);b.max=b.min+w});const u=Vm();Hm(u,o,i.layoutBox);const h=Vm();l?Hm(h,e.applyTransform(a,!0),i.measuredBox):Hm(h,o,i.layoutBox);const g=!kz(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:w}=v;if(b&&w){const E=Zr();Wm(E,i.layoutBox,b.layoutBox);const P=Zr();Wm(P,o,w.layoutBox),Ez(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function lde(e){e.clearSnapshot()}function RL(e){e.clearMeasurements()}function ude(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function NL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function cde(e){e.resolveTargetDelta()}function dde(e){e.calcProjection()}function fde(e){e.resetRotation()}function hde(e){e.removeLeadSnapshot()}function DL(e,t,n){e.translate=Cr(t.translate,0,n),e.scale=Cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zL(e,t,n,r){e.min=Cr(t.min,n.min,r),e.max=Cr(t.max,n.max,r)}function pde(e,t,n,r){zL(e.x,t.x,n.x,r),zL(e.y,t.y,n.y,r)}function gde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mde={duration:.45,ease:[.4,0,.1,1]};function vde(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 BL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function yde(e){BL(e.x),BL(e.y)}function Tz(e,t,n){return e==="position"||e==="preserve-aspect"&&!tde(AL(t),AL(n),.2)}const bde=Pz({attachResizeListener:(e,t)=>pb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jx={current:void 0},Sde=Pz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jx.current){const e=new bde(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Jx.current=e}return Jx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),xde={...ece,...cue,...xce,...jce},zl=Jae((e,t)=>Bse(e,t,xde,Hce,Sde));function Lz(){const e=C.exports.useRef(!1);return $5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function wde(){const e=Lz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ps.postRender(r),[r]),t]}class Cde 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 _de({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]),x(Cde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const ew=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=hb(kde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(_de,{isPresent:n,children:e})),x(l1.Provider,{value:u,children:e})};function kde(){return new Map}const Fp=e=>e.key||"";function Ede(e,t){e.forEach(n=>{const r=Fp(n);t.set(r,n)})}function Pde(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",tz(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=wde();const l=C.exports.useContext(o8).forceRender;l&&(s=l);const u=Lz(),h=Pde(e);let g=h;const m=new Set,v=C.exports.useRef(g),b=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if($5(()=>{w.current=!1,Ede(h,b),v.current=g}),p8(()=>{w.current=!0,b.clear(),m.clear()}),w.current)return x(Wn,{children:g.map(T=>x(ew,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Fp(T)))});g=[...g];const E=v.current.map(Fp),P=h.map(Fp),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=b.get(T);if(!M)return;const O=E.indexOf(T),R=()=>{b.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};g.splice(O,0,x(ew,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Fp(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:x(ew,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Fp(T))}),ez!=="production"&&a==="wait"&&g.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.`),x(Wn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var vl=function(){return vl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]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 LC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Tde(){return!1}var Lde=e=>{const{condition:t,message:n}=e;t&&Tde()&&console.warn(n)},$f={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Vg={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 AC(e){switch(e?.direction??"right"){case"right":return Vg.slideRight;case"left":return Vg.slideLeft;case"bottom":return Vg.slideDown;case"top":return Vg.slideUp;default:return Vg.slideRight}}var Xf={enter:{duration:.2,ease:$f.easeOut},exit:{duration:.1,ease:$f.easeIn}},Ts={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Ade=e=>e!=null&&parseInt(e.toString(),10)>0,$L={exit:{height:{duration:.2,ease:$f.ease},opacity:{duration:.3,ease:$f.ease}},enter:{height:{duration:.3,ease:$f.ease},opacity:{duration:.4,ease:$f.ease}}},Mde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Ade(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ts.exit($L.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ts.enter($L.enter,i)})},Mz=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:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Lde({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const b=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:b?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(Sd,{initial:!1,custom:w,children:E&&ae.createElement(zl.div,{ref:t,...g,className:t2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Mde,initial:r?"exit":!1,animate:P,exit:"exit"})})});Mz.displayName="Collapse";var Ide={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ts.exit(Xf.exit,n),transitionEnd:t?.exit})},Iz={initial:"exit",animate:"enter",exit:"exit",variants:Ide},Ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(Sd,{custom:m,children:g&&ae.createElement(zl.div,{ref:n,className:t2("chakra-fade",o),custom:m,...Iz,animate:h,...u})})});Ode.displayName="Fade";var Rde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ts.exit(Xf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ts.enter(Xf.enter,n),transitionEnd:e?.enter})},Oz={initial:"exit",animate:"enter",exit:"exit",variants:Rde},Nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",b={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(Sd,{custom:b,children:m&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",s),...Oz,animate:v,custom:b,...g})})});Nde.displayName="ScaleFade";var HL={exit:{duration:.15,ease:$f.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Dde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=AC({direction:e});return{...i,transition:t?.exit??Ts.exit(HL.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=AC({direction:e});return{...i,transition:n?.enter??Ts.enter(HL.enter,r),transitionEnd:t?.enter}}},Rz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=AC({direction:r}),b=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(Sd,{custom:P,children:w&&ae.createElement(zl.div,{...m,ref:n,initial:"exit",className:t2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Dde,style:b,...g})})});Rz.displayName="Slide";var zde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ts.exit(Xf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ts.enter(Xf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ts.exit(Xf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},MC={initial:"initial",animate:"enter",exit:"exit",variants:zde},Bde=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:h,delay:g,...m}=t,v=r?i&&r:!0,b=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return x(Sd,{custom:w,children:v&&ae.createElement(zl.div,{ref:n,className:t2("chakra-offset-slide",a),custom:w,...MC,animate:b,...m})})});Bde.displayName="SlideFade";var n2=(...e)=>e.filter(Boolean).join(" ");function Fde(){return!1}var Sb=e=>{const{condition:t,message:n}=e;t&&Fde()&&console.warn(n)};function tw(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[$de,xb]=_n({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Hde,A8]=_n({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Wde,pTe,Vde,Ude]=nD(),Hf=ke(function(t,n){const{getButtonProps:r}=A8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...xb().button};return ae.createElement(Se.button,{...i,className:n2("chakra-accordion__button",t.className),__css:a})});Hf.displayName="AccordionButton";function Gde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;qde(e),Kde(e);const s=Vde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=ub({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let b=!1;return v!==null&&(b=Array.isArray(h)?h.includes(v):h===v),{isOpen:b,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[jde,M8]=_n({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Yde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=M8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;Xde(e);const{register:m,index:v,descendants:b}=Ude({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);Zde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=b.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=b.prevEnabled(v);j?.node.focus()},Home:()=>{const j=b.firstEnabled();j?.node.focus()},End:()=>{const j=b.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[b,v]),O=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(V={},$=null){return{...V,type:"button",ref:Hn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:tw(V.onClick,T),onFocus:tw(V.onFocus,O),onKeyDown:tw(V.onKeyDown,M)}},[h,t,w,T,O,M,g,m]),N=C.exports.useCallback(function(V={},$=null){return{...V,ref:$,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function qde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;Sb({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Kde(e){Sb({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 Xde(e){Sb({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 Zde(e){Sb({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Wf(e){const{isOpen:t,isDisabled:n}=A8(),{reduceMotion:r}=M8(),i=n2("chakra-accordion__icon",e.className),o=xb(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(va,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Wf.displayName="AccordionIcon";var Vf=ke(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Yde(t),l={...xb().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return ae.createElement(Hde,{value:u},ae.createElement(Se.div,{ref:n,...o,className:n2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Vf.displayName="AccordionItem";var Uf=ke(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=M8(),{getPanelProps:s,isOpen:l}=A8(),u=s(o,n),h=n2("chakra-accordion__panel",r),g=xb();a||delete u.hidden;const m=ae.createElement(Se.div,{...u,__css:g.panel,className:h});return a?m:x(Mz,{in:l,...i,children:m})});Uf.displayName="AccordionPanel";var wb=ke(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=Gde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return ae.createElement(Wde,{value:l},ae.createElement(jde,{value:h},ae.createElement($de,{value:o},ae.createElement(Se.div,{ref:i,...s,className:n2("chakra-accordion",r.className),__css:o.root},t))))});wb.displayName="Accordion";var Qde=(...e)=>e.filter(Boolean).join(" "),Jde=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),r2=ke((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Qde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Jde} ${o} linear infinite`,...n};return ae.createElement(Se.div,{ref:t,__css:h,className:u,...l},r&&ae.createElement(Se.span,{srOnly:!0},r))});r2.displayName="Spinner";var Cb=(...e)=>e.filter(Boolean).join(" ");function efe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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 tfe(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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 WL(e){return x(va,{viewBox:"0 0 24 24",...e,children:x("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[nfe,rfe]=_n({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ife,I8]=_n({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Nz={info:{icon:tfe,colorScheme:"blue"},warning:{icon:WL,colorScheme:"orange"},success:{icon:efe,colorScheme:"green"},error:{icon:WL,colorScheme:"red"},loading:{icon:r2,colorScheme:"blue"}};function ofe(e){return Nz[e].colorScheme}function afe(e){return Nz[e].icon}var Dz=ke(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??ofe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return ae.createElement(nfe,{value:{status:r}},ae.createElement(ife,{value:s},ae.createElement(Se.div,{role:i?"alert":void 0,ref:n,...o,className:Cb("chakra-alert",t.className),__css:l})))});Dz.displayName="Alert";var zz=ke(function(t,n){const i={display:"inline",...I8().description};return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__desc",t.className),__css:i})});zz.displayName="AlertDescription";function Bz(e){const{status:t}=rfe(),n=afe(t),r=I8(),i=t==="loading"?r.spinner:r.icon;return ae.createElement(Se.span,{display:"inherit",...e,className:Cb("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}Bz.displayName="AlertIcon";var Fz=ke(function(t,n){const r=I8();return ae.createElement(Se.div,{ref:n,...t,className:Cb("chakra-alert__title",t.className),__css:r.title})});Fz.displayName="AlertTitle";function sfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function lfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=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=w=>{v(),h("loaded"),i?.(w)},b.onerror=w=>{v(),h("failed"),o?.(w)},g.current=b},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return ks(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var ufe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",Q5=ke(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});Q5.displayName="NativeImage";var _b=ke(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...b}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=lfe({...t,ignoreFallback:E}),k=ufe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?b:sfe(b,["onError","onLoad"])};return k?i||ae.createElement(Se.img,{as:Q5,className:"chakra-image__placeholder",src:r,...T}):ae.createElement(Se.img,{as:Q5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});_b.displayName="Image";ke((e,t)=>ae.createElement(Se.img,{ref:t,as:Q5,className:"chakra-image",...e}));function kb(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var Eb=(...e)=>e.filter(Boolean).join(" "),VL=e=>e?"":void 0,[cfe,dfe]=_n({strict:!1,name:"ButtonGroupContext"});function IC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Eb("chakra-button__icon",n);return ae.createElement(Se.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}IC.displayName="ButtonIcon";function OC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(r2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Eb("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=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 ae.createElement(Se.div,{className:l,...s,__css:h},i)}OC.displayName="ButtonSpinner";function ffe(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 Wa=ke((e,t)=>{const n=dfe(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:b="start",className:w,as:E,...P}=vn(e),k=C.exports.useMemo(()=>{const R={...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:R}}},[r,n]),{ref:T,type:M}=ffe(E),O={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return ae.createElement(Se.button,{disabled:i||o,ref:Rae(t,T),as:E,type:m??M,"data-active":VL(a),"data-loading":VL(o),__css:k,className:Eb("chakra-button",w),...P},o&&b==="start"&&x(OC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||ae.createElement(Se.span,{opacity:0},x(UL,{...O})):x(UL,{...O}),o&&b==="end"&&x(OC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Wa.displayName="Button";function UL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Wn,{children:[t&&x(IC,{marginEnd:i,children:t}),r,n&&x(IC,{marginStart:i,children:n})]})}var ia=ke(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=Eb("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}},ae.createElement(cfe,{value:m},ae.createElement(Se.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});ia.displayName="ButtonGroup";var Va=ke((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 x(Wa,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Va.displayName="IconButton";var f1=(...e)=>e.filter(Boolean).join(" "),$y=e=>e?"":void 0,nw=e=>e?!0:void 0;function GL(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hfe,$z]=_n({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[pfe,h1]=_n({strict:!1,name:"FormControlContext"});function gfe(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`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[b,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:g,...N,ref:Hn(z,V=>{!V||w(!0)})}),[g]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":$y(E),"data-disabled":$y(i),"data-invalid":$y(r),"data-readonly":$y(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Hn(z,V=>{!V||v(!0)}),"aria-live":"polite"}),[h]),O=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:b,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:O,getLabelProps:T,getRequiredIndicatorProps:R}}var xd=ke(function(t,n){const r=Oi("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=gfe(i),l=f1("chakra-form-control",t.className);return ae.createElement(pfe,{value:s},ae.createElement(hfe,{value:r},ae.createElement(Se.div,{...o({},n),className:l,__css:r.container})))});xd.displayName="FormControl";var mfe=ke(function(t,n){const r=h1(),i=$z(),o=f1("chakra-form__helper-text",t.className);return ae.createElement(Se.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});mfe.displayName="FormHelperText";function O8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=R8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":nw(n),"aria-required":nw(i),"aria-readonly":nw(r)}}function R8(e){const t=h1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:GL(t?.onFocus,h),onBlur:GL(t?.onBlur,g)}}var[vfe,yfe]=_n({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),bfe=ke((e,t)=>{const n=Oi("FormError",e),r=vn(e),i=h1();return i?.isInvalid?ae.createElement(vfe,{value:n},ae.createElement(Se.div,{...i?.getErrorMessageProps(r,t),className:f1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});bfe.displayName="FormErrorMessage";var Sfe=ke((e,t)=>{const n=yfe(),r=h1();if(!r?.isInvalid)return null;const i=f1("chakra-form__error-icon",e.className);return x(va,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("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"})})});Sfe.displayName="FormErrorIcon";var mh=ke(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Hz,{}),optionalIndicator:l=null,...u}=i,h=h1(),g=h?.getLabelProps(u,n)??{ref:n,...u};return ae.createElement(Se.label,{...g,className:f1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});mh.displayName="FormLabel";var Hz=ke(function(t,n){const r=h1(),i=$z();if(!r?.isRequired)return null;const o=f1("chakra-form__required-indicator",t.className);return ae.createElement(Se.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Hz.displayName="RequiredIndicator";function ud(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 N8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},xfe=Se("span",{baseStyle:N8});xfe.displayName="VisuallyHidden";var wfe=Se("input",{baseStyle:N8});wfe.displayName="VisuallyHiddenInput";var jL=!1,Pb=null,G0=!1,RC=new Set,Cfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function _fe(e){return!(e.metaKey||!Cfe&&e.altKey||e.ctrlKey)}function D8(e,t){RC.forEach(n=>n(e,t))}function YL(e){G0=!0,_fe(e)&&(Pb="keyboard",D8("keyboard",e))}function Ep(e){Pb="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(G0=!0,D8("pointer",e))}function kfe(e){e.target===window||e.target===document||(G0||(Pb="keyboard",D8("keyboard",e)),G0=!1)}function Efe(){G0=!1}function qL(){return Pb!=="pointer"}function Pfe(){if(typeof window>"u"||jL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){G0=!0,e.apply(this,n)},document.addEventListener("keydown",YL,!0),document.addEventListener("keyup",YL,!0),window.addEventListener("focus",kfe,!0),window.addEventListener("blur",Efe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Ep,!0),document.addEventListener("pointermove",Ep,!0),document.addEventListener("pointerup",Ep,!0)):(document.addEventListener("mousedown",Ep,!0),document.addEventListener("mousemove",Ep,!0),document.addEventListener("mouseup",Ep,!0)),jL=!0}function Tfe(e){Pfe(),e(qL());const t=()=>e(qL());return RC.add(t),()=>{RC.delete(t)}}var[gTe,Lfe]=_n({name:"CheckboxGroupContext",strict:!1}),Afe=(...e)=>e.filter(Boolean).join(" "),Zi=e=>e?"":void 0;function Ta(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Ife(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function Ofe(e){return ae.createElement(Se.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function Rfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Ofe:Ife;return n||t?ae.createElement(Se.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function Nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Wz(e={}){const t=R8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:b,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...O}=e,R=Nfe(O,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dr(v),z=dr(s),V=dr(l),[$,j]=C.exports.useState(!1),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),[J,K]=C.exports.useState(!1);C.exports.useEffect(()=>Tfe(j),[]);const G=C.exports.useRef(null),[X,ce]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),xe=g!==void 0,be=xe?g:me,Ie=C.exports.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}xe||Me(be?Ee.target.checked:b?!0:Ee.target.checked),N?.(Ee)},[r,n,be,xe,b,N]);ks(()=>{G.current&&(G.current.indeterminate=Boolean(b))},[b]),ud(()=>{n&&W(!1)},[n,W]),ks(()=>{const Ee=G.current;!Ee?.form||(Ee.form.onreset=()=>{Me(!!h)})},[]);const We=n&&!m,De=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!0)},[K]),Qe=C.exports.useCallback(Ee=>{Ee.key===" "&&K(!1)},[K]);ks(()=>{if(!G.current)return;G.current.checked!==be&&Me(G.current.checked)},[G.current]);const st=C.exports.useCallback((Ee={},Je=null)=>{const Lt=it=>{ue&&it.preventDefault(),K(!0)};return{...Ee,ref:Je,"data-active":Zi(J),"data-hover":Zi(Q),"data-checked":Zi(be),"data-focus":Zi(ue),"data-focus-visible":Zi(ue&&$),"data-indeterminate":Zi(b),"data-disabled":Zi(n),"data-invalid":Zi(o),"data-readonly":Zi(r),"aria-hidden":!0,onMouseDown:Ta(Ee.onMouseDown,Lt),onMouseUp:Ta(Ee.onMouseUp,()=>K(!1)),onMouseEnter:Ta(Ee.onMouseEnter,()=>ne(!0)),onMouseLeave:Ta(Ee.onMouseLeave,()=>ne(!1))}},[J,be,n,ue,$,Q,b,o,r]),Ct=C.exports.useCallback((Ee={},Je=null)=>({...R,...Ee,ref:Hn(Je,Lt=>{!Lt||ce(Lt.tagName==="LABEL")}),onClick:Ta(Ee.onClick,()=>{var Lt;X||((Lt=G.current)==null||Lt.click(),requestAnimationFrame(()=>{var it;(it=G.current)==null||it.focus()}))}),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[R,n,be,o,X]),ft=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Hn(G,Je),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ta(Ee.onChange,Ie),onBlur:Ta(Ee.onBlur,z,()=>W(!1)),onFocus:Ta(Ee.onFocus,V,()=>W(!0)),onKeyDown:Ta(Ee.onKeyDown,De),onKeyUp:Ta(Ee.onKeyUp,Qe),required:i,checked:be,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:N8}),[w,E,a,Ie,z,V,De,Qe,i,be,We,r,k,T,M,o,u,n,P]),ut=C.exports.useCallback((Ee={},Je=null)=>({...Ee,ref:Je,onMouseDown:Ta(Ee.onMouseDown,KL),onTouchStart:Ta(Ee.onTouchStart,KL),"data-disabled":Zi(n),"data-checked":Zi(be),"data-invalid":Zi(o)}),[be,n,o]);return{state:{isInvalid:o,isFocused:ue,isChecked:be,isActive:J,isHovered:Q,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ct,getCheckboxProps:st,getInputProps:ft,getLabelProps:ut,htmlProps:R}}function KL(e){e.preventDefault(),e.stopPropagation()}var Dfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},zfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Bfe=bd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Ffe=bd({from:{opacity:0},to:{opacity:1}}),$fe=bd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Vz=ke(function(t,n){const r=Lfe(),i={...r,...t},o=Oi("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=x(Rfe,{}),isChecked:v,isDisabled:b=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Mfe(r.onChange,w));const{state:M,getInputProps:O,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Wz({...P,isDisabled:b,isChecked:k,onChange:T}),V=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${Ffe} 20ms linear, ${$fe} 200ms linear`:`${Bfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:V,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return ae.createElement(Se.label,{__css:{...zfe,...o.container},className:Afe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...O(E,n)}),ae.createElement(Se.span,{__css:{...Dfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&ae.createElement(Se.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Vz.displayName="Checkbox";function Hfe(e){return x(va,{focusable:"false","aria-hidden":!0,...e,children:x("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 Tb=ke(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return ae.createElement(Se.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(Hfe,{width:"1em",height:"1em"}))});Tb.displayName="CloseButton";function Wfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function z8(e,t){let n=Wfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function NC(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 J5(e,t,n){return(e-t)*100/(n-t)}function Uz(e,t,n){return(n-t)*e+t}function DC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=NC(n);return z8(r,i)}function _0(e,t,n){return e==null?e:(nr==null?"":rw(r,o,n)??""),m=typeof i<"u",v=m?i:h,b=Gz(Ac(v),o),w=n??b,E=C.exports.useCallback($=>{$!==v&&(m||g($.toString()),u?.($.toString(),Ac($)))},[u,m,v]),P=C.exports.useCallback($=>{let j=$;return l&&(j=_0(j,a,s)),z8(j,w)},[w,l,s,a]),k=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac($):j=Ac(v)+$,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Ac(-$):j=Ac(v)-$,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=rw(r,o,n)??a,E($)},[r,n,o,E,a]),O=C.exports.useCallback($=>{const j=rw($,o,w)??a;E(j)},[w,o,E,a]),R=Ac(v);return{isOutOfRange:R>s||Rx(ob,{styles:jz}),Gfe=()=>x(ob,{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; + } + + ${jz} + `});function Zf(e,t,n,r){const i=dr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():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??document;o?.removeEventListener(t,i,r)}}function jfe(e){return"current"in e}var Yz=()=>typeof window<"u";function Yfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var qfe=e=>Yz()&&e.test(navigator.vendor),Kfe=e=>Yz()&&e.test(Yfe()),Xfe=()=>Kfe(/mac|iphone|ipad|ipod/i),Zfe=()=>Xfe()&&qfe(/apple/i);function Qfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Zf(i,"pointerdown",o=>{if(!Zfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=jfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Jfe=HJ?C.exports.useLayoutEffect:C.exports.useEffect;function XL(e,t=[]){const n=C.exports.useRef(e);return Jfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ehe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function the(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Av(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=XL(n),a=XL(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ehe(r,s),g=the(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),b=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:b,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:WJ(w.onClick,b)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function B8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var F8=ke(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=vn(i),s=O8(a),l=Nr("chakra-input",t.className);return ae.createElement(Se.input,{size:r,...s,__css:o.field,ref:n,className:l})});F8.displayName="Input";F8.id="Input";var[nhe,qz]=_n({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),rhe=ke(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=vn(t),s=Nr("chakra-input__group",o),l={},u=kb(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,b;const w=B8({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,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return ae.createElement(Se.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(nhe,{value:r,children:g}))});rhe.displayName="InputGroup";var ihe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},ohe=Se("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),$8=ke(function(t,n){const{placement:r="left",...i}=t,o=ihe[r]??{},a=qz();return x(ohe,{ref:n,...i,__css:{...a.addon,...o}})});$8.displayName="InputAddon";var Kz=ke(function(t,n){return x($8,{ref:n,placement:"left",...t,className:Nr("chakra-input__left-addon",t.className)})});Kz.displayName="InputLeftAddon";Kz.id="InputLeftAddon";var Xz=ke(function(t,n){return x($8,{ref:n,placement:"right",...t,className:Nr("chakra-input__right-addon",t.className)})});Xz.displayName="InputRightAddon";Xz.id="InputRightAddon";var ahe=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Lb=ke(function(t,n){const{placement:r="left",...i}=t,o=qz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(ahe,{ref:n,__css:l,...i})});Lb.id="InputElement";Lb.displayName="InputElement";var Zz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__left-element",r);return x(Lb,{ref:n,placement:"left",className:o,...i})});Zz.id="InputLeftElement";Zz.displayName="InputLeftElement";var Qz=ke(function(t,n){const{className:r,...i}=t,o=Nr("chakra-input__right-element",r);return x(Lb,{ref:n,placement:"right",className:o,...i})});Qz.id="InputRightElement";Qz.displayName="InputRightElement";function she(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function cd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):she(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var lhe=ke(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Nr("chakra-aspect-ratio",i);return ae.createElement(Se.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:cd(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)});lhe.displayName="AspectRatio";var uhe=ke(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return ae.createElement(Se.span,{ref:n,className:Nr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});uhe.displayName="Badge";var Bl=Se("div");Bl.displayName="Box";var Jz=ke(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Bl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Jz.displayName="Square";var che=ke(function(t,n){const{size:r,...i}=t;return x(Jz,{size:r,ref:n,borderRadius:"9999px",...i})});che.displayName="Circle";var eB=Se("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});eB.displayName="Center";var dhe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};ke(function(t,n){const{axis:r="both",...i}=t;return ae.createElement(Se.div,{ref:n,__css:dhe[r],...i,position:"absolute"})});var fhe=ke(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return ae.createElement(Se.code,{ref:n,className:Nr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});fhe.displayName="Code";var hhe=ke(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});hhe.displayName="Container";var phe=ke(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:g,orientation:m="horizontal",__css:v,...b}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return ae.createElement(Se.hr,{ref:n,"aria-orientation":m,...b,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Nr("chakra-divider",g)})});phe.displayName="Divider";var en=ke(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return ae.createElement(Se.div,{ref:n,__css:g,...h})});en.displayName="Flex";var tB=ke(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...b}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return ae.createElement(Se.div,{ref:n,__css:w,...b})});tB.displayName="Grid";function ZL(e){return cd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var ghe=ke(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=B8({gridArea:r,gridColumn:ZL(i),gridRow:ZL(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return ae.createElement(Se.div,{ref:n,__css:g,...h})});ghe.displayName="GridItem";var Qf=ke(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return ae.createElement(Se.h2,{ref:n,className:Nr("chakra-heading",t.className),...o,__css:r})});Qf.displayName="Heading";ke(function(t,n){const r=so("Mark",t),i=vn(t);return x(Bl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var mhe=ke(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return ae.createElement(Se.kbd,{ref:n,className:Nr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});mhe.displayName="Kbd";var Jf=ke(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return ae.createElement(Se.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Nr("chakra-link",i),...a,__css:r})});Jf.displayName="Link";ke(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return ae.createElement(Se.a,{...s,ref:n,className:Nr("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%"}}})});ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.div,{ref:n,position:"relative",...i,className:Nr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[vhe,nB]=_n({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),H8=ke(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=kb(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return ae.createElement(vhe,{value:r},ae.createElement(Se.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});H8.displayName="List";var yhe=ke((e,t)=>{const{as:n,...r}=e;return x(H8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});yhe.displayName="OrderedList";var bhe=ke(function(t,n){const{as:r,...i}=t;return x(H8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});bhe.displayName="UnorderedList";var She=ke(function(t,n){const r=nB();return ae.createElement(Se.li,{ref:n,...t,__css:r.item})});She.displayName="ListItem";var xhe=ke(function(t,n){const r=nB();return x(va,{ref:n,role:"presentation",...t,__css:r.icon})});xhe.displayName="ListIcon";var whe=ke(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=s1(),h=s?_he(s,u):khe(r);return x(tB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});whe.displayName="SimpleGrid";function Che(e){return typeof e=="number"?`${e}px`:e}function _he(e,t){return cd(e,n=>{const r=Cae("sizes",n,Che(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function khe(e){return cd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var rB=Se("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});rB.displayName="Spacer";var zC="& > *:not(style) ~ *:not(style)";function Ehe(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,[zC]:cd(n,i=>r[i])}}function Phe(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{"&":cd(n,i=>r[i])}}var iB=e=>ae.createElement(Se.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});iB.displayName="StackItem";var W8=ke((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r??"column",b=C.exports.useMemo(()=>Ehe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Phe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,k=C.exports.useMemo(()=>{const M=kb(l);return P?M:M.map((O,R)=>{const N=typeof O.key<"u"?O.key:R,z=R+1===M.length,$=g?x(iB,{children:O},N):O;if(!E)return $;const j=C.exports.cloneElement(u,{__css:w}),ue=z?null:j;return ee(C.exports.Fragment,{children:[$,ue]},N)})},[u,w,E,P,g,l]),T=Nr("chakra-stack",h);return ae.createElement(Se.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:b.flexDirection,flexWrap:s,className:T,__css:E?{}:{[zC]:b[zC]},...m},k)});W8.displayName="Stack";var oB=ke((e,t)=>x(W8,{align:"center",...e,direction:"row",ref:t}));oB.displayName="HStack";var aB=ke((e,t)=>x(W8,{align:"center",...e,direction:"column",ref:t}));aB.displayName="VStack";var Po=ke(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=B8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return ae.createElement(Se.p,{ref:n,className:Nr("chakra-text",t.className),...u,...l,__css:r})});Po.displayName="Text";function QL(e){return typeof e=="number"?`${e}px`:e}var The=ke(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>cd(w,k=>QL(j6("space",k)(P))),"--chakra-wrap-y-spacing":P=>cd(E,k=>QL(j6("space",k)(P))),"--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(()=>g?C.exports.Children.map(a,(w,E)=>x(sB,{children:w},E)):a,[a,g]);return ae.createElement(Se.div,{ref:n,className:Nr("chakra-wrap",h),overflow:"hidden",...m},ae.createElement(Se.ul,{className:"chakra-wrap__list",__css:v},b))});The.displayName="Wrap";var sB=ke(function(t,n){const{className:r,...i}=t;return ae.createElement(Se.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Nr("chakra-wrap__listitem",r),...i})});sB.displayName="WrapItem";var Lhe={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[]}}}},lB=Lhe,Pp=()=>{},Ahe={document:lB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Pp,removeEventListener:Pp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Pp,removeListener:Pp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Pp,setInterval:()=>0,clearInterval:Pp},Mhe=Ahe,Ihe={window:Mhe,document:lB},uB=typeof window<"u"?{window,document}:Ihe,cB=C.exports.createContext(uB);cB.displayName="EnvironmentContext";function dB(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?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:uB},[r,n]);return ee(cB.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}dB.displayName="EnvironmentProvider";var Ohe=e=>e?"":void 0;function Rhe(){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 iw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...b}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Rhe(),M=K=>{!K||K.tagName!=="BUTTON"&&E(!1)},O=w?g:g||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{P&&iw(K)&&(K.preventDefault(),K.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),V=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),k(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!iw(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),k(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(k(!1),T.remove(document,"mouseup",j,!1))},[T]),ue=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||k(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),W=C.exports.useCallback(K=>{K.button===0&&(w||k(!1),s?.(K))},[s,w]),Q=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ne=C.exports.useCallback(K=>{P&&(K.preventDefault(),k(!1)),v?.(K)},[P,v]),J=Hn(t,M);return w?{...b,ref:J,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...b,ref:J,role:"button","data-active":Ohe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:O,onClick:N,onMouseDown:ue,onMouseUp:W,onKeyUp:$,onKeyDown:V,onMouseOver:Q,onMouseLeave:ne}}function fB(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function hB(e){if(!fB(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function Dhe(e){var t;return((t=pB(e))==null?void 0:t.defaultView)??window}function pB(e){return fB(e)?e.ownerDocument:document}function zhe(e){return pB(e).activeElement}var gB=e=>e.hasAttribute("tabindex"),Bhe=e=>gB(e)&&e.tabIndex===-1;function Fhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function mB(e){return e.parentElement&&mB(e.parentElement)?!0:e.hidden}function $he(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function vB(e){if(!hB(e)||mB(e)||Fhe(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]():$he(e)?!0:gB(e)}function Hhe(e){return e?hB(e)&&vB(e)&&!Bhe(e):!1}var Whe=["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]"],Vhe=Whe.join(),Uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function yB(e){const t=Array.from(e.querySelectorAll(Vhe));return t.unshift(e),t.filter(n=>vB(n)&&Uhe(n))}function Ghe(e){const t=e.current;if(!t)return!1;const n=zhe(t);return!n||t.contains(n)?!1:!!Hhe(n)}function jhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ud(()=>{if(!o||Ghe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var Yhe={preventScroll:!0,shouldFocus:!1};function qhe(e,t=Yhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Khe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);ks(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=yB(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);ud(()=>{h()},[h]),Zf(a,"transitionend",h)}function Khe(e){return"current"in e}var Oo="top",Ua="bottom",Ga="right",Ro="left",V8="auto",i2=[Oo,Ua,Ga,Ro],j0="start",Mv="end",Xhe="clippingParents",bB="viewport",Ug="popper",Zhe="reference",JL=i2.reduce(function(e,t){return e.concat([t+"-"+j0,t+"-"+Mv])},[]),SB=[].concat(i2,[V8]).reduce(function(e,t){return e.concat([t,t+"-"+j0,t+"-"+Mv])},[]),Qhe="beforeRead",Jhe="read",epe="afterRead",tpe="beforeMain",npe="main",rpe="afterMain",ipe="beforeWrite",ope="write",ape="afterWrite",spe=[Qhe,Jhe,epe,tpe,npe,rpe,ipe,ope,ape];function Il(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sh(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function Ba(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function U8(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lpe(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];!Ba(o)||!Il(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 upe(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},{});!Ba(i)||!Il(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const cpe={name:"applyStyles",enabled:!0,phase:"write",fn:lpe,effect:upe,requires:["computeStyles"]};function Pl(e){return e.split("-")[0]}var eh=Math.max,e4=Math.min,Y0=Math.round;function BC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function xB(){return!/^((?!chrome|android).)*safari/i.test(BC())}function q0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ba(e)&&(i=e.offsetWidth>0&&Y0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Y0(r.height)/e.offsetHeight||1);var a=sh(e)?Ya(e):window,s=a.visualViewport,l=!xB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function G8(e){var t=q0(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 wB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&U8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ku(e){return Ya(e).getComputedStyle(e)}function dpe(e){return["table","td","th"].indexOf(Il(e))>=0}function wd(e){return((sh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ab(e){return Il(e)==="html"?e:e.assignedSlot||e.parentNode||(U8(e)?e.host:null)||wd(e)}function eA(e){return!Ba(e)||ku(e).position==="fixed"?null:e.offsetParent}function fpe(e){var t=/firefox/i.test(BC()),n=/Trident/i.test(BC());if(n&&Ba(e)){var r=ku(e);if(r.position==="fixed")return null}var i=Ab(e);for(U8(i)&&(i=i.host);Ba(i)&&["html","body"].indexOf(Il(i))<0;){var o=ku(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 o2(e){for(var t=Ya(e),n=eA(e);n&&dpe(n)&&ku(n).position==="static";)n=eA(n);return n&&(Il(n)==="html"||Il(n)==="body"&&ku(n).position==="static")?t:n||fpe(e)||t}function j8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Um(e,t,n){return eh(e,e4(t,n))}function hpe(e,t,n){var r=Um(e,t,n);return r>n?n:r}function CB(){return{top:0,right:0,bottom:0,left:0}}function _B(e){return Object.assign({},CB(),e)}function kB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ppe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,_B(typeof t!="number"?t:kB(t,i2))};function gpe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pl(n.placement),l=j8(s),u=[Ro,Ga].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=ppe(i.padding,n),m=G8(o),v=l==="y"?Oo:Ro,b=l==="y"?Ua:Ga,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=o2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],O=k-m[h]-g[b],R=k/2-m[h]/2+T,N=Um(M,R,O),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function mpe(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)||!wB(t.elements.popper,i)||(t.elements.arrow=i))}const vpe={name:"arrow",enabled:!0,phase:"main",fn:gpe,effect:mpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K0(e){return e.split("-")[1]}var ype={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bpe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Y0(t*i)/i||0,y:Y0(n*i)/i||0}}function tA(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,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,b=a.y,w=b===void 0?0:b,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Ro,M=Oo,O=window;if(u){var R=o2(n),N="clientHeight",z="clientWidth";if(R===Ya(n)&&(R=wd(n),ku(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Oo||(i===Ro||i===Ga)&&o===Mv){M=Ua;var V=g&&R===O&&O.visualViewport?O.visualViewport.height:R[N];w-=V-r.height,w*=l?1:-1}if(i===Ro||(i===Oo||i===Ua)&&o===Mv){T=Ga;var $=g&&R===O&&O.visualViewport?O.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&ype),ue=h===!0?bpe({x:v,y:w}):{x:v,y:w};if(v=ue.x,w=ue.y,l){var W;return Object.assign({},j,(W={},W[M]=k?"0":"",W[T]=P?"0":"",W.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",W))}return Object.assign({},j,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Spe(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:Pl(t.placement),variation:K0(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,tA(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,tA(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 xpe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Spe,data:{}};var Hy={passive:!0};function wpe(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=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Hy)}),s&&l.addEventListener("resize",n.update,Hy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Hy)}),s&&l.removeEventListener("resize",n.update,Hy)}}const Cpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wpe,data:{}};var _pe={left:"right",right:"left",bottom:"top",top:"bottom"};function V3(e){return e.replace(/left|right|bottom|top/g,function(t){return _pe[t]})}var kpe={start:"end",end:"start"};function nA(e){return e.replace(/start|end/g,function(t){return kpe[t]})}function Y8(e){var t=Ya(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function q8(e){return q0(wd(e)).left+Y8(e).scrollLeft}function Epe(e,t){var n=Ya(e),r=wd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=xB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+q8(e),y:l}}function Ppe(e){var t,n=wd(e),r=Y8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q8(e),l=-r.scrollTop;return ku(i||n).direction==="rtl"&&(s+=eh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function K8(e){var t=ku(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function EB(e){return["html","body","#document"].indexOf(Il(e))>=0?e.ownerDocument.body:Ba(e)&&K8(e)?e:EB(Ab(e))}function Gm(e,t){var n;t===void 0&&(t=[]);var r=EB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ya(r),a=i?[o].concat(o.visualViewport||[],K8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Gm(Ab(a)))}function FC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tpe(e,t){var n=q0(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 rA(e,t,n){return t===bB?FC(Epe(e,n)):sh(t)?Tpe(t,n):FC(Ppe(wd(e)))}function Lpe(e){var t=Gm(Ab(e)),n=["absolute","fixed"].indexOf(ku(e).position)>=0,r=n&&Ba(e)?o2(e):e;return sh(r)?t.filter(function(i){return sh(i)&&wB(i,r)&&Il(i)!=="body"}):[]}function Ape(e,t,n,r){var i=t==="clippingParents"?Lpe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=rA(e,u,r);return l.top=eh(h.top,l.top),l.right=e4(h.right,l.right),l.bottom=e4(h.bottom,l.bottom),l.left=eh(h.left,l.left),l},rA(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 PB(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pl(r):null,o=r?K0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Oo:l={x:a,y:t.y-n.height};break;case Ua:l={x:a,y:t.y+t.height};break;case Ga:l={x:t.x+t.width,y:s};break;case Ro:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?j8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case j0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Mv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Iv(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?Xhe:s,u=n.rootBoundary,h=u===void 0?bB:u,g=n.elementContext,m=g===void 0?Ug:g,v=n.altBoundary,b=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=_B(typeof E!="number"?E:kB(E,i2)),k=m===Ug?Zhe:Ug,T=e.rects.popper,M=e.elements[b?k:m],O=Ape(sh(M)?M:M.contextElement||wd(e.elements.popper),l,h,a),R=q0(e.elements.reference),N=PB({reference:R,element:T,strategy:"absolute",placement:i}),z=FC(Object.assign({},T,N)),V=m===Ug?z:R,$={top:O.top-V.top+P.top,bottom:V.bottom-O.bottom+P.bottom,left:O.left-V.left+P.left,right:V.right-O.right+P.right},j=e.modifiersData.offset;if(m===Ug&&j){var ue=j[i];Object.keys($).forEach(function(W){var Q=[Ga,Ua].indexOf(W)>=0?1:-1,ne=[Oo,Ua].indexOf(W)>=0?"y":"x";$[W]+=ue[ne]*Q})}return $}function Mpe(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?SB:l,h=K0(r),g=h?s?JL:JL.filter(function(b){return K0(b)===h}):i2,m=g.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=g);var v=m.reduce(function(b,w){return b[w]=Iv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Pl(w)],b},{});return Object.keys(v).sort(function(b,w){return v[b]-v[w]})}function Ipe(e){if(Pl(e)===V8)return[];var t=V3(e);return[nA(e),t,nA(t)]}function Ope(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,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,b=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Pl(E),k=P===E,T=l||(k||!b?[V3(E)]:Ipe(E)),M=[E].concat(T).reduce(function(be,Ie){return be.concat(Pl(Ie)===V8?Mpe(t,{placement:Ie,boundary:h,rootBoundary:g,padding:u,flipVariations:b,allowedAutoPlacements:w}):Ie)},[]),O=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,V=M[0],$=0;$=0,ne=Q?"width":"height",J=Iv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),K=Q?W?Ga:Ro:W?Ua:Oo;O[ne]>R[ne]&&(K=V3(K));var G=V3(K),X=[];if(o&&X.push(J[ue]<=0),s&&X.push(J[K]<=0,J[G]<=0),X.every(function(be){return be})){V=j,z=!1;break}N.set(j,X)}if(z)for(var ce=b?3:1,me=function(Ie){var We=M.find(function(De){var Qe=N.get(De);if(Qe)return Qe.slice(0,Ie).every(function(st){return st})});if(We)return V=We,"break"},Me=ce;Me>0;Me--){var xe=me(Me);if(xe==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}const Rpe={name:"flip",enabled:!0,phase:"main",fn:Ope,requiresIfExists:["offset"],data:{_skip:!1}};function iA(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 oA(e){return[Oo,Ga,Ua,Ro].some(function(t){return e[t]>=0})}function Npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Iv(t,{elementContext:"reference"}),s=Iv(t,{altBoundary:!0}),l=iA(a,r),u=iA(s,i,o),h=oA(l),g=oA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Dpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Npe};function zpe(e,t,n){var r=Pl(e),i=[Ro,Oo].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,[Ro,Ga].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Bpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=SB.reduce(function(h,g){return h[g]=zpe(g,t.rects,o),h},{}),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 Fpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bpe};function $pe(e){var t=e.state,n=e.name;t.modifiersData[n]=PB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Hpe={name:"popperOffsets",enabled:!0,phase:"read",fn:$pe,data:{}};function Wpe(e){return e==="x"?"y":"x"}function Vpe(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,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,b=n.tetherOffset,w=b===void 0?0:b,E=Iv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Pl(t.placement),k=K0(t.placement),T=!k,M=j8(P),O=Wpe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,V=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(!!R){if(o){var W,Q=M==="y"?Oo:Ro,ne=M==="y"?Ua:Ga,J=M==="y"?"height":"width",K=R[M],G=K+E[Q],X=K-E[ne],ce=v?-z[J]/2:0,me=k===j0?N[J]:z[J],Me=k===j0?-z[J]:-N[J],xe=t.elements.arrow,be=v&&xe?G8(xe):{width:0,height:0},Ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:CB(),We=Ie[Q],De=Ie[ne],Qe=Um(0,N[J],be[J]),st=T?N[J]/2-ce-Qe-We-$.mainAxis:me-Qe-We-$.mainAxis,Ct=T?-N[J]/2+ce+Qe+De+$.mainAxis:Me+Qe+De+$.mainAxis,ft=t.elements.arrow&&o2(t.elements.arrow),ut=ft?M==="y"?ft.clientTop||0:ft.clientLeft||0:0,vt=(W=j?.[M])!=null?W:0,Ee=K+st-vt-ut,Je=K+Ct-vt,Lt=Um(v?e4(G,Ee):G,K,v?eh(X,Je):X);R[M]=Lt,ue[M]=Lt-K}if(s){var it,pt=M==="x"?Oo:Ro,an=M==="x"?Ua:Ga,_t=R[O],Ut=O==="y"?"height":"width",sn=_t+E[pt],yn=_t-E[an],Oe=[Oo,Ro].indexOf(P)!==-1,Xe=(it=j?.[O])!=null?it:0,Xt=Oe?sn:_t-N[Ut]-z[Ut]-Xe+$.altAxis,Yt=Oe?_t+N[Ut]+z[Ut]-Xe-$.altAxis:yn,_e=v&&Oe?hpe(Xt,_t,Yt):Um(v?Xt:sn,_t,v?Yt:yn);R[O]=_e,ue[O]=_e-_t}t.modifiersData[r]=ue}}const Upe={name:"preventOverflow",enabled:!0,phase:"main",fn:Vpe,requiresIfExists:["offset"]};function Gpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jpe(e){return e===Ya(e)||!Ba(e)?Y8(e):Gpe(e)}function Ype(e){var t=e.getBoundingClientRect(),n=Y0(t.width)/e.offsetWidth||1,r=Y0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qpe(e,t,n){n===void 0&&(n=!1);var r=Ba(t),i=Ba(t)&&Ype(t),o=wd(t),a=q0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Il(t)!=="body"||K8(o))&&(s=jpe(t)),Ba(t)?(l=q0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=q8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Kpe(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 Xpe(e){var t=Kpe(e);return spe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Zpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qpe(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 aA={placement:"bottom",modifiers:[],strategy:"absolute"};function sA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Wr={arrowShadowColor:Tp("--popper-arrow-shadow-color"),arrowSize:Tp("--popper-arrow-size","8px"),arrowSizeHalf:Tp("--popper-arrow-size-half"),arrowBg:Tp("--popper-arrow-bg"),transformOrigin:Tp("--popper-transform-origin"),arrowOffset:Tp("--popper-arrow-offset")};function n0e(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 r0e={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"},i0e=e=>r0e[e],lA={scroll:!0,resize:!0};function o0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...lA,...e}}:t={enabled:e,options:lA},t}var a0e={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`}},s0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{uA(e)},effect:({state:e})=>()=>{uA(e)}},uA=e=>{e.elements.popper.style.setProperty(Wr.transformOrigin.var,i0e(e.placement))},l0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{u0e(e)}},u0e=e=>{var t;if(!e.placement)return;const n=c0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Wr.arrowSize.varRef,height:Wr.arrowSize.varRef,zIndex:-1});const r={[Wr.arrowSizeHalf.var]:`calc(${Wr.arrowSize.varRef} / 2)`,[Wr.arrowOffset.var]:`calc(${Wr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},c0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Wr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Wr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Wr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Wr.arrowOffset.varRef}},d0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{cA(e)},effect:({state:e})=>()=>{cA(e)}},cA=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:Wr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:n0e(e.placement)})},f0e={"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"}},h0e={"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 p0e(e,t="ltr"){var n;const r=((n=f0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:h0e[e]??r}function TB(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:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,b=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=p0e(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!b.current||!w.current||(($=k.current)==null||$.call(k),E.current=t0e(b.current,w.current,{placement:P,modifiers:[d0e,l0e,s0e,{...a0e,enabled:!!m},{name:"eventListeners",...o0e(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!g,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var $;!b.current&&!w.current&&(($=E.current)==null||$.destroy(),E.current=null)},[]);const M=C.exports.useCallback($=>{b.current=$,T()},[T]),O=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Hn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:ue,shadowColor:W,bg:Q,style:ne,...J}=$;return{...J,ref:j,"data-popper-arrow":"",style:g0e($)}},[]),V=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=E.current)==null||$.update()},forceUpdate(){var $;($=E.current)==null||$.forceUpdate()},transformOrigin:Wr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:V,getReferenceProps:O}}function g0e(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 LB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=dr(n),a=dr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i??`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),b=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():b()},[u,b,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:b,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function m0e(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]),Zf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Dhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function AB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[v0e,y0e]=_n({strict:!1,name:"PortalManagerContext"});function MB(e){const{children:t,zIndex:n}=e;return x(v0e,{value:{zIndex:n},children:t})}MB.displayName="PortalManager";var[IB,b0e]=_n({strict:!1,name:"PortalContext"}),X8="chakra-portal",S0e=".chakra-portal",x0e=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),w0e=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=b0e(),l=y0e();ks(()=>{if(!r)return;const h=r.ownerDocument,g=t?s??h.body:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=X8,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l?.zIndex?x(x0e,{zIndex:l?.zIndex,children:n}):n;return o.current?Dl.exports.createPortal(x(IB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},C0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=X8),l},[i]),[,s]=C.exports.useState({});return ks(()=>s({}),[]),ks(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Dl.exports.createPortal(x(IB,{value:r?a:null,children:t}),a):null};function vh(e){const{containerRef:t,...n}=e;return t?x(C0e,{containerRef:t,...n}):x(w0e,{...n})}vh.defaultProps={appendToParentPortal:!0};vh.className=X8;vh.selector=S0e;vh.displayName="Portal";var _0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lp=new WeakMap,Wy=new WeakMap,Vy={},ow=0,OB=function(e){return e&&(e.host||OB(e.parentNode))},k0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OB(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)})},E0e=function(e,t,n,r){var i=k0e(t,Array.isArray(e)?e:[e]);Vy[n]||(Vy[n]=new WeakMap);var o=Vy[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Lp.get(m)||0)+1,E=(o.get(m)||0)+1;Lp.set(m,w),o.set(m,E),a.push(m),w===1&&b&&Wy.set(m,!0),E===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return h(t),s.clear(),ow++,function(){a.forEach(function(g){var m=Lp.get(g)-1,v=o.get(g)-1;Lp.set(g,m),o.set(g,v),m||(Wy.has(g)||g.removeAttribute(r),Wy.delete(g)),v||g.removeAttribute(n)}),ow--,ow||(Lp=new WeakMap,Lp=new WeakMap,Wy=new WeakMap,Vy={})}},RB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||_0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),E0e(r,i,n,"aria-hidden")):function(){return null}};function Z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},P0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T0e=P0e,L0e=T0e;function NB(){}function DB(){}DB.resetWarningCache=NB;var A0e=function(){function e(r,i,o,a,s,l){if(l!==L0e){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:DB,resetWarningCache:NB};return n.PropTypes=n,n};On.exports=A0e();var $C="data-focus-lock",zB="data-focus-lock-disabled",M0e="data-no-focus-lock",I0e="data-autofocus-inside",O0e="data-no-autofocus";function R0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function N0e(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 BB(e,t){return N0e(t||null,function(n){return e.forEach(function(r){return R0e(r,n)})})}var aw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function FB(e){return e}function $B(e,t){t===void 0&&(t=FB);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 h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function Q8(e,t){return t===void 0&&(t=FB),$B(e,t)}function HB(e){e===void 0&&(e={});var t=$B(null);return t.options=vl({async:!0,ssr:!1},e),t}var WB=function(e){var t=e.sideCar,n=Az(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 x(r,{...vl({},n)})};WB.isSideCarExport=!0;function D0e(e,t){return e.useMedium(t),WB}var VB=Q8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),UB=Q8(),z0e=Q8(),B0e=HB({async:!0}),F0e=[],J8=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),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,b=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,O=M===void 0?F0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,V=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,ue=t.focusOptions,W=t.onActivation,Q=t.onDeactivation,ne=C.exports.useState({}),J=ne[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&W&&W(s.current),l.current=!0},[W]),G=C.exports.useCallback(function(){l.current=!1,Q&&Q(s.current)},[Q]);C.exports.useEffect(function(){g||(u.current=null)},[]);var X=C.exports.useCallback(function(De){var Qe=u.current;if(Qe&&Qe.focus){var st=typeof j=="function"?j(Qe):j;if(st){var Ct=typeof st=="object"?st:void 0;u.current=null,De?Promise.resolve().then(function(){return Qe.focus(Ct)}):Qe.focus(Ct)}}},[j]),ce=C.exports.useCallback(function(De){l.current&&VB.useMedium(De)},[]),me=UB.useMedium,Me=C.exports.useCallback(function(De){s.current!==De&&(s.current=De,a(De))},[]),xe=Ln((r={},r[zB]=g&&"disabled",r[$C]=E,r),V),be=m!==!0,Ie=be&&m!=="tail",We=BB([n,Me]);return ee(Wn,{children:[be&&[x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:aw},"guard-nearest"):null],!g&&x($,{id:J,sideCar:B0e,observed:o,disabled:g,persistentFocus:v,crossFrame:b,autoFocus:w,whiteList:k,shards:O,onActivation:K,onDeactivation:G,returnFocus:X,focusOptions:ue}),x(N,{ref:We,...xe,className:P,onBlur:me,onFocus:ce,children:h}),Ie&&x("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:aw})]})});J8.propTypes={};J8.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 GB=J8;function HC(e,t){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HC(e,t)}function e_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,HC(e,t)}function jB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $0e(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){e_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return jB(l,"displayName","SideEffect("+n(i)+")"),l}}var Fl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(q0e)},K0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],n_=K0e.join(","),X0e="".concat(n_,", [data-focus-guard]"),tF=function(e,t){var n;return Fl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?X0e:n_)?[i]:[],tF(i))},[])},r_=function(e,t){return e.reduce(function(n,r){return n.concat(tF(r,t),r.parentNode?Fl(r.parentNode.querySelectorAll(n_)).filter(function(i){return i===r}):[])},[])},Z0e=function(e){var t=e.querySelectorAll("[".concat(I0e,"]"));return Fl(t).map(function(n){return r_([n])}).reduce(function(n,r){return n.concat(r)},[])},i_=function(e,t){return Fl(e).filter(function(n){return KB(t,n)}).filter(function(n){return G0e(n)})},dA=function(e,t){return t===void 0&&(t=new Map),Fl(e).filter(function(n){return XB(t,n)})},VC=function(e,t,n){return eF(i_(r_(e,n),t),!0,n)},fA=function(e,t){return eF(i_(r_(e),t),!1)},Q0e=function(e,t){return i_(Z0e(e),t)},Ov=function(e,t){return e.shadowRoot?Ov(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Fl(e.children).some(function(n){return Ov(n,t)})},J0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},nF=function(e){return e.parentNode?nF(e.parentNode):e},o_=function(e){var t=WC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute($C);return n.push.apply(n,i?J0e(Fl(nF(r).querySelectorAll("[".concat($C,'="').concat(i,'"]:not([').concat(zB,'="disabled"])')))):[r]),n},[])},rF=function(e){return e.activeElement?e.activeElement.shadowRoot?rF(e.activeElement.shadowRoot):e.activeElement:void 0},a_=function(){return document.activeElement?document.activeElement.shadowRoot?rF(document.activeElement.shadowRoot):document.activeElement:void 0},e1e=function(e){return e===document.activeElement},t1e=function(e){return Boolean(Fl(e.querySelectorAll("iframe")).some(function(t){return e1e(t)}))},iF=function(e){var t=document&&a_();return!t||t.dataset&&t.dataset.focusGuard?!1:o_(e).some(function(n){return Ov(n,t)||t1e(n)})},n1e=function(){var e=document&&a_();return e?Fl(document.querySelectorAll("[".concat(M0e,"]"))).some(function(t){return Ov(t,e)}):!1},r1e=function(e,t){return t.filter(JB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},s_=function(e,t){return JB(e)&&e.name?r1e(e,t):e},i1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(s_(n,e))}),e.filter(function(n){return t.has(n)})},hA=function(e){return e[0]&&e.length>1?s_(e[0],e):e[0]},pA=function(e,t){return e.length>1?e.indexOf(s_(e[t],e)):t},oF="NEW_FOCUS",o1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=t_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),b=i1e(t),w=n!==void 0?b.indexOf(n):-1,E=w-(r?b.indexOf(r):l),P=pA(e,0),k=pA(e,i-1);if(l===-1||h===-1)return oF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return k;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},a1e=function(e){return function(t){var n,r=(n=ZB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=dA(r.filter(a1e(n)));return i&&i.length?hA(i):hA(dA(t))},UC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&UC(e.parentNode.host||e.parentNode,t),t},sw=function(e,t){for(var n=UC(e),r=UC(t),i=0;i=0)return o}return!1},aF=function(e,t,n){var r=WC(e),i=WC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=sw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=sw(o,l);u&&(!a||Ov(u,a)?a=u:a=sw(u,a))})}),a},l1e=function(e,t){return e.reduce(function(n,r){return n.concat(Q0e(r,t))},[])},u1e=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(Y0e)},c1e=function(e,t){var n=document&&a_(),r=o_(e).filter(t4),i=aF(n||e,e,r),o=new Map,a=fA(r,o),s=VC(r,o).filter(function(m){var v=m.node;return t4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=fA([i],o).map(function(m){var v=m.node;return v}),u=u1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=o1e(h,l,n,t);return g===oF?{node:s1e(a,h,l1e(r,o))}:g===void 0?g:u[g]}},d1e=function(e){var t=o_(e).filter(t4),n=aF(e,e,t),r=new Map,i=VC([n],r,!0),o=VC(t,r).filter(function(a){var s=a.node;return t4(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:t_(s)}})},f1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},lw=0,uw=!1,h1e=function(e,t,n){n===void 0&&(n={});var r=c1e(e,t);if(!uw&&r){if(lw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),uw=!0,setTimeout(function(){uw=!1},1);return}lw++,f1e(r.node,n.focusOptions),lw--}};const sF=h1e;function lF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var p1e=function(){return document&&document.activeElement===document.body},g1e=function(){return p1e()||n1e()},k0=null,t0=null,E0=null,Rv=!1,m1e=function(){return!0},v1e=function(t){return(k0.whiteList||m1e)(t)},y1e=function(t,n){E0={observerNode:t,portaledElement:n}},b1e=function(t){return E0&&E0.portaledElement===t};function gA(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 S1e=function(t){return t&&"current"in t?t.current:t},x1e=function(t){return t?Boolean(Rv):Rv==="meanwhile"},w1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},C1e=function(t,n){return n.some(function(r){return w1e(t,r,r)})},n4=function(){var t=!1;if(k0){var n=k0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||E0&&E0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(S1e).filter(Boolean));if((!h||v1e(h))&&(i||x1e(s)||!g1e()||!t0&&o)&&(u&&!(iF(g)||h&&C1e(h,g)||b1e(h))&&(document&&!t0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=sF(g,t0,{focusOptions:l}),E0={})),Rv=!1,t0=document&&document.activeElement),document){var m=document&&document.activeElement,v=d1e(g),b=v.map(function(w){var E=w.node;return E}).indexOf(m);b>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),gA(b,v.length,1,v),gA(b,-1,-1,v))}}}return t},uF=function(t){n4()&&t&&(t.stopPropagation(),t.preventDefault())},l_=function(){return lF(n4)},_1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||y1e(r,n)},k1e=function(){return null},cF=function(){Rv="just",setTimeout(function(){Rv="meanwhile"},0)},E1e=function(){document.addEventListener("focusin",uF),document.addEventListener("focusout",l_),window.addEventListener("blur",cF)},P1e=function(){document.removeEventListener("focusin",uF),document.removeEventListener("focusout",l_),window.removeEventListener("blur",cF)};function T1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function L1e(e){var t=e.slice(-1)[0];t&&!k0&&E1e();var n=k0,r=n&&t&&t.id===n.id;k0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(t0=null,(!r||n.observed!==t.observed)&&t.onActivation(),n4(),lF(n4)):(P1e(),t0=null)}VB.assignSyncMedium(_1e);UB.assignMedium(l_);z0e.assignMedium(function(e){return e({moveFocusInside:sF,focusInside:iF})});const A1e=$0e(T1e,L1e)(k1e);var dF=C.exports.forwardRef(function(t,n){return x(GB,{sideCar:A1e,ref:n,...t})}),fF=GB.propTypes||{};fF.sideCar;Z8(fF,["sideCar"]);dF.propTypes={};const M1e=dF;var hF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&yB(r.current).length===0&&requestAnimationFrame(()=>{var b;(b=r.current)==null||b.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(M1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};hF.displayName="FocusLock";var U3="right-scroll-bar-position",G3="width-before-scroll-bar",I1e="with-scroll-bars-hidden",O1e="--removed-body-scroll-bar-size",pF=HB(),cw=function(){},Mb=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:cw,onWheelCapture:cw,onTouchMoveCapture:cw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=Az(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=BB([n,t]),O=vl(vl({},k),i);return ee(Wn,{children:[h&&x(T,{sideCar:pF,removeScrollBar:u,shards:g,noIsolation:v,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),vl(vl({},O),{ref:M})):x(P,{...vl({},O,{className:l,ref:M}),children:s})]})});Mb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mb.classNames={fullWidth:G3,zeroRight:U3};var R1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R1e();return t&&e.setAttribute("nonce",t),e}function D1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N1e())&&(D1e(t,n),z1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F1e=function(){var e=B1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gF=function(){var e=F1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},$1e={left:0,top:0,right:0,gap:0},dw=function(e){return parseInt(e||"",10)||0},H1e=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[dw(n),dw(r),dw(i)]},W1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $1e;var t=H1e(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])}},V1e=gF(),U1e=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(I1e,` { + 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(U3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(G3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(U3," .").concat(U3,` { + right: 0 `).concat(r,`; + } + + .`).concat(G3," .").concat(G3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(O1e,": ").concat(s,`px; + } +`)},G1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return W1e(i)},[i]);return x(V1e,{styles:U1e(o,!t,i,n?"":"!important")})},GC=!1;if(typeof window<"u")try{var Uy=Object.defineProperty({},"passive",{get:function(){return GC=!0,!0}});window.addEventListener("test",Uy,Uy),window.removeEventListener("test",Uy,Uy)}catch{GC=!1}var Ap=GC?{passive:!1}:!1,j1e=function(e){return e.tagName==="TEXTAREA"},mF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!j1e(e)&&n[t]==="visible")},Y1e=function(e){return mF(e,"overflowY")},q1e=function(e){return mF(e,"overflowX")},mA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=vF(e,n);if(r){var i=yF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},K1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},X1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vF=function(e,t){return e==="v"?Y1e(t):q1e(t)},yF=function(e,t){return e==="v"?K1e(t):X1e(t)},Z1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q1e=function(e,t,n,r,i){var o=Z1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=yF(e,s),b=v[0],w=v[1],E=v[2],P=w-E-o*b;(b||P)&&vF(e,s)&&(g+=P,m+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Gy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vA=function(e){return[e.deltaX,e.deltaY]},yA=function(e){return e&&"current"in e?e.current:e},J1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ege=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},tge=0,Mp=[];function nge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(tge++)[0],o=C.exports.useState(function(){return gF()})[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 w=LC([e.lockRef.current],(e.shards||[]).map(yA),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Gy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],O,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=mA(N,R);if(!z)return!0;if(z?O=N:(O=N==="v"?"h":"v",z=mA(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=O),!O)return!0;var V=r.current||O;return Q1e(V,E,w,V==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Mp.length||Mp[Mp.length-1]!==o)){var P="deltaY"in E?vA(E):Gy(E),k=t.current.filter(function(O){return O.name===E.type&&O.target===E.target&&J1e(O.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(yA).filter(Boolean).filter(function(O){return O.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Gy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,vA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Gy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Mp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Ap),document.addEventListener("touchmove",l,Ap),document.addEventListener("touchstart",h,Ap),function(){Mp=Mp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Ap),document.removeEventListener("touchmove",l,Ap),document.removeEventListener("touchstart",h,Ap)}},[]);var v=e.removeScrollBar,b=e.inert;return ee(Wn,{children:[b?x(o,{styles:ege(i)}):null,v?x(G1e,{gapMode:"margin"}):null]})}const rge=D0e(pF,nge);var bF=C.exports.forwardRef(function(e,t){return x(Mb,{...vl({},e,{ref:t,sideCar:rge})})});bF.classNames=Mb.classNames;const SF=bF;var yh=(...e)=>e.filter(Boolean).join(" ");function um(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var ige=class{modals;constructor(){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}},jC=new ige;function oge(e,t){C.exports.useEffect(()=>(t&&jC.add(e),()=>{jC.remove(e)}),[t,e])}function age(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),h=C.exports.useRef(null),[g,m,v]=lge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");sge(u,t&&a),oge(u,t);const b=C.exports.useRef(null),w=C.exports.useCallback(z=>{b.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),O=C.exports.useCallback((z={},V=null)=>({role:"dialog",...z,ref:Hn(V,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:um(z.onClick,$=>$.stopPropagation())}),[v,T,g,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),b.current===z.target&&(!jC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},V=null)=>({...z,ref:Hn(V,h),onClick:um(z.onClick,R),onKeyDown:um(z.onKeyDown,E),onMouseDown:um(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:O,getDialogContainerProps:N}}function sge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return RB(e.current)},[t,e,n])}function lge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[uge,bh]=_n({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[cge,dd]=_n({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),X0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,b=Oi("Modal",e),E={...age(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return x(cge,{value:E,children:x(uge,{value:b,children:x(Sd,{onExitComplete:v,children:E.isOpen&&x(vh,{...t,children:n})})})})};X0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};X0.displayName="Modal";var Nv=ke((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__body",n),s=bh();return ae.createElement(Se.div,{ref:t,className:a,id:i,...r,__css:s.body})});Nv.displayName="ModalBody";var u_=ke((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=dd(),a=yh("chakra-modal__close-btn",r),s=bh();return x(Tb,{ref:t,__css:s.closeButton,className:a,onClick:um(n,l=>{l.stopPropagation(),o()}),...i})});u_.displayName="ModalCloseButton";function xF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=dd(),[g,m]=w8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),x(hF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(SF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var dge={slideInBottom:{...MC,custom:{offsetY:16,reverse:!0}},slideInRight:{...MC,custom:{offsetX:16,reverse:!0}},scale:{...Oz,custom:{initialScale:.95,reverse:!0}},none:{}},fge=Se(zl.section),hge=e=>dge[e||"none"],wF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=hge(n),...i}=e;return x(fge,{ref:t,...r,...i})});wF.displayName="ModalTransition";var Dv=ke((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=dd(),u=s(a,t),h=l(i),g=yh("chakra-modal__content",n),m=bh(),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:w}=dd();return ae.createElement(xF,null,ae.createElement(Se.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:b},x(wF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Dv.displayName="ModalContent";var Ib=ke((e,t)=>{const{className:n,...r}=e,i=yh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...bh().footer};return ae.createElement(Se.footer,{ref:t,...r,__css:a,className:i})});Ib.displayName="ModalFooter";var Ob=ke((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=dd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=yh("chakra-modal__header",n),l={flex:0,...bh().header};return ae.createElement(Se.header,{ref:t,className:a,id:i,...r,__css:l})});Ob.displayName="ModalHeader";var pge=Se(zl.div),Z0=ke((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=yh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...bh().overlay},{motionPreset:u}=dd();return x(pge,{...i||(u==="none"?{}:Iz),__css:l,ref:t,className:a,...o})});Z0.displayName="ModalOverlay";function CF(e){const{leastDestructiveRef:t,...n}=e;return x(X0,{...n,initialFocusRef:t})}var _F=ke((e,t)=>x(Dv,{ref:t,role:"alertdialog",...e})),[mTe,gge]=_n(),mge=Se(Rz),vge=ke((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=dd(),h=s(a,t),g=l(o),m=yh("chakra-modal__content",n),v=bh(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=gge();return ae.createElement(xF,null,ae.createElement(Se.div,{...g,className:"chakra-modal__content-container",__css:w},x(mge,{motionProps:i,direction:E,in:u,className:m,...h,__css:b,children:r})))});vge.displayName="DrawerContent";function yge(e,t){const n=dr(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 kF=(...e)=>e.filter(Boolean).join(" "),fw=e=>e?!0:void 0;function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var bge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("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"})}),Sge=e=>x(va,{viewBox:"0 0 24 24",...e,children:x("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 bA(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var xge=50,SA=300;function wge(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);yge(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?xge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},SA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},SA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var Cge=/^[Ee0-9+\-.]$/;function _ge(e){return Cge.test(e)}function kge(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 Ege(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:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:b,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:O,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:V,format:$,parse:j,...ue}=e,W=dr(O),Q=dr(R),ne=dr(N),J=dr(V??_ge),K=dr(z),G=Vfe(e),{update:X,increment:ce,decrement:me}=G,[Me,xe]=C.exports.useState(!1),be=!(s||l),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useRef(null),st=C.exports.useCallback(_e=>_e.split("").filter(J).join(""),[J]),Ct=C.exports.useCallback(_e=>j?.(_e)??_e,[j]),ft=C.exports.useCallback(_e=>($?.(_e)??_e).toString(),[$]);ud(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Ie.current)return;if(Ie.current.value!=G.value){const It=Ct(Ie.current.value);G.setValue(st(It))}},[Ct,st]);const ut=C.exports.useCallback((_e=a)=>{be&&ce(_e)},[ce,be,a]),vt=C.exports.useCallback((_e=a)=>{be&&me(_e)},[me,be,a]),Ee=wge(ut,vt);bA(De,"disabled",Ee.stop,Ee.isSpinning),bA(Qe,"disabled",Ee.stop,Ee.isSpinning);const Je=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;const ze=Ct(_e.currentTarget.value);X(st(ze)),We.current={start:_e.currentTarget.selectionStart,end:_e.currentTarget.selectionEnd}},[X,st,Ct]),Lt=C.exports.useCallback(_e=>{var It;W?.(_e),We.current&&(_e.target.selectionStart=We.current.start??((It=_e.currentTarget.value)==null?void 0:It.length),_e.currentTarget.selectionEnd=We.current.end??_e.currentTarget.selectionStart)},[W]),it=C.exports.useCallback(_e=>{if(_e.nativeEvent.isComposing)return;kge(_e,J)||_e.preventDefault();const It=pt(_e)*a,ze=_e.key,ln={ArrowUp:()=>ut(It),ArrowDown:()=>vt(It),Home:()=>X(i),End:()=>X(o)}[ze];ln&&(_e.preventDefault(),ln(_e))},[J,a,ut,vt,X,i,o]),pt=_e=>{let It=1;return(_e.metaKey||_e.ctrlKey)&&(It=.1),_e.shiftKey&&(It=10),It},an=C.exports.useMemo(()=>{const _e=K?.(G.value);if(_e!=null)return _e;const It=G.value.toString();return It||void 0},[G.value,K]),_t=C.exports.useCallback(()=>{let _e=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(_e=o),G.cast(_e))},[G,o,i]),Ut=C.exports.useCallback(()=>{xe(!1),n&&_t()},[n,xe,_t]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var _e;(_e=Ie.current)==null||_e.focus()})},[t]),yn=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.up(),sn()},[sn,Ee]),Oe=C.exports.useCallback(_e=>{_e.preventDefault(),Ee.down(),sn()},[sn,Ee]);Zf(()=>Ie.current,"wheel",_e=>{var It;const ot=(((It=Ie.current)==null?void 0:It.ownerDocument)??document).activeElement===Ie.current;if(!v||!ot)return;_e.preventDefault();const ln=pt(_e)*a,zn=Math.sign(_e.deltaY);zn===-1?ut(ln):zn===1&&vt(ln)},{passive:!1});const Xe=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMax;return{..._e,ref:Hn(It,De),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||yn(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMax,r,yn,Ee.stop,l]),Xt=C.exports.useCallback((_e={},It=null)=>{const ze=l||r&&G.isAtMin;return{..._e,ref:Hn(It,Qe),role:"button",tabIndex:-1,onPointerDown:al(_e.onPointerDown,ot=>{ot.button!==0||ze||Oe(ot)}),onPointerLeave:al(_e.onPointerLeave,Ee.stop),onPointerUp:al(_e.onPointerUp,Ee.stop),disabled:ze,"aria-disabled":fw(ze)}},[G.isAtMin,r,Oe,Ee.stop,l]),Yt=C.exports.useCallback((_e={},It=null)=>({name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:b,disabled:l,..._e,readOnly:_e.readOnly??s,"aria-readonly":_e.readOnly??s,"aria-required":_e.required??u,required:_e.required??u,ref:Hn(Ie,It),value:ft(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":fw(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:al(_e.onChange,Je),onKeyDown:al(_e.onKeyDown,it),onFocus:al(_e.onFocus,Lt,()=>xe(!0)),onBlur:al(_e.onBlur,Q,Ut)}),[P,m,g,M,T,ft,k,b,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,Je,it,Lt,Q,Ut]);return{value:ft(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Xe,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:ue}}var[Pge,Rb]=_n({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Tge,c_]=_n({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),d_=ke(function(t,n){const r=Oi("NumberInput",t),i=vn(t),o=R8(i),{htmlProps:a,...s}=Ege(o),l=C.exports.useMemo(()=>s,[s]);return ae.createElement(Tge,{value:l},ae.createElement(Pge,{value:r},ae.createElement(Se.div,{...a,ref:n,className:kF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});d_.displayName="NumberInput";var EF=ke(function(t,n){const r=Rb();return ae.createElement(Se.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}})});EF.displayName="NumberInputStepper";var f_=ke(function(t,n){const{getInputProps:r}=c_(),i=r(t,n),o=Rb();return ae.createElement(Se.input,{...i,className:kF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});f_.displayName="NumberInputField";var PF=Se("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),h_=ke(function(t,n){const r=Rb(),{getDecrementButtonProps:i}=c_(),o=i(t,n);return x(PF,{...o,__css:r.stepper,children:t.children??x(bge,{})})});h_.displayName="NumberDecrementStepper";var p_=ke(function(t,n){const{getIncrementButtonProps:r}=c_(),i=r(t,n),o=Rb();return x(PF,{...i,__css:o.stepper,children:t.children??x(Sge,{})})});p_.displayName="NumberIncrementStepper";var a2=(...e)=>e.filter(Boolean).join(" ");function Lge(e,...t){return Age(e)?e(...t):e}var Age=e=>typeof e=="function";function sl(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Mge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Ige,Sh]=_n({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[Oge,s2]=_n({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Ip={click:"click",hover:"hover"};function Rge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Ip.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:b,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=LB(e),M=C.exports.useRef(null),O=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[V,$]=C.exports.useState(!1),[j,ue]=C.exports.useState(!1),W=C.exports.useId(),Q=i??W,[ne,J,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(Je=>`${Je}-${Q}`),{referenceRef:X,getArrowProps:ce,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:xe}=TB({...w,enabled:E||!!b}),be=m0e({isOpen:E,ref:R});Qfe({enabled:E,ref:O}),jhe(R,{focusRef:O,visible:E,shouldFocus:o&&u===Ip.click}),qhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===Ip.click});const Ie=AB({wasSelected:z.current,enabled:m,mode:v,isSelected:be.present}),We=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,style:{...Je.style,transformOrigin:Wr.transformOrigin.varRef,[Wr.arrowSize.var]:s?`${s}px`:void 0,[Wr.arrowShadowColor.var]:l},ref:Hn(R,Lt),children:Ie?Je.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:sl(Je.onKeyDown,pt=>{n&&pt.key==="Escape"&&P()}),onBlur:sl(Je.onBlur,pt=>{const an=xA(pt),_t=hw(R.current,an),Ut=hw(O.current,an);E&&t&&(!_t&&!Ut)&&P()}),"aria-labelledby":V?K:void 0,"aria-describedby":j?G:void 0};return u===Ip.hover&&(it.role="tooltip",it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0}),it.onMouseLeave=sl(Je.onMouseLeave,pt=>{pt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),g))})),it},[Ie,J,V,K,j,G,u,n,P,E,t,g,l,s]),De=C.exports.useCallback((Je={},Lt=null)=>me({...Je,style:{visibility:E?"visible":"hidden",...Je.style}},Lt),[E,me]),Qe=C.exports.useCallback((Je,Lt=null)=>({...Je,ref:Hn(Lt,M,X)}),[M,X]),st=C.exports.useRef(),Ct=C.exports.useRef(),ft=C.exports.useCallback(Je=>{M.current==null&&X(Je)},[X]),ut=C.exports.useCallback((Je={},Lt=null)=>{const it={...Je,ref:Hn(O,Lt,ft),id:ne,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===Ip.click&&(it.onClick=sl(Je.onClick,T)),u===Ip.hover&&(it.onFocus=sl(Je.onFocus,()=>{st.current===void 0&&k()}),it.onBlur=sl(Je.onBlur,pt=>{const an=xA(pt),_t=!hw(R.current,an);E&&t&&_t&&P()}),it.onKeyDown=sl(Je.onKeyDown,pt=>{pt.key==="Escape"&&P()}),it.onMouseEnter=sl(Je.onMouseEnter,()=>{N.current=!0,st.current=window.setTimeout(()=>k(),h)}),it.onMouseLeave=sl(Je.onMouseLeave,()=>{N.current=!1,st.current&&(clearTimeout(st.current),st.current=void 0),Ct.current=window.setTimeout(()=>{N.current===!1&&P()},g)})),it},[ne,E,J,u,ft,T,k,t,P,h,g]);C.exports.useEffect(()=>()=>{st.current&&clearTimeout(st.current),Ct.current&&clearTimeout(Ct.current)},[]);const vt=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:K,ref:Hn(Lt,it=>{$(!!it)})}),[K]),Ee=C.exports.useCallback((Je={},Lt=null)=>({...Je,id:G,ref:Hn(Lt,it=>{ue(!!it)})}),[G]);return{forceUpdate:xe,isOpen:E,onAnimationComplete:be.onComplete,onClose:P,getAnchorProps:Qe,getArrowProps:ce,getArrowInnerProps:Me,getPopoverPositionerProps:De,getPopoverProps:We,getTriggerProps:ut,getHeaderProps:vt,getBodyProps:Ee}}function hw(e,t){return e===t||e?.contains(t)}function xA(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function g_(e){const t=Oi("Popover",e),{children:n,...r}=vn(e),i=s1(),o=Rge({...r,direction:i.direction});return x(Ige,{value:o,children:x(Oge,{value:t,children:Lge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}g_.displayName="Popover";function m_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=Sh(),a=s2(),s=t??n??r;return ae.createElement(Se.div,{...i(),className:"chakra-popover__arrow-positioner"},ae.createElement(Se.div,{className:a2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}m_.displayName="PopoverArrow";var Nge=ke(function(t,n){const{getBodyProps:r}=Sh(),i=s2();return ae.createElement(Se.div,{...r(t,n),className:a2("chakra-popover__body",t.className),__css:i.body})});Nge.displayName="PopoverBody";var Dge=ke(function(t,n){const{onClose:r}=Sh(),i=s2();return x(Tb,{size:"sm",onClick:r,className:a2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Dge.displayName="PopoverCloseButton";function zge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Bge={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]}}},Fge=Se(zl.section),TF=ke(function(t,n){const{variants:r=Bge,...i}=t,{isOpen:o}=Sh();return ae.createElement(Fge,{ref:n,variants:zge(r),initial:!1,animate:o?"enter":"exit",...i})});TF.displayName="PopoverTransition";var v_=ke(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Sh(),u=s2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return ae.createElement(Se.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(TF,{...i,...a(o,n),onAnimationComplete:Mge(l,o.onAnimationComplete),className:a2("chakra-popover__content",t.className),__css:h}))});v_.displayName="PopoverContent";var $ge=ke(function(t,n){const{getHeaderProps:r}=Sh(),i=s2();return ae.createElement(Se.header,{...r(t,n),className:a2("chakra-popover__header",t.className),__css:i.header})});$ge.displayName="PopoverHeader";function y_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=Sh();return C.exports.cloneElement(t,n(t.props,t.ref))}y_.displayName="PopoverTrigger";function Hge(e,t,n){return(e-t)*100/(n-t)}var Wge=bd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Vge=bd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Uge=bd({"0%":{left:"-40%"},"100%":{left:"100%"}}),Gge=bd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function LF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=Hge(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 AF=e=>{const{size:t,isIndeterminate:n,...r}=e;return ae.createElement(Se.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Vge} 2s linear infinite`:void 0},...r})};AF.displayName="Shape";var YC=e=>ae.createElement(Se.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});YC.displayName="Circle";var jge=ke((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...b}=e,w=LF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${Wge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return ae.createElement(Se.div,{ref:t,className:"chakra-progress",...w.bind,...b,__css:T},ee(AF,{size:n,isIndeterminate:v,children:[x(YC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(YC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});jge.displayName="CircularProgress";var[Yge,qge]=_n({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Kge=ke((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=LF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...qge().filledTrack};return ae.createElement(Se.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),MF=ke((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:b,...w}=vn(e),E=Oi("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${Gge} 1s linear infinite`},O={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Uge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return ae.createElement(Se.div,{ref:t,borderRadius:P,__css:R,...w},ee(Yge,{value:E,children:[x(Kge,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:O,borderRadius:P,title:v,role:b}),l]}))});MF.displayName="Progress";var Xge=Se("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Xge.displayName="CircularProgressLabel";var Zge=(...e)=>e.filter(Boolean).join(" "),Qge=e=>e?"":void 0;function Jge(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 IF=ke(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return ae.createElement(Se.select,{...a,ref:n,className:Zge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});IF.displayName="SelectField";var OF=ke((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...b}=vn(e),[w,E]=Jge(b,SQ),P=O8(E),k={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 ae.createElement(Se.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(IF,{ref:t,height:u??l,minH:h??g,placeholder:o,...P,__css:T,children:e.children}),x(RF,{"data-disabled":Qge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});OF.displayName="Select";var eme=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),tme=Se("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),RF=e=>{const{children:t=x(eme,{}),...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 x(tme,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};RF.displayName="SelectIcon";function nme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rme(e){const t=ome(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function NF(e){return!!e.touches}function ime(e){return NF(e)&&e.touches.length>1}function ome(e){return e.view??window}function ame(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function sme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function DF(e,t="page"){return NF(e)?ame(e,t):sme(e,t)}function lme(e){return t=>{const n=rme(t);(!n||n&&t.button===0)&&e(t)}}function ume(e,t=!1){function n(i){e(i,{point:DF(i)})}return t?lme(n):n}function j3(e,t,n,r){return nme(e,t,ume(n,t==="pointerdown"),r)}function zF(e){const t=C.exports.useRef(null);return t.current=e,t}var cme=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,ime(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:DF(e)},{timestamp:i}=QP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,pw(r,this.history)),this.removeListeners=hme(j3(this.win,"pointermove",this.onPointerMove),j3(this.win,"pointerup",this.onPointerUp),j3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=pw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=pme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=QP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,IJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=pw(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),OJ.update(this.updatePoint)}};function wA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pw(e,t){return{point:e.point,delta:wA(e.point,t[t.length-1]),offset:wA(e.point,t[0]),velocity:fme(t,.1)}}var dme=e=>e*1e3;function fme(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>dme(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 hme(...e){return t=>e.reduce((n,r)=>r(n),t)}function gw(e,t){return Math.abs(e-t)}function CA(e){return"x"in e&&"y"in e}function pme(e,t){if(typeof e=="number"&&typeof t=="number")return gw(e,t);if(CA(e)&&CA(t)){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function BF(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),h=zF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i?.(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new cme(v,h.current,s)}return j3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function gme(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;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;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var mme=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function vme(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function FF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return mme(()=>{const a=e(),s=a.map((l,u)=>gme(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(vme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function yme(e){return typeof e=="object"&&e!==null&&"current"in e}function bme(e){const[t]=FF({observeMutation:!1,getNodes(){return[yme(e)?e.current:e]}});return t}var Sme=Object.getOwnPropertyNames,xme=(e,t)=>function(){return e&&(t=(0,e[Sme(e)[0]])(e=0)),t},Cd=xme({"../../../react-shim.js"(){}});Cd();Cd();Cd();var Oa=e=>e?"":void 0,P0=e=>e?!0:void 0,_d=(...e)=>e.filter(Boolean).join(" ");Cd();function T0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Cd();Cd();function wme(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 cm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Y3={width:0,height:0},jy=e=>e||Y3;function $F(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??Y3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...cm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>jy(w).height>jy(E).height?w:E,Y3):r.reduce((w,E)=>jy(w).width>jy(E).width?w:E,Y3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...cm({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",...cm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),b={...l,...cm({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 HF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Cme(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:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:O=0,...R}=e,N=dr(m),z=dr(v),V=dr(w),$=HF({isReversed:a,direction:s,orientation:l}),[j,ue]=ub({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[W,Q]=C.exports.useState(!1),[ne,J]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),X=!(h||g),ce=C.exports.useRef(j),me=j.map(He=>_0(He,t,n)),Me=O*b,xe=_me(me,t,n,Me),be=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});be.current.value=me,be.current.valueBounds=xe;const Ie=me.map(He=>n-He+t),De=($?Ie:me).map(He=>J5(He,t,n)),Qe=l==="vertical",st=C.exports.useRef(null),Ct=C.exports.useRef(null),ft=FF({getNodes(){const He=Ct.current,ct=He?.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),ut=C.exports.useId(),Ee=wme(u??ut),Je=C.exports.useCallback(He=>{var ct;if(!st.current)return;be.current.eventSource="pointer";const tt=st.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ct=He.touches)==null?void 0:ct[0])??He,er=Qe?tt.bottom-Zt:Nt-tt.left,lo=Qe?tt.height:tt.width;let mi=er/lo;return $&&(mi=1-mi),Uz(mi,t,n)},[Qe,$,n,t]),Lt=(n-t)/10,it=b||(n-t)/100,pt=C.exports.useMemo(()=>({setValueAtIndex(He,ct){if(!X)return;const tt=be.current.valueBounds[He];ct=parseFloat(DC(ct,tt.min,it)),ct=_0(ct,tt.min,tt.max);const Nt=[...be.current.value];Nt[He]=ct,ue(Nt)},setActiveIndex:G,stepUp(He,ct=it){const tt=be.current.value[He],Nt=$?tt-ct:tt+ct;pt.setValueAtIndex(He,Nt)},stepDown(He,ct=it){const tt=be.current.value[He],Nt=$?tt+ct:tt-ct;pt.setValueAtIndex(He,Nt)},reset(){ue(ce.current)}}),[it,$,ue,X]),an=C.exports.useCallback(He=>{const ct=He.key,Nt={ArrowRight:()=>pt.stepUp(K),ArrowUp:()=>pt.stepUp(K),ArrowLeft:()=>pt.stepDown(K),ArrowDown:()=>pt.stepDown(K),PageUp:()=>pt.stepUp(K,Lt),PageDown:()=>pt.stepDown(K,Lt),Home:()=>{const{min:Zt}=xe[K];pt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=xe[K];pt.setValueAtIndex(K,Zt)}}[ct];Nt&&(He.preventDefault(),He.stopPropagation(),Nt(He),be.current.eventSource="keyboard")},[pt,K,Lt,xe]),{getThumbStyle:_t,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>$F({isReversed:$,orientation:l,thumbRects:ft,thumbPercents:De}),[$,l,De,ft]),Oe=C.exports.useCallback(He=>{var ct;const tt=He??K;if(tt!==-1&&M){const Nt=Ee.getThumb(tt),Zt=(ct=Ct.current)==null?void 0:ct.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Ee]);ud(()=>{be.current.eventSource==="keyboard"&&z?.(be.current.value)},[me,z]);const Xe=He=>{const ct=Je(He)||0,tt=be.current.value.map(mi=>Math.abs(mi-ct)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const er=tt.filter(mi=>mi===Nt);er.length>1&&ct>be.current.value[Zt]&&(Zt=Zt+er.length-1),G(Zt),pt.setValueAtIndex(Zt,ct),Oe(Zt)},Xt=He=>{if(K==-1)return;const ct=Je(He)||0;G(K),pt.setValueAtIndex(K,ct),Oe(K)};BF(Ct,{onPanSessionStart(He){!X||(Q(!0),Xe(He),N?.(be.current.value))},onPanSessionEnd(){!X||(Q(!1),z?.(be.current.value))},onPan(He){!X||Xt(He)}});const Yt=C.exports.useCallback((He={},ct=null)=>({...He,...R,id:Ee.root,ref:Hn(ct,Ct),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(ne),style:{...He.style,...Ut}}),[R,h,ne,Ut,Ee]),_e=C.exports.useCallback((He={},ct=null)=>({...He,ref:Hn(ct,st),id:Ee.track,"data-disabled":Oa(h),style:{...He.style,...sn}}),[h,sn,Ee]),It=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.innerTrack,style:{...He.style,...yn}}),[yn,Ee]),ze=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He,Zt=me[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const er=xe[tt];return{...Nt,ref:ct,role:"slider",tabIndex:X?0:void 0,id:Ee.getThumb(tt),"data-active":Oa(W&&K===tt),"aria-valuetext":V?.(Zt)??E?.[tt],"aria-valuemin":er.min,"aria-valuemax":er.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...He.style,..._t(tt)},onKeyDown:T0(He.onKeyDown,an),onFocus:T0(He.onFocus,()=>{J(!0),G(tt)}),onBlur:T0(He.onBlur,()=>{J(!1),G(-1)})}},[Ee,me,xe,X,W,K,V,E,l,h,g,P,k,_t,an,J]),ot=C.exports.useCallback((He={},ct=null)=>({...He,ref:ct,id:Ee.output,htmlFor:me.map((tt,Nt)=>Ee.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ee,me]),ln=C.exports.useCallback((He,ct=null)=>{const{value:tt,...Nt}=He,Zt=!(ttn),er=tt>=me[0]&&tt<=me[me.length-1];let lo=J5(tt,t,n);lo=$?100-lo:lo;const mi={position:"absolute",pointerEvents:"none",...cm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ct,id:Ee.getMarker(He.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(er),style:{...He.style,...mi}}},[h,$,n,t,l,me,Ee]),zn=C.exports.useCallback((He,ct=null)=>{const{index:tt,...Nt}=He;return{...Nt,ref:ct,id:Ee.getInput(tt),type:"hidden",value:me[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,me,Ee]);return{state:{value:me,isFocused:ne,isDragging:W,getThumbPercent:He=>De[He],getThumbMinValue:He=>xe[He].min,getThumbMaxValue:He=>xe[He].max},actions:pt,getRootProps:Yt,getTrackProps:_e,getInnerTrackProps:It,getThumbProps:ze,getMarkerProps:ln,getInputProps:zn,getOutputProps:ot}}function _me(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[kme,Nb]=_n({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Eme,b_]=_n({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),WF=ke(function(t,n){const r=Oi("Slider",t),i=vn(t),{direction:o}=s1();i.direction=o;const{getRootProps:a,...s}=Cme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return ae.createElement(kme,{value:l},ae.createElement(Eme,{value:r},ae.createElement(Se.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});WF.defaultProps={orientation:"horizontal"};WF.displayName="RangeSlider";var Pme=ke(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=Nb(),a=b_(),s=r(t,n);return ae.createElement(Se.div,{...s,className:_d("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Pme.displayName="RangeSliderThumb";var Tme=ke(function(t,n){const{getTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:_d("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Tme.displayName="RangeSliderTrack";var Lme=ke(function(t,n){const{getInnerTrackProps:r}=Nb(),i=b_(),o=r(t,n);return ae.createElement(Se.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Lme.displayName="RangeSliderFilledTrack";var Ame=ke(function(t,n){const{getMarkerProps:r}=Nb(),i=r(t,n);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",t.className)})});Ame.displayName="RangeSliderMark";Cd();Cd();function Mme(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:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:b=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...O}=e,R=dr(m),N=dr(v),z=dr(w),V=HF({isReversed:a,direction:s,orientation:l}),[$,j]=ub({value:i,defaultValue:o??Ome(t,n),onChange:r}),[ue,W]=C.exports.useState(!1),[Q,ne]=C.exports.useState(!1),J=!(h||g),K=(n-t)/10,G=b||(n-t)/100,X=_0($,t,n),ce=n-X+t,Me=J5(V?ce:X,t,n),xe=l==="vertical",be=zF({min:t,max:n,step:b,isDisabled:h,value:X,isInteractive:J,isReversed:V,isVertical:xe,eventSource:null,focusThumbOnChange:M,orientation:l}),Ie=C.exports.useRef(null),We=C.exports.useRef(null),De=C.exports.useRef(null),Qe=C.exports.useId(),st=u??Qe,[Ct,ft]=[`slider-thumb-${st}`,`slider-track-${st}`],ut=C.exports.useCallback(ze=>{var ot;if(!Ie.current)return;const ln=be.current;ln.eventSource="pointer";const zn=Ie.current.getBoundingClientRect(),{clientX:He,clientY:ct}=((ot=ze.touches)==null?void 0:ot[0])??ze,tt=xe?zn.bottom-ct:He-zn.left,Nt=xe?zn.height:zn.width;let Zt=tt/Nt;V&&(Zt=1-Zt);let er=Uz(Zt,ln.min,ln.max);return ln.step&&(er=parseFloat(DC(er,ln.min,ln.step))),er=_0(er,ln.min,ln.max),er},[xe,V,be]),vt=C.exports.useCallback(ze=>{const ot=be.current;!ot.isInteractive||(ze=parseFloat(DC(ze,ot.min,G)),ze=_0(ze,ot.min,ot.max),j(ze))},[G,j,be]),Ee=C.exports.useMemo(()=>({stepUp(ze=G){const ot=V?X-ze:X+ze;vt(ot)},stepDown(ze=G){const ot=V?X+ze:X-ze;vt(ot)},reset(){vt(o||0)},stepTo(ze){vt(ze)}}),[vt,V,X,G,o]),Je=C.exports.useCallback(ze=>{const ot=be.current,zn={ArrowRight:()=>Ee.stepUp(),ArrowUp:()=>Ee.stepUp(),ArrowLeft:()=>Ee.stepDown(),ArrowDown:()=>Ee.stepDown(),PageUp:()=>Ee.stepUp(K),PageDown:()=>Ee.stepDown(K),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[ze.key];zn&&(ze.preventDefault(),ze.stopPropagation(),zn(ze),ot.eventSource="keyboard")},[Ee,vt,K,be]),Lt=z?.(X)??E,it=bme(We),{getThumbStyle:pt,rootStyle:an,trackStyle:_t,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const ze=be.current,ot=it??{width:0,height:0};return $F({isReversed:V,orientation:ze.orientation,thumbRects:[ot],thumbPercents:[Me]})},[V,it,Me,be]),sn=C.exports.useCallback(()=>{be.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=We.current)==null?void 0:ot.focus()})},[be]);ud(()=>{const ze=be.current;sn(),ze.eventSource==="keyboard"&&N?.(ze.value)},[X,N]);function yn(ze){const ot=ut(ze);ot!=null&&ot!==be.current.value&&j(ot)}BF(De,{onPanSessionStart(ze){const ot=be.current;!ot.isInteractive||(W(!0),sn(),yn(ze),R?.(ot.value))},onPanSessionEnd(){const ze=be.current;!ze.isInteractive||(W(!1),N?.(ze.value))},onPan(ze){!be.current.isInteractive||yn(ze)}});const Oe=C.exports.useCallback((ze={},ot=null)=>({...ze,...O,ref:Hn(ot,De),tabIndex:-1,"aria-disabled":P0(h),"data-focused":Oa(Q),style:{...ze.style,...an}}),[O,h,Q,an]),Xe=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,Ie),id:ft,"data-disabled":Oa(h),style:{...ze.style,..._t}}),[h,ft,_t]),Xt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,style:{...ze.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:Hn(ot,We),role:"slider",tabIndex:J?0:void 0,id:Ct,"data-active":Oa(ue),"aria-valuetext":Lt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":X,"aria-orientation":l,"aria-disabled":P0(h),"aria-readonly":P0(g),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...ze.style,...pt(0)},onKeyDown:T0(ze.onKeyDown,Je),onFocus:T0(ze.onFocus,()=>ne(!0)),onBlur:T0(ze.onBlur,()=>ne(!1))}),[J,Ct,ue,Lt,t,n,X,l,h,g,P,k,pt,Je]),_e=C.exports.useCallback((ze,ot=null)=>{const ln=!(ze.valuen),zn=X>=ze.value,He=J5(ze.value,t,n),ct={position:"absolute",pointerEvents:"none",...Ime({orientation:l,vertical:{bottom:V?`${100-He}%`:`${He}%`},horizontal:{left:V?`${100-He}%`:`${He}%`}})};return{...ze,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!ln),"data-highlighted":Oa(zn),style:{...ze.style,...ct}}},[h,V,n,t,l,X]),It=C.exports.useCallback((ze={},ot=null)=>({...ze,ref:ot,type:"hidden",value:X,name:T}),[T,X]);return{state:{value:X,isFocused:Q,isDragging:ue},actions:Ee,getRootProps:Oe,getTrackProps:Xe,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:_e,getInputProps:It}}function Ime(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Ome(e,t){return t"}),[Nme,zb]=_n({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),S_=ke((e,t)=>{const n=Oi("Slider",e),r=vn(e),{direction:i}=s1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Mme(r),l=a(),u=o({},t);return ae.createElement(Rme,{value:s},ae.createElement(Nme,{value:n},ae.createElement(Se.div,{...l,className:_d("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});S_.defaultProps={orientation:"horizontal"};S_.displayName="Slider";var VF=ke((e,t)=>{const{getThumbProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__thumb",e.className),__css:r.thumb})});VF.displayName="SliderThumb";var UF=ke((e,t)=>{const{getTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__track",e.className),__css:r.track})});UF.displayName="SliderTrack";var GF=ke((e,t)=>{const{getInnerTrackProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__filled-track",e.className),__css:r.filledTrack})});GF.displayName="SliderFilledTrack";var qC=ke((e,t)=>{const{getMarkerProps:n}=Db(),r=zb(),i=n(e,t);return ae.createElement(Se.div,{...i,className:_d("chakra-slider__marker",e.className),__css:r.mark})});qC.displayName="SliderMark";var Dme=(...e)=>e.filter(Boolean).join(" "),_A=e=>e?"":void 0,x_=ke(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=Wz(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 ae.createElement(Se.label,{...h(),className:Dme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),ae.createElement(Se.span,{...u(),className:"chakra-switch__track",__css:v},ae.createElement(Se.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":_A(s.isChecked),"data-hover":_A(s.isHovered)})),o&&ae.createElement(Se.span,{className:"chakra-switch__label",...g(),__css:b},o))});x_.displayName="Switch";var p1=(...e)=>e.filter(Boolean).join(" ");function KC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[zme,jF,Bme,Fme]=nD();function $me(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t??0),[m,v]=ub({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const b=Bme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:b,direction:l,htmlProps:u}}var[Hme,l2]=_n({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Wme(e){const{focusedIndex:t,orientation:n,direction:r}=l2(),i=jF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,b=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[b]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:KC(e.onKeyDown,o)}}function Vme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=l2(),{index:u,register:h}=Fme({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},b=Nhe({...r,ref:Hn(h,e.ref),isDisabled:t,isFocusable:n,onClick:KC(e.onClick,m)}),w="button";return{...b,id:YF(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":qF(a,u),onFocus:t?void 0:KC(e.onFocus,v)}}var[Ume,Gme]=_n({});function jme(e){const t=l2(),{id:n,selectedIndex:r}=t,o=kb(e.children).map((a,s)=>C.exports.createElement(Ume,{key:s,value:{isSelected:s===r,id:qF(n,s),tabId:YF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Yme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=l2(),{isSelected:o,id:a,tabId:s}=Gme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=AB({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 qme(){const e=l2(),t=jF(),{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 ks(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[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 YF(e,t){return`${e}--tab-${t}`}function qF(e,t){return`${e}--tabpanel-${t}`}var[Kme,u2]=_n({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),KF=ke(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=$me(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return ae.createElement(zme,{value:l},ae.createElement(Hme,{value:h},ae.createElement(Kme,{value:r},ae.createElement(Se.div,{className:p1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});KF.displayName="Tabs";var Xme=ke(function(t,n){const r=qme(),i={...t.style,...r},o=u2();return ae.createElement(Se.div,{ref:n,...t,className:p1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Xme.displayName="TabIndicator";var Zme=ke(function(t,n){const r=Wme({...t,ref:n}),o={display:"flex",...u2().tablist};return ae.createElement(Se.div,{...r,className:p1("chakra-tabs__tablist",t.className),__css:o})});Zme.displayName="TabList";var XF=ke(function(t,n){const r=Yme({...t,ref:n}),i=u2();return ae.createElement(Se.div,{outline:"0",...r,className:p1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});XF.displayName="TabPanel";var ZF=ke(function(t,n){const r=jme(t),i=u2();return ae.createElement(Se.div,{...r,width:"100%",ref:n,className:p1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});ZF.displayName="TabPanels";var QF=ke(function(t,n){const r=u2(),i=Vme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return ae.createElement(Se.button,{...i,className:p1("chakra-tabs__tab",t.className),__css:o})});QF.displayName="Tab";var Qme=(...e)=>e.filter(Boolean).join(" ");function Jme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var eve=["h","minH","height","minHeight"],JF=ke((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=O8(o),s=i?Jme(n,eve):n;return ae.createElement(Se.textarea,{ref:t,rows:i,...a,className:Qme("chakra-textarea",r),__css:s})});JF.displayName="Textarea";function tve(e,t){const n=dr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function XC(e,...t){return nve(e)?e(...t):e}var nve=e=>typeof e=="function";function rve(e,t){const n=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 i?.[t]??n}var ive=(e,t)=>e.find(n=>n.id===t);function kA(e,t){const n=e$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function e$(e,t){for(const[n,r]of Object.entries(e))if(ive(r,t))return n}function ove(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 ave(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 sve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},yl=lve(sve);function lve(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=uve(i,o),{position:s,id:l}=a;return r(u=>{const g=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=kA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:t$(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=e$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(kA(yl.getState(),i).position)}}var EA=0;function uve(e,t={}){EA+=1;const n=t.id??EA,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var cve=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 ae.createElement(Dz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(Bz,{children:l}),ae.createElement(Se.div,{flex:"1",maxWidth:"100%"},i&&x(Fz,{id:u?.title,children:i}),s&&x(zz,{id:u?.description,display:"block",children:s})),o&&x(Tb,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function t$(e={}){const{render:t,toastComponent:n=cve}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function dve(e,t){const n=i=>({...t,...i,position:rve(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=t$(o);return yl.notify(a,o)};return r.update=(i,o)=>{yl.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,...XC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...XC(o.error,s)}))},r.closeAll=yl.closeAll,r.close=yl.close,r.isActive=yl.isActive,r}function c2(e){const{theme:t}=JN();return C.exports.useMemo(()=>dve(t.direction,e),[e,t.direction])}var fve={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]}}},n$=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=fve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=due();ud(()=>{v||r?.()},[v]),ud(()=>{m(s)},[s]);const b=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),tve(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>ove(a),[a]);return ae.createElement(zl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:w,custom:{position:a},style:k},ae.createElement(Se.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},XC(n,{id:t,onClose:E})))});n$.displayName="ToastComponent";var hve=e=>{const t=C.exports.useSyncExternalStore(yl.subscribe,yl.getState,yl.getState),{children:n,motionVariants:r,component:i=n$,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:ave(l),children:x(Sd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ee(Wn,{children:[n,x(vh,{...o,children:s})]})};function pve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function gve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var mve={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 Gg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var r4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},ZC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function vve(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:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:b=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:O,...R}=e,{isOpen:N,onOpen:z,onClose:V}=LB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:ue,getArrowProps:W}=TB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:O}),Q=C.exports.useId(),J=`tooltip-${g??Q}`,K=C.exports.useRef(null),G=C.exports.useRef(),X=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),ce=C.exports.useRef(),me=C.exports.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),V()},[V,me]),xe=yve(K,Me),be=C.exports.useCallback(()=>{if(!k&&!G.current){xe();const ut=ZC(K);G.current=ut.setTimeout(z,t)}},[xe,k,z,t]),Ie=C.exports.useCallback(()=>{X();const ut=ZC(K);ce.current=ut.setTimeout(Me,n)},[n,Me,X]),We=C.exports.useCallback(()=>{N&&r&&Ie()},[r,Ie,N]),De=C.exports.useCallback(()=>{N&&a&&Ie()},[a,Ie,N]),Qe=C.exports.useCallback(ut=>{N&&ut.key==="Escape"&&Ie()},[N,Ie]);Zf(()=>r4(K),"keydown",s?Qe:void 0),Zf(()=>r4(K),"scroll",()=>{N&&o&&Me()}),C.exports.useEffect(()=>{!k||(X(),N&&V())},[k,N,V,X]),C.exports.useEffect(()=>()=>{X(),me()},[X,me]),Zf(()=>K.current,"pointerleave",Ie);const st=C.exports.useCallback((ut={},vt=null)=>({...ut,ref:Hn(K,vt,$),onPointerEnter:Gg(ut.onPointerEnter,Je=>{Je.pointerType!=="touch"&&be()}),onClick:Gg(ut.onClick,We),onPointerDown:Gg(ut.onPointerDown,De),onFocus:Gg(ut.onFocus,be),onBlur:Gg(ut.onBlur,Ie),"aria-describedby":N?J:void 0}),[be,Ie,De,N,J,We,$]),Ct=C.exports.useCallback((ut={},vt=null)=>j({...ut,style:{...ut.style,[Wr.arrowSize.var]:b?`${b}px`:void 0,[Wr.arrowShadowColor.var]:w}},vt),[j,b,w]),ft=C.exports.useCallback((ut={},vt=null)=>{const Ee={...ut.style,position:"relative",transformOrigin:Wr.transformOrigin.varRef};return{ref:vt,...R,...ut,id:J,role:"tooltip",style:Ee}},[R,J]);return{isOpen:N,show:be,hide:Ie,getTriggerProps:st,getTooltipProps:ft,getTooltipPositionerProps:Ct,getArrowProps:W,getArrowInnerProps:ue}}var mw="chakra-ui:close-tooltip";function yve(e,t){return C.exports.useEffect(()=>{const n=r4(e);return n.addEventListener(mw,t),()=>n.removeEventListener(mw,t)},[t,e]),()=>{const n=r4(e),r=ZC(e);n.dispatchEvent(new r.CustomEvent(mw))}}var bve=Se(zl.div),pi=ke((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=s1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:b,motionProps:w,...E}=r,P=m??v??h??b;if(P){n.bg=P;const V=RQ(i,"colors",P);n[Wr.arrowBg.var]=V}const k=vve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=ae.createElement(Se.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const V=C.exports.Children.only(o);M=C.exports.cloneElement(V,k.getTriggerProps(V.props,V.ref))}const O=!!l,R=k.getTooltipProps({},t),N=O?pve(R,["role","id"]):R,z=gve(R,["role","id"]);return a?ee(Wn,{children:[M,x(Sd,{children:k.isOpen&&ae.createElement(vh,{...g},ae.createElement(Se.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(bve,{variants:mve,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,O&&ae.createElement(Se.span,{srOnly:!0,...z},l),u&&ae.createElement(Se.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},ae.createElement(Se.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Wn,{children:o})});pi.displayName="Tooltip";var Sve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(dB,{environment:a,children:t});return x(_ae,{theme:o,cssVarsRoot:s,children:ee(nN,{colorModeManager:n,options:o.config,children:[i?x(Gfe,{}):x(Ufe,{}),x(Eae,{}),r?x(MB,{zIndex:r,children:l}):l]})})};function xve({children:e,theme:t=gae,toastOptions:n,...r}){return ee(Sve,{theme:t,...r,children:[e,x(hve,{...n})]})}function xs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:w_(e)?2:C_(e)?3:0}function L0(e,t){return g1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wve(e,t){return g1(e)===2?e.get(t):e[t]}function r$(e,t,n){var r=g1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function i$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function w_(e){return Tve&&e instanceof Map}function C_(e){return Lve&&e instanceof Set}function Ef(e){return e.o||e.t}function __(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=a$(e);delete t[rr];for(var n=A0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Cve),Object.freeze(e),t&&lh(e,function(n,r){return k_(r,!0)},!0)),e}function Cve(){xs(2)}function E_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Tl(e){var t=t7[e];return t||xs(18,e),t}function _ve(e,t){t7[e]||(t7[e]=t)}function QC(){return zv}function vw(e,t){t&&(Tl("Patches"),e.u=[],e.s=[],e.v=t)}function i4(e){JC(e),e.p.forEach(kve),e.p=null}function JC(e){e===zv&&(zv=e.l)}function PA(e){return zv={p:[],l:zv,h:e,m:!0,_:0}}function kve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function yw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Tl("ES5").S(t,e,r),r?(n[rr].P&&(i4(t),xs(4)),Eu(e)&&(e=o4(t,e),t.l||a4(t,e)),t.u&&Tl("Patches").M(n[rr].t,e,t.u,t.s)):e=o4(t,n,[]),i4(t),t.u&&t.v(t.u,t.s),e!==o$?e:void 0}function o4(e,t,n){if(E_(t))return t;var r=t[rr];if(!r)return lh(t,function(o,a){return TA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return a4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=__(r.k):r.o;lh(r.i===3?new Set(i):i,function(o,a){return TA(e,r,i,o,a,n)}),a4(e,i,!1),n&&e.u&&Tl("Patches").R(r,n,e.u,e.s)}return r.o}function TA(e,t,n,r,i,o){if(fd(i)){var a=o4(e,i,o&&t&&t.i!==3&&!L0(t.D,r)?o.concat(r):void 0);if(r$(n,r,a),!fd(a))return;e.m=!1}if(Eu(i)&&!E_(i)){if(!e.h.F&&e._<1)return;o4(e,i),t&&t.A.l||a4(e,i)}}function a4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&k_(t,n)}function bw(e,t){var n=e[rr];return(n?Ef(n):e)[t]}function LA(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 Bc(e){e.P||(e.P=!0,e.l&&Bc(e.l))}function Sw(e){e.o||(e.o=__(e.t))}function e7(e,t,n){var r=w_(t)?Tl("MapSet").N(t,n):C_(t)?Tl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:QC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Bv;a&&(l=[s],u=dm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Tl("ES5").J(t,n);return(n?n.A:QC()).p.push(r),r}function Eve(e){return fd(e)||xs(22,e),function t(n){if(!Eu(n))return n;var r,i=n[rr],o=g1(n);if(i){if(!i.P&&(i.i<4||!Tl("ES5").K(i)))return i.t;i.I=!0,r=AA(n,o),i.I=!1}else r=AA(n,o);return lh(r,function(a,s){i&&wve(i.t,a)===s||r$(r,a,t(s))}),o===3?new Set(r):r}(e)}function AA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return __(e)}function Pve(){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[rr];return Bv.get(l,o)},set:function(l){var u=this[rr];Bv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Bc(s);break;case 4:n(s)&&Bc(s)}}}function n(o){for(var a=o.t,s=o.k,l=A0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!L0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!i$(m,g))return!0}}var b=!!a[rr];return l.length!==A0(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;l1?P-1:0),T=1;T1?h-1:0),m=1;m=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=Tl("Patches").$;return fd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ha=new Mve,s$=ha.produce;ha.produceWithPatches.bind(ha);ha.setAutoFreeze.bind(ha);ha.setUseProxies.bind(ha);ha.applyPatches.bind(ha);ha.createDraft.bind(ha);ha.finishDraft.bind(ha);function RA(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 NA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(T_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function g(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Ive(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:s4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function l$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function l4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return u4}function i(s,l){r(s)===u4&&(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 zve=function(t,n){return t===n};function Bve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S2e:b2e;h$.useSyncExternalStore=Q0.useSyncExternalStore!==void 0?Q0.useSyncExternalStore:x2e;(function(e){e.exports=h$})(f$);var p$={exports:{}},g$={};/** + * @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 Fb=C.exports,w2e=f$.exports;function C2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _2e=typeof Object.is=="function"?Object.is:C2e,k2e=w2e.useSyncExternalStore,E2e=Fb.useRef,P2e=Fb.useEffect,T2e=Fb.useMemo,L2e=Fb.useDebugValue;g$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=E2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=T2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var b=a.value;if(i(b,v))return g=b}return g=v}if(b=g,_2e(h,v))return b;var w=r(v);return i!==void 0&&i(b,w)?b:(h=v,g=w)}var u=!1,h,g,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=k2e(e,o[0],o[1]);return P2e(function(){a.hasValue=!0,a.value=s},[s]),L2e(s),s};(function(e){e.exports=g$})(p$);function A2e(e){e()}let m$=A2e;const M2e=e=>m$=e,I2e=()=>m$,hd=C.exports.createContext(null);function v$(){return C.exports.useContext(hd)}const O2e=()=>{throw new Error("uSES not initialized!")};let y$=O2e;const R2e=e=>{y$=e},N2e=(e,t)=>e===t;function D2e(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(r,i=N2e){const{store:o,subscription:a,getServerState:s}=t(),l=y$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const z2e=D2e();var B2e={exports:{}},Mn={};/** + * @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 A_=Symbol.for("react.element"),M_=Symbol.for("react.portal"),$b=Symbol.for("react.fragment"),Hb=Symbol.for("react.strict_mode"),Wb=Symbol.for("react.profiler"),Vb=Symbol.for("react.provider"),Ub=Symbol.for("react.context"),F2e=Symbol.for("react.server_context"),Gb=Symbol.for("react.forward_ref"),jb=Symbol.for("react.suspense"),Yb=Symbol.for("react.suspense_list"),qb=Symbol.for("react.memo"),Kb=Symbol.for("react.lazy"),$2e=Symbol.for("react.offscreen"),b$;b$=Symbol.for("react.module.reference");function qa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case A_:switch(e=e.type,e){case $b:case Wb:case Hb:case jb:case Yb:return e;default:switch(e=e&&e.$$typeof,e){case F2e:case Ub:case Gb:case Kb:case qb:case Vb:return e;default:return t}}case M_:return t}}}Mn.ContextConsumer=Ub;Mn.ContextProvider=Vb;Mn.Element=A_;Mn.ForwardRef=Gb;Mn.Fragment=$b;Mn.Lazy=Kb;Mn.Memo=qb;Mn.Portal=M_;Mn.Profiler=Wb;Mn.StrictMode=Hb;Mn.Suspense=jb;Mn.SuspenseList=Yb;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return qa(e)===Ub};Mn.isContextProvider=function(e){return qa(e)===Vb};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===A_};Mn.isForwardRef=function(e){return qa(e)===Gb};Mn.isFragment=function(e){return qa(e)===$b};Mn.isLazy=function(e){return qa(e)===Kb};Mn.isMemo=function(e){return qa(e)===qb};Mn.isPortal=function(e){return qa(e)===M_};Mn.isProfiler=function(e){return qa(e)===Wb};Mn.isStrictMode=function(e){return qa(e)===Hb};Mn.isSuspense=function(e){return qa(e)===jb};Mn.isSuspenseList=function(e){return qa(e)===Yb};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$b||e===Wb||e===Hb||e===jb||e===Yb||e===$2e||typeof e=="object"&&e!==null&&(e.$$typeof===Kb||e.$$typeof===qb||e.$$typeof===Vb||e.$$typeof===Ub||e.$$typeof===Gb||e.$$typeof===b$||e.getModuleId!==void 0)};Mn.typeOf=qa;(function(e){e.exports=Mn})(B2e);function H2e(){const e=I2e();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 WA={notify(){},get:()=>[]};function W2e(e,t){let n,r=WA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=H2e())}function u(){n&&(n(),n=void 0,r.clear(),r=WA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const V2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U2e=V2e?C.exports.useLayoutEffect:C.exports.useEffect;function G2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=W2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return U2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||hd).Provider,{value:i,children:n})}function S$(e=hd){const t=e===hd?v$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const j2e=S$();function Y2e(e=hd){const t=e===hd?j2e:S$(e);return function(){return t().dispatch}}const q2e=Y2e();R2e(p$.exports.useSyncExternalStoreWithSelector);M2e(Dl.exports.unstable_batchedUpdates);var I_="persist:",x$="persist/FLUSH",O_="persist/REHYDRATE",w$="persist/PAUSE",C$="persist/PERSIST",_$="persist/PURGE",k$="persist/REGISTER",K2e=-1;function q3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q3=function(n){return typeof n}:q3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},q3(e)}function VA(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 X2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,V){return V.in(z,R,h)},h[R]);if(N!==void 0)try{g[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete g[R];m.length===0&&k()}function k(){Object.keys(g).forEach(function(R){h[R]===void 0&&delete g[R]}),b=s.setItem(a,l(g)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var O=function(){for(;m.length!==0;)P();return b||Promise.resolve()};return{update:E,flush:O}}function eye(e){return JSON.stringify(e)}function tye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).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=nye,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,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function nye(e){return JSON.parse(e)}function rye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:I_).concat(e.key);return t.removeItem(n,iye)}function iye(e){}function UA(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 uu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function sye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var lye=5e3;function uye(e,t){var n=e.version!==void 0?e.version:K2e;e.debug;var r=e.stateReconciler===void 0?Q2e:e.stateReconciler,i=e.getStoredState||tye,o=e.timeout!==void 0?e.timeout:lye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,b=aye(m,["_persist"]),w=b;if(g.type===C$){var E=!1,P=function(z,V){E||(g.rehydrate(e.key,z,V),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=J2e(e)),v)return uu({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.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 g.register(e.key),i(e).then(function(N){var z=e.migrate||function(V,$){return Promise.resolve(V)};z(N,n).then(function(V){P(V)},function(V){P(void 0,V)})},function(N){P(void 0,N)}),uu({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===_$)return s=!0,g.result(rye(e)),uu({},t(w,g),{_persist:v});if(g.type===x$)return g.result(a&&a.flush()),uu({},t(w,g),{_persist:v});if(g.type===w$)l=!0;else if(g.type===O_){if(s)return uu({},w,{_persist:uu({},v,{rehydrated:!0})});if(g.key===e.key){var k=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,O=uu({},M,{_persist:uu({},v,{rehydrated:!0})});return u(O)}}}if(!v)return t(h,g);var R=t(w,g);return R===w?h:u(uu({},R,{_persist:v}))}}function GA(e){return fye(e)||dye(e)||cye()}function cye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function dye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function fye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:E$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case k$:return r7({},t,{registry:[].concat(GA(t.registry),[n.key])});case O_:var r=t.registry.indexOf(n.key),i=GA(t.registry);return i.splice(r,1),r7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function gye(e,t,n){var r=n||!1,i=T_(pye,E$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:k$,key:u})},a=function(u,h,g){var m={type:O_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=r7({},i,{purge:function(){var u=[];return e.dispatch({type:_$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:x$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:w$})},persist:function(){e.dispatch({type:C$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var R_={},N_={};N_.__esModule=!0;N_.default=yye;function K3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?K3=function(n){return typeof n}:K3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K3(e)}function kw(){}var mye={getItem:kw,setItem:kw,removeItem:kw};function vye(e){if((typeof self>"u"?"undefined":K3(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{return!1}return!0}function yye(e){var t="".concat(e,"Storage");return vye(t)?self[t]:mye}R_.__esModule=!0;R_.default=xye;var bye=Sye(N_);function Sye(e){return e&&e.__esModule?e:{default:e}}function xye(e){var t=(0,bye.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 P$=void 0,wye=Cye(R_);function Cye(e){return e&&e.__esModule?e:{default:e}}var _ye=(0,wye.default)("local");P$=_ye;var T$={},L$={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.PLACEHOLDER_UNDEFINED=uh.PACKAGE_NAME=void 0;uh.PACKAGE_NAME="redux-deep-persist";uh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var D_={};(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={}))})(D_);(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=uh,n=D_,r=function(W){return typeof W=="object"&&W!==null};e.isObjectLike=r;const i=function(W){return typeof W=="number"&&W>-1&&W%1==0&&W<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(W){return(0,e.isLength)(W&&W.length)&&Object.prototype.toString.call(W)==="[object Array]"};const o=function(W){return!!W&&typeof W=="object"&&!(0,e.isArray)(W)};e.isPlainObject=o;const a=function(W){return String(~~W)===W&&Number(W)>=0};e.isIntegerString=a;const s=function(W){return Object.prototype.toString.call(W)==="[object String]"};e.isString=s;const l=function(W){return Object.prototype.toString.call(W)==="[object Date]"};e.isDate=l;const u=function(W){return Object.keys(W).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(W,Q,ne){ne||(ne=new Set([W])),Q||(Q="");for(const J in W){const K=Q?`${Q}.${J}`:J,G=W[J];if((0,e.isObjectLike)(G))return ne.has(G)?`${Q}.${J}:`:(ne.add(G),(0,e.getCircularPath)(G,K,ne))}return null};e.getCircularPath=g;const m=function(W){if(!(0,e.isObjectLike)(W))return W;if((0,e.isDate)(W))return new Date(+W);const Q=(0,e.isArray)(W)?[]:{};for(const ne in W){const J=W[ne];Q[ne]=(0,e._cloneDeep)(J)}return Q};e._cloneDeep=m;const v=function(W){const Q=(0,e.getCircularPath)(W);if(Q)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${Q}' of object you're trying to persist: ${W}`);return(0,e._cloneDeep)(W)};e.cloneDeep=v;const b=function(W,Q){if(W===Q)return{};if(!(0,e.isObjectLike)(W)||!(0,e.isObjectLike)(Q))return Q;const ne=(0,e.cloneDeep)(W),J=(0,e.cloneDeep)(Q),K=Object.keys(ne).reduce((X,ce)=>(h.call(J,ce)||(X[ce]=void 0),X),{});if((0,e.isDate)(ne)||(0,e.isDate)(J))return ne.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((X,ce)=>{if(!h.call(ne,ce))return X[ce]=J[ce],X;const me=(0,e.difference)(ne[ce],J[ce]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(ne)&&!(0,e.isArray)(J)||!(0,e.isArray)(ne)&&(0,e.isArray)(J)?J:X:(X[ce]=me,X)},K);return delete G._persist,G};e.difference=b;const w=function(W,Q){return Q.reduce((ne,J)=>{if(ne){const K=parseInt(J,10),G=(0,e.isIntegerString)(J)&&K<0?ne.length+K:J;return(0,e.isString)(ne)?ne.charAt(G):ne[G]}},W)};e.path=w;const E=function(W,Q){return[...W].reverse().reduce((K,G,X)=>{const ce=(0,e.isIntegerString)(G)?[]:{};return ce[G]=X===0?Q:K,ce},{})};e.assocPath=E;const P=function(W,Q){const ne=(0,e.cloneDeep)(W);return Q.reduce((J,K,G)=>(G===Q.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[K],J&&J[K]),ne),ne};e.dissocPath=P;const k=function(W,Q,...ne){if(!ne||!ne.length)return Q;const J=ne.shift(),{preservePlaceholder:K,preserveUndefined:G}=W;if((0,e.isObjectLike)(Q)&&(0,e.isObjectLike)(J))for(const X in J)if((0,e.isObjectLike)(J[X])&&(0,e.isObjectLike)(Q[X]))Q[X]||(Q[X]={}),k(W,Q[X],J[X]);else if((0,e.isArray)(Q)){let ce=J[X];const me=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(ce=typeof ce<"u"?ce:Q[parseInt(X,10)]),ce=ce!==t.PLACEHOLDER_UNDEFINED?ce:me,Q[parseInt(X,10)]=ce}else{const ce=J[X]!==t.PLACEHOLDER_UNDEFINED?J[X]:void 0;Q[X]=ce}return k(W,Q,...ne)},T=function(W,Q,ne){return k({preservePlaceholder:ne?.preservePlaceholder,preserveUndefined:ne?.preserveUndefined},(0,e.cloneDeep)(W),(0,e.cloneDeep)(Q))};e.mergeDeep=T;const M=function(W,Q=[],ne,J,K){if(!(0,e.isObjectLike)(W))return W;for(const G in W){const X=W[G],ce=(0,e.isArray)(W),me=J?J+"."+G:G;X===null&&(ne===n.ConfigType.WHITELIST&&Q.indexOf(me)===-1||ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)!==-1)&&ce&&(W[parseInt(G,10)]=void 0),X===void 0&&K&&ne===n.ConfigType.BLACKLIST&&Q.indexOf(me)===-1&&ce&&(W[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(X,Q,ne,me,K)}},O=function(W,Q,ne,J){const K=(0,e.cloneDeep)(W);return M(K,Q,ne,"",J),K};e.preserveUndefined=O;const R=function(W,Q,ne){return ne.indexOf(W)===Q};e.unique=R;const N=function(W){return W.reduce((Q,ne)=>{const J=W.filter(Me=>Me===ne),K=W.filter(Me=>(ne+".").indexOf(Me+".")===0),{duplicates:G,subsets:X}=Q,ce=J.length>1&&G.indexOf(ne)===-1,me=K.length>1;return{duplicates:[...G,...ce?J:[]],subsets:[...X,...me?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(W,Q,ne){const J=ne===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${ne===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(Q)||Q.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!W||!W.length)return;const{duplicates:X,subsets:ce}=(0,e.findDuplicatesAndSubsets)(W);if(X.length>1)throw new Error(`${K} Duplicated paths. + + ${JSON.stringify(X)} + + ${G}`);if(ce.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(ce)} + + ${G}`)};e.singleTransformValidator=z;const V=function(W){if(!(0,e.isArray)(W))return;const Q=W?.map(ne=>ne.deepPersistKey).filter(ne=>ne)||[];if(Q.length){const ne=Q.filter((J,K)=>Q.indexOf(J)!==K);if(ne.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(ne)}`)}};e.transformsValidator=V;const $=function({whitelist:W,blacklist:Q}){if(W&&W.length&&Q&&Q.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(W){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(W);(0,e.throwError)({duplicates:ne,subsets:J},"whitelist")}if(Q){const{duplicates:ne,subsets:J}=(0,e.findDuplicatesAndSubsets)(Q);(0,e.throwError)({duplicates:ne,subsets:J},"blacklist")}};e.configValidator=$;const j=function({duplicates:W,subsets:Q},ne){if(W.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ne}. + + ${JSON.stringify(W)}`);if(Q.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ne}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(Q)}`)};e.throwError=j;const ue=function(W){return(0,e.isArray)(W)?W.filter(e.unique).reduce((Q,ne)=>{const J=ne.split("."),K=J[0],G=J.slice(1).join(".")||void 0,X=Q.filter(me=>Object.keys(me)[0]===K)[0],ce=X?Object.values(X)[0]:void 0;return X||Q.push({[K]:G?[G]:void 0}),X&&!ce&&G&&(X[K]=[G]),X&&ce&&G&&ce.push(G),Q},[]):[]};e.getRootKeysGroup=ue})(L$);(function(e){var t=bs&&bs.__rest||function(g,m){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&m.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,b=Object.getOwnPropertySymbols(g);w!E(k)&&g?g(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:b&&b[0]}},a=(g,m,v,{debug:b,whitelist:w,blacklist:E,transforms:P})=>{if(w||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)(P);const k=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{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(M)}`)),Object.keys(T).forEach(O=>{if(O!=="_persist"){if((0,n.isObjectLike)(k[O])){k[O]=(0,n.mergeDeep)(k[O],T[O]);return}k[O]=T[O]}})}return b&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let b=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};b=(0,n.mergeDeep)(b||T,k,{preservePlaceholder:!0})}),b||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,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,P)=>(0,n.dissocPath)(E,P),b)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const b=Object.keys(v)[0],w=v[b];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(b,w):(0,e.createBlacklist)(b,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:b,storage:w,transforms:E,rootReducer:P}=g,k=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:b});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(b),O=Object.keys(P(void 0,{type:""})),R=T.map(ue=>Object.keys(ue)[0]),N=M.map(ue=>Object.keys(ue)[0]),z=O.filter(ue=>R.indexOf(ue)===-1&&N.indexOf(ue)===-1),V=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(ue=>(0,e.createBlacklist)(ue)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...V,...$,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(T$);const X3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),kye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return z_(r)?r:!1},z_=e=>Boolean(typeof e=="string"?kye(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)})),d4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Eye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Jr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * 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,h="__lodash_placeholder__",g=1,m=2,v=4,b=1,w=2,E=1,P=2,k=4,T=8,M=16,O=32,R=64,N=128,z=256,V=512,$=30,j="...",ue=800,W=16,Q=1,ne=2,J=3,K=1/0,G=9007199254740991,X=17976931348623157e292,ce=0/0,me=4294967295,Me=me-1,xe=me>>>1,be=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",V],["partial",O],["partialRight",R],["rearg",z]],Ie="[object Arguments]",We="[object Array]",De="[object AsyncFunction]",Qe="[object Boolean]",st="[object Date]",Ct="[object DOMException]",ft="[object Error]",ut="[object Function]",vt="[object GeneratorFunction]",Ee="[object Map]",Je="[object Number]",Lt="[object Null]",it="[object Object]",pt="[object Promise]",an="[object Proxy]",_t="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",Xe="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",_e="[object DataView]",It="[object Float32Array]",ze="[object Float64Array]",ot="[object Int8Array]",ln="[object Int16Array]",zn="[object Int32Array]",He="[object Uint8Array]",ct="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,er=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,C1=RegExp(mi.source),ya=RegExp(Os.source),Th=/<%-([\s\S]+?)%>/g,_1=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Lh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ah=/^\w*$/,Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Md=/[\\^$.*+?()[\]{}|]/g,k1=RegExp(Md.source),$u=/^\s+/,Id=/\s/,E1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,Hu=/,? & /,P1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,T1=/[()=,{}\[\]\/\s]/,L1=/\\(\\)?/g,A1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,M1=/^[-+]0x[0-9a-f]+$/i,I1=/^0b[01]+$/i,O1=/^\[object .+?Constructor\]$/,R1=/^0o[0-7]+$/i,N1=/^(?:0|[1-9]\d*)$/,D1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ns=/($^)/,z1=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Ds="\\u20d0-\\u20ff",Vl=Hl+Wl+Ds,Mh="\\u2700-\\u27bf",Wu="a-z\\xdf-\\xf6\\xf8-\\xff",zs="\\xac\\xb1\\xd7\\xf7",zo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",bn=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",kr="\\ufe0e\\ufe0f",Gr=zs+zo+En+bn,Fo="['\u2019]",Bs="["+Xa+"]",jr="["+Gr+"]",Za="["+Vl+"]",Od="\\d+",Ul="["+Mh+"]",Qa="["+Wu+"]",Rd="[^"+Xa+Gr+Od+Mh+Wu+Bo+"]",vi="\\ud83c[\\udffb-\\udfff]",Ih="(?:"+Za+"|"+vi+")",Oh="[^"+Xa+"]",Nd="(?:\\ud83c[\\udde6-\\uddff]){2}",Fs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Bo+"]",$s="\\u200d",Gl="(?:"+Qa+"|"+Rd+")",B1="(?:"+uo+"|"+Rd+")",Vu="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Dd=Ih+"?",Gu="["+kr+"]?",ba="(?:"+$s+"(?:"+[Oh,Nd,Fs].join("|")+")"+Gu+Dd+")*",zd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Gu+Dd+ba,Rh="(?:"+[Ul,Nd,Fs].join("|")+")"+Ht,ju="(?:"+[Oh+Za+"?",Za,Nd,Fs,Bs].join("|")+")",Yu=RegExp(Fo,"g"),Nh=RegExp(Za,"g"),$o=RegExp(vi+"(?="+vi+")|"+ju+Ht,"g"),Un=RegExp([uo+"?"+Qa+"+"+Vu+"(?="+[jr,uo,"$"].join("|")+")",B1+"+"+Uu+"(?="+[jr,uo+Gl,"$"].join("|")+")",uo+"?"+Gl+"+"+Vu,uo+"+"+Uu,jl,zd,Od,Rh].join("|"),"g"),Bd=RegExp("["+$s+Xa+Vl+kr+"]"),Dh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fd=["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"],zh=-1,un={};un[It]=un[ze]=un[ot]=un[ln]=un[zn]=un[He]=un[ct]=un[tt]=un[Nt]=!0,un[Ie]=un[We]=un[Yt]=un[Qe]=un[_e]=un[st]=un[ft]=un[ut]=un[Ee]=un[Je]=un[it]=un[_t]=un[Ut]=un[sn]=un[Xe]=!1;var Wt={};Wt[Ie]=Wt[We]=Wt[Yt]=Wt[_e]=Wt[Qe]=Wt[st]=Wt[It]=Wt[ze]=Wt[ot]=Wt[ln]=Wt[zn]=Wt[Ee]=Wt[Je]=Wt[it]=Wt[_t]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[He]=Wt[ct]=Wt[tt]=Wt[Nt]=!0,Wt[ft]=Wt[ut]=Wt[Xe]=!1;var Bh={\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"},F1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,zt=typeof bs=="object"&&bs&&bs.Object===Object&&bs,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Dr=Vt&&Vt.exports===Tt,mr=Dr&&zt.process,hn=function(){try{var re=Vt&&Vt.require&&Vt.require("util").types;return re||mr&&mr.binding&&mr.binding("util")}catch{}}(),Yr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Vi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,Hs=hn&&hn.isSet,$1=hn&&hn.isTypedArray;function yi(re,ye,ge){switch(ge.length){case 0:return re.call(ye);case 1:return re.call(ye,ge[0]);case 2:return re.call(ye,ge[0],ge[1]);case 3:return re.call(ye,ge[0],ge[1],ge[2])}return re.apply(ye,ge)}function H1(re,ye,ge,Ge){for(var Et=-1,Qt=re==null?0:re.length;++Et-1}function Fh(re,ye,ge){for(var Ge=-1,Et=re==null?0:re.length;++Ge-1;);return ge}function Ja(re,ye){for(var ge=re.length;ge--&&Xu(ye,re[ge],0)>-1;);return ge}function V1(re,ye){for(var ge=re.length,Ge=0;ge--;)re[ge]===ye&&++Ge;return Ge}var C2=Vd(Bh),es=Vd(F1);function Vs(re){return"\\"+te[re]}function Hh(re,ye){return re==null?n:re[ye]}function ql(re){return Bd.test(re)}function Wh(re){return Dh.test(re)}function _2(re){for(var ye,ge=[];!(ye=re.next()).done;)ge.push(ye.value);return ge}function Vh(re){var ye=-1,ge=Array(re.size);return re.forEach(function(Ge,Et){ge[++ye]=[Et,Ge]}),ge}function Uh(re,ye){return function(ge){return re(ye(ge))}}function Vo(re,ye){for(var ge=-1,Ge=re.length,Et=0,Qt=[];++ge-1}function V2(c,p){var S=this.__data__,A=Pr(S,c);return A<0?(++this.size,S.push([c,p])):S[A][1]=p,this}Uo.prototype.clear=H2,Uo.prototype.delete=W2,Uo.prototype.get=ig,Uo.prototype.has=og,Uo.prototype.set=V2;function Go(c){var p=-1,S=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ai(c,p,S,A,D,F){var Y,Z=p&g,le=p&m,we=p&v;if(S&&(Y=D?S(c,A,D,F):S(c)),Y!==n)return Y;if(!lr(c))return c;var Ce=Rt(c);if(Ce){if(Y=bU(c),!Z)return _i(c,Y)}else{var Te=ui(c),Ue=Te==ut||Te==vt;if(_c(c))return el(c,Z);if(Te==it||Te==Ie||Ue&&!D){if(Y=le||Ue?{}:Nk(c),!Z)return le?Cg(c,pc(Y,c)):yo(c,Ke(Y,c))}else{if(!Wt[Te])return D?c:{};Y=SU(c,Te,Z)}}F||(F=new yr);var lt=F.get(c);if(lt)return lt;F.set(c,Y),cE(c)?c.forEach(function(xt){Y.add(ai(xt,p,S,xt,c,F))}):lE(c)&&c.forEach(function(xt,jt){Y.set(jt,ai(xt,p,S,jt,c,F))});var St=we?le?pe:Xo:le?So:ci,$t=Ce?n:St(c);return Gn($t||c,function(xt,jt){$t&&(jt=xt,xt=c[jt]),js(Y,jt,ai(xt,p,S,jt,c,F))}),Y}function Qh(c){var p=ci(c);return function(S){return Jh(S,c,p)}}function Jh(c,p,S){var A=S.length;if(c==null)return!A;for(c=cn(c);A--;){var D=S[A],F=p[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ug(c,p,S){if(typeof c!="function")throw new bi(a);return Tg(function(){c.apply(n,S)},p)}function gc(c,p,S,A){var D=-1,F=Ri,Y=!0,Z=c.length,le=[],we=p.length;if(!Z)return le;S&&(p=Fn(p,Er(S))),A?(F=Fh,Y=!1):p.length>=i&&(F=Qu,Y=!1,p=new _a(p));e:for(;++DD?0:D+S),A=A===n||A>D?D:Dt(A),A<0&&(A+=D),A=S>A?0:fE(A);S0&&S(Z)?p>1?Tr(Z,p-1,S,A,D):xa(D,Z):A||(D[D.length]=Z)}return D}var tp=tl(),go=tl(!0);function Ko(c,p){return c&&tp(c,p,ci)}function mo(c,p){return c&&go(c,p,ci)}function np(c,p){return ho(p,function(S){return ru(c[S])})}function Ys(c,p){p=Js(p,c);for(var S=0,A=p.length;c!=null&&Sp}function ip(c,p){return c!=null&&tn.call(c,p)}function op(c,p){return c!=null&&p in cn(c)}function ap(c,p,S){return c>=Kr(p,S)&&c=120&&Ce.length>=120)?new _a(Y&&Ce):n}Ce=c[0];var Te=-1,Ue=Z[0];e:for(;++Te-1;)Z!==c&&Zd.call(Z,le,1),Zd.call(c,le,1);return c}function sf(c,p){for(var S=c?p.length:0,A=S-1;S--;){var D=p[S];if(S==A||D!==F){var F=D;nu(D)?Zd.call(c,D,1):mp(c,D)}}return c}function lf(c,p){return c+Xl(Q1()*(p-c+1))}function Zs(c,p,S,A){for(var D=-1,F=vr(ef((p-c)/(S||1)),0),Y=ge(F);F--;)Y[A?F:++D]=c,c+=S;return Y}function xc(c,p){var S="";if(!c||p<1||p>G)return S;do p%2&&(S+=c),p=Xl(p/2),p&&(c+=c);while(p);return S}function kt(c,p){return zS(Bk(c,p,xo),c+"")}function dp(c){return hc(Cp(c))}function uf(c,p){var S=Cp(c);return Z2(S,Ql(p,0,S.length))}function eu(c,p,S,A){if(!lr(c))return c;p=Js(p,c);for(var D=-1,F=p.length,Y=F-1,Z=c;Z!=null&&++DD?0:D+p),S=S>D?D:S,S<0&&(S+=D),D=p>S?0:S-p>>>0,p>>>=0;for(var F=ge(D);++A>>1,Y=c[F];Y!==null&&!Zo(Y)&&(S?Y<=p:Y=i){var we=p?null:H(c);if(we)return Yd(we);Y=!1,D=Qu,le=new _a}else le=p?[]:Z;e:for(;++A=A?c:Ar(c,p,S)}var bg=L2||function(c){return yt.clearTimeout(c)};function el(c,p){if(p)return c.slice();var S=c.length,A=rc?rc(S):new c.constructor(S);return c.copy(A),A}function Sg(c){var p=new c.constructor(c.byteLength);return new Si(p).set(new Si(c)),p}function tu(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function Y2(c){var p=new c.constructor(c.source,Ka.exec(c));return p.lastIndex=c.lastIndex,p}function jn(c){return nf?cn(nf.call(c)):{}}function q2(c,p){var S=p?Sg(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function xg(c,p){if(c!==p){var S=c!==n,A=c===null,D=c===c,F=Zo(c),Y=p!==n,Z=p===null,le=p===p,we=Zo(p);if(!Z&&!we&&!F&&c>p||F&&Y&&le&&!Z&&!we||A&&Y&&le||!S&&le||!D)return 1;if(!A&&!F&&!we&&c=Z)return le;var we=S[A];return le*(we=="desc"?-1:1)}}return c.index-p.index}function K2(c,p,S,A){for(var D=-1,F=c.length,Y=S.length,Z=-1,le=p.length,we=vr(F-Y,0),Ce=ge(le+we),Te=!A;++Z1?S[D-1]:n,Y=D>2?S[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Ki(S[0],S[1],Y)&&(F=D<3?n:F,D=1),p=cn(p);++A-1?D[F?p[Y]:Y]:n}}function kg(c){return nr(function(p){var S=p.length,A=S,D=Gi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new bi(a);if(D&&!Y&&ve(F)=="wrapper")var Y=new Gi([],!0)}for(A=Y?A:S;++A1&&Jt.reverse(),Ce&&leZ))return!1;var we=F.get(c),Ce=F.get(p);if(we&&Ce)return we==p&&Ce==c;var Te=-1,Ue=!0,lt=S&w?new _a:n;for(F.set(c,p),F.set(p,c);++Te1?"& ":"")+p[A],p=p.join(S>2?", ":" "),c.replace(E1,`{ +/* [wrapped with `+p+`] */ +`)}function wU(c){return Rt(c)||vf(c)||!!(X1&&c&&c[X1])}function nu(c,p){var S=typeof c;return p=p??G,!!p&&(S=="number"||S!="symbol"&&N1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ue)return arguments[0]}else p=0;return c.apply(n,arguments)}}function Z2(c,p){var S=-1,A=c.length,D=A-1;for(p=p===n?A:p;++S1?c[p-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Xk(c,S)});function Zk(c){var p=B(c);return p.__chain__=!0,p}function OG(c,p){return p(c),c}function Q2(c,p){return p(c)}var RG=nr(function(c){var p=c.length,S=p?c[0]:0,A=this.__wrapped__,D=function(F){return Zh(F,c)};return p>1||this.__actions__.length||!(A instanceof Gt)||!nu(S)?this.thru(D):(A=A.slice(S,+S+(p?1:0)),A.__actions__.push({func:Q2,args:[D],thisArg:n}),new Gi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function NG(){return Zk(this)}function DG(){return new Gi(this.value(),this.__chain__)}function zG(){this.__values__===n&&(this.__values__=dE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function BG(){return this}function FG(c){for(var p,S=this;S instanceof rf;){var A=Uk(S);A.__index__=0,A.__values__=n,p?D.__wrapped__=A:p=A;var D=A;S=S.__wrapped__}return D.__wrapped__=c,p}function $G(){var c=this.__wrapped__;if(c instanceof Gt){var p=c;return this.__actions__.length&&(p=new Gt(this)),p=p.reverse(),p.__actions__.push({func:Q2,args:[BS],thisArg:n}),new Gi(p,this.__chain__)}return this.thru(BS)}function HG(){return Qs(this.__wrapped__,this.__actions__)}var WG=yp(function(c,p,S){tn.call(c,S)?++c[S]:jo(c,S,1)});function VG(c,p,S){var A=Rt(c)?Bn:cg;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}function UG(c,p){var S=Rt(c)?ho:qo;return S(c,Pe(p,3))}var GG=_g(Gk),jG=_g(jk);function YG(c,p){return Tr(J2(c,p),1)}function qG(c,p){return Tr(J2(c,p),K)}function KG(c,p,S){return S=S===n?1:Dt(S),Tr(J2(c,p),S)}function Qk(c,p){var S=Rt(c)?Gn:rs;return S(c,Pe(p,3))}function Jk(c,p){var S=Rt(c)?fo:ep;return S(c,Pe(p,3))}var XG=yp(function(c,p,S){tn.call(c,S)?c[S].push(p):jo(c,S,[p])});function ZG(c,p,S,A){c=bo(c)?c:Cp(c),S=S&&!A?Dt(S):0;var D=c.length;return S<0&&(S=vr(D+S,0)),iy(c)?S<=D&&c.indexOf(p,S)>-1:!!D&&Xu(c,p,S)>-1}var QG=kt(function(c,p,S){var A=-1,D=typeof p=="function",F=bo(c)?ge(c.length):[];return rs(c,function(Y){F[++A]=D?yi(p,Y,S):is(Y,p,S)}),F}),JG=yp(function(c,p,S){jo(c,S,p)});function J2(c,p){var S=Rt(c)?Fn:Sr;return S(c,Pe(p,3))}function ej(c,p,S,A){return c==null?[]:(Rt(p)||(p=p==null?[]:[p]),S=A?n:S,Rt(S)||(S=S==null?[]:[S]),wi(c,p,S))}var tj=yp(function(c,p,S){c[S?0:1].push(p)},function(){return[[],[]]});function nj(c,p,S){var A=Rt(c)?$d:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,rs)}function rj(c,p,S){var A=Rt(c)?b2:$h,D=arguments.length<3;return A(c,Pe(p,4),S,D,ep)}function ij(c,p){var S=Rt(c)?ho:qo;return S(c,ny(Pe(p,3)))}function oj(c){var p=Rt(c)?hc:dp;return p(c)}function aj(c,p,S){(S?Ki(c,p,S):p===n)?p=1:p=Dt(p);var A=Rt(c)?oi:uf;return A(c,p)}function sj(c){var p=Rt(c)?LS:li;return p(c)}function lj(c){if(c==null)return 0;if(bo(c))return iy(c)?wa(c):c.length;var p=ui(c);return p==Ee||p==Ut?c.size:Lr(c).length}function uj(c,p,S){var A=Rt(c)?qu:vo;return S&&Ki(c,p,S)&&(p=n),A(c,Pe(p,3))}var cj=kt(function(c,p){if(c==null)return[];var S=p.length;return S>1&&Ki(c,p[0],p[1])?p=[]:S>2&&Ki(p[0],p[1],p[2])&&(p=[p[0]]),wi(c,Tr(p,1),[])}),ey=A2||function(){return yt.Date.now()};function dj(c,p){if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){if(--c<1)return p.apply(this,arguments)}}function eE(c,p,S){return p=S?n:p,p=c&&p==null?c.length:p,fe(c,N,n,n,n,n,p)}function tE(c,p){var S;if(typeof p!="function")throw new bi(a);return c=Dt(c),function(){return--c>0&&(S=p.apply(this,arguments)),c<=1&&(p=n),S}}var $S=kt(function(c,p,S){var A=E;if(S.length){var D=Vo(S,Ve($S));A|=O}return fe(c,A,p,S,D)}),nE=kt(function(c,p,S){var A=E|P;if(S.length){var D=Vo(S,Ve(nE));A|=O}return fe(p,A,c,S,D)});function rE(c,p,S){p=S?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=rE.placeholder,A}function iE(c,p,S){p=S?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=iE.placeholder,A}function oE(c,p,S){var A,D,F,Y,Z,le,we=0,Ce=!1,Te=!1,Ue=!0;if(typeof c!="function")throw new bi(a);p=Pa(p)||0,lr(S)&&(Ce=!!S.leading,Te="maxWait"in S,F=Te?vr(Pa(S.maxWait)||0,p):F,Ue="trailing"in S?!!S.trailing:Ue);function lt(Ir){var us=A,ou=D;return A=D=n,we=Ir,Y=c.apply(ou,us),Y}function St(Ir){return we=Ir,Z=Tg(jt,p),Ce?lt(Ir):Y}function $t(Ir){var us=Ir-le,ou=Ir-we,_E=p-us;return Te?Kr(_E,F-ou):_E}function xt(Ir){var us=Ir-le,ou=Ir-we;return le===n||us>=p||us<0||Te&&ou>=F}function jt(){var Ir=ey();if(xt(Ir))return Jt(Ir);Z=Tg(jt,$t(Ir))}function Jt(Ir){return Z=n,Ue&&A?lt(Ir):(A=D=n,Y)}function Qo(){Z!==n&&bg(Z),we=0,A=le=D=Z=n}function Xi(){return Z===n?Y:Jt(ey())}function Jo(){var Ir=ey(),us=xt(Ir);if(A=arguments,D=this,le=Ir,us){if(Z===n)return St(le);if(Te)return bg(Z),Z=Tg(jt,p),lt(le)}return Z===n&&(Z=Tg(jt,p)),Y}return Jo.cancel=Qo,Jo.flush=Xi,Jo}var fj=kt(function(c,p){return ug(c,1,p)}),hj=kt(function(c,p,S){return ug(c,Pa(p)||0,S)});function pj(c){return fe(c,V)}function ty(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new bi(a);var S=function(){var A=arguments,D=p?p.apply(this,A):A[0],F=S.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,A);return S.cache=F.set(D,Y)||F,Y};return S.cache=new(ty.Cache||Go),S}ty.Cache=Go;function ny(c){if(typeof c!="function")throw new bi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function gj(c){return tE(2,c)}var mj=IS(function(c,p){p=p.length==1&&Rt(p[0])?Fn(p[0],Er(Pe())):Fn(Tr(p,1),Er(Pe()));var S=p.length;return kt(function(A){for(var D=-1,F=Kr(A.length,S);++D=p}),vf=lp(function(){return arguments}())?lp:function(c){return xr(c)&&tn.call(c,"callee")&&!K1.call(c,"callee")},Rt=ge.isArray,Mj=Yr?Er(Yr):fg;function bo(c){return c!=null&&ry(c.length)&&!ru(c)}function Mr(c){return xr(c)&&bo(c)}function Ij(c){return c===!0||c===!1||xr(c)&&si(c)==Qe}var _c=M2||QS,Oj=co?Er(co):hg;function Rj(c){return xr(c)&&c.nodeType===1&&!Lg(c)}function Nj(c){if(c==null)return!0;if(bo(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||_c(c)||wp(c)||vf(c)))return!c.length;var p=ui(c);if(p==Ee||p==Ut)return!c.size;if(Pg(c))return!Lr(c).length;for(var S in c)if(tn.call(c,S))return!1;return!0}function Dj(c,p){return vc(c,p)}function zj(c,p,S){S=typeof S=="function"?S:n;var A=S?S(c,p):n;return A===n?vc(c,p,n,S):!!A}function WS(c){if(!xr(c))return!1;var p=si(c);return p==ft||p==Ct||typeof c.message=="string"&&typeof c.name=="string"&&!Lg(c)}function Bj(c){return typeof c=="number"&&Yh(c)}function ru(c){if(!lr(c))return!1;var p=si(c);return p==ut||p==vt||p==De||p==an}function sE(c){return typeof c=="number"&&c==Dt(c)}function ry(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function lr(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function xr(c){return c!=null&&typeof c=="object"}var lE=Vi?Er(Vi):MS;function Fj(c,p){return c===p||yc(c,p,Pt(p))}function $j(c,p,S){return S=typeof S=="function"?S:n,yc(c,p,Pt(p),S)}function Hj(c){return uE(c)&&c!=+c}function Wj(c){if(kU(c))throw new Et(o);return up(c)}function Vj(c){return c===null}function Uj(c){return c==null}function uE(c){return typeof c=="number"||xr(c)&&si(c)==Je}function Lg(c){if(!xr(c)||si(c)!=it)return!1;var p=ic(c);if(p===null)return!0;var S=tn.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&or.call(S)==ii}var VS=Sa?Er(Sa):ar;function Gj(c){return sE(c)&&c>=-G&&c<=G}var cE=Hs?Er(Hs):Bt;function iy(c){return typeof c=="string"||!Rt(c)&&xr(c)&&si(c)==sn}function Zo(c){return typeof c=="symbol"||xr(c)&&si(c)==yn}var wp=$1?Er($1):zr;function jj(c){return c===n}function Yj(c){return xr(c)&&ui(c)==Xe}function qj(c){return xr(c)&&si(c)==Xt}var Kj=_(qs),Xj=_(function(c,p){return c<=p});function dE(c){if(!c)return[];if(bo(c))return iy(c)?Ni(c):_i(c);if(oc&&c[oc])return _2(c[oc]());var p=ui(c),S=p==Ee?Vh:p==Ut?Yd:Cp;return S(c)}function iu(c){if(!c)return c===0?c:0;if(c=Pa(c),c===K||c===-K){var p=c<0?-1:1;return p*X}return c===c?c:0}function Dt(c){var p=iu(c),S=p%1;return p===p?S?p-S:p:0}function fE(c){return c?Ql(Dt(c),0,me):0}function Pa(c){if(typeof c=="number")return c;if(Zo(c))return ce;if(lr(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=lr(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Ui(c);var S=I1.test(c);return S||R1.test(c)?Ye(c.slice(2),S?2:8):M1.test(c)?ce:+c}function hE(c){return ka(c,So(c))}function Zj(c){return c?Ql(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Yi(c)}var Qj=qi(function(c,p){if(Pg(p)||bo(p)){ka(p,ci(p),c);return}for(var S in p)tn.call(p,S)&&js(c,S,p[S])}),pE=qi(function(c,p){ka(p,So(p),c)}),oy=qi(function(c,p,S,A){ka(p,So(p),c,A)}),Jj=qi(function(c,p,S,A){ka(p,ci(p),c,A)}),eY=nr(Zh);function tY(c,p){var S=Zl(c);return p==null?S:Ke(S,p)}var nY=kt(function(c,p){c=cn(c);var S=-1,A=p.length,D=A>2?p[2]:n;for(D&&Ki(p[0],p[1],D)&&(A=1);++S1),F}),ka(c,pe(c),S),A&&(S=ai(S,g|m|v,At));for(var D=p.length;D--;)mp(S,p[D]);return S});function SY(c,p){return mE(c,ny(Pe(p)))}var xY=nr(function(c,p){return c==null?{}:mg(c,p)});function mE(c,p){if(c==null)return{};var S=Fn(pe(c),function(A){return[A]});return p=Pe(p),cp(c,S,function(A,D){return p(A,D[0])})}function wY(c,p,S){p=Js(p,c);var A=-1,D=p.length;for(D||(D=1,c=n);++Ap){var A=c;c=p,p=A}if(S||c%1||p%1){var D=Q1();return Kr(c+D*(p-c+he("1e-"+((D+"").length-1))),p)}return lf(c,p)}var OY=nl(function(c,p,S){return p=p.toLowerCase(),c+(S?bE(p):p)});function bE(c){return jS(xn(c).toLowerCase())}function SE(c){return c=xn(c),c&&c.replace(D1,C2).replace(Nh,"")}function RY(c,p,S){c=xn(c),p=Yi(p);var A=c.length;S=S===n?A:Ql(Dt(S),0,A);var D=S;return S-=p.length,S>=0&&c.slice(S,D)==p}function NY(c){return c=xn(c),c&&ya.test(c)?c.replace(Os,es):c}function DY(c){return c=xn(c),c&&k1.test(c)?c.replace(Md,"\\$&"):c}var zY=nl(function(c,p,S){return c+(S?"-":"")+p.toLowerCase()}),BY=nl(function(c,p,S){return c+(S?" ":"")+p.toLowerCase()}),FY=Sp("toLowerCase");function $Y(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;if(!p||A>=p)return c;var D=(p-A)/2;return d(Xl(D),S)+c+d(ef(D),S)}function HY(c,p,S){c=xn(c),p=Dt(p);var A=p?wa(c):0;return p&&A>>0,S?(c=xn(c),c&&(typeof p=="string"||p!=null&&!VS(p))&&(p=Yi(p),!p&&ql(c))?as(Ni(c),0,S):c.split(p,S)):[]}var qY=nl(function(c,p,S){return c+(S?" ":"")+jS(p)});function KY(c,p,S){return c=xn(c),S=S==null?0:Ql(Dt(S),0,c.length),p=Yi(p),c.slice(S,S+p.length)==p}function XY(c,p,S){var A=B.templateSettings;S&&Ki(c,p,S)&&(p=n),c=xn(c),p=oy({},p,A,Ne);var D=oy({},p.imports,A.imports,Ne),F=ci(D),Y=jd(D,F),Z,le,we=0,Ce=p.interpolate||Ns,Te="__p += '",Ue=Kd((p.escape||Ns).source+"|"+Ce.source+"|"+(Ce===Fu?A1:Ns).source+"|"+(p.evaluate||Ns).source+"|$","g"),lt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zh+"]")+` +`;c.replace(Ue,function(xt,jt,Jt,Qo,Xi,Jo){return Jt||(Jt=Qo),Te+=c.slice(we,Jo).replace(z1,Vs),jt&&(Z=!0,Te+=`' + +__e(`+jt+`) + +'`),Xi&&(le=!0,Te+=`'; +`+Xi+`; +__p += '`),Jt&&(Te+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),we=Jo+xt.length,xt}),Te+=`'; +`;var St=tn.call(p,"variable")&&p.variable;if(!St)Te=`with (obj) { +`+Te+` +} +`;else if(T1.test(St))throw new Et(s);Te=(le?Te.replace(Zt,""):Te).replace(er,"$1").replace(lo,"$1;"),Te="function("+(St||"obj")+`) { +`+(St?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(le?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Te+`return __p +}`;var $t=wE(function(){return Qt(F,lt+"return "+Te).apply(n,Y)});if($t.source=Te,WS($t))throw $t;return $t}function ZY(c){return xn(c).toLowerCase()}function QY(c){return xn(c).toUpperCase()}function JY(c,p,S){if(c=xn(c),c&&(S||p===n))return Ui(c);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ni(p),F=Wo(A,D),Y=Ja(A,D)+1;return as(A,F,Y).join("")}function eq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.slice(0,G1(c)+1);if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Ja(A,Ni(p))+1;return as(A,0,D).join("")}function tq(c,p,S){if(c=xn(c),c&&(S||p===n))return c.replace($u,"");if(!c||!(p=Yi(p)))return c;var A=Ni(c),D=Wo(A,Ni(p));return as(A,D).join("")}function nq(c,p){var S=$,A=j;if(lr(p)){var D="separator"in p?p.separator:D;S="length"in p?Dt(p.length):S,A="omission"in p?Yi(p.omission):A}c=xn(c);var F=c.length;if(ql(c)){var Y=Ni(c);F=Y.length}if(S>=F)return c;var Z=S-wa(A);if(Z<1)return A;var le=Y?as(Y,0,Z).join(""):c.slice(0,Z);if(D===n)return le+A;if(Y&&(Z+=le.length-Z),VS(D)){if(c.slice(Z).search(D)){var we,Ce=le;for(D.global||(D=Kd(D.source,xn(Ka.exec(D))+"g")),D.lastIndex=0;we=D.exec(Ce);)var Te=we.index;le=le.slice(0,Te===n?Z:Te)}}else if(c.indexOf(Yi(D),Z)!=Z){var Ue=le.lastIndexOf(D);Ue>-1&&(le=le.slice(0,Ue))}return le+A}function rq(c){return c=xn(c),c&&C1.test(c)?c.replace(mi,P2):c}var iq=nl(function(c,p,S){return c+(S?" ":"")+p.toUpperCase()}),jS=Sp("toUpperCase");function xE(c,p,S){return c=xn(c),p=S?n:p,p===n?Wh(c)?qd(c):W1(c):c.match(p)||[]}var wE=kt(function(c,p){try{return yi(c,n,p)}catch(S){return WS(S)?S:new Et(S)}}),oq=nr(function(c,p){return Gn(p,function(S){S=rl(S),jo(c,S,$S(c[S],c))}),c});function aq(c){var p=c==null?0:c.length,S=Pe();return c=p?Fn(c,function(A){if(typeof A[1]!="function")throw new bi(a);return[S(A[0]),A[1]]}):[],kt(function(A){for(var D=-1;++DG)return[];var S=me,A=Kr(c,me);p=Pe(p),c-=me;for(var D=Gd(A,p);++S0||p<0)?new Gt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),p!==n&&(p=Dt(p),S=p<0?S.dropRight(-p):S.take(p-c)),S)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(me)},Ko(Gt.prototype,function(c,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),D=B[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!D||(B.prototype[p]=function(){var Y=this.__wrapped__,Z=A?[1]:arguments,le=Y instanceof Gt,we=Z[0],Ce=le||Rt(Y),Te=function(jt){var Jt=D.apply(B,xa([jt],Z));return A&&Ue?Jt[0]:Jt};Ce&&S&&typeof we=="function"&&we.length!=1&&(le=Ce=!1);var Ue=this.__chain__,lt=!!this.__actions__.length,St=F&&!Ue,$t=le&&!lt;if(!F&&Ce){Y=$t?Y:new Gt(this);var xt=c.apply(Y,Z);return xt.__actions__.push({func:Q2,args:[Te],thisArg:n}),new Gi(xt,Ue)}return St&&$t?c.apply(this,Z):(xt=this.thru(Te),St?A?xt.value()[0]:xt.value():xt)})}),Gn(["pop","push","shift","sort","splice","unshift"],function(c){var p=ec[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Rt(F)?F:[],D)}return this[S](function(Y){return p.apply(Rt(Y)?Y:[],D)})}}),Ko(Gt.prototype,function(c,p){var S=B[p];if(S){var A=S.name+"";tn.call(ts,A)||(ts[A]=[]),ts[A].push({name:p,func:S})}}),ts[pf(n,P).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=xi,Gt.prototype.value=D2,B.prototype.at=RG,B.prototype.chain=NG,B.prototype.commit=DG,B.prototype.next=zG,B.prototype.plant=FG,B.prototype.reverse=$G,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=HG,B.prototype.first=B.prototype.head,oc&&(B.prototype[oc]=BG),B},Ca=po();Vt?((Vt.exports=Ca)._=Ca,Tt._=Ca):yt._=Ca}).call(bs)})(Jr,Jr.exports);const Ze=Jr.exports;var Pye=Object.create,A$=Object.defineProperty,Tye=Object.getOwnPropertyDescriptor,Lye=Object.getOwnPropertyNames,Aye=Object.getPrototypeOf,Mye=Object.prototype.hasOwnProperty,Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Iye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lye(t))!Mye.call(e,i)&&i!==n&&A$(e,i,{get:()=>t[i],enumerable:!(r=Tye(t,i))||r.enumerable});return e},M$=(e,t,n)=>(n=e!=null?Pye(Aye(e)):{},Iye(t||!e||!e.__esModule?A$(n,"default",{value:e,enumerable:!0}):n,e)),Oye=Be((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),I$=Be((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),Xb=Be((e,t)=>{var n=I$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Rye=Be((e,t)=>{var n=Xb(),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}),Nye=Be((e,t)=>{var n=Xb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Dye=Be((e,t)=>{var n=Xb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),zye=Be((e,t)=>{var n=Xb();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}),Zb=Be((e,t)=>{var n=Oye(),r=Rye(),i=Nye(),o=Dye(),a=zye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb();function r(){this.__data__=new n,this.size=0}t.exports=r}),Fye=Be((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),$ye=Be((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),Hye=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),O$=Be((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Mu=Be((e,t)=>{var n=O$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),B_=Be((e,t)=>{var n=Mu(),r=n.Symbol;t.exports=r}),Wye=Be((e,t)=>{var n=B_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch{}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Vye=Be((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),Qb=Be((e,t)=>{var n=B_(),r=Wye(),i=Vye(),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}),R$=Be((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),N$=Be((e,t)=>{var n=Qb(),r=R$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),Uye=Be((e,t)=>{var n=Mu(),r=n["__core-js_shared__"];t.exports=r}),Gye=Be((e,t)=>{var n=Uye(),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}),D$=Be((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),jye=Be((e,t)=>{var n=N$(),r=Gye(),i=R$(),o=D$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(b){if(!i(b)||r(b))return!1;var w=n(b)?m:s;return w.test(o(b))}t.exports=v}),Yye=Be((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),m1=Be((e,t)=>{var n=jye(),r=Yye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),F_=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Map");t.exports=i}),Jb=Be((e,t)=>{var n=m1(),r=n(Object,"create");t.exports=r}),qye=Be((e,t)=>{var n=Jb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),Kye=Be((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Xye=Be((e,t)=>{var n=Jb(),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}),Zye=Be((e,t)=>{var n=Jb(),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}),Qye=Be((e,t)=>{var n=Jb(),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}),Jye=Be((e,t)=>{var n=qye(),r=Kye(),i=Xye(),o=Zye(),a=Qye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Jye(),r=Zb(),i=F_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),t3e=Be((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}),eS=Be((e,t)=>{var n=t3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),n3e=Be((e,t)=>{var n=eS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),r3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).get(i)}t.exports=r}),i3e=Be((e,t)=>{var n=eS();function r(i){return n(this,i).has(i)}t.exports=r}),o3e=Be((e,t)=>{var n=eS();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}),z$=Be((e,t)=>{var n=e3e(),r=n3e(),i=r3e(),o=i3e(),a=o3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Zb(),r=F_(),i=z$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=Zb(),r=Bye(),i=Fye(),o=$ye(),a=Hye(),s=a3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),l3e=Be((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),u3e=Be((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),c3e=Be((e,t)=>{var n=z$(),r=l3e(),i=u3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),B$=Be((e,t)=>{var n=c3e(),r=d3e(),i=f3e(),o=1,a=2;function s(l,u,h,g,m,v){var b=h&o,w=l.length,E=u.length;if(w!=E&&!(b&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,O=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Mu(),r=n.Uint8Array;t.exports=r}),p3e=Be((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}),g3e=Be((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),m3e=Be((e,t)=>{var n=B_(),r=h3e(),i=I$(),o=B$(),a=p3e(),s=g3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",b="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",O=n?n.prototype:void 0,R=O?O.valueOf:void 0;function N(z,V,$,j,ue,W,Q){switch($){case M:if(z.byteLength!=V.byteLength||z.byteOffset!=V.byteOffset)return!1;z=z.buffer,V=V.buffer;case T:return!(z.byteLength!=V.byteLength||!W(new r(z),new r(V)));case h:case g:case b:return i(+z,+V);case m:return z.name==V.name&&z.message==V.message;case w:case P:return z==V+"";case v:var ne=a;case E:var J=j&l;if(ne||(ne=s),z.size!=V.size&&!J)return!1;var K=Q.get(z);if(K)return K==V;j|=u,Q.set(z,V);var G=o(ne(z),ne(V),j,ue,W,Q);return Q.delete(z),G;case k:if(R)return R.call(z)==R.call(V)}return!1}t.exports=N}),v3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),y3e=Be((e,t)=>{var n=v3e(),r=$_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),b3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),x3e=Be((e,t)=>{var n=b3e(),r=S3e(),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}),w3e=Be((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),C3e=Be((e,t)=>{var n=Qb(),r=tS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),_3e=Be((e,t)=>{var n=C3e(),r=tS(),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}),k3e=Be((e,t)=>{function n(){return!1}t.exports=n}),F$=Be((e,t)=>{var n=Mu(),r=k3e(),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}),E3e=Be((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),P3e=Be((e,t)=>{var n=Qb(),r=$$(),i=tS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",ue="[object Uint32Array]",W={};W[M]=W[O]=W[R]=W[N]=W[z]=W[V]=W[$]=W[j]=W[ue]=!0,W[o]=W[a]=W[k]=W[s]=W[T]=W[l]=W[u]=W[h]=W[g]=W[m]=W[v]=W[b]=W[w]=W[E]=W[P]=!1;function Q(ne){return i(ne)&&r(ne.length)&&!!W[n(ne)]}t.exports=Q}),T3e=Be((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),L3e=Be((e,t)=>{var n=O$(),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{}}();t.exports=s}),H$=Be((e,t)=>{var n=P3e(),r=T3e(),i=L3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),A3e=Be((e,t)=>{var n=w3e(),r=_3e(),i=$_(),o=F$(),a=E3e(),s=H$(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),b=!v&&r(g),w=!v&&!b&&o(g),E=!v&&!b&&!w&&s(g),P=v||b||w||E,k=P?n(g.length,String):[],T=k.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),M3e=Be((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}),I3e=Be((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),O3e=Be((e,t)=>{var n=I3e(),r=n(Object.keys,Object);t.exports=r}),R3e=Be((e,t)=>{var n=M3e(),r=O3e(),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}),N3e=Be((e,t)=>{var n=N$(),r=$$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),D3e=Be((e,t)=>{var n=A3e(),r=R3e(),i=N3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),z3e=Be((e,t)=>{var n=y3e(),r=x3e(),i=D3e();function o(a){return n(a,i,r)}t.exports=o}),B3e=Be((e,t)=>{var n=z3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,b=n(s),w=b.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=b[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),O=m.get(l);if(M&&O)return M==l&&O==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=m1(),r=Mu(),i=n(r,"DataView");t.exports=i}),$3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Promise");t.exports=i}),H3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"Set");t.exports=i}),W3e=Be((e,t)=>{var n=m1(),r=Mu(),i=n(r,"WeakMap");t.exports=i}),V3e=Be((e,t)=>{var n=F3e(),r=F_(),i=$3e(),o=H3e(),a=W3e(),s=Qb(),l=D$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",b="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=b||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(O){var R=s(O),N=R==h?O.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return b;case E:return u;case P:return g;case k:return m;case T:return v}return R}),t.exports=M}),U3e=Be((e,t)=>{var n=s3e(),r=B$(),i=m3e(),o=B3e(),a=V3e(),s=$_(),l=F$(),u=H$(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",b=Object.prototype,w=b.hasOwnProperty;function E(P,k,T,M,O,R){var N=s(P),z=s(k),V=N?m:a(P),$=z?m:a(k);V=V==g?v:V,$=$==g?v:$;var j=V==v,ue=$==v,W=V==$;if(W&&l(P)){if(!l(k))return!1;N=!0,j=!1}if(W&&!j)return R||(R=new n),N||u(P)?r(P,k,T,M,O,R):i(P,k,V,T,M,O,R);if(!(T&h)){var Q=j&&w.call(P,"__wrapped__"),ne=ue&&w.call(k,"__wrapped__");if(Q||ne){var J=Q?P.value():P,K=ne?k.value():k;return R||(R=new n),O(J,K,T,M,R)}}return W?(R||(R=new n),o(P,k,T,M,O,R)):!1}t.exports=E}),G3e=Be((e,t)=>{var n=U3e(),r=tS();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}),W$=Be((e,t)=>{var n=G3e();function r(i,o){return n(i,o)}t.exports=r}),j3e=["ctrl","shift","alt","meta","mod"],Y3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Ew(e,t=","){return typeof e=="string"?e.split(t):e}function jm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>Y3e[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=>!j3e.includes(o));return{...r,keys:i}}function q3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function K3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function X3e(e){return V$(e,["input","textarea","select"])}function V$({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 Z3e(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 '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var Q3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:b}=e,w=b.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},J3e=C.exports.createContext(void 0),e5e=()=>C.exports.useContext(J3e),t5e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),n5e=()=>C.exports.useContext(t5e),r5e=M$(W$());function i5e(e){let t=C.exports.useRef(void 0);return(0,r5e.default)(t.current,e)||(t.current=e),t.current}var YA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function gt(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=i5e(a),{enabledScopes:h}=n5e(),g=e5e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!Z3e(h,u?.scopes))return;let m=w=>{if(!(X3e(w)&&!V$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){YA(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||Ew(e,u?.splitKey).forEach(E=>{let P=jm(E,u?.combinationKey);if(Q3e(w,P,o)||P.keys?.includes("*")){if(q3e(w,P,u?.preventDefault),!K3e(w,P,u?.enabled)){YA(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},b=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",b),(i.current||document).addEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.addHotkey(jm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",b),(i.current||document).removeEventListener("keydown",v),g&&Ew(e,u?.splitKey).forEach(w=>g.removeHotkey(jm(w,u?.combinationKey)))}},[e,l,u,h]),i}M$(W$());var i7=new Set;function o5e(e){(Array.isArray(e)?e:[e]).forEach(t=>i7.add(jm(t)))}function a5e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=jm(t);for(let r of i7)r.keys?.every(i=>n.keys?.includes(i))&&i7.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{o5e(e.key)}),document.addEventListener("keyup",e=>{a5e(e.key)})});function s5e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const l5e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),u5e=at({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("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"})})}),c5e=at({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("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"})}),d5e=at({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("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"})}),f5e=at({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("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 eo=(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.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(eo||{});const h5e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},Fa=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(xd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(mh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(x_,{className:"invokeai__switch-root",...s})]})})};function U$(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Rke(i.target.checked))})]})}const qA=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:b,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,O]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(qA)&&u!==Number(M)&&O(String(u))},[u,M]);const R=z=>{O(z),z.match(qA)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const V=Ze.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),g,m);O(String(V)),h(V)};return x(pi,{...k,children:ee(xd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...b,children:[t&&x(mh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(d_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(f_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[x(p_,{...P,className:"invokeai__number-input-stepper-button"}),x(h_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Iu=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(xd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(mh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(pi,{label:i,...o,children:x(OF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},p5e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],g5e=[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],m5e=[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],v5e=[{key:"2x",value:2},{key:"4x",value:4}],H_=0,W_=4294967295,y5e=["gfpgan","codeformer"],b5e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],S5e=dt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),x5e=dt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),V_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(S5e),{isGFPGANAvailable:i}=Le(x5e),o=l=>e(t5(l)),a=l=>e(EV(l)),s=l=>e(n5(l.target.value));return ee(en,{direction:"column",gap:2,children:[x(Iu,{label:"Type",validValues:y5e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function w5e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return x(Fa,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(NV(r.target.checked))})}var G$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},KA=ae.createContext&&ae.createContext(G$),nd=globalThis&&globalThis.__assign||function(){return nd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(pi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Va,{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 ws(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:b=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:O,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:V,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:ue,sliderNumberInputProps:W,sliderNumberInputFieldProps:Q,sliderNumberInputStepperProps:ne,sliderTooltipProps:J,sliderIAIIconButtonProps:K,...G}=e,[X,ce]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>W?.max?W.max:a,[a,W?.max]);C.exports.useEffect(()=>{String(i)!==X&&X!==""&&ce(String(i))},[i,X,ce]);const Me=Ie=>{const We=Ze.clamp(b?Math.floor(Number(Ie.target.value)):Number(Ie.target.value),o,me);ce(String(We)),l(We)},xe=Ie=>{ce(Ie),l(Number(Ie))},be=()=>{!T||T()};return ee(xd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(mh,{className:"invokeai__slider-component-label",...V,children:r}),ee(oB,{w:"100%",gap:2,children:[ee(S_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:xe,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:O,...G,children:[h&&ee(Wn,{children:[x(qC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...$,children:o}),x(qC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(UF,{className:"invokeai__slider_track",...j,children:x(GF,{className:"invokeai__slider_track-filled"})}),x(pi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...J,children:x(VF,{className:"invokeai__slider-thumb",...ue})})]}),v&&ee(d_,{min:o,max:me,step:s,value:X,onChange:xe,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:R,...W,children:[x(f_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...Q}),ee(EF,{...ne,children:[x(p_,{className:"invokeai__slider-number-stepper"}),x(h_,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(U_,{}),onClick:be,isDisabled:M,...K})]})]})}function Y$(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return x(ws,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(O7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(O7(.5))}})}const q$=()=>x(Bl,{flex:"1",textAlign:"left",children:"Other Options"}),A5e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(TV(r.target.checked))})})},M5e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(Fa,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(OV(r.target.checked))})})},K$=()=>ee(en,{gap:2,direction:"column",children:[x(M5e,{}),x(A5e,{})]}),G_=()=>x(Bl,{flex:"1",textAlign:"left",children:"Seed"});function I5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Fa,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Ike(r.target.checked))})}function O5e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(v2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:H_,max:W_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const X$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function R5e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return x(Wa,{size:"sm",isDisabled:t,onClick:()=>e(v2(X$(H_,W_))),children:x("p",{children:"Shuffle"})})}function N5e(){const e=qe(),t=Le(r=>r.options.threshold);return x(As,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(BV(r)),value:t,isInteger:!1})}function D5e(){const e=qe(),t=Le(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(MV(r)),value:t,isInteger:!1})}const j_=()=>ee(en,{gap:2,direction:"column",children:[x(I5e,{}),ee(en,{gap:2,children:[x(O5e,{}),x(R5e,{})]}),x(en,{gap:2,children:x(N5e,{})}),x(en,{gap:2,children:x(D5e,{})})]});function Z$(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(Fa,{isDisabled:!e,isChecked:t,onChange:i=>n(Oke(i.target.checked))})]})}const z5e=dt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),B5e=dt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),Y_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le(z5e),{isESRGANAvailable:r}=Le(B5e);return ee("div",{className:"upscale-options",children:[x(Iu,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(R7(Number(a.target.value))),validValues:v5e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(N7(a)),value:n,isInteger:!1})]})};function F5e(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return x(Fa,{isChecked:e,width:"auto",onChange:r=>t(Tke(r.target.checked))})}function q_(){return ee(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(F5e,{})]})}function $5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(xd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(mh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(F8,{...s,className:"input-entry",size:"sm",width:o})]})}function H5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(RV(i.target.value));return x($5e,{label:"Seed Weights",value:e,isInvalid:t&&!(z_(e)||e===""),isDisabled:!t,onChange:r})}function W5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(Dke(i)),isInteger:!1})}const K_=()=>ee(en,{gap:2,direction:"column",children:[x(W5e,{}),x(H5e,{})]});function V5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(kV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const _r=dt(e=>e.options,e=>xS[e.activeTab],{memoizeOptions:{equalityCheck:Ze.isEqual}}),U5e=dt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Q$=e=>e.options;function G5e(){const e=Le(i=>i.options.height),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(PV(Number(i.target.value))),validValues:m5e,styleClass:"main-option-block"})}const j5e=dt([e=>e.options,U5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function Y5e(){const e=qe(),{iterations:t,mayGenerateMultipleImages:n}=Le(j5e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(kke(i)),value:t,width:X_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function q5e(){const e=Le(r=>r.options.sampler),t=qe();return x(Iu,{label:"Sampler",value:e,onChange:r=>t(IV(r.target.value)),validValues:p5e,styleClass:"main-option-block"})}function K5e(){const e=qe(),t=Le(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(zV(r)),value:t,width:X_,styleClass:"main-option-block",textAlign:"center"})}function X5e(){const e=Le(i=>i.options.width),t=Le(_r),n=qe();return x(Iu,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(FV(Number(i.target.value))),validValues:g5e,styleClass:"main-option-block"})}const X_="auto";function Z_(){return x("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[x(Y5e,{}),x(K5e,{}),x(V5e,{})]}),ee("div",{className:"main-options-row",children:[x(X5e,{}),x(G5e,{}),x(q5e,{})]})]})})}const Z5e={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:"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:[]},J$=Bb({name:"system",initialState:Z5e,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="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},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="Processing canceled"},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="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",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}}}),{setShouldDisplayInProgressType:Q5e,setIsProcessing:yu,addLogEntry:Co,setShouldShowLogViewer:Pw,setIsConnected:XA,setSocketId:vTe,setShouldConfirmOnDelete:eH,setOpenAccordions:J5e,setSystemStatus:e4e,setCurrentStatus:Z3,setSystemConfig:t4e,setShouldDisplayGuides:n4e,processingCanceled:r4e,errorOccurred:ZA,errorSeen:tH,setModelList:QA,setIsCancelable:n0,modelChangeRequested:i4e,setSaveIntermediatesInterval:o4e,setEnableImageDebugging:a4e,generationRequested:s4e,addToast:fm,clearToastQueue:l4e,setProcessingIndeterminateTask:u4e}=J$.actions,c4e=J$.reducer;function d4e(e){return ht({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 f4e(e){return ht({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 nH(e){return ht({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 h4e(e){return ht({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 p4e(e){return ht({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)}const g4e=dt(e=>e.system,e=>e.shouldDisplayGuides),m4e=({children:e,feature:t})=>{const n=Le(g4e),{text:r}=h5e[t];return n?ee(g_,{trigger:"hover",children:[x(y_,{children:x(Bl,{children:e})}),ee(v_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(m_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},v4e=ke(({feature:e,icon:t=d4e},n)=>x(m4e,{feature:e,children:x(Bl,{ref:n,children:x(va,{marginBottom:"-.15rem",as:t})})}));function y4e(e){const{header:t,feature:n,options:r}=e;return ee(Vf,{className:"advanced-settings-item",children:[x("h2",{children:ee(Hf,{className:"advanced-settings-header",children:[t,x(v4e,{feature:n}),x(Wf,{})]})}),x(Uf,{className:"advanced-settings-panel",children:r})]})}const Q_=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return x(wb,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(J5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(y4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function b4e(e){return ht({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 S4e(e){return ht({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 x4e(e){return ht({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 rH(e){return ht({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 iH(e){return ht({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 w4e(e){return ht({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 C4e(e){return ht({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 _4e(e){return ht({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 k4e(e){return ht({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 E4e(e){return ht({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 J_(e){return ht({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 oH(e){return ht({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 nS(e){return ht({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 P4e(e){return ht({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 aH(e){return ht({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 T4e(e){return ht({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 L4e(e){return ht({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 A4e(e){return ht({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 M4e(e){return ht({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 I4e(e){return ht({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 O4e(e){return ht({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 R4e(e){return ht({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 N4e(e){return ht({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 D4e(e){return ht({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 z4e(e){return ht({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 B4e(e){return ht({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 F4e(e){return ht({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 $4e(e){return ht({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 H4e(e){return ht({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 W4e(e){return ht({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 V4e(e){return ht({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 sH(e){return ht({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 U4e(e){return ht({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 G4e(e){return ht({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 JA(e){return ht({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 lH(e){return ht({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 j4e(e){return ht({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 v1(e){return ht({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 Y4e(e){return ht({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 ek(e){return ht({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 q4e(e){return ht({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 tk(e){return ht({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 K4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],nk=e=>e.kind==="line"&&e.layer==="mask",X4e=e=>e.kind==="line"&&e.layer==="base",f4=e=>e.kind==="image"&&e.layer==="base",Z4e=e=>e.kind==="line",Dn=e=>e.canvas,Ou=e=>e.canvas.layerState.stagingArea.images.length>0,uH=e=>e.canvas.layerState.objects.find(f4),cH=dt([e=>e.options,e=>e.system,uH,_r],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(z_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Ze.isEqual,resultEqualityCheck:Ze.isEqual}}),o7=ti("socketio/generateImage"),Q4e=ti("socketio/runESRGAN"),J4e=ti("socketio/runFacetool"),ebe=ti("socketio/deleteImage"),a7=ti("socketio/requestImages"),eM=ti("socketio/requestNewImages"),tbe=ti("socketio/cancelProcessing"),nbe=ti("socketio/requestSystemConfig"),dH=ti("socketio/requestModelChange"),rbe=ti("socketio/saveStagingAreaImageToGallery"),ibe=ti("socketio/requestEmptyTempFolder"),ra=ke((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(pi,{label:r,...i,children:x(Wa,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function fH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(cH),o=Le(_r),a=()=>{r(o7(o))};return gt(["ctrl+enter","meta+enter"],()=>{i&&r(o7(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x($4e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ra,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const obe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function hH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(obe),a=()=>n(tbe());return gt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(p4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const abe=dt(e=>e.options,e=>e.shouldLoopback),sbe=()=>{const e=qe(),t=Le(abe);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(W4e,{}),onClick:()=>{e(Ake(!t))}})},rk=()=>{const e=Le(_r);return ee("div",{className:"process-buttons",children:[x(fH,{}),e==="img2img"&&x(sbe,{}),x(hH,{})]})},lbe=dt([e=>e.options,_r],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ik=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(lbe),{isReady:r}=Le(cH),i=C.exports.useRef(null),o=s=>{e(wS(s.target.value))};gt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(o7(n)))};return x("div",{className:"prompt-bar",children:x(xd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(JF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function pH(e){return ht({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 gH(e){return ht({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 ube(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function cbe(e,t){e.classList?e.classList.add(t):ube(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function tM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function dbe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=tM(e.className,t):e.setAttribute("class",tM(e.className&&e.className.baseVal||"",t))}const nM={disabled:!1},mH=ae.createContext(null);var vH=function(t){return t.scrollTop},hm="unmounted",Pf="exited",Tf="entering",$p="entered",s7="exiting",Ru=function(e){e_(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=Pf,o.appearStatus=Tf):l=$p:r.unmountOnExit||r.mountOnEnter?l=hm:l=Pf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===hm?{status:Pf}: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!==Tf&&a!==$p&&(o=Tf):(a===Tf||a===$p)&&(o=s7)}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===Tf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Cy.findDOMNode(this);a&&vH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pf&&this.setState({status:hm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Cy.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||nM.disabled){this.safeSetState({status:$p},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:Tf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:$p},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Cy.findDOMNode(this);if(!o||nM.disabled){this.safeSetState({status:Pf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:s7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Pf},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:Cy.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],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===hm)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=Z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(mH.Provider,{value:null,children:typeof a=="function"?a(i,s):ae.cloneElement(ae.Children.only(a),s)})},t}(ae.Component);Ru.contextType=mH;Ru.propTypes={};function Op(){}Ru.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Op,onEntering:Op,onEntered:Op,onExit:Op,onExiting:Op,onExited:Op};Ru.UNMOUNTED=hm;Ru.EXITED=Pf;Ru.ENTERING=Tf;Ru.ENTERED=$p;Ru.EXITING=s7;const fbe=Ru;var hbe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return cbe(t,r)})},Tw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return dbe(t,r)})},ok=function(e){e_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Gc=(e,t)=>Math.round(e/t)*t,Rp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Np=(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}},rM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),pbe=e=>({width:Gc(e.width,64),height:Gc(e.height,64)}),gbe=.999,mbe=.1,vbe=20,jg=.95,pm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},ybe={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},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:pm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,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"},bH=Bb({name:"canvas",initialState:ybe,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(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!nk(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:gl(Ze.clamp(n.width,64,512),64),height:gl(Ze.clamp(n.height,64,512),64)},o={x:Gc(n.width/2-i.width/2,64),y:Gc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...pm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Rp(r.width,r.height,n.width,n.height,jg),s=Np(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gl(Ze.clamp(i,64,n/e.stageScale),64),s=gl(Ze.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=pbe(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=rM(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(Ze.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(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(Z4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(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(e.layerState),e.layerState=pm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(f4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Rp(i.width,i.height,512,512,jg),g=Np(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=g,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Rp(t,n,o,a,.95),u=Np(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=rM(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(f4)){const i=Rp(r.width,r.height,512,512,jg),o=Np(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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=Rp(r,i,s,l,jg),h=Np(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Rp(r,i,512,512,jg),h=Np(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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(Ze.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...pm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!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:gl(Ze.clamp(o,64,512),64),height:gl(Ze.clamp(a,64,512),64)},l={x:Gc(o/2-s.width/2,64),y:Gc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...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}}}),{addImageToStagingArea:bbe,addLine:SH,addPointToCurrentLine:xH,clearMask:Sbe,commitStagingAreaImage:xbe,discardStagedImages:wbe,fitBoundingBoxToStage:yTe,nextStagingAreaImage:Cbe,prevStagingAreaImage:_be,redo:kbe,resetCanvas:wH,resetCanvasInteractionState:Ebe,resetCanvasView:Pbe,resizeAndScaleCanvas:CH,resizeCanvas:Tbe,setBoundingBoxCoordinates:Lw,setBoundingBoxDimensions:gm,setBoundingBoxPreviewFill:bTe,setBrushColor:Lbe,setBrushSize:Aw,setCanvasContainerDimensions:Abe,clearCanvasHistory:_H,setCursorPosition:kH,setDoesCanvasNeedScaling:Li,setInitialCanvasImage:ak,setInpaintReplace:iM,setIsDrawing:rS,setIsMaskEnabled:EH,setIsMouseOverBoundingBox:Yy,setIsMoveBoundingBoxKeyHeld:STe,setIsMoveStageKeyHeld:xTe,setIsMovingBoundingBox:oM,setIsMovingStage:h4,setIsTransformingBoundingBox:Mw,setLayer:PH,setMaskColor:Mbe,setMergedCanvas:Ibe,setShouldAutoSave:Obe,setShouldCropToBoundingBoxOnSave:Rbe,setShouldDarkenOutsideBoundingBox:Nbe,setShouldLockBoundingBox:wTe,setShouldPreserveMaskedArea:Dbe,setShouldShowBoundingBox:zbe,setShouldShowBrush:CTe,setShouldShowBrushPreview:_Te,setShouldShowCanvasDebugInfo:Bbe,setShouldShowCheckboardTransparency:kTe,setShouldShowGrid:Fbe,setShouldShowIntermediates:$be,setShouldShowStagingImage:Hbe,setShouldShowStagingOutline:aM,setShouldSnapToGrid:Wbe,setShouldUseInpaintReplace:Vbe,setStageCoordinates:TH,setStageDimensions:ETe,setStageScale:Ube,setTool:M0,toggleShouldLockBoundingBox:PTe,toggleTool:TTe,undo:Gbe}=bH.actions,jbe=bH.reducer,LH=""+new URL("logo.13003d72.png",import.meta.url).href,Ybe=dt(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:Ze.isEqual}}),sk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(Ybe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;gt("o",()=>{t(ad(!n)),i&&setTimeout(()=>t(Li(!0)),400)},[n,i]),gt("esc",()=>{t(ad(!1))},{enabled:()=>!i,preventDefault:!0},[i]),gt("shift+o",()=>{m(),t(Li(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Eke(a.current?a.current.scrollTop:0)),t(ad(!1)),t(Lke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Mke(!i)),t(Li(!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]),x(yH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:g,onMouseOver:i?void 0:g,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?g():!i&&h()},children:[x(pi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(pH,{}):x(gH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function qbe(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(w5e,{}),x(Q_,{accordionInfo:e})]})}const lk=C.exports.createContext(null),Kbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(lk),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[x(ek,{}),x(Qf,{size:"lg",children:"Click or Drag and Drop"})]})})},Xbe=dt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),l7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Av(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(Xbe),h=C.exports.useRef(null),g=b=>{b.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(ebe(e)),o()};gt("delete",()=>{s?i():m()},[e,s]);const v=b=>a(eH(!b.target.checked));return ee(Wn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),x(CF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Nv,{children:ee(en,{direction:"column",gap:5,children:[x(Po,{children:"Are you sure? You can't undo this action afterwards."}),x(xd,{children:ee(en,{alignItems:"center",children:[x(mh,{mb:0,children:"Don't ask me again"}),x(x_,{checked:!s,onChange:v})]})})]})}),ee(Ib,{children:[x(Wa,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x(Wa,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),rd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(g_,{...o,children:[x(y_,{children:t}),ee(v_,{className:`invokeai__popover-content ${r}`,children:[i&&x(m_,{className:"invokeai__popover-arrow"}),n]})]})},Zbe=dt([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:h,isLightBoxOpen:g}=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:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),AH=()=>{const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(Zbe),m=c2(),v=()=>{!u||(h&&e(gd(!1)),e(m2(u)),e(ko("img2img")))},b=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};gt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(wke(u.metadata)),u.metadata?.image.type==="img2img"?e(ko("img2img")):u.metadata?.image.type==="txt2img"&&e(ko("txt2img")))};gt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(v2(u.metadata.image.seed))};gt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(wS(u.metadata.image.prompt));gt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(Q4e(u))};gt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(J4e(u))};gt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(DV(!l)),O=()=>{!u||(h&&e(gd(!1)),e(ak(u)),e(Li(!0)),g!=="unifiedCanvas"&&e(ko("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return gt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ee("div",{className:"current-image-options",children:[x(ia,{isAttached:!0,children:x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(G4e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[x(ra,{size:"sm",onClick:v,leftIcon:x(JA,{}),children:"Send to Image to Image"}),x(ra,{size:"sm",onClick:O,leftIcon:x(JA,{}),children:"Send to Unified Canvas"}),x(ra,{size:"sm",onClick:b,leftIcon:x(nS,{}),children:"Copy Link to Image"}),x(ra,{leftIcon:x(aH,{}),size:"sm",children:x(Jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ee(ia,{isAttached:!0,children:[x(mt,{icon:x(H4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(mt,{icon:x(U4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(mt,{icon:x(k4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ee(ia,{isAttached:!0,children:[x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(I4e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(V_,{}),x(ra,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(rd,{trigger:"hover",triggerComponent:x(mt,{icon:x(L4e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[x(Y_,{}),x(ra,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(mt,{icon:x(oH,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(l7,{image:u,children:x(mt,{icon:x(v1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},Qbe={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},MH=Bb({name:"gallery",initialState:Qbe,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=Jr.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{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:r0,clearIntermediateImage:Iw,removeImage:IH,setCurrentImage:Jbe,addGalleryImages:eSe,setIntermediateImage:tSe,selectNextImage:uk,selectPrevImage:ck,setShouldPinGallery:nSe,setShouldShowGallery:id,setGalleryScrollPosition:rSe,setGalleryImageMinimumWidth:Yg,setGalleryImageObjectFit:iSe,setShouldHoldGalleryOpen:OH,setShouldAutoSwitchToNewImages:oSe,setCurrentCategory:qy,setGalleryWidth:aSe,setShouldUseSingleGalleryColumn:sSe}=MH.actions,lSe=MH.reducer;at({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"});at({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"});at({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"});at({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"});at({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});at({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"});at({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("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"})});at({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"});at({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"});at({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"});at({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"});at({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});at({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({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"});at({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("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"})})});at({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({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"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var RH=at({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});at({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});at({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"});at({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"});at({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({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"});at({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"});at({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"});at({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"});at({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});at({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"});at({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"});at({displayName:"SpinnerIcon",path:ee(Wn,{children:[x("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});at({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"});at({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("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"})});at({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"});at({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"});at({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"});at({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});at({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"});at({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"});at({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"});at({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});at({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"});at({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"});at({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});at({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({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"});function uSe(e){return ht({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 In=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(en,{gap:2,children:[n&&x(pi,{label:`Recall ${e}`,children:x(Va,{"aria-label":"Use this parameter",icon:x(uSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(pi,{label:`Copy ${e}`,children:x(Va,{"aria-label":`Copy ${e}`,icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(en,{direction:i?"column":"row",children:[ee(Po,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(RH,{mx:"2px"})]}):x(Po,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),cSe=(e,t)=>e.image.uuid===t.image.uuid,NH=C.exports.memo(({image:e,styleClass:t})=>{const n=qe();gt("esc",()=>{n(DV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:h,orig_path:g,perlin:m,postprocessing:v,prompt:b,sampler:w,scale:E,seamless:P,seed:k,steps:T,strength:M,threshold:O,type:R,variations:N,width:z}=r,V=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ee(en,{gap:1,direction:"column",width:"100%",children:[ee(en,{gap:2,children:[x(Po,{fontWeight:"semibold",children:"File:"}),ee(Jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(RH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Wn,{children:[R&&x(In,{label:"Generation type",value:R}),e.metadata?.model_weights&&x(In,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(R)&&x(In,{label:"Original image",value:g}),R==="gfpgan"&&M!==void 0&&x(In,{label:"Fix faces strength",value:M,onClick:()=>n(t5(M))}),R==="esrgan"&&E!==void 0&&x(In,{label:"Upscaling scale",value:E,onClick:()=>n(R7(E))}),R==="esrgan"&&M!==void 0&&x(In,{label:"Upscaling strength",value:M,onClick:()=>n(N7(M))}),b&&x(In,{label:"Prompt",labelPosition:"top",value:X3(b),onClick:()=>n(wS(b))}),k!==void 0&&x(In,{label:"Seed",value:k,onClick:()=>n(v2(k))}),O!==void 0&&x(In,{label:"Noise Threshold",value:O,onClick:()=>n(BV(O))}),m!==void 0&&x(In,{label:"Perlin Noise",value:m,onClick:()=>n(MV(m))}),w&&x(In,{label:"Sampler",value:w,onClick:()=>n(IV(w))}),T&&x(In,{label:"Steps",value:T,onClick:()=>n(zV(T))}),o!==void 0&&x(In,{label:"CFG scale",value:o,onClick:()=>n(kV(o))}),N&&N.length>0&&x(In,{label:"Seed-weight pairs",value:d4(N),onClick:()=>n(RV(d4(N)))}),P&&x(In,{label:"Seamless",value:P,onClick:()=>n(OV(P))}),l&&x(In,{label:"High Resolution Optimization",value:l,onClick:()=>n(TV(l))}),z&&x(In,{label:"Width",value:z,onClick:()=>n(FV(z))}),s&&x(In,{label:"Height",value:s,onClick:()=>n(PV(s))}),u&&x(In,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(m2(u))}),h&&x(In,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(AV(h))}),R==="img2img"&&M&&x(In,{label:"Image to image strength",value:M,onClick:()=>n(O7(M))}),a&&x(In,{label:"Image to image fit",value:a,onClick:()=>n(NV(a))}),v&&v.length>0&&ee(Wn,{children:[x(Qf,{size:"sm",children:"Postprocessing"}),v.map(($,j)=>{if($.type==="esrgan"){const{scale:ue,strength:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Upscale (ESRGAN)`}),x(In,{label:"Scale",value:ue,onClick:()=>n(R7(ue))}),x(In,{label:"Strength",value:W,onClick:()=>n(N7(W))})]},j)}else if($.type==="gfpgan"){const{strength:ue}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (GFPGAN)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("gfpgan"))}})]},j)}else if($.type==="codeformer"){const{strength:ue,fidelity:W}=$;return ee(en,{pl:"2rem",gap:1,direction:"column",children:[x(Po,{size:"md",children:`${j+1}: Face restoration (Codeformer)`}),x(In,{label:"Strength",value:ue,onClick:()=>{n(t5(ue)),n(n5("codeformer"))}}),W&&x(In,{label:"Fidelity",value:W,onClick:()=>{n(EV(W)),n(n5("codeformer"))}})]},j)}})]}),i&&x(In,{withCopy:!0,label:"Dream Prompt",value:i}),ee(en,{gap:2,direction:"column",children:[ee(en,{gap:2,children:[x(pi,{label:"Copy metadata JSON",children:x(Va,{"aria-label":"Copy metadata JSON",icon:x(nS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(V)})}),x(Po,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:V})})]})]}):x(eB,{width:"100%",pt:10,children:x(Po,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},cSe),DH=dt([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=>u.uuid===e?.currentImage?.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:Ze.isEqual}});function dSe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())},m=()=>{e(gd(!0))};return ee("div",{className:"current-image-preview",children:[i&&x(_b,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&x(NH,{image:i,styleClass:"current-image-metadata"})]})}const fSe=dt([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:Ze.isEqual}}),zH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(fSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Wn,{children:[x(AH,{}),x(dSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(h4e,{})})})},hSe=()=>{const e=C.exports.useContext(lk);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(ek,{}),onClick:e||void 0})};function pSe(){const e=Le(i=>i.options.initialImage),t=qe(),n=c2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(_V())};return ee(Wn,{children:[ee("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(hSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(_b,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const gSe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(pSe,{})}):x(Kbe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(zH,{})})]})};function mSe(e){return ht({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)}var vSe=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)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"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)}},_Se=["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"],dM="__resizable_base__",BH=function(e){SSe(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(dM):o.className+=dM,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||xSe},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","")),h=u/l[s]*100;return h+"%"}return Ow(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Ow(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Ow(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&&Dp("left",o),s=i&&Dp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.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"u"?10:o.width,g=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,w=u||0;if(s){var E=(m-b)*this.ratio+w,P=(v-b)*this.ratio+w,k=(h-w)/this.ratio+b,T=(g-w)/this.ratio+b,M=Math.max(h,E),O=Math.min(g,P),R=Math.max(m,k),N=Math.min(v,T);n=Xy(n,M,O),r=Xy(r,R,N)}else n=Xy(n,h,g),r=Xy(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&&wSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Zy(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 h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:dl(dl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Zy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Zy(n)?n.touches[0].clientX:n.clientX,h=Zy(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,b=g.width,w=g.height,E=this.getParentSize(),P=CSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,O=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=cM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=cM(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:O.maxWidth,height:O.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=uM(M,this.props.grid[0]),z=uM(T,this.props.grid[1]),V=this.props.snapGap||0;M=V===0||Math.abs(N-M)<=V?N:M,T=V===0||Math.abs(z-T)<=V?z:T}var $={width:M-v.width,height:T-v.height};if(b&&typeof b=="string"){if(b.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(b.endsWith("vw")){var ue=M/this.window.innerWidth*100;M=ue+"vw"}else if(b.endsWith("vh")){var W=M/this.window.innerHeight*100;M=W+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ue=T/this.window.innerWidth*100;T=ue+"vw"}else if(w.endsWith("vh")){var W=T/this.window.innerHeight*100;T=W+"vh"}}var Q={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height),Dl.exports.flushSync(function(){r.setState(Q)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},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:dl(dl({},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 h=Object.keys(i).map(function(g){return i[g]!==!1?x(bSe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return _Se.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=dl(dl(dl({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 ee(o,{...dl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("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);function Kn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function d2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...b}=g,w=m?.[e][l]||s,E=C.exports.useMemo(()=>b,Object.values(b));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=m?.[e][l]||s,b=C.exports.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,kSe(i,...t)]}function kSe(...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 g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ESe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function FH(...e){return t=>e.forEach(n=>ESe(n,t))}function ja(...e){return C.exports.useCallback(FH(...e),e)}const Fv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(TSe);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(u7,Ln({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(u7,Ln({},r,{ref:t}),n)});Fv.displayName="Slot";const u7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...LSe(r,n.props),ref:FH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});u7.displayName="SlotClone";const PSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function TSe(e){return C.exports.isValidElement(e)&&e.type===PSe}function LSe(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 ASe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Pu=ASe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Fv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Ln({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $H(e,t){e&&Dl.exports.flushSync(()=>e.dispatchEvent(t))}function HH(e){const t=e+"CollectionProvider",[n,r]=d2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:w}=v,E=ae.useRef(null),P=ae.useRef(new Map).current;return ae.createElement(i,{scope:b,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=ae.forwardRef((v,b)=>{const{scope:w,children:E}=v,P=o(s,w),k=ja(b,P.collectionRef);return ae.createElement(Fv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=ae.forwardRef((v,b)=>{const{scope:w,children:E,...P}=v,k=ae.useRef(null),T=ja(b,k),M=o(u,w);return ae.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),ae.createElement(Fv,{[h]:"",ref:T},E)});function m(v){const b=o(e+"CollectionConsumer",v);return ae.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((M,O)=>P.indexOf(M.ref.current)-P.indexOf(O.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const MSe=C.exports.createContext(void 0);function WH(e){const t=C.exports.useContext(MSe);return e||t||"ltr"}function Ol(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 ISe(e,t=globalThis?.document){const n=Ol(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const c7="dismissableLayer.update",OSe="dismissableLayer.pointerDownOutside",RSe="dismissableLayer.focusOutside";let fM;const NSe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DSe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(NSe),[g,m]=C.exports.useState(null),v=(n=g?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,b]=C.exports.useState({}),w=ja(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=k,R=zSe(z=>{const V=z.target,$=[...h.branches].some(j=>j.contains(V));!O||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=BSe(z=>{const V=z.target;[...h.branches].some(j=>j.contains(V))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ISe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(fM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),hM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=fM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),hM())},[g,h]),C.exports.useEffect(()=>{const z=()=>b({});return document.addEventListener(c7,z),()=>document.removeEventListener(c7,z)},[]),C.exports.createElement(Pu.div,Ln({},u,{ref:w,style:{pointerEvents:M?O?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function zSe(e,t=globalThis?.document){const n=Ol(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(){VH(OSe,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 BSe(e,t=globalThis?.document){const n=Ol(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&VH(RSe,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 hM(){const e=new CustomEvent(c7);document.dispatchEvent(e)}function VH(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?$H(i,o):i.dispatchEvent(o)}let Rw=0;function FSe(){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:pM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:pM()),Rw++,()=>{Rw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Rw--}},[])}function pM(){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 Nw="focusScope.autoFocusOnMount",Dw="focusScope.autoFocusOnUnmount",gM={bubbles:!1,cancelable:!0},$Se=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=Ol(i),h=Ol(o),g=C.exports.useRef(null),m=ja(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?g.current=k:Lf(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Lf(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){vM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Nw,gM);s.addEventListener(Nw,u),s.dispatchEvent(P),P.defaultPrevented||(HSe(jSe(UH(s)),{select:!0}),document.activeElement===w&&Lf(s))}return()=>{s.removeEventListener(Nw,u),setTimeout(()=>{const P=new CustomEvent(Dw,gM);s.addEventListener(Dw,h),s.dispatchEvent(P),P.defaultPrevented||Lf(w??document.body,{select:!0}),s.removeEventListener(Dw,h),vM.remove(v)},0)}}},[s,u,h,v]);const b=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=WSe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Lf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Lf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Pu.div,Ln({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function HSe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lf(r,{select:t}),document.activeElement!==n)return}function WSe(e){const t=UH(e),n=mM(t,e),r=mM(t.reverse(),e);return[n,r]}function UH(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 mM(e,t){for(const n of e)if(!VSe(n,{upTo:t}))return n}function VSe(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 USe(e){return e instanceof HTMLInputElement&&"select"in e}function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&USe(e)&&t&&e.select()}}const vM=GSe();function GSe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=yM(e,t),e.unshift(t)},remove(t){var n;e=yM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function yM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jSe(e){return e.filter(t=>t.tagName!=="A")}const J0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},YSe=Zw["useId".toString()]||(()=>{});let qSe=0;function KSe(e){const[t,n]=C.exports.useState(YSe());return J0(()=>{e||n(r=>r??String(qSe++))},[e]),e||(t?`radix-${t}`:"")}function y1(e){return e.split("-")[0]}function iS(e){return e.split("-")[1]}function b1(e){return["top","bottom"].includes(y1(e))?"x":"y"}function dk(e){return e==="y"?"height":"width"}function bM(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=b1(t),l=dk(s),u=r[l]/2-i[l]/2,h=y1(t),g=s==="x";let m;switch(h){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(iS(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const XSe=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:h}=bM(l,r,s),g=r,m={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=GH(r),h={x:i,y:o},g=b1(a),m=iS(a),v=dk(g),b=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const O=P/2-k/2,R=u[w],N=M-b[v]-u[E],z=M/2-b[v]/2+O,V=d7(R,z,N),ue=(m==="start"?u[w]:u[E])>0&&z!==V&&s.reference[v]<=s.floating[v]?zexe[t])}function txe(e,t,n){n===void 0&&(n=!1);const r=iS(e),i=b1(e),o=dk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=m4(a)),{main:a,cross:m4(a)}}const nxe={start:"end",end:"start"};function xM(e){return e.replace(/start|end/g,t=>nxe[t])}const rxe=["top","right","bottom","left"];function ixe(e){const t=m4(e);return[xM(e),t,xM(t)]}const oxe=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:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...b}=e,w=y1(r),P=g||(w===a||!v?[m4(a)]:ixe(a)),k=[a,...P],T=await g4(t,b),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:V,cross:$}=txe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[V],T[$])}if(O=[...O,{placement:r,overflows:M}],!M.every(V=>V<=0)){var R,N;const V=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=k[V];if($)return{data:{index:V,overflows:O},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const ue=(z=O.map(W=>[W,W.overflows.filter(Q=>Q>0).reduce((Q,ne)=>Q+ne,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:z[0].placement;ue&&(j=ue);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function wM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CM(e){return rxe.some(t=>e[t]>=0)}const axe=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 g4(r,{...n,elementContext:"reference"}),a=wM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:CM(a)}}}case"escaped":{const o=await g4(r,{...n,altBoundary:!0}),a=wM(o,i.floating);return{data:{escapedOffsets:a,escaped:CM(a)}}}default:return{}}}}};async function sxe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=y1(n),s=iS(n),l=b1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(v=s==="end"?b*-1:b),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const lxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await sxe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function jH(e){return e==="x"?"y":"x"}const uxe=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:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await g4(t,l),g=b1(y1(i)),m=jH(g);let v=u[g],b=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=d7(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=b+h[E],T=b-h[P];b=d7(k,b,T)}const w=s.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},cxe=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,h={x:n,y:r},g=b1(i),m=jH(g);let v=h[g],b=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const O=g==="y"?"height":"width",R=o.reference[g]-o.floating[O]+E.mainAxis,N=o.reference[g]+o.reference[O]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const O=g==="y"?"width":"height",R=["top","left"].includes(y1(i)),N=o.reference[m]-o.floating[O]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[O]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);bz&&(b=z)}return{[g]:v,[m]:b}}}};function YH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Nu(e){if(e==null)return window;if(!YH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function f2(e){return Nu(e).getComputedStyle(e)}function Tu(e){return YH(e)?"":e?(e.nodeName||"").toLowerCase():""}function qH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Rl(e){return e instanceof Nu(e).HTMLElement}function pd(e){return e instanceof Nu(e).Element}function dxe(e){return e instanceof Nu(e).Node}function fk(e){if(typeof ShadowRoot>"u")return!1;const t=Nu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oS(e){const{overflow:t,overflowX:n,overflowY:r}=f2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function fxe(e){return["table","td","th"].includes(Tu(e))}function KH(e){const t=/firefox/i.test(qH()),n=f2(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 XH(){return!/^((?!chrome|android).)*safari/i.test(qH())}const _M=Math.min,Ym=Math.max,v4=Math.round;function Lu(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&&Rl(e)&&(l=e.offsetWidth>0&&v4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&v4(s.height)/e.offsetHeight||1);const h=pd(e)?Nu(e):window,g=!XH()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,b=s.width/l,w=s.height/u;return{width:b,height:w,top:v,right:m+b,bottom:v+w,left:m,x:m,y:v}}function kd(e){return((dxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function aS(e){return pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ZH(e){return Lu(kd(e)).left+aS(e).scrollLeft}function hxe(e){const t=Lu(e);return v4(t.width)!==e.offsetWidth||v4(t.height)!==e.offsetHeight}function pxe(e,t,n){const r=Rl(t),i=kd(t),o=Lu(e,r&&hxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Tu(t)!=="body"||oS(i))&&(a=aS(t)),Rl(t)){const l=Lu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=ZH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function QH(e){return Tu(e)==="html"?e:e.assignedSlot||e.parentNode||(fk(e)?e.host:null)||kd(e)}function kM(e){return!Rl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function gxe(e){let t=QH(e);for(fk(t)&&(t=t.host);Rl(t)&&!["html","body"].includes(Tu(t));){if(KH(t))return t;t=t.parentNode}return null}function f7(e){const t=Nu(e);let n=kM(e);for(;n&&fxe(n)&&getComputedStyle(n).position==="static";)n=kM(n);return n&&(Tu(n)==="html"||Tu(n)==="body"&&getComputedStyle(n).position==="static"&&!KH(n))?t:n||gxe(e)||t}function EM(e){if(Rl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Lu(e);return{width:t.width,height:t.height}}function mxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rl(n),o=kd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Tu(n)!=="body"||oS(o))&&(a=aS(n)),Rl(n))){const l=Lu(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 vxe(e,t){const n=Nu(e),r=kd(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=XH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function yxe(e){var t;const n=kd(e),r=aS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ym(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ym(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+ZH(e);const l=-r.scrollTop;return f2(i||n).direction==="rtl"&&(s+=Ym(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function JH(e){const t=QH(e);return["html","body","#document"].includes(Tu(t))?e.ownerDocument.body:Rl(t)&&oS(t)?t:JH(t)}function y4(e,t){var n;t===void 0&&(t=[]);const r=JH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Nu(r),a=i?[o].concat(o.visualViewport||[],oS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(y4(a))}function bxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Sxe(e,t){const n=Lu(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 PM(e,t,n){return t==="viewport"?p4(vxe(e,n)):pd(t)?Sxe(t,n):p4(yxe(kd(e)))}function xxe(e){const t=y4(e),r=["absolute","fixed"].includes(f2(e).position)&&Rl(e)?f7(e):e;return pd(r)?t.filter(i=>pd(i)&&bxe(i,r)&&Tu(i)!=="body"):[]}function wxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?xxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=PM(t,h,i);return u.top=Ym(g.top,u.top),u.right=_M(g.right,u.right),u.bottom=_M(g.bottom,u.bottom),u.left=Ym(g.left,u.left),u},PM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Cxe={getClippingRect:wxe,convertOffsetParentRelativeRectToViewportRelativeRect:mxe,isElement:pd,getDimensions:EM,getOffsetParent:f7,getDocumentElement:kd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:pxe(t,f7(n),r),floating:{...EM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>f2(e).direction==="rtl"};function _xe(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,h=l||u?[...pd(e)?y4(e):[],...y4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),pd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Lu(e):null;s&&b();function b(){const w=Lu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const kxe=(e,t,n)=>XSe(e,t,{platform:Cxe,...n});var h7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function p7(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(!p7(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)&&!p7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Exe(e){const t=C.exports.useRef(e);return h7(()=>{t.current=e}),t}function Pxe(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=Exe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);p7(g?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||kxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{b.current&&Dl.exports.flushSync(()=>{h(T)})})},[g,n,r]);h7(()=>{b.current&&v()},[v]);const b=C.exports.useRef(!1);h7(()=>(b.current=!0,()=>{b.current=!1}),[]);const w=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,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Txe=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?SM({element:t.current,padding:n}).fn(i):{}:t?SM({element:t,padding:n}).fn(i):{}}}};function Lxe(e){const[t,n]=C.exports.useState(void 0);return J0(()=>{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 eW="Popper",[hk,tW]=d2(eW),[Axe,nW]=hk(eW),Mxe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Axe,{scope:t,anchor:r,onAnchorChange:i},n)},Ixe="PopperAnchor",Oxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=nW(Ixe,n),a=C.exports.useRef(null),s=ja(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Pu.div,Ln({},i,{ref:s}))}),b4="PopperContent",[Rxe,LTe]=hk(b4),[Nxe,Dxe]=hk(b4,{hasParent:!1,positionUpdateFns:new Set}),zxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...O}=e,R=nW(b4,h),[N,z]=C.exports.useState(null),V=ja(t,_t=>z(_t)),[$,j]=C.exports.useState(null),ue=Lxe($),W=(n=ue?.width)!==null&&n!==void 0?n:0,Q=(r=ue?.height)!==null&&r!==void 0?r:0,ne=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},K=Array.isArray(E)?E:[E],G=K.length>0,X={padding:J,boundary:K.filter(Fxe),altBoundary:G},{reference:ce,floating:me,strategy:Me,x:xe,y:be,placement:Ie,middlewareData:We,update:De}=Pxe({strategy:"fixed",placement:ne,whileElementsMounted:_xe,middleware:[lxe({mainAxis:m+Q,alignmentAxis:b}),M?uxe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?cxe():void 0,...X}):void 0,$?Txe({element:$,padding:w}):void 0,M?oxe({...X}):void 0,$xe({arrowWidth:W,arrowHeight:Q}),T?axe({strategy:"referenceHidden"}):void 0].filter(Bxe)});J0(()=>{ce(R.anchor)},[ce,R.anchor]);const Qe=xe!==null&&be!==null,[st,Ct]=rW(Ie),ft=(i=We.arrow)===null||i===void 0?void 0:i.x,ut=(o=We.arrow)===null||o===void 0?void 0:o.y,vt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ee,Je]=C.exports.useState();J0(()=>{N&&Je(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Lt,positionUpdateFns:it}=Dxe(b4,h),pt=!Lt;C.exports.useLayoutEffect(()=>{if(!pt)return it.add(De),()=>{it.delete(De)}},[pt,it,De]),C.exports.useLayoutEffect(()=>{pt&&Qe&&Array.from(it).reverse().forEach(_t=>requestAnimationFrame(_t))},[pt,Qe,it]);const an={"data-side":st,"data-align":Ct,...O,ref:V,style:{...O.style,animation:Qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:Qe?`translate3d(${Math.round(xe)}px, ${Math.round(be)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ee,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Rxe,{scope:h,placedSide:st,onArrowChange:j,arrowX:ft,arrowY:ut,shouldHideArrow:vt},pt?C.exports.createElement(Nxe,{scope:h,hasParent:!0,positionUpdateFns:it},C.exports.createElement(Pu.div,an)):C.exports.createElement(Pu.div,an)))});function Bxe(e){return e!==void 0}function Fxe(e){return e!==null}const $xe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=rW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return b==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):b==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):b==="right"?(T=`${-v}px`,M=g?E:`${k}px`):b==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${k}px`),{data:{x:T,y:M}}}});function rW(e){const[t,n="center"]=e.split("-");return[t,n]}const Hxe=Mxe,Wxe=Oxe,Vxe=zxe;function Uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const iW=e=>{const{present:t,children:n}=e,r=Gxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=ja(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};iW.displayName="Presence";function Gxe(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]=Uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Jy(r.current);o.current=s==="mounted"?u:"none"},[s]),J0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Jy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),J0(()=>{if(t){const u=g=>{const v=Jy(r.current).includes(g.animationName);g.target===t&&v&&Dl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=Jy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),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 Jy(e){return e?.animationName||"none"}function jxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Yxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ol(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Yxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ol(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const zw="rovingFocusGroup.onEntryFocus",qxe={bubbles:!1,cancelable:!0},pk="RovingFocusGroup",[g7,oW,Kxe]=HH(pk),[Xxe,aW]=d2(pk,[Kxe]),[Zxe,Qxe]=Xxe(pk),Jxe=C.exports.forwardRef((e,t)=>C.exports.createElement(g7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(g7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(ewe,Ln({},e,{ref:t}))))),ewe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=ja(t,g),v=WH(o),[b=null,w]=jxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Ol(u),T=oW(n),M=C.exports.useRef(!1),[O,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(zw,k),()=>N.removeEventListener(zw,k)},[k]),C.exports.createElement(Zxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Pu.div,Ln({tabIndex:E||O===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Kn(e.onMouseDown,()=>{M.current=!0}),onFocus:Kn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const V=new CustomEvent(zw,qxe);if(N.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=T().filter(ne=>ne.focusable),j=$.find(ne=>ne.active),ue=$.find(ne=>ne.id===b),Q=[j,ue,...$].filter(Boolean).map(ne=>ne.ref.current);sW(Q)}}M.current=!1}),onBlur:Kn(e.onBlur,()=>P(!1))})))}),twe="RovingFocusGroupItem",nwe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=KSe(),s=Qxe(twe,n),l=s.currentTabStopId===a,u=oW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(g7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Pu.span,Ln({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Kn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Kn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Kn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=owe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?awe(w,E+1):w.slice(E+1)}setTimeout(()=>sW(w))}})})))}),rwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function owe(e,t,n){const r=iwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rwe[r]}function sW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const swe=Jxe,lwe=nwe,uwe=["Enter"," "],cwe=["ArrowDown","PageUp","Home"],lW=["ArrowUp","PageDown","End"],dwe=[...cwe,...lW],sS="Menu",[m7,fwe,hwe]=HH(sS),[xh,uW]=d2(sS,[hwe,tW,aW]),gk=tW(),cW=aW(),[pwe,lS]=xh(sS),[gwe,mk]=xh(sS),mwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=gk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Ol(o),m=WH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.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(Hxe,s,C.exports.createElement(pwe,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(gwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},vwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=gk(n);return C.exports.createElement(Wxe,Ln({},i,r,{ref:t}))}),ywe="MenuPortal",[ATe,bwe]=xh(ywe,{forceMount:void 0}),od="MenuContent",[Swe,dW]=xh(od),xwe=C.exports.forwardRef((e,t)=>{const n=bwe(od,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=lS(od,e.__scopeMenu),a=mk(od,e.__scopeMenu);return C.exports.createElement(m7.Provider,{scope:e.__scopeMenu},C.exports.createElement(iW,{present:r||o.open},C.exports.createElement(m7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(wwe,Ln({},i,{ref:t})):C.exports.createElement(Cwe,Ln({},i,{ref:t})))))}),wwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu),r=C.exports.useRef(null),i=ja(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return RB(o)},[]),C.exports.createElement(fW,Ln({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Cwe=C.exports.forwardRef((e,t)=>{const n=lS(od,e.__scopeMenu);return C.exports.createElement(fW,Ln({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),fW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...b}=e,w=lS(od,n),E=mk(od,n),P=gk(n),k=cW(n),T=fwe(n),[M,O]=C.exports.useState(null),R=C.exports.useRef(null),N=ja(t,R,w.onContentChange),z=C.exports.useRef(0),V=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),ue=C.exports.useRef("right"),W=C.exports.useRef(0),Q=v?SF:C.exports.Fragment,ne=v?{as:Fv,allowPinchZoom:!0}:void 0,J=G=>{var X,ce;const me=V.current+G,Me=T().filter(Qe=>!Qe.disabled),xe=document.activeElement,be=(X=Me.find(Qe=>Qe.ref.current===xe))===null||X===void 0?void 0:X.textValue,Ie=Me.map(Qe=>Qe.textValue),We=Iwe(Ie,me,be),De=(ce=Me.find(Qe=>Qe.textValue===We))===null||ce===void 0?void 0:ce.ref.current;(function Qe(st){V.current=st,window.clearTimeout(z.current),st!==""&&(z.current=window.setTimeout(()=>Qe(""),1e3))})(me),De&&setTimeout(()=>De.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),FSe();const K=C.exports.useCallback(G=>{var X,ce;return ue.current===((X=j.current)===null||X===void 0?void 0:X.side)&&Rwe(G,(ce=j.current)===null||ce===void 0?void 0:ce.area)},[]);return C.exports.createElement(Swe,{scope:n,searchRef:V,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var X;K(G)||((X=R.current)===null||X===void 0||X.focus(),O(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(Q,ne,C.exports.createElement($Se,{asChild:!0,trapped:i,onMountAutoFocus:Kn(o,G=>{var X;G.preventDefault(),(X=R.current)===null||X===void 0||X.focus()}),onUnmountAutoFocus:a},C.exports.createElement(DSe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(swe,Ln({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(Vxe,Ln({role:"menu","aria-orientation":"vertical","data-state":Lwe(w.open),"data-radix-menu-content":"",dir:E.dir},P,b,{ref:N,style:{outline:"none",...b.style},onKeyDown:Kn(b.onKeyDown,G=>{const ce=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;ce&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&J(G.key));const xe=R.current;if(G.target!==xe||!dwe.includes(G.key))return;G.preventDefault();const Ie=T().filter(We=>!We.disabled).map(We=>We.ref.current);lW.includes(G.key)&&Ie.reverse(),Awe(Ie)}),onBlur:Kn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:Kn(e.onPointerMove,y7(G=>{const X=G.target,ce=W.current!==G.clientX;if(G.currentTarget.contains(X)&&ce){const me=G.clientX>W.current?"right":"left";ue.current=me,W.current=G.clientX}}))})))))))}),v7="MenuItem",TM="menu.itemSelect",_we=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=mk(v7,e.__scopeMenu),s=dW(v7,e.__scopeMenu),l=ja(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(TM,{bubbles:!0,cancelable:!0});g.addEventListener(TM,v=>r?.(v),{once:!0}),$H(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(kwe,Ln({},i,{ref:l,disabled:n,onClick:Kn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Kn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Kn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||uwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),kwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=dW(v7,n),s=cW(n),l=C.exports.useRef(null),u=ja(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const b=l.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(m7.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(lwe,Ln({asChild:!0},s,{focusable:!r}),C.exports.createElement(Pu.div,Ln({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Kn(e.onPointerMove,y7(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:Kn(e.onPointerLeave,y7(b=>a.onItemLeave(b))),onFocus:Kn(e.onFocus,()=>g(!0)),onBlur:Kn(e.onBlur,()=>g(!1))}))))}),Ewe="MenuRadioGroup";xh(Ewe,{value:void 0,onValueChange:()=>{}});const Pwe="MenuItemIndicator";xh(Pwe,{checked:!1});const Twe="MenuSub";xh(Twe);function Lwe(e){return e?"open":"closed"}function Awe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Iwe(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=Mwe(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 Owe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Rwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Owe(n,t)}function y7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Nwe=mwe,Dwe=vwe,zwe=xwe,Bwe=_we,hW="ContextMenu",[Fwe,MTe]=d2(hW,[uW]),uS=uW(),[$we,pW]=Fwe(hW),Hwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=uS(t),u=Ol(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement($we,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(Nwe,Ln({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},Wwe="ContextMenuTrigger",Vwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Wwe,n),o=uS(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),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(Dwe,Ln({},o,{virtualRef:s})),C.exports.createElement(Pu.span,Ln({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Kn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Kn(e.onPointerDown,e3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Kn(e.onPointerMove,e3(u)),onPointerCancel:Kn(e.onPointerCancel,e3(u)),onPointerUp:Kn(e.onPointerUp,e3(u))})))}),Uwe="ContextMenuContent",Gwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=pW(Uwe,n),o=uS(n),a=C.exports.useRef(!1);return C.exports.createElement(zwe,Ln({},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)"}}))}),jwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=uS(n);return C.exports.createElement(Bwe,Ln({},i,r,{ref:t}))});function e3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Ywe=Hwe,qwe=Vwe,Kwe=Gwe,Sf=jwe,Xwe=dt([e=>e.gallery,e=>e.options,Ou,_r],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:b,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}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:w}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),Zwe=dt([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:Ze.isEqual}}),Qwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Jwe=C.exports.memo(e=>{const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(Zwe),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[b,w]=C.exports.useState(!1),E=c2(),P=()=>w(!0),k=()=>w(!1),T=()=>{l.metadata&&t(wS(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(v2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(gd(!1)),t(m2(l)),n!=="img2img"&&t(ko("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(gd(!1)),t(ak(l)),t(CH()),n!=="unifiedCanvas"&&t(ko("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},N=()=>{v&&t(Cke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},z=async()=>{if(v?.image?.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(ko("img2img")),t(xke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ee(Ywe,{onOpenChange:$=>{t(OH($))},children:[x(qwe,{children:ee(Bl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:k,userSelect:"none",children:[x(_b,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(Jbe(l)),children:u&&x(va,{width:"50%",height:"50%",as:J_,className:"hoverable-image-check"})}),b&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(pi,{label:"Delete image",hasArrow:!0,children:x(l7,{image:l,children:x(Va,{"aria-label":"Delete image",icon:x(j4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(Kwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(Sf,{onClickCapture:T,disabled:l?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(Sf,{onClickCapture:M,disabled:l?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(Sf,{onClickCapture:N,disabled:!["txt2img","img2img"].includes(l?.metadata?.image?.type),children:"Use All Parameters"}),x(pi,{label:"Load initial image used for this generation",children:x(Sf,{onClickCapture:z,disabled:l?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(Sf,{onClickCapture:O,children:"Send to Image To Image"}),x(Sf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(l7,{image:l,children:x(Sf,{"data-warning":!0,children:"Delete Image"})})]})]})},Qwe),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Vz,{className:`invokeai__checkbox ${n}`,...r,children:t})},t3=320,LM=40,e6e={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}},AM=400;function gW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:b,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:k}=Le(Xwe),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:AM,galleryMaxWidth:AM}:e6e[u],[O,R]=C.exports.useState(b>=t3),[N,z]=C.exports.useState(!1),[V,$]=C.exports.useState(0),j=C.exports.useRef(null),ue=C.exports.useRef(null),W=C.exports.useRef(null);C.exports.useEffect(()=>{b>=t3&&R(!1)},[b]);const Q=()=>{e(nSe(!i)),e(Li(!0))},ne=()=>{o?K():J()},J=()=>{e(id(!0)),i&&e(Li(!0))},K=C.exports.useCallback(()=>{e(id(!1)),e(OH(!1)),e(rSe(ue.current?ue.current.scrollTop:0)),setTimeout(()=>e(Li(!0)),400)},[e]),G=()=>{e(a7(n))},X=xe=>{e(Yg(xe))},ce=()=>{g||(W.current=window.setTimeout(()=>K(),500))},me=()=>{W.current&&window.clearTimeout(W.current)};gt("g",()=>{ne()},[o,i]),gt("left",()=>{e(ck())},{enabled:!E},[E]),gt("right",()=>{e(uk())},{enabled:!E},[E]),gt("shift+g",()=>{Q()},[i]),gt("esc",()=>{e(id(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return gt("shift+up",()=>{if(s<256){const xe=Ze.clamp(s+Me,32,256);e(Yg(xe))}},[s]),gt("shift+down",()=>{if(s>32){const xe=Ze.clamp(s-Me,32,256);e(Yg(xe))}},[s]),C.exports.useEffect(()=>{!ue.current||(ue.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function xe(be){!i&&j.current&&!j.current.contains(be.target)&&K()}return document.addEventListener("mousedown",xe),()=>{document.removeEventListener("mousedown",xe)}},[K,i]),x(yH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:ce,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(BH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:b,height:i?"100%":"100vh"},onResizeStart:(xe,be,Ie)=>{$(Ie.clientHeight),Ie.style.height=`${Ie.clientHeight}px`,i&&(Ie.style.position="fixed",Ie.style.right="1rem",z(!0))},onResizeStop:(xe,be,Ie,We)=>{const De=i?Ze.clamp(Number(b)+We.width,T,Number(M)):Number(b)+We.width;e(aSe(De)),Ie.removeAttribute("data-resize-alert"),i&&(Ie.style.position="relative",Ie.style.removeProperty("right"),Ie.style.setProperty("height",i?"100%":"100vh"),z(!1),e(Li(!0)))},onResize:(xe,be,Ie,We)=>{const De=Ze.clamp(Number(b)+We.width,T,Number(i?M:.95*window.innerWidth));De>=t3&&!O?R(!0):DeDe-LM&&e(Yg(De-LM)),i&&(De>=M?Ie.setAttribute("data-resize-alert","true"):Ie.removeAttribute("data-resize-alert")),Ie.style.height=`${V}px`},children:[ee("div",{className:"image-gallery-header",children:[x(ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:O?ee(Wn,{children:[x(ra,{size:"sm","data-selected":n==="result",onClick:()=>e(qy("result")),children:"Generations"}),x(ra,{size:"sm","data-selected":n==="user",onClick:()=>e(qy("user")),children:"Uploads"})]}):ee(Wn,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(O4e,{}),onClick:()=>e(qy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(q4e,{}),onClick:()=>e(qy("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[x(rd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(tk,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[x(ws,{value:s,onChange:X,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Yg(64)),icon:x(U_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(iSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:xe=>e(oSe(xe.target.checked))})}),x("div",{children:x(Aa,{label:"Single Column Layout",isChecked:k,onChange:xe=>e(sSe(xe.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:Q,icon:i?x(pH,{}):x(gH,{})})]})]}),x("div",{className:"image-gallery-container",ref:ue,children:t.length||v?ee(Wn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(xe=>{const{uuid:be}=xe;return x(Jwe,{image:xe,isSelected:r===be},be)})}),x(Wa,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[x(nH,{}),x("p",{children:"No Images In Gallery"})]})})]}),N&&x("div",{style:{width:b+"px",height:"100%"}})]})})}const t6e=dt([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)}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),vk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Le(t6e),l=()=>{t(Nke(!o)),t(Li(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",children:[r,s&&x(pi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(mSe,{})})})]}),!a&&x(gW,{})]})})};function n6e(){return x(vk,{optionsPanel:x(qbe,{}),children:x(gSe,{})})}function r6e(){Le(t=>t.options.showAdvancedOptions);const e={seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})},face_restore:{header:x(U$,{}),feature:eo.FACE_CORRECTION,options:x(V_,{})},upscale:{header:x(Z$,{}),feature:eo.UPSCALE,options:x(Y_,{})},other:{header:x(q$,{}),feature:eo.OTHER,options:x(K$,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Q_,{accordionInfo:e})]})}const i6e=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(zH,{})})});function o6e(){return x(vk,{optionsPanel:x(r6e,{}),children:x(i6e,{})})}var b7=function(e,t){return b7=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])},b7(e,t)};function a6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");b7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ll=function(){return Ll=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Ed(e,t,n,r){var i=w6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):yW(e,r,n,function(v){var b=s+h*v,w=l+g*v,E=u+m*v;o(b,w,E)})}}function w6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function C6e(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,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var _6e=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,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},yk=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=C6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=_6e(a,l,u,s,h,g,Boolean(i));return m},e1=function(e,t){var n=yk(e,t);return e.bounds=n,n};function cS(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=S7(e,s-g,u+g,r),b=S7(t,l-m,h+m,r);return{x:v,y:b}}var S7=function(e,t,n,r){return r?en?Da(n,2):Da(e,2):Da(e,2)};function dS(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=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 g=l-t*h,m=u-n*h,v=cS(g,m,i,o,0,0,null);return v}function h2(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 IM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=fS(o,n);return!l},OM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},k6e=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}},E6e=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 P6e(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 h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,b=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=dS(e,P,k,i,e.bounds,s||l),M=T.x,O=T.y;return{scale:i,positionX:w?M:n,positionY:E?O:r}}}function T6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,b=!m||!v;if(!(!a||b||!s)){var w=cS(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var L6e=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 h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},S4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},A6e=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},M6e=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 I6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function RM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:S7(e,o,a,i)}function O6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function R6e(e,t){var n=A6e(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=O6e(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,b=l-i,w=h*h+g*g,E=Math.sqrt(w)/b;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function N6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=M6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,b=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=b.sizeX,O=b.sizeY,R=b.velocityAlignmentTime,N=R,z=I6e(e,l),V=Math.max(z,N),$=S4(e,M),j=S4(e,O),ue=$*i.offsetWidth/100,W=j*i.offsetHeight/100,Q=u+ue,ne=h-ue,J=g+W,K=m-W,G=e.transformState,X=new Date().getTime();yW(e,T,V,function(ce){var me=e.transformState,Me=me.scale,xe=me.positionX,be=me.positionY,Ie=new Date().getTime()-X,We=Ie/N,De=mW[b.animationType],Qe=1-De(Math.min(1,We)),st=1-ce,Ct=xe+a*st,ft=be+s*st,ut=RM(Ct,G.positionX,xe,k,v,h,u,ne,Q,Qe),vt=RM(ft,G.positionY,be,P,v,m,g,K,J,Qe);(xe!==Ct||be!==ft)&&e.setTransformState(Me,ut,vt)})}}function NM(e,t){var n=e.transformState.scale;bl(e),e1(e,n),t.touches?E6e(e,t):k6e(e,t)}function DM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=L6e(e,t,n),u=l.x,h=l.y,g=S4(e,a),m=S4(e,s);R6e(e,{x:u,y:h}),T6e(e,u,h,g,m)}}function D6e(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?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,g=s.1&&g;m?N6e(e):bW(e)}}function bW(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,h=o||t=a;if((r>=1||s)&&bW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,b=n||i.offsetHeight/2,w=bk(e,a,v,b);w&&Ed(e,w,h,g)}}function bk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=h2(Da(t,2),o,a,0,!1),u=e1(e,l),h=dS(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var i0={previousScale:1,scale:1,positionX:0,positionY:0},z6e=Ll(Ll({},i0),{setComponents:function(){},contextInstance:null}),qg={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}},xW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:i0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:i0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:i0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:i0.positionY}},zM=function(e){var t=Ll({},qg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof qg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(qg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ll(Ll({},qg[n]),e[n]):s?t[n]=MM(MM([],qg[n]),e[n]):t[n]=e[n]}}),t},wW=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 h=r*Math.exp(t*n),g=h2(Da(h,3),s,a,u,!1);return g};function CW(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 h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,b=wW(e,t,n),w=bk(e,b,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,w,r,i)}function _W(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=xW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=yk(e,a.scale),m=cS(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Ed(e,v,t,n)}}function B6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return i0;var l=r.getBoundingClientRect(),u=F6e(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,b=r.offsetWidth/m,w=r.offsetHeight/v,E=h2(n||Math.min(b,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+k,O=yk(e,E),R=cS(T,M,O,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function F6e(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 $6e(e){if(e){if(e?.offsetWidth===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 H6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,1,t,n,r)}},W6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),CW(e,-1,t,n,r)}},V6e=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,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Ed(e,v,i,o)}}},U6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),_W(e,t,n)}},G6e=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=kW(t||i.scale,o,a);Ed(e,s,n,r)}}},j6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&$6e(a)&&a&&o.contains(a)){var s=B6e(e,a,n);Ed(e,s,r,i)}}},$r=function(e){return{instance:e,state:e.transformState,zoomIn:H6e(e),zoomOut:W6e(e),setTransform:V6e(e),resetTransform:U6e(e),centerView:G6e(e),zoomToElement:j6e(e)}},Bw=!1;function Fw(){try{var e={get passive(){return Bw=!0,!1}};return e}catch{return Bw=!1,Bw}}var fS=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},BM=function(e){e&&clearTimeout(e)},Y6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},kW=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}},q6e=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,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=fS(u,a);return!g};function K6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=s6e(t,n);return r}function EW(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 X6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.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,w=h2(Da(v,3),u,l,g,b);return w},Z6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},Q6e=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=fS(a,i);return!l},J6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},eCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Da(i[0].clientX-r.left,5),a=Da(i[0].clientY-r.top,5),s=Da(i[1].clientX-r.left,5),l=Da(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},PW=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))},tCe=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 h=t/r,g=h*n;return h2(Da(g,2),a,o,l,!u)},nCe=160,rCe=100,iCe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),di($r(e),t,r),di($r(e),t,i))},oCe=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,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,b=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=K6e(t,null),P=X6e(e,E,w,!t.ctrlKey);if(l!==P){var k=e1(e,P),T=EW(t,o,l),M=b||v===0||h,O=u&&M,R=dS(e,T.x,T.y,P,k,O),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),di($r(e),t,r),di($r(e),t,i)}},aCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;BM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(SW(e,t.x,t.y),e.wheelAnimationTimer=null)},rCe);var o=Z6e(e,t);o&&(BM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,di($r(e),t,r),di($r(e),t,i))},nCe))},sCe=function(e,t){var n=PW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},lCe=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,h=l.size;if(!(r===null||!n)){var g=eCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=PW(t),v=tCe(e,m);if(v!==i){var b=e1(e,v),w=u||h===0||s,E=a&&w,P=dS(e,g.x,g.y,v,b,E),k=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,k,T)}}}},uCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,SW(e,t?.x,t?.y)};function cCe(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 _W(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=wW(e,h,o),m=EW(t,u,l),v=bk(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ed(e,v,a,s)}}var dCe=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?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var g=fS(l,s);return!(g||!h)},TW=ae.createContext(z6e),fCe=function(e){a6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=xW(n.props),n.setup=zM(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=Fw();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=q6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(iCe(n,r),oCe(n,r),aCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),NM(n,r),di($r(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=OM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),DM(n,r.clientX,r.clientY),di($r(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(D6e(n),di($r(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=Q6e(n,r);!l||(sCe(n,r),bl(n),di($r(n),r,a),di($r(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=J6e(n);!l||(r.preventDefault(),r.stopPropagation(),lCe(n,r),di($r(n),r,a),di($r(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(uCe(n),di($r(n),r,o),di($r(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=IM(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,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),NM(n,r),di($r(n),r,o)),h&&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=OM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];DM(n,s.clientX,s.clientY),di($r(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=dCe(n,r);!o||cCe(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,e1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,di($r(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=kW(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=Y6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef($r(n))},n}return t.prototype.componentDidMount=function(){var n=Fw();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=Fw();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),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(e1(this,this.transformState.scale),this.setup=zM(this.props))},t.prototype.render=function(){var n=$r(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(TW.Provider,{value:Ll(Ll({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),hCe=ae.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]),x(fCe,{...Ll({},e,{setRef:i})})});function pCe(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 gCe=`.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; +} +`,FM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};pCe(gCe);var mCe=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(TW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+FM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+FM.content+" "+o,style:s,children:t})})};function vCe({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)},h=()=>{s(!a)};return x(hCe,{centerOnInit:!0,minScale:.1,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:b})=>ee(Wn,{children:[ee("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(T5e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),x(mt,{icon:x(L5e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(E5e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(P5e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(f4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(U_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(mCe,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>b()})})]})})}function yCe(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(DH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(ck())},g=()=>{e(uk())};return gt("Esc",()=>{t&&e(gd(!1))},[t]),ee("div",{className:"lightbox-container",children:[x(mt,{icon:x(k5e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(gd(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[x(AH,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Va,{"aria-label":"Previous image",icon:x(rH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Va,{"aria-label":"Next image",icon:x(iH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Wn,{children:[x(vCe,{image:n.url,styleClass:"lightbox-image"}),r&&x(NH,{image:n})]})]}),x(gW,{})]})]})}const bCe=dt(Dn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),SCe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(bCe),n=a=>{e(gm({...t,width:Math.floor(a)}))},r=a=>{e(gm({...t,height:Math.floor(a)}))},i=()=>{e(gm({...t,width:Math.floor(512)}))},o=()=>{e(gm({...t,height:Math.floor(512)}))};return ee(en,{direction:"column",gap:"1rem",children:[x(ws,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(ws,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},xCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Bounding Box"}),p2=e=>e.system,wCe=e=>e.system.toastQueue,CCe=dt(Dn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function _Ce(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(CCe),n=qe();return ee(en,{alignItems:"center",columnGap:"1rem",children:[x(ws,{label:"Inpaint Replace",value:e,onChange:r=>{n(iM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(iM(1)),isResetDisabled:!t}),x(Fa,{isChecked:t,onChange:r=>n(Vbe(r.target.checked))})]})}const kCe=dt([Q$,p2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),ECe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Le(kCe);return ee(en,{direction:"column",gap:"1rem",children:[x(_Ce,{}),x(ws,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(wI(u))},handleReset:()=>e(wI(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(xI(u))},handleReset:()=>{e(xI(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(_I(u))},handleReset:()=>{e(_I(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(ws,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(CI(u))},handleReset:()=>{e(CI(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(Fa,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(Pke(u.target.checked))}}),x(Iu,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(LV(u.target.value))}),x(ws,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(kI(u))},handleReset:()=>{e(kI(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},PCe=()=>x(Bl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function TCe(){const e={boundingBox:{header:x(xCe,{}),feature:eo.BOUNDING_BOX,options:x(SCe,{})},outpainting:{header:x(PCe,{}),feature:eo.OUTPAINTING,options:x(ECe,{})},seed:{header:x(G_,{}),feature:eo.SEED,options:x(j_,{})},variations:{header:x(q_,{}),feature:eo.VARIATIONS,options:x(K_,{})}};return ee(sk,{children:[x(ik,{}),x(rk,{}),x(Z_,{}),x(Y$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q_,{accordionInfo:e})]})}const LCe=dt(Dn,uH,_r,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),ACe=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(LCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Abe({width:a,height:s})),e(Tbe()),e(Li(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(r2,{thickness:"2px",speed:"1s",size:"xl"})})};var MCe=Math.PI/180;function ICe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const I0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},rt={_global:I0,version:"8.3.14",isBrowser:ICe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return rt.angleDeg?e*MCe: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 rt.DD.isDragging},isDragReady(){return!!rt.DD.node},releaseCanvasOnDestroy:!0,document:I0.document,_injectGlobal(e){I0.Konva=e}},gr=e=>{rt[e.prototype.getClassName()]=e};rt._injectGlobal(rt);class oa{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 oa(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 h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var OCe="[object Array]",RCe="[object Number]",NCe="[object String]",DCe="[object Boolean]",zCe=Math.PI/180,BCe=180/Math.PI,$w="#",FCe="",$Ce="0",HCe="Konva warning: ",$M="Konva error: ",WCe="rgb(",Hw={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]},VCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,n3=[];const UCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_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)===OCe},_isNumber(e){return Object.prototype.toString.call(e)===RCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===NCe},_isBoolean(e){return Object.prototype.toString.call(e)===DCe},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){n3.push(e),n3.length===1&&UCe(function(){const t=n3;n3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}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=de.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($w,FCe);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=$Ce+e;return $w+e},getRGB(e){var t;return e in Hw?(t=Hw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===$w?this._hexToRgb(e.substring(1)):e.substr(0,4)===WCe?(t=VCe.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",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Hw[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,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-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,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.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=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Pd(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function LW(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(rt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function AW(e){if(rt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function Sk(){if(rt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function S1(){if(rt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function MW(){if(rt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function GCe(){if(rt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ms(){if(rt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Pd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function jCe(e){if(rt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Pd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Kg="get",Xg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Kg+de._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=Xg+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Xg+de._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=de._capitalize,s=Kg+a(t),l=Xg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Xg+n,i=Kg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Kg+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Kg+de._capitalize(n),a=Xg+de._capitalize(n);function s(){i.apply(this,arguments),de.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 YCe(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=qCe+u.join(HM)+KCe)):(o+=s.property,t||(o+=e7e+s.val)),o+=QCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=n7e&&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 h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.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=WM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=YCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._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{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._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")&&(dn.justDragged=!0,rt._mouseListenClick=!1,rt._touchListenClick=!1,rt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof rt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};rt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var Q3="absoluteOpacity",i3="allEventListeners",cu="absoluteTransform",VM="absoluteScale",xf="canvas",a7e="Change",s7e="children",l7e="konva",x7="listening",UM="mouseenter",GM="mouseleave",jM="set",YM="Shape",J3=" ",qM="stage",Mc="transform",u7e="Stage",w7="visible",c7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(J3);let d7e=1;class $e{constructor(t){this._id=d7e++,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===Mc||t===cu)&&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===Mc||t===cu,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(J3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(xf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===cu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(xf)){const{scene:t,filter:n,hit:r}=this._cache.get(xf);de.releaseCanvas(t,n,r),this._cache.delete(xf)}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,h=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!i||!o){de.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 O0({pixelRatio:a,width:i,height:o}),v=new O0({pixelRatio:a,width:0,height:0}),b=new xk({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=b.getContext();return b.isCache=!0,m.isCache=!0,this._cache.delete(xf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Q3),this._clearSelfAndDescendantCache(VM),this.drawScene(m,this),this.drawHit(b,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(xf,{scene:m,filter:v,hit:b,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(xf)}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 h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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 h=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()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==s7e&&(r=jM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(x7,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(w7,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;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!rt.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;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==u7e&&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(Mc),this._clearSelfAndDescendantCache(cu)),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 oa,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(Mc);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(Mc),this._clearSelfAndDescendantCache(cu),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;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.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 de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.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(Q3,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=de.isObject(i)&&!de._isPlainObject(i)&&!de._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(),de._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{try{const i=t?.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),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():rt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._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=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._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 de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),rt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=rt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}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;n0?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=$e.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=$e.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 h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.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=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&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},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,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 g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",zp=e=>{const t=bm(e);if(t==="pointer")return rt.pointerEventsEnabled&&Vw.pointer;if(t==="touch")return Vw.touch;if(t==="mouse")return Vw.mouse};function XM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const y7e="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);",e5=[];class gS extends ca{constructor(t){super(XM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e5.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{XM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.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===h7e){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-1&&e5.splice(n,1),de.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}:(de.warn(y7e),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 O0({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+KM,this.content.style.height=n+KM),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;rm7e&&de.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(),rt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}getLayers(){return this.children}_bindContentEvents(){!rt.isBrowser||v7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=zp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=zp(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=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||rt.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=zp(t.type),r=bm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,rt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;rt.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=zp(t.type),r=bm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||rt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Ww(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=zp(t.type),r=bm(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=Ww(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;rt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(rt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){rt["_"+r+"InDblClickWindow"]=!1},rt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),rt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,rt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rt["_"+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(C7,{evt:t}):this._fire(C7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(_7,{evt:t}):this._fire(_7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Ww(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(o0,wk(t)),qm(t.pointerId)}_lostpointercapture(t){qm(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:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.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 O0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new xk({pixelRatio:1,width:this.width(),height:this.height()}),!!rt.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 de.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}}gS.prototype.nodeType=f7e;gr(gS);q.addGetterSetter(gS,"container");var GW="hasShadow",jW="shadowRGBA",YW="patternImage",qW="linearGradient",KW="radialGradient";let u3;function Uw(){return u3||(u3=de.createCanvasElement().getContext("2d"),u3)}const Km={};function b7e(e){e.fill()}function S7e(e){e.stroke()}function x7e(e){e.fill()}function w7e(e){e.stroke()}function C7e(){this._clearCache(GW)}function _7e(){this._clearCache(jW)}function k7e(){this._clearCache(YW)}function E7e(){this._clearCache(qW)}function P7e(){this._clearCache(KW)}class Ae extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in Km)););this.colorKey=n,Km[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.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(GW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(YW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Uw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new oa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(rt.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(qW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Uw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.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 $e.prototype.destroy.call(this),delete Km[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){de.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(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),b=u&&this.shadowBlur()||0,w=m+b*2,E=v+b*2,P={width:w,height:E,x:-(a/2+b)+Math.min(h,0)+i.x,y:-(a/2+b)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,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,h,g,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(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[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||de.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 h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[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,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(b){de.error("Unable to draw hit graph from cached scene canvas. "+b.message)}return this}hasPointerCapture(t){return OW(t,this)}setPointerCapture(t){RW(t,this)}releaseCapture(t){qm(t)}}Ae.prototype._fillFunc=b7e;Ae.prototype._strokeFunc=S7e;Ae.prototype._fillFuncHit=x7e;Ae.prototype._strokeFuncHit=w7e;Ae.prototype._centroid=!1;Ae.prototype.nodeType="Shape";gr(Ae);Ae.prototype.eventListeners={};Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",C7e);Ae.prototype.on.call(Ae.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",_7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",E7e);Ae.prototype.on.call(Ae.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",P7e);q.addGetterSetter(Ae,"stroke",void 0,MW());q.addGetterSetter(Ae,"strokeWidth",2,Fe());q.addGetterSetter(Ae,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Ae,"hitStrokeWidth","auto",Sk());q.addGetterSetter(Ae,"strokeHitEnabled",!0,Ms());q.addGetterSetter(Ae,"perfectDrawEnabled",!0,Ms());q.addGetterSetter(Ae,"shadowForStrokeEnabled",!0,Ms());q.addGetterSetter(Ae,"lineJoin");q.addGetterSetter(Ae,"lineCap");q.addGetterSetter(Ae,"sceneFunc");q.addGetterSetter(Ae,"hitFunc");q.addGetterSetter(Ae,"dash");q.addGetterSetter(Ae,"dashOffset",0,Fe());q.addGetterSetter(Ae,"shadowColor",void 0,S1());q.addGetterSetter(Ae,"shadowBlur",0,Fe());q.addGetterSetter(Ae,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Ae,"shadowOffset",["x","y"]);q.addGetterSetter(Ae,"shadowOffsetX",0,Fe());q.addGetterSetter(Ae,"shadowOffsetY",0,Fe());q.addGetterSetter(Ae,"fillPatternImage");q.addGetterSetter(Ae,"fill",void 0,MW());q.addGetterSetter(Ae,"fillPatternX",0,Fe());q.addGetterSetter(Ae,"fillPatternY",0,Fe());q.addGetterSetter(Ae,"fillLinearGradientColorStops");q.addGetterSetter(Ae,"strokeLinearGradientColorStops");q.addGetterSetter(Ae,"fillRadialGradientStartRadius",0);q.addGetterSetter(Ae,"fillRadialGradientEndRadius",0);q.addGetterSetter(Ae,"fillRadialGradientColorStops");q.addGetterSetter(Ae,"fillPatternRepeat","repeat");q.addGetterSetter(Ae,"fillEnabled",!0);q.addGetterSetter(Ae,"strokeEnabled",!0);q.addGetterSetter(Ae,"shadowEnabled",!0);q.addGetterSetter(Ae,"dashEnabled",!0);q.addGetterSetter(Ae,"strokeScaleEnabled",!0);q.addGetterSetter(Ae,"fillPriority","color");q.addComponentsGetterSetter(Ae,"fillPatternOffset",["x","y"]);q.addGetterSetter(Ae,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Ae,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Ae,"fillPatternScale",["x","y"]);q.addGetterSetter(Ae,"fillPatternScaleX",1,Fe());q.addGetterSetter(Ae,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Ae,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientStartPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Ae,"fillLinearGradientStartPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Ae,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillLinearGradientEndPointX",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Ae,"fillLinearGradientEndPointY",0);q.addGetterSetter(Ae,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientStartPointX",0);q.addGetterSetter(Ae,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Ae,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Ae,"fillRadialGradientEndPointX",0);q.addGetterSetter(Ae,"fillRadialGradientEndPointY",0);q.addGetterSetter(Ae,"fillPatternRotation",0);q.backCompat(Ae,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var T7e="#",L7e="beforeDraw",A7e="draw",XW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],M7e=XW.length;class wh extends ca{constructor(t){super(t),this.canvas=new O0,this.hitCanvas=new xk({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{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;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(L7e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ca.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(),ca.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.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 de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}wh.prototype.nodeType="Layer";gr(wh);q.addGetterSetter(wh,"imageSmoothingEnabled",!0);q.addGetterSetter(wh,"clearBeforeDraw",!0);q.addGetterSetter(wh,"hitGraphEnabled",!0,Ms());class Ck extends wh{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ck.prototype.nodeType="FastLayer";gr(Ck);class t1 extends ca{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}t1.prototype.nodeType="Group";gr(t1);var Gw=function(){return I0.performance&&I0.performance.now?function(){return I0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Gw(),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;ithis.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=ZM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=QM,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===ZM?this.setTime(t):this.state===QM&&this.setTime(this.duration-t)}pause(){this.state=O7e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Xm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=R7e++;var u=r.getLayer()||(r instanceof rt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new N7e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)I7e[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,h,g,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.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=Or.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=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Xm={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||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Du.prototype._centroid=!0;Du.prototype.className="Arc";Du.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Du);q.addGetterSetter(Du,"innerRadius",0,Fe());q.addGetterSetter(Du,"outerRadius",0,Fe());q.addGetterSetter(Du,"angle",0,Fe());q.addGetterSetter(Du,"clockwise",!1,Ms());function k7(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),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),b=r+h*(o-t);return[g,m,v,b]}function eI(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-b),t.scale(1/E,1/P),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 h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;b-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],b,0);t.push(w.x,w.y)}else for(let b=h+v;bthis.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 Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.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 Rn.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],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,g,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));i0&&!isNaN(b[0]);){var k=null,T=[],M=l,O=u,R,N,z,V,$,j,ue,W,Q,ne;switch(v){case"l":l+=b.shift(),u+=b.shift(),k="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(),K=b.shift();if(l+=J,u+=K,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=b.shift(),u=b.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=b.shift(),k="L",T.push(l,u);break;case"H":l=b.shift(),k="L",T.push(l,u);break;case"v":u+=b.shift(),k="L",T.push(l,u);break;case"V":u=b.shift(),k="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(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,b.shift(),b.shift()),l=b.shift(),u=b.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+b.shift(),u+b.shift()),l+=b.shift(),u+=b.shift(),k="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(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=b.shift(),u=b.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=b.shift(),u+=b.shift(),k="Q",T.push(N,z,l,u);break;case"A":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l=b.shift(),u=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break;case"a":V=b.shift(),$=b.shift(),j=b.shift(),ue=b.shift(),W=b.shift(),Q=l,ne=u,l+=b.shift(),u+=b.shift(),k="A",T=this.convertEndpointToCenterParameterization(Q,ne,l,u,ue,W,V,$,j);break}a.push({command:k||v,points:T,start:{x:M,y:O},pathLength:this.calcLength(M,O,k||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=Rn;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 h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)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=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var b=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(b*=-1),isNaN(b)&&(b=0);var w=b*s*m/l,E=b*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},O=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=O([1,0],[(g-w)/s,(m-E)/l]),N=[(g-w)/s,(m-E)/l],z=[(-1*g-w)/s,(-1*m-E)/l],V=O(N,z);return M(N,z)<=-1&&(V=Math.PI),M(N,z)>=1&&(V=0),a===0&&V>0&&(V=V-2*Math.PI),a===1&&V<0&&(V=V+2*Math.PI),[P,k,s,l,R,V,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];gr(Rn);q.addGetterSetter(Rn,"data");class Ch extends zu{_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=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),b=Rn.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 h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/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,g/2),t.lineTo(-a,-g/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}}}Ch.prototype.className="Arrow";gr(Ch);q.addGetterSetter(Ch,"pointerLength",10,Fe());q.addGetterSetter(Ch,"pointerWidth",10,Fe());q.addGetterSetter(Ch,"pointerAtBeginning",!1);q.addGetterSetter(Ch,"pointerAtEnding",!0);class x1 extends Ae{_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)}}x1.prototype._centroid=!0;x1.prototype.className="Circle";x1.prototype._attrsAffectingSize=["radius"];gr(x1);q.addGetterSetter(x1,"radius",0,Fe());class Td extends Ae{_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)}}Td.prototype.className="Ellipse";Td.prototype._centroid=!0;Td.prototype._attrsAffectingSize=["radiusX","radiusY"];gr(Td);q.addComponentsGetterSetter(Td,"radius",["x","y"]);q.addGetterSetter(Td,"radiusX",0,Fe());q.addGetterSetter(Td,"radiusY",0,Fe());class Is extends Ae{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=de.createImageElement();i.onload=function(){var o=new Is({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Is.prototype.className="Image";gr(Is);q.addGetterSetter(Is,"image");q.addComponentsGetterSetter(Is,"crop",["x","y","width","height"]);q.addGetterSetter(Is,"cropX",0,Fe());q.addGetterSetter(Is,"cropY",0,Fe());q.addGetterSetter(Is,"cropWidth",0,Fe());q.addGetterSetter(Is,"cropHeight",0,Fe());var ZW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],D7e="Change.konva",z7e="none",E7="up",P7="right",T7="down",L7="left",B7e=ZW.length;class _k extends t1{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{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)}}kh.prototype.className="RegularPolygon";kh.prototype._centroid=!0;kh.prototype._attrsAffectingSize=["radius"];gr(kh);q.addGetterSetter(kh,"radius",0,Fe());q.addGetterSetter(kh,"sides",0,Fe());var tI=Math.PI*2;class Eh extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,tI,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),tI,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)}}Eh.prototype.className="Ring";Eh.prototype._centroid=!0;Eh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];gr(Eh);q.addGetterSetter(Eh,"innerRadius",0,Fe());q.addGetterSetter(Eh,"outerRadius",0,Fe());class $l extends Ae{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{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],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_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],h=r*2;t.rect(u[h+0],u[h+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{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var d3;function Yw(){return d3||(d3=de.createCanvasElement().getContext(H7e),d3)}function Q7e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function J7e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function e9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pr extends Ae{constructor(t){super(e9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=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=de._isString(t)?t:t==null?"":t+"";return this._setAttr(W7e,n),this}getWidth(){var t=this.attrs.width===Bp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Bp||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 de.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=Yw(),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()+c3+this.fontVariant()+c3+(this.fontSize()+j7e)+Z7e(this.fontFamily())}_addTextLine(t){this.align()===Zg&&(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 Yw().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!==Bp&&o!==void 0,l=a!==Bp&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),b=v!==iI,w=v!==K7e&&b,E=this.ellipsis();this.textArr=[],Yw().font=this._getContextFont();for(var P=E?this._getTextWidth(jw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",V=0;R>>1,j=M.slice(0,$+1),ue=this._getTextWidth(j)+P;ue<=h?(R=$+1,z=j,V=ue):N=$}if(z){if(w){var W,Q=M[z.length],ne=Q===c3||Q===nI;ne&&V<=h?W=z.length:W=Math.max(z.lastIndexOf(c3),z.lastIndexOf(nI))+1,W>0&&(R=W,z=z.slice(0,R),V=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,V),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(O=this._getTextWidth(M),O<=h)){this._addTextLine(M),m+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,O),this._shouldHandleEllipsis(m)&&kg)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!==Bp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==iI;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Bp&&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+jw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(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 h=QW(this.text()),g=this.text().split(" ").length-1,m,v,b,w=-1,E=0,P=function(){E=0;for(var ue=t.dataArray,W=w+1;W0)return w=W,ue[W];ue[W].command==="M"&&(m={x:ue[W].points[0],y:ue[W].points[1]})}return{}},k=function(ue){var W=t._getTextSize(ue).width+r;ue===" "&&i==="justify"&&(W+=(s-a)/g);var Q=0,ne=0;for(v=void 0;Math.abs(W-Q)/W>.01&&ne<20;){ne++;for(var J=Q;b===void 0;)b=P(),b&&J+b.pathLengthW?v=Rn.getPointOnLine(W,m.x,m.y,b.points[0],b.points[1],m.x,m.y):b=void 0;break;case"A":var G=b.points[4],X=b.points[5],ce=b.points[4]+X;E===0?E=G+1e-8:W>Q?E+=Math.PI/180*X/Math.abs(X):E-=Math.PI/360*X/Math.abs(X),(X<0&&E=0&&E>ce)&&(E=ce,K=!0),v=Rn.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],E,b.points[6]);break;case"C":E===0?W>b.pathLength?E=1e-8:E=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength/2:E=Math.max(E-(Q-W)/b.pathLength/2,0),E>1&&(E=1,K=!0),v=Rn.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=W/b.pathLength:W>Q?E+=(W-Q)/b.pathLength:E-=(Q-W)/b.pathLength,E>1&&(E=1,K=!0),v=Rn.getPointOnQuadraticBezier(E,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3]);break}v!==void 0&&(Q=Rn.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,b=void 0)}},T="C",M=t._getTextSize(T).width+r,O=u/M-1,R=0;Re+`.${oV}`).join(" "),oI="nodesRect",r9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],i9e={"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 o9e="ontouchstart"in rt._global;function a9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(i9e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var x4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],aI=1e8;function s9e(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 aV(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 l9e(e,t){const n=s9e(e);return aV(e,t,n)}function u9e(e,t,n){let r=t;for(let i=0;i{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(r9e.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(oI),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(oI,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=(rt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={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 aV(h,-rt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-aI,y:-aI,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var b=m.point(v);n.push(b)})});const r=new oa;r.rotate(-rt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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:rt.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(),x4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new g2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:o9e?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=rt.getAngle(this.rotation()),o=a9e(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 Ae({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()*de._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 h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ue=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ue-=Math.PI);var m=rt.getAngle(this.rotation());const W=m+ue,Q=rt.getAngle(this.rotationSnapTolerance()),J=u9e(this.rotationSnaps(),W,Q)-g.rotation,K=l9e(g,J);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var b=k?{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 w=this.findOne(".top-left").x()>b.x?-1:1,E=this.findOne(".top-left").y()>b.y?-1:1;n=i*this.cos*w,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=k?{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 w=this.findOne(".top-right").x()b.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(b.x+n),this.findOne(".top-right").y(b.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.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=k?{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 w=b.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new oa;if(a.rotate(rt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new oa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new oa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),b=g.getTransform().copy();b.translate(g.offsetX(),g.offsetY());const w=new oa;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(b);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._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(de._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()*de._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=""),t1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function c9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){x4.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+x4.join(", "))}),e||[]}kn.prototype.className="Transformer";gr(kn);q.addGetterSetter(kn,"enabledAnchors",x4,c9e);q.addGetterSetter(kn,"flipEnabled",!0,Ms());q.addGetterSetter(kn,"resizeEnabled",!0);q.addGetterSetter(kn,"anchorSize",10,Fe());q.addGetterSetter(kn,"rotateEnabled",!0);q.addGetterSetter(kn,"rotationSnaps",[]);q.addGetterSetter(kn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(kn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(kn,"borderEnabled",!0);q.addGetterSetter(kn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(kn,"anchorFill","white");q.addGetterSetter(kn,"anchorCornerRadius",0,Fe());q.addGetterSetter(kn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(kn,"borderStrokeWidth",1,Fe());q.addGetterSetter(kn,"borderDash");q.addGetterSetter(kn,"keepRatio",!0);q.addGetterSetter(kn,"centeredScaling",!1);q.addGetterSetter(kn,"ignoreStroke",!1);q.addGetterSetter(kn,"padding",0,Fe());q.addGetterSetter(kn,"node");q.addGetterSetter(kn,"nodes");q.addGetterSetter(kn,"boundBoxFunc");q.addGetterSetter(kn,"anchorDragBoundFunc");q.addGetterSetter(kn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(kn,"useSingleNodeRotation",!0);q.backCompat(kn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Bu extends Ae{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,rt.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)}}Bu.prototype.className="Wedge";Bu.prototype._centroid=!0;Bu.prototype._attrsAffectingSize=["radius"];gr(Bu);q.addGetterSetter(Bu,"radius",0,Fe());q.addGetterSetter(Bu,"angle",0,Fe());q.addGetterSetter(Bu,"clockwise",!1);q.backCompat(Bu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function sI(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var d9e=[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],f9e=[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 h9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,b,w,E,P,k,T,M,O,R,N,z,V,$,j,ue,W=t+t+1,Q=r-1,ne=i-1,J=t+1,K=J*(J+1)/2,G=new sI,X=null,ce=G,me=null,Me=null,xe=d9e[t],be=f9e[t];for(s=1;s>be,j!==0?(j=255/j,n[h]=(m*xe>>be)*j,n[h+1]=(v*xe>>be)*j,n[h+2]=(b*xe>>be)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=g+((l=o+t+1)>be,j>0?(j=255/j,n[l]=(m*xe>>be)*j,n[l+1]=(v*xe>>be)*j,n[l+2]=(b*xe>>be)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,b-=k,w-=T,E-=me.r,P-=me.g,k-=me.b,T-=me.a,l=o+((l=a+J)0&&h9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const g9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?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};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const v9e=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,h=l*4,g=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:de.error("Unknown emboss direction: "+r)}do{var m=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var b=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=b+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],O=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,V=O>0?O:-O;if(z>N&&(R=M),V>N&&(R=O),R*=t,i){var $=s[E]+R,j=s[E+1]+R,ue=s[E+2]+R;s[E]=$>255?255:$<0?0:$,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ue>255?255:ue<0?0:ue}else{var W=n-R;W<0?W=0:W>255&&(W=255),s[E]=s[E+1]=s[E+2]=W}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function qw(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 y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var b,w,E,P,k,T,M,O,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),O=h+v*(255-h),R=u-v*(u-0)):(b=(i+r)*.5,w=i+v*(i-b),E=r+v*(r-b),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,O=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,O,R=360/T*Math.PI/180,N,z;for(O=0;OT?k:T;var M=a,O=o,R,N,z=n.polarRotation||0,V,$;for(h=0;ht&&(M=T,O=0,R=-1),i=0;i=0&&v=0&&b=0&&v=0&&b=255*4?255:0}return a}function M9e(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=0&&v=0&&b=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const N9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);const z9e=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;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,LW,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const B9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},$9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ioe||L[H]!==I[oe]){var fe=` +`+L[H].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=H&&0<=oe);break}}}finally{Ds=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Wl(d):""}var Mh=Object.prototype.hasOwnProperty,Wu=[],zs=-1;function zo(d){return{current:d}}function En(d){0>zs||(d.current=Wu[zs],Wu[zs]=null,zs--)}function bn(d,f){zs++,Wu[zs]=d.current,d.current=f}var Bo={},kr=zo(Bo),Gr=zo(!1),Fo=Bo;function Bs(d,f){var y=d.type.contextTypes;if(!y)return Bo;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var L={},I;for(I in y)L[I]=f[I];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function jr(d){return d=d.childContextTypes,d!=null}function Za(){En(Gr),En(kr)}function Od(d,f,y){if(kr.current!==Bo)throw Error(a(168));bn(kr,f),bn(Gr,y)}function Ul(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var L in _)if(!(L in f))throw Error(a(108,z(d)||"Unknown",L));return o({},y,_)}function Qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Bo,Fo=kr.current,bn(kr,d),bn(Gr,Gr.current),!0}function Rd(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Ul(d,f,Fo),_.__reactInternalMemoizedMergedChildContext=d,En(Gr),En(kr),bn(kr,d)):En(Gr),bn(Gr,y)}var vi=Math.clz32?Math.clz32:Nd,Ih=Math.log,Oh=Math.LN2;function Nd(d){return d>>>=0,d===0?32:31-(Ih(d)/Oh|0)|0}var Fs=64,uo=4194304;function $s(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 Gl(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,L=d.suspendedLanes,I=d.pingedLanes,H=y&268435455;if(H!==0){var oe=H&~L;oe!==0?_=$s(oe):(I&=H,I!==0&&(_=$s(I)))}else H=y&~L,H!==0?_=$s(H):I!==0&&(_=$s(I));if(_===0)return 0;if(f!==0&&f!==_&&(f&L)===0&&(L=_&-_,I=f&-f,L>=I||L===16&&(I&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ba(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-vi(f),d[f]=y}function zd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=H,L-=H,Vi=1<<32-vi(f)+L|y<Ft?(Br=Pt,Pt=null):Br=Pt.sibling;var qt=je(pe,Pt,ve[Ft],Ve);if(qt===null){Pt===null&&(Pt=Br);break}d&&Pt&&qt.alternate===null&&f(pe,Pt),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt,Pt=Br}if(Ft===ve.length)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;FtFt?(Br=Pt,Pt=null):Br=Pt.sibling;var ss=je(pe,Pt,qt.value,Ve);if(ss===null){Pt===null&&(Pt=Br);break}d&&Pt&&ss.alternate===null&&f(pe,Pt),se=I(ss,se,Ft),Mt===null?Pe=ss:Mt.sibling=ss,Mt=ss,Pt=Br}if(qt.done)return y(pe,Pt),Bn&&Hs(pe,Ft),Pe;if(Pt===null){for(;!qt.done;Ft++,qt=ve.next())qt=At(pe,qt.value,Ve),qt!==null&&(se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return Bn&&Hs(pe,Ft),Pe}for(Pt=_(pe,Pt);!qt.done;Ft++,qt=ve.next())qt=$n(Pt,pe,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Pt.delete(qt.key===null?Ft:qt.key),se=I(qt,se,Ft),Mt===null?Pe=qt:Mt.sibling=qt,Mt=qt);return d&&Pt.forEach(function(ui){return f(pe,ui)}),Bn&&Hs(pe,Ft),Pe}function Xo(pe,se,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Pe=ve.key,Mt=se;Mt!==null;){if(Mt.key===Pe){if(Pe=ve.type,Pe===h){if(Mt.tag===7){y(pe,Mt.sibling),se=L(Mt,ve.props.children),se.return=pe,pe=se;break e}}else if(Mt.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&G1(Pe)===Mt.type){y(pe,Mt.sibling),se=L(Mt,ve.props),se.ref=wa(pe,Mt,ve),se.return=pe,pe=se;break e}y(pe,Mt);break}else f(pe,Mt);Mt=Mt.sibling}ve.type===h?(se=tl(ve.props.children,pe.mode,Ve,ve.key),se.return=pe,pe=se):(Ve=ff(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wa(pe,se,ve),Ve.return=pe,pe=Ve)}return H(pe);case u:e:{for(Mt=ve.key;se!==null;){if(se.key===Mt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){y(pe,se.sibling),se=L(se,ve.children||[]),se.return=pe,pe=se;break e}else{y(pe,se);break}else f(pe,se);se=se.sibling}se=nl(ve,pe.mode,Ve),se.return=pe,pe=se}return H(pe);case T:return Mt=ve._init,Xo(pe,se,Mt(ve._payload),Ve)}if(ne(ve))return Pn(pe,se,ve,Ve);if(R(ve))return nr(pe,se,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,se!==null&&se.tag===6?(y(pe,se.sibling),se=L(se,ve),se.return=pe,pe=se):(y(pe,se),se=Sp(ve,pe.mode,Ve),se.return=pe,pe=se),H(pe)):y(pe,se)}return Xo}var Ju=P2(!0),T2=P2(!1),qd={},po=zo(qd),Ca=zo(qd),re=zo(qd);function ye(d){if(d===qd)throw Error(a(174));return d}function ge(d,f){bn(re,f),bn(Ca,d),bn(po,qd),d=K(f),En(po),bn(po,d)}function Ge(){En(po),En(Ca),En(re)}function Et(d){var f=ye(re.current),y=ye(po.current);f=G(y,d.type,f),y!==f&&(bn(Ca,d),bn(po,f))}function Qt(d){Ca.current===d&&(En(po),En(Ca))}var Ot=zo(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||$u(y)||Id(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Kd=[];function j1(){for(var d=0;dy?y:4,d(!0);var _=ec.transition;ec.transition={};try{d(!1),f()}finally{Ht=y,ec.transition=_}}function sc(){return Si().memoizedState}function eg(d,f,y){var _=Ar(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},uc(d))cc(f,y);else if(y=Qu(d,f,y,_),y!==null){var L=li();vo(y,d,_,L),tf(y,f,_)}}function lc(d,f,y){var _=Ar(d),L={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(uc(d))cc(f,L);else{var I=d.alternate;if(d.lanes===0&&(I===null||I.lanes===0)&&(I=f.lastRenderedReducer,I!==null))try{var H=f.lastRenderedState,oe=I(H,y);if(L.hasEagerState=!0,L.eagerState=oe,U(oe,H)){var fe=f.interleaved;fe===null?(L.next=L,jd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch{}finally{}y=Qu(d,f,L,_),y!==null&&(L=li(),vo(y,d,_,L),tf(y,f,_))}}function uc(d){var f=d.alternate;return d===Sn||f!==null&&f===Sn}function cc(d,f){Xd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function tf(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,jl(d,y)}}var ts={readContext:Ui,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},_S={readContext:Ui,useCallback:function(d,f){return qr().memoizedState=[d,f===void 0?null:f],d},useContext:Ui,useEffect:M2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Xl(4194308,4,vr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Xl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Xl(4,2,d,f)},useMemo:function(d,f){var y=qr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=qr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=eg.bind(null,Sn,d),[_.memoizedState,d]},useRef:function(d){var f=qr();return d={current:d},f.memoizedState=d},useState:A2,useDebugValue:Z1,useDeferredValue:function(d){return qr().memoizedState=d},useTransition:function(){var d=A2(!1),f=d[0];return d=J1.bind(null,d[1]),qr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=Sn,L=qr();if(Bn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),zr===null)throw Error(a(349));(Kl&30)!==0||X1(_,f,y)}L.memoizedState=y;var I={value:y,getSnapshot:f};return L.queue=I,M2(Us.bind(null,_,I,d),[d]),_.flags|=2048,Jd(9,oc.bind(null,_,I,y,f),void 0,null),y},useId:function(){var d=qr(),f=zr.identifierPrefix;if(Bn){var y=Sa,_=Vi;y=(_&~(1<<32-vi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=tc++,0cp&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304)}else{if(!_)if(d=cn(I),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),hc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!I.alternate&&!Bn)return oi(f),null}else 2*Un()-L.renderingStartTime>cp&&y!==1073741824&&(f.flags|=128,_=!0,hc(L,!1),f.lanes=4194304);L.isBackwards?(I.sibling=f.child,f.child=I):(d=L.last,d!==null?d.sibling=I:f.child=I,L.last=I)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Un(),f.sibling=null,d=Ot.current,bn(Ot,_?d&1|2:d&1),f):(oi(f),null);case 22:case 23:return wc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(ji&1073741824)!==0&&(oi(f),ft&&f.subtreeFlags&6&&(f.flags|=8192)):oi(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function lg(d,f){switch(H1(f),f.tag){case 1:return jr(f.type)&&Za(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Gr),En(kr),j1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(Ot),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Ku()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(Ot),null;case 4:return Ge(),null;case 10:return Ud(f.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var js=!1,Pr=!1,AS=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function pc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){jn(d,f,_)}else y.current=null}function jo(d,f,y){try{y()}catch(_){jn(d,f,_)}}var Zh=!1;function Ql(d,f){for(X(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,L=y.memoizedState,I=d.stateNode,H=I.getSnapshotBeforeUpdate(d.elementType===d.type?_:Ho(d.type,_),L);I.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ft&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){jn(d,d.return,oe)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=Zh,Zh=!1,y}function ai(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var L=_=_.next;do{if((L.tag&d)===d){var I=L.destroy;L.destroy=void 0,I!==void 0&&jo(f,y,I)}L=L.next}while(L!==_)}}function Qh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ug(d){var f=d.alternate;f!==null&&(d.alternate=null,ug(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&it(f)),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 gc(d){return d.tag===5||d.tag===3||d.tag===4}function rs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||gc(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 ep(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?He(y,d,f):It(y,d);else if(_!==4&&(d=d.child,d!==null))for(ep(d,f,y),d=d.sibling;d!==null;)ep(d,f,y),d=d.sibling}function cg(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?zn(y,d,f):_e(y,d);else if(_!==4&&(d=d.child,d!==null))for(cg(d,f,y),d=d.sibling;d!==null;)cg(d,f,y),d=d.sibling}var br=null,Yo=!1;function qo(d,f,y){for(y=y.child;y!==null;)Tr(d,f,y),y=y.sibling}function Tr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Pr||pc(y,f);case 6:if(ft){var _=br,L=Yo;br=null,qo(d,f,y),br=_,Yo=L,br!==null&&(Yo?tt(br,y.stateNode):ct(br,y.stateNode))}else qo(d,f,y);break;case 18:ft&&br!==null&&(Yo?D1(br,y.stateNode):N1(br,y.stateNode));break;case 4:ft?(_=br,L=Yo,br=y.stateNode.containerInfo,Yo=!0,qo(d,f,y),br=_,Yo=L):(ut&&(_=y.stateNode.containerInfo,L=ya(_),Fu(_,L)),qo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Pr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){L=_=_.next;do{var I=L,H=I.destroy;I=I.tag,H!==void 0&&((I&2)!==0||(I&4)!==0)&&jo(y,f,H),L=L.next}while(L!==_)}qo(d,f,y);break;case 1:if(!Pr&&(pc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(oe){jn(y,f,oe)}qo(d,f,y);break;case 21:qo(d,f,y);break;case 22:y.mode&1?(Pr=(_=Pr)||y.memoizedState!==null,qo(d,f,y),Pr=_):qo(d,f,y);break;default:qo(d,f,y)}}function tp(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new AS),f.forEach(function(_){var L=K2.bind(null,d,_);y.has(_)||(y.add(_),_.then(L,L))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case op:return":has("+(hg(d)||"")+")";case ap:return'[role="'+d.value+'"]';case sp:return'"'+d.value+'"';case mc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function vc(d,f){var y=[];d=[d,0];for(var _=0;_L&&(L=H),_&=~I}if(_=L,_=Un()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*MS(_/1960))-_,10<_){d.timeoutHandle=De(el.bind(null,d,wi,os),_);break}el(d,wi,os);break;case 5:el(d,wi,os);break;default:throw Error(a(329))}}}return Xr(d,Un()),d.callbackNode===y?hp.bind(null,d):null}function pp(d,f){var y=Sc;return d.current.memoizedState.isDehydrated&&(Qs(d,f).flags|=256),d=Cc(d,f),d!==2&&(f=wi,wi=y,f!==null&&gp(f)),d}function gp(d){wi===null?wi=d:wi.push.apply(wi,d)}function Yi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,kt===null)var _=!1;else{if(d=kt,kt=null,dp=0,(Bt&6)!==0)throw Error(a(331));var L=Bt;for(Bt|=4,Ke=d.current;Ke!==null;){var I=Ke,H=I.child;if((Ke.flags&16)!==0){var oe=I.deletions;if(oe!==null){for(var fe=0;feUn()-mg?Qs(d,0):gg|=y),Xr(d,f)}function xg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=li();d=Wo(d,f),d!==null&&(ba(d,f,y),Xr(d,y))}function OS(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),xg(d,y)}function K2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),xg(d,y)}var wg;wg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Gr.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,TS(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Bn&&(f.flags&1048576)!==0&&$1(f,mr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;_a(d,f),d=f.pendingProps;var L=Bs(f,kr.current);Zu(f,y),L=q1(null,f,_,d,L,y);var I=nc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,jr(_)?(I=!0,Qa(f)):I=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,V1(f),L.updater=Vo,f.stateNode=L,L._reactInternals=f,U1(f,_,d,y),f=Uo(null,f,_,!0,I,y)):(f.tag=0,Bn&&I&&yi(f),xi(null,f,L,y),f=f.child),f;case 16:_=f.elementType;e:{switch(_a(d,f),d=f.pendingProps,L=_._init,_=L(_._payload),f.type=_,L=f.tag=yp(_),d=Ho(_,d),L){case 0:f=rg(null,f,_,d,y);break e;case 1:f=$2(null,f,_,d,y);break e;case 11:f=D2(null,f,_,d,y);break e;case 14:f=Gs(null,f,_,Ho(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),rg(d,f,_,L,y);case 1:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),$2(d,f,_,L,y);case 3:e:{if(H2(f),d===null)throw Error(a(387));_=f.pendingProps,I=f.memoizedState,L=I.element,C2(d,f),Wh(f,_,null,y);var H=f.memoizedState;if(_=H.element,vt&&I.isDehydrated)if(I={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},f.updateQueue.baseState=I,f.memoizedState=I,f.flags&256){L=dc(Error(a(423)),f),f=W2(d,f,_,y,L);break e}else if(_!==L){L=dc(Error(a(424)),f),f=W2(d,f,_,y,L);break e}else for(vt&&(fo=T1(f.stateNode.containerInfo),Gn=f,Bn=!0,Ri=null,ho=!1),y=T2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ku(),_===L){f=ns(d,f,y);break e}xi(d,f,_,y)}f=f.child}return f;case 5:return Et(f),d===null&&$d(f),_=f.type,L=f.pendingProps,I=d!==null?d.memoizedProps:null,H=L.children,Ie(_,L)?H=null:I!==null&&Ie(_,I)&&(f.flags|=32),F2(d,f),xi(d,f,H,y),f.child;case 6:return d===null&&$d(f),null;case 13:return V2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Ju(f,null,_,y):xi(d,f,_,y),f.child;case 11:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),D2(d,f,_,L,y);case 7:return xi(d,f,f.pendingProps,y),f.child;case 8:return xi(d,f,f.pendingProps.children,y),f.child;case 12:return xi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,L=f.pendingProps,I=f.memoizedProps,H=L.value,w2(f,_,H),I!==null)if(U(I.value,H)){if(I.children===L.children&&!Gr.current){f=ns(d,f,y);break e}}else for(I=f.child,I!==null&&(I.return=f);I!==null;){var oe=I.dependencies;if(oe!==null){H=I.child;for(var fe=oe.firstContext;fe!==null;){if(fe.context===_){if(I.tag===1){fe=es(-1,y&-y),fe.tag=2;var Ne=I.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}I.lanes|=y,fe=I.alternate,fe!==null&&(fe.lanes|=y),Gd(I.return,y,f),oe.lanes|=y;break}fe=fe.next}}else if(I.tag===10)H=I.type===f.type?null:I.child;else if(I.tag===18){if(H=I.return,H===null)throw Error(a(341));H.lanes|=y,oe=H.alternate,oe!==null&&(oe.lanes|=y),Gd(H,y,f),H=I.sibling}else H=I.child;if(H!==null)H.return=I;else for(H=I;H!==null;){if(H===f){H=null;break}if(I=H.sibling,I!==null){I.return=H.return,H=I;break}H=H.return}I=H}xi(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,_=f.pendingProps.children,Zu(f,y),L=Ui(L),_=_(L),f.flags|=1,xi(d,f,_,y),f.child;case 14:return _=f.type,L=Ho(_,f.pendingProps),L=Ho(_.type,L),Gs(d,f,_,L,y);case 15:return z2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,L=f.pendingProps,L=f.elementType===_?L:Ho(_,L),_a(d,f),f.tag=1,jr(_)?(d=!0,Qa(f)):d=!1,Zu(f,y),k2(f,_,L),U1(f,_,L,y),Uo(null,f,_,!0,d,y);case 19:return G2(d,f,y);case 22:return B2(d,f,y)}throw Error(a(156,f.tag))};function _i(d,f){return ju(d,f)}function ka(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new ka(d,f,y,_)}function Cg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function yp(d){if(typeof d=="function")return Cg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function qi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function ff(d,f,y,_,L,I){var H=2;if(_=d,typeof d=="function")Cg(d)&&(H=1);else if(typeof d=="string")H=5;else e:switch(d){case h:return tl(y.children,L,I,f);case g:H=8,L|=8;break;case m:return d=yo(12,y,f,L|2),d.elementType=m,d.lanes=I,d;case E:return d=yo(13,y,f,L),d.elementType=E,d.lanes=I,d;case P:return d=yo(19,y,f,L),d.elementType=P,d.lanes=I,d;case M:return bp(y,L,I,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:H=10;break e;case b:H=9;break e;case w:H=11;break e;case k:H=14;break e;case T:H=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(H,y,f,L),f.elementType=d,f.type=_,f.lanes=I,f}function tl(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function bp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function Sp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function nl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function hf(d,f,y,_,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gu(0),this.expirationTimes=Gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gu(0),this.identifierPrefix=_,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function X2(d,f,y,_,L,I,H,oe,fe){return d=new hf(d,f,y,oe,fe),f===1?(f=1,I===!0&&(f|=8)):f=0,I=yo(3,null,null,f),d.current=I,I.stateNode=d,I.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},V1(I),d}function _g(d){if(!d)return Bo;d=d._reactInternals;e:{if(V(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(jr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(jr(y))return Ul(d,y,f)}return f}function kg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ue(f),d===null?null:d.stateNode}function pf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&I>=At&&L<=et&&H<=je){d.splice(f,1);break}else if(_!==Ne||y.width!==fe.width||jeH){if(!(I!==At||y.height!==fe.height||et<_||Ne>L)){Ne>_&&(fe.width+=Ne-_,fe.x=_),etI&&(fe.height+=At-I,fe.y=I),jey&&(y=H)),H ")+` + +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:xp,findFiberByHostInstance:d.findFiberByHostInstance||Eg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!_t)throw Error(a(363));d=pg(d,f);var L=Yt(d,y,_).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var L=f.current,I=li(),H=Ar(L);return y=_g(y),f.context===null?f.context=y:f.pendingContext=y,f=es(I,H),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Vs(L,f,H),d!==null&&(vo(d,L,H,I),Hh(d,L,H)),H},n};(function(e){e.exports=H9e})(sV);const W9e=q7(sV.exports);var kk={exports:{}},Ph={};/** + * @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. + */Ph.ConcurrentRoot=1;Ph.ContinuousEventPriority=4;Ph.DefaultEventPriority=16;Ph.DiscreteEventPriority=1;Ph.IdleEventPriority=536870912;Ph.LegacyRoot=0;(function(e){e.exports=Ph})(kk);const lI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let uI=!1,cI=!1;const Ek=".react-konva-event",V9e=`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 +`,U9e=`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 +`,G9e={};function mS(e,t,n=G9e){if(!uI&&"zIndex"in t&&(console.warn(U9e),uI=!0),!cI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(V9e),cI=!0)}for(var o in n)if(!lI[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 h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!lI[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]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Ad(e));for(var l in v)e.on(l+Ek,v[l])}function Ad(e){if(!rt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const lV={},j9e={};ch.Node.prototype._applyProps=mS;function Y9e(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),Ad(e)}function q9e(e,t,n){let r=ch[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=ch.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 mS(l,o),l}function K9e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function X9e(e,t,n){return!1}function Z9e(e){return e}function Q9e(){return null}function J9e(){return null}function e8e(e,t,n,r){return j9e}function t8e(){}function n8e(e){}function r8e(e,t){return!1}function i8e(){return lV}function o8e(){return lV}const a8e=setTimeout,s8e=clearTimeout,l8e=-1;function u8e(e,t){return!1}const c8e=!1,d8e=!0,f8e=!0;function h8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function p8e(e,t){t.parent===e?t.moveToTop():e.add(t),Ad(e)}function uV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ad(e)}function g8e(e,t,n){uV(e,t,n)}function m8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function v8e(e,t){t.destroy(),t.off(Ek),Ad(e)}function y8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function b8e(e,t,n){}function S8e(e,t,n,r,i){mS(e,i,r)}function x8e(e){e.hide(),Ad(e)}function w8e(e){}function C8e(e,t){(t.visible==null||t.visible)&&e.show()}function _8e(e,t){}function k8e(e){}function E8e(){}const P8e=()=>kk.exports.DefaultEventPriority,T8e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:Y9e,createInstance:q9e,createTextInstance:K9e,finalizeInitialChildren:X9e,getPublicInstance:Z9e,prepareForCommit:Q9e,preparePortalMount:J9e,prepareUpdate:e8e,resetAfterCommit:t8e,resetTextContent:n8e,shouldDeprioritizeSubtree:r8e,getRootHostContext:i8e,getChildHostContext:o8e,scheduleTimeout:a8e,cancelTimeout:s8e,noTimeout:l8e,shouldSetTextContent:u8e,isPrimaryRenderer:c8e,warnsIfNotActing:d8e,supportsMutation:f8e,appendChild:h8e,appendChildToContainer:p8e,insertBefore:uV,insertInContainerBefore:g8e,removeChild:m8e,removeChildFromContainer:v8e,commitTextUpdate:y8e,commitMount:b8e,commitUpdate:S8e,hideInstance:x8e,hideTextInstance:w8e,unhideInstance:C8e,unhideTextInstance:_8e,clearContainer:k8e,detachDeletedInstance:E8e,getCurrentEventPriority:P8e,now:s0.exports.unstable_now,idlePriority:s0.exports.unstable_IdlePriority,run:s0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var L8e=Object.defineProperty,A8e=Object.defineProperties,M8e=Object.getOwnPropertyDescriptors,dI=Object.getOwnPropertySymbols,I8e=Object.prototype.hasOwnProperty,O8e=Object.prototype.propertyIsEnumerable,fI=(e,t,n)=>t in e?L8e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hI=(e,t)=>{for(var n in t||(t={}))I8e.call(t,n)&&fI(e,n,t[n]);if(dI)for(var n of dI(t))O8e.call(t,n)&&fI(e,n,t[n]);return e},R8e=(e,t)=>A8e(e,M8e(t));function Pk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Pk(r,t,n);if(i)return i;r=t?null:r.sibling}}function cV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Tk=cV(C.exports.createContext(null));class dV extends C.exports.Component{render(){return x(Tk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:N8e,ReactCurrentDispatcher:D8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z8e(){const e=C.exports.useContext(Tk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=N8e.current)!=null?r:Pk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const em=[],pI=new WeakMap;function B8e(){var e;const t=z8e();em.splice(0,em.length),Pk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Tk&&em.push(cV(i))});for(const n of em){const r=(e=D8e.current)==null?void 0:e.readContext(n);pI.set(n,r)}return C.exports.useMemo(()=>em.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,R8e(hI({},i),{value:pI.get(r)}))),n=>x(dV,{...hI({},n)})),[])}function F8e(e){const t=ae.useRef();return ae.useLayoutEffect(()=>{t.current=e}),t.current}const $8e=e=>{const t=ae.useRef(),n=ae.useRef(),r=ae.useRef(),i=F8e(e),o=B8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return ae.useLayoutEffect(()=>(n.current=new ch.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Sm.createContainer(n.current,kk.exports.LegacyRoot,!1,null),Sm.updateContainer(x(o,{children:e.children}),r.current),()=>{!ch.isBrowser||(a(null),Sm.updateContainer(null,r.current,null),n.current.destroy())}),[]),ae.useLayoutEffect(()=>{a(n.current),mS(n.current,e,i),Sm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},h3="Layer",dh="Group",R0="Rect",tm="Circle",w4="Line",fV="Image",H8e="Transformer",Sm=W9e(T8e);Sm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:ae.version,rendererPackageName:"react-konva"});const W8e=ae.forwardRef((e,t)=>x(dV,{children:x($8e,{...e,forwardedRef:t})})),V8e=dt([Dn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),U8e=e=>{const{...t}=e,{objects:n}=Le(V8e);return x(dh,{listening:!1,...t,children:n.filter(nk).map((r,i)=>x(w4,{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))})},vS=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},G8e=dt(Dn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:g,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:vS(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||g||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),j8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Le(G8e);return l?ee(dh,{listening:!1,...t,children:[x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(tm,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},Y8e=dt(Dn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:g,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:g,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),q8e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:g,stageScale:m,shouldSnapToGrid:v,tool:b,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Le(Y8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(W=>{if(!v){n(Lw({x:Math.floor(W.target.x()),y:Math.floor(W.target.y())}));return}const Q=W.target.x(),ne=W.target.y(),J=Gc(Q,64),K=Gc(ne,64);W.target.x(J),W.target.y(K),n(Lw({x:J,y:K}))},[n,v]),O=C.exports.useCallback(()=>{if(!k.current)return;const W=k.current,Q=W.scaleX(),ne=W.scaleY(),J=Math.round(W.width()*Q),K=Math.round(W.height()*ne),G=Math.round(W.x()),X=Math.round(W.y());n(gm({width:J,height:K})),n(Lw({x:v?gl(G,64):G,y:v?gl(X,64):X})),W.scaleX(1),W.scaleY(1)},[n,v]),R=C.exports.useCallback((W,Q,ne)=>{const J=W.x%T,K=W.y%T;return{x:gl(Q.x,T)+J,y:gl(Q.y,T)+K}},[T]),N=()=>{n(Mw(!0))},z=()=>{n(Mw(!1)),n(Yy(!1))},V=()=>{n(oM(!0))},$=()=>{n(Mw(!1)),n(oM(!1)),n(Yy(!1))},j=()=>{n(Yy(!0))},ue=()=>{!u&&!l&&n(Yy(!1))};return ee(dh,{...t,children:[x(R0,{offsetX:h.x/m,offsetY:h.y/m,height:g.height/m,width:g.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(R0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(R0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&b==="move",onDragEnd:$,onDragMove:M,onMouseDown:V,onMouseOut:ue,onMouseOver:j,onMouseUp:$,onTransform:O,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(H8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:b==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&b==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let hV=null,pV=null;const K8e=e=>{hV=e},C4=()=>hV,X8e=e=>{pV=e},Z8e=()=>pV,Q8e=dt([Dn,_r],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),J8e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Le(Q8e),i=C.exports.useRef(null),o=Z8e();gt("esc",()=>{e(Ebe())},{enabled:()=>!0,preventDefault:!0}),gt("shift+h",()=>{e(zbe(!n))},{preventDefault:!0},[t,n]),gt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(M0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(M0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},e_e=dt(Dn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:vS(t)}}),gI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),t_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(e_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=gI(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=gI(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Jr.exports.isNumber(r.x)||!Jr.exports.isNumber(r.y)||!Jr.exports.isNumber(o)||!Jr.exports.isNumber(i.width)||!Jr.exports.isNumber(i.height)?null:x(R0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Jr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},n_e=dt([Dn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),r_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(n_e);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=Ze.clamp(r*gbe**s,mbe,vbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(Ube(l)),t(TH(u))},[e,n,r,t])},yS=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},i_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),o_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(i_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(h4(!0));return}const o=yS(e.current);!o||(i.evt.preventDefault(),t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},a_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),s_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(a_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(h4(!1));return}if(!t.current&&i&&e.current){const a=yS(e.current);if(!a)return;n(xH([a.x,a.y]))}else t.current=!1;n(rS(!1))},[t,n,i,o,e,r])},l_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),u_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(l_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=yS(e.current);!s||(r(kH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(xH([s.x,s.y]))))},[t,r,i,a,n,e,o])},c_e=dt([_r,Dn,Ou],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),d_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(c_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=yS(e.current);!o||n==="move"||r||(t(rS(!0)),t(SH([o.x,o.y])))},[e,n,r,t])},f_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(kH(null)),e(rS(!1))},[e])},h_e=dt([Dn,Ou],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),p_e=()=>{const e=qe(),{tool:t,isStaging:n}=Le(h_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(TH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(h4(!1))},[e,n,t])}};var wf=C.exports,g_e=function(t,n,r){const i=wf.useRef("loading"),o=wf.useRef(),[a,s]=wf.useState(0),l=wf.useRef(),u=wf.useRef(),h=wf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),wf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const gV=e=>{const{url:t,x:n,y:r}=e,[i]=g_e(t);return x(fV,{x:n,y:r,image:i,listening:!1})},m_e=dt([Dn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),v_e=()=>{const{objects:e}=Le(m_e);return e?x(dh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(f4(t))return x(gV,{x:t.x,y:t.y,url:t.image.url},n);if(X4e(t))return x(w4,{points:t.points,stroke:t.color?vS(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)})}):null},y_e=dt([Dn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),b_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},S_e=()=>{const{colorMode:e}=Yv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=b_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/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)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,O=Ze.range(0,T).map(N=>x(w4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=Ze.range(0,M).map(N=>x(w4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(O.concat(R))},[t,n,r,e,a]),x(dh,{children:i})},x_e=dt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),w_e=e=>{const{...t}=e,n=Le(x_e),[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?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(fV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},C_e=dt([Dn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function __e(){const{cursorCoordinatesString:e}=Le(C_e);return x("div",{children:`Cursor Position: ${e}`})}const p3=e=>Math.round(e*100)/100,k_e=dt([Dn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:g}=e;return{activeLayerColor:g==="mask"?"var(--status-working-color)":"inherit",activeLayerString:g.charAt(0).toUpperCase()+g.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${p3(s)}, ${p3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${p3(r)}\xD7${p3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),E_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Le(k_e);return ee("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&ee(Wn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(__e,{})]})]})},P_e=dt([Dn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),T_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Le(P_e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ee(dh,{...t,children:[r&&x(gV,{url:u,x:o,y:a}),i&&ee(dh,{children:[x(R0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(R0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},L_e=dt([Dn],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:Ze.isEqual}}),A_e=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(L_e),o=C.exports.useCallback(()=>{e(aM(!1))},[e]),a=C.exports.useCallback(()=>{e(aM(!0))},[e]);gt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),gt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),gt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(_be()),l=()=>e(Cbe()),u=()=>e(xbe());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(ia,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(w4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(C4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(J_,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(M4e,{}):x(A4e,{}),onClick:()=>e(Hbe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(sH,{}),onClick:()=>e(rbe(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(v1,{}),onClick:()=>e(wbe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},M_e=dt([Dn,Ou],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v}=e;let b="";return h==="move"||t?g?b="grabbing":b="grab":o?b=void 0:a?b="move":b="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:b,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),I_e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(M_e);J8e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{X8e($),g.current=$},[]),b=C.exports.useCallback($=>{K8e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=r_e(g),k=o_e(g),T=s_e(g,E),M=u_e(g,E,w),O=d_e(g),R=f_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:V}=p_e();return x("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(W8e,{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:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:O,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:V,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(h3,{id:"grid",visible:r,children:x(S_e,{})}),x(h3,{id:"base",ref:b,listening:!1,imageSmoothingEnabled:!1,children:x(v_e,{})}),ee(h3,{id:"mask",visible:e,listening:!1,children:[x(U8e,{visible:!0,listening:!1}),x(t_e,{listening:!1})]}),ee(h3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(j8e,{visible:l!=="move",listening:!1}),x(T_e,{visible:u}),h&&x(w_e,{}),x(q8e,{visible:n&&!u})]})]}),x(E_e,{}),x(A_e,{})]})})},O_e=dt([Dn,_r],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function R_e(){const e=qe(),{canUndo:t,activeTabName:n}=Le(O_e),r=()=>{e(Gbe())};return gt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(Y4e,{}),onClick:r,isDisabled:!t})}const N_e=dt([Dn,_r],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}});function D_e(){const e=qe(),{canRedo:t,activeTabName:n}=Le(N_e),r=()=>{e(kbe())};return gt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(V4e,{}),onClick:r,isDisabled:!t})}const mV=ke((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Av(),m=C.exports.useRef(null),v=()=>{r(),g()},b=()=>{o&&o(),g()};return ee(Wn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(CF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:x(Z0,{children:ee(_F,{className:"modal",children:[x(Ob,{fontSize:"lg",fontWeight:"bold",children:s}),x(Nv,{children:a}),ee(Ib,{children:[x(Wa,{ref:m,onClick:b,className:"modal-close-btn",children:i}),x(Wa,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),z_e=()=>{const e=qe();return ee(mV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(ibe()),e(wH()),e(_H())},acceptButtonText:"Empty Folder",triggerComponent:x(ra,{leftIcon:x(v1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},B_e=()=>{const e=qe();return ee(mV,{title:"Clear Canvas History",acceptCallback:()=>e(_H()),acceptButtonText:"Clear History",triggerComponent:x(ra,{size:"sm",leftIcon:x(v1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},F_e=dt([Dn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),$_e=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Le(F_e);return x(rd,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(tk,{})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e($be(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(Fbe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(Wbe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(Nbe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(Obe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(Rbe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(Bbe(l.target.checked))}),x(B_e,{}),x(z_e,{})]})})};function bS(){return(bS=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function A7(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 n1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(mI(i.current,E,s.current)):w(!1)},b=function(){return w(!1)};function w(E){var P=l.current,k=M7(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",b)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(vI(P),!function(M,O){return O&&!Zm(M)}(P,l.current)&&k)){if(Zm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(mI(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...bS({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),SS=function(e){return e.filter(Boolean).join(" ")},Ak=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=SS(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},yV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},I7=function(e){var t=yV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Kw=function(e){var t=yV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},H_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:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},W_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:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},V_e=ae.memo(function(e){var t=e.hue,n=e.onChange,r=SS(["react-colorful__hue",e.className]);return ae.createElement("div",{className:r},ae.createElement(Lk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:n1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},ae.createElement(Ak,{className:"react-colorful__hue-pointer",left:t/360,color:I7({h:t,s:100,v:100,a:1})})))}),U_e=ae.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:I7({h:t.h,s:100,v:100,a:1})};return ae.createElement("div",{className:"react-colorful__saturation",style:r},ae.createElement(Lk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:n1(t.s+100*i.left,0,100),v:n1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},ae.createElement(Ak,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:I7(t)})))}),bV=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=A7(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;bV(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(h){return Object.assign({},h,u)})},[]);return[o,l]}var j_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,Y_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},yI=new Map,q_e=function(e){j_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!yI.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,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,yI.set(t,n);var r=Y_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},K_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Kw(Object.assign({},n,{a:0}))+", "+Kw(Object.assign({},n,{a:1}))+")"},o=SS(["react-colorful__alpha",t]),a=no(100*n.a);return ae.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),ae.createElement(Lk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:n1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},ae.createElement(Ak,{className:"react-colorful__alpha-pointer",left:n.a,color:Kw(n)})))},X_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=vV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);q_e(s);var l=G_e(n,i,o),u=l[0],h=l[1],g=SS(["react-colorful",t]);return ae.createElement("div",bS({},a,{ref:s,className:g}),x(U_e,{hsva:u,onChange:h}),x(V_e,{hue:u.h,onChange:h}),ae.createElement(K_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},Z_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:W_e,fromHsva:H_e,equal:bV},Q_e=function(e){return ae.createElement(X_e,bS({},e,{colorModel:Z_e}))};const SV=e=>{const{styleClass:t,...n}=e;return x(Q_e,{className:`invokeai__color-picker ${t}`,...n})},J_e=dt([Dn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:vS(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),eke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Le(J_e);gt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),gt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(PH(t==="mask"?"base":"mask"))},a=()=>e(Sbe()),s=()=>e(EH(!r));return x(rd,{trigger:"hover",triggerComponent:x(ia,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(D4e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:ee(en,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(Dbe(l.target.checked))}),x(SV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Mbe(l))}),x(ra,{size:"sm",leftIcon:x(v1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let g3;const tke=new Uint8Array(16);function nke(){if(!g3&&(g3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g3(tke)}const Ei=[];for(let e=0;e<256;++e)Ei.push((e+256).toString(16).slice(1));function rke(e,t=0){return(Ei[e[t+0]]+Ei[e[t+1]]+Ei[e[t+2]]+Ei[e[t+3]]+"-"+Ei[e[t+4]]+Ei[e[t+5]]+"-"+Ei[e[t+6]]+Ei[e[t+7]]+"-"+Ei[e[t+8]]+Ei[e[t+9]]+"-"+Ei[e[t+10]]+Ei[e[t+11]]+Ei[e[t+12]]+Ei[e[t+13]]+Ei[e[t+14]]+Ei[e[t+15]]).toLowerCase()}const ike=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bI={randomUUID:ike};function a0(e,t,n){if(bI.randomUUID&&!t&&!e)return bI.randomUUID();e=e||{};const r=e.random||(e.rng||nke)();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 rke(r)}const oke=(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(),h=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)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},ake=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},ske=(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},lke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},m3=(e=lke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(u4e("Exporting Image")),t(n0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,b=C4();if(!b){t(yu(!1)),t(n0(!0));return}const{dataURL:w,boundingBox:E}=oke(b,h,v,i?{...g,...m}:void 0);if(!w){t(yu(!1)),t(n0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:O,height:R}=T,N={uuid:a0(),category:o?"result":"user",...T};a&&(ake(M),t(fm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(ske(M,O,R),t(fm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(r0({image:N,category:"result"})),t(fm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(Ibe({kind:"image",layer:"base",...E,image:N})),t(fm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(yu(!1)),t(Z3("Connected")),t(n0(!0))},uke=dt([Dn,Ou,p2],(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:Ze.isEqual}}),cke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(uke);gt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),gt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),gt(["["],()=>{e(Aw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),gt(["]"],()=>{e(Aw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(M0("brush")),a=()=>e(M0("eraser"));return ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(B4e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(T4e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(M0("eraser"))}),x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(lH,{})}),children:ee(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(ws,{label:"Size",value:r,withInput:!0,onChange:s=>e(Aw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(SV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(Lbe(s))})]})})]})};let SI;const xV=()=>({setOpenUploader:e=>{e&&(SI=e)},openUploader:SI}),dke=dt([p2,Dn,Ou],(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:Ze.isEqual}}),fke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(dke),s=C4(),{openUploader:l}=xV();gt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),gt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),gt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["meta+c","ctrl+c"],()=>{b()},{enabled:()=>!t,preventDefault:!0},[s,t]),gt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(M0("move")),h=()=>{const P=C4();if(!P)return;const k=P.getClientRect({skipTransform:!0});e(Pbe({contentRect:k}))},g=()=>{e(wH()),e(CH())},m=()=>{e(m3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},b=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(m3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[x(Iu,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:K4e,onChange:P=>{const k=P.target.value;e(PH(k)),k==="mask"&&!r&&e(EH(!0))}}),x(eke,{}),x(cke,{}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(_4e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(P4e,{}),onClick:h})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(N4e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(sH,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(nS,{}),onClick:b,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(aH,{}),onClick:w,isDisabled:t})]}),ee(ia,{isAttached:!0,children:[x(R_e,{}),x(D_e,{})]}),ee(ia,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x(ek,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(v1,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ia,{isAttached:!0,children:x($_e,{})})]})},hke=dt([Dn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),pke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le(hke);return C.exports.useLayoutEffect(()=>{const n=Ze.debounce(()=>{e(Li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[x(fke,{}),x("div",{className:"inpainting-canvas-area",children:t?x(ACe,{}):x(I_e,{})})]})})})};function gke(){const e=qe();return C.exports.useEffect(()=>{e(Li(!0))},[e]),x(vk,{optionsPanel:x(TCe,{}),styleClass:"inpainting-workarea-overrides",children:x(pke,{})})}const mke=at({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("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 vke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",x("br",{}),x("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const yke=at({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:x("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"})}),If={txt2img:{title:x(f5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(o6e,{}),tooltip:"Text To Image"},img2img:{title:x(u5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(n6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(mke,{fill:"black",boxSize:"2.5rem"}),workarea:x(gke,{}),tooltip:"Unified Canvas"},nodes:{title:x(c5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(s5e,{}),tooltip:"Nodes"},postprocess:{title:x(d5e,{fill:"black",boxSize:"2.5rem"}),workarea:x(l5e,{}),tooltip:"Post Processing"},training:{title:x(yke,{fill:"black",boxSize:"2.5rem"}),workarea:x(vke,{}),tooltip:"Training"}},xS=Ze.map(If,(e,t)=>t);[...xS];function bke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();gt("1",()=>{n(ko(0))}),gt("2",()=>{n(ko(1))}),gt("3",()=>{n(ko(2))}),gt("4",()=>{n(ko(3))}),gt("5",()=>{n(ko(4))}),gt("6",()=>{n(ko(5))}),gt("z",()=>{n(gd(!t))},[t]);const r=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(pi,{hasArrow:!0,label:If[a].tooltip,placement:"right",children:x(QF,{children:If[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(If).forEach(a=>{o.push(x(XF,{className:"app-tabs-panel",children:If[a].workarea},a))}),o};return ee(KF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(ko(o)),n(Li(!0))},children:[x("div",{className:"app-tabs-list",children:r()}),x(ZF,{className:"app-tabs-panels",children:t?x(yCe,{}):i()})]})}const wV={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,shouldForceOutpaint:!1,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},Ske=wV,CV=Bb({name:"options",initialState:Ske,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=X3(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},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=d4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=X3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),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:h,seamless:g,hires_fix:m,width:v,height:b,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=d4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=X3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),b&&(e.height=b),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...wV}),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=xS.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},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:_V,resetOptionsState:ITe,resetSeed:OTe,setActiveTab:ko,setAllImageToImageParameters:xke,setAllParameters:wke,setAllTextToImageParameters:Cke,setCfgScale:kV,setCodeformerFidelity:EV,setCurrentTheme:_ke,setFacetoolStrength:t5,setFacetoolType:n5,setHeight:PV,setHiresFix:TV,setImg2imgStrength:O7,setInfillMethod:LV,setInitialImage:m2,setIsLightBoxOpen:gd,setIterations:kke,setMaskPath:AV,setOptionsPanelScrollPosition:Eke,setParameter:RTe,setPerlin:MV,setPrompt:wS,setSampler:IV,setSeamBlur:xI,setSeamless:OV,setSeamSize:wI,setSeamSteps:CI,setSeamStrength:_I,setSeed:v2,setSeedWeights:RV,setShouldFitToWidthHeight:NV,setShouldForceOutpaint:Pke,setShouldGenerateVariations:Tke,setShouldHoldOptionsPanelOpen:Lke,setShouldLoopback:Ake,setShouldPinOptionsPanel:Mke,setShouldRandomizeSeed:Ike,setShouldRunESRGAN:Oke,setShouldRunFacetool:Rke,setShouldShowImageDetails:DV,setShouldShowOptionsPanel:ad,setShowAdvancedOptions:NTe,setShowDualDisplay:Nke,setSteps:zV,setThreshold:BV,setTileSize:kI,setUpscalingLevel:R7,setUpscalingStrength:N7,setVariationAmount:Dke,setWidth:FV}=CV.actions,zke=CV.reducer,Nl=Object.create(null);Nl.open="0";Nl.close="1";Nl.ping="2";Nl.pong="3";Nl.message="4";Nl.upgrade="5";Nl.noop="6";const r5=Object.create(null);Object.keys(Nl).forEach(e=>{r5[Nl[e]]=e});const Bke={type:"error",data:"parser error"},Fke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$ke=typeof ArrayBuffer=="function",Hke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$V=({type:e,data:t},n,r)=>Fke&&t instanceof Blob?n?r(t):EI(t,r):$ke&&(t instanceof ArrayBuffer||Hke(t))?n?r(t):EI(new Blob([t]),r):r(Nl[e]+(t||"")),EI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},PI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;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),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},Vke=typeof ArrayBuffer=="function",HV=(e,t)=>{if(typeof e!="string")return{type:"message",data:WV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Uke(e.substring(1),t)}:r5[n]?e.length>1?{type:r5[n],data:e.substring(1)}:{type:r5[n]}:Bke},Uke=(e,t)=>{if(Vke){const n=Wke(e);return WV(n,t)}else return{base64:!0,data:e}},WV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},VV=String.fromCharCode(30),Gke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{$V(o,!1,s=>{r[a]=s,++i===n&&t(r.join(VV))})})},jke=(e,t)=>{const n=e.split(VV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function GV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const qke=setTimeout,Kke=clearTimeout;function CS(e,t){t.useNativeTimers?(e.setTimeoutFn=qke.bind(jc),e.clearTimeoutFn=Kke.bind(jc)):(e.setTimeoutFn=setTimeout.bind(jc),e.clearTimeoutFn=clearTimeout.bind(jc))}const Xke=1.33;function Zke(e){return typeof e=="string"?Qke(e):Math.ceil((e.byteLength||e.size)*Xke)}function Qke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Jke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jV extends Ur{constructor(t){super(),this.writable=!1,CS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Jke(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=HV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const YV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),D7=64,eEe={};let TI=0,v3=0,LI;function AI(e){let t="";do t=YV[e%D7]+t,e=Math.floor(e/D7);while(e>0);return t}function qV(){const e=AI(+new Date);return e!==LI?(TI=0,LI=e):e+"."+AI(TI++)}for(;v3{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)};jke(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,Gke(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]=qV()),!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=KV(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 Al(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 Al extends Ur{constructor(t,n){super(),CS(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=GV(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 ZV(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{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"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=Al.requestsCount++,Al.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=rEe,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Al.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()}}Al.requestsCount=0;Al.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MI);else if(typeof addEventListener=="function"){const e="onpagehide"in jc?"pagehide":"unload";addEventListener(e,MI,!1)}}function MI(){for(let e in Al.requests)Al.requests.hasOwnProperty(e)&&Al.requests[e].abort()}const QV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),y3=jc.WebSocket||jc.MozWebSocket,II=!0,aEe="arraybuffer",OI=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sEe extends jV{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=OI?{}:GV(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=II&&!OI?n?new y3(t,n):new y3(t):new y3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||aEe,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{const a={};try{II&&this.ws.send(o)}catch{}i&&QV(()=>{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]=qV()),this.supportsBinary||(t.b64=1);const i=KV(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!!y3}}const lEe={websocket:sEe,polling:oEe},uEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function z7(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=uEe.exec(e||""),o={},a=14;for(;a--;)o[cEe[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=dEe(o,o.path),o.queryKey=fEe(o,o.query),o}function dEe(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 fEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Fc extends Ur{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=z7(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=z7(n.host).host),CS(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=tEe(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=UV,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 lEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fc.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{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;Fc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),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,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{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",Fc.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{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;r0&&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){Fc.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(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,JV=Object.prototype.toString,mEe=typeof Blob=="function"||typeof Blob<"u"&&JV.call(Blob)==="[object BlobConstructor]",vEe=typeof File=="function"||typeof File<"u"&&JV.call(File)==="[object FileConstructor]";function Mk(e){return pEe&&(e instanceof ArrayBuffer||gEe(e))||mEe&&e instanceof Blob||vEe&&e instanceof File}function i5(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class wEe{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=bEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:SEe,get PacketType(){return nn},Encoder:xEe,Decoder:Ik},Symbol.toStringTag,{value:"Module"}));function vs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const _Ee=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eU extends Ur{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=[vs(t,"open",this.onopen.bind(this)),vs(t,"packet",this.onpacket.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(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(_Ee.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.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.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:nn.CONNECT,data:t})}):this.packet({type:nn.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 nn.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 nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.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:nn.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:nn.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;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}w1.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};w1.prototype.reset=function(){this.attempts=0};w1.prototype.setMin=function(e){this.ms=e};w1.prototype.setMax=function(e){this.max=e};w1.prototype.setJitter=function(e){this.jitter=e};class $7 extends Ur{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,CS(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 w1({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||CEe;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 Fc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vs(n,"open",function(){r.onopen(),t&&t()}),o=vs(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(vs(t,"ping",this.onping.bind(this)),vs(t,"data",this.ondata.bind(this)),vs(t,"error",this.onerror.bind(this)),vs(t,"close",this.onclose.bind(this)),vs(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){QV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new eU(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;rt()),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 nm={};function o5(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=hEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=nm[i]&&o in nm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new $7(r,t):(nm[i]||(nm[i]=new $7(r,t)),l=nm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(o5,{Manager:$7,Socket:eU,io:o5,connect:o5});var kEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,EEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,PEe=/[^-+\dA-Z]/g;function _o(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(RI[t]||t||RI.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"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},b=function(){return n?0:e.getTimezoneOffset()},w=function(){return TEe(e)},E=function(){return LEe(e)},P={d:function(){return a()},dd:function(){return ea(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return NI({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ea(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ea(u(),4)},h:function(){return h()%12||12},hh:function(){return ea(h()%12||12)},H:function(){return h()},HH:function(){return ea(h())},M:function(){return g()},MM:function(){return ea(g())},s:function(){return m()},ss:function(){return ea(m())},l:function(){return ea(v(),3)},L:function(){return ea(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":AEe(e)},o:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+ea(Math.floor(Math.abs(b())/60),2)+":"+ea(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 w()},WW:function(){return ea(w())},N:function(){return E()}};return t.replace(kEe,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var RI={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"},wo={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"]},ea=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},NI=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,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},b=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return b()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},TEe=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)},LEe=function(t){var n=t.getDay();return n===0&&(n=7),n},AEe=function(t){return(String(t).match(EEe)||[""]).pop().replace(PEe,"").replace(/GMT\+0000/g,"UTC")};const MEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(XA(!0)),t(Z3("Connected")),t(nbe());const r=n().gallery;r.categories.user.latest_mtime?t(eM("user")):t(a7("user")),r.categories.result.latest_mtime?t(eM("result")):t(a7("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(XA(!1)),t(Z3("Disconnected")),t(Co({timestamp:_o(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,h={uuid:a0(),...u};if(["txt2img","img2img"].includes(l)&&t(r0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(bbe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(r0({image:{...h,category:"result"},category:"result"}))}if(o)switch(xS[a]){case"img2img":{t(m2(h));break}}t(Iw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(tSe({uuid:a0(),...r,category:"result"})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(r0({category:"result",image:{uuid:a0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(yu(!0)),t(e4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(ZA()),t(Iw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:a0(),...l}));t(eSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(r4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(r0({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Iw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(IH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(_V()),a===i&&t(AV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(t4e(r)),r.infill_methods.includes("patchmatch")||t(LV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(Z3("Model Changed")),t(yu(!1)),t(n0(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(QA(o)),t(yu(!1)),t(n0(!0)),t(ZA()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(fm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},IEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Jg.Stage({container:i,width:n,height:r}),a=new Jg.Layer,s=new Jg.Layer;a.add(new Jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Jg.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},OEe=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("
"),t.document.write(r.outerHTML),t.document.write("

")})},REe=e=>{const t=C4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:g,hiresFix:m,img2imgStrength:v,infillMethod:b,initialImage:w,iterations:E,perlin:P,prompt:k,sampler:T,seamBlur:M,seamless:O,seamSize:R,seamSteps:N,seamStrength:z,seed:V,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:ue,shouldGenerateVariations:W,shouldRandomizeSeed:Q,shouldRunESRGAN:ne,shouldRunFacetool:J,steps:K,threshold:G,tileSize:X,upscalingLevel:ce,upscalingStrength:me,variationAmount:Me,width:xe}=r,{shouldDisplayInProgressType:be,saveIntermediatesInterval:Ie,enableImageDebugging:We}=o,De={prompt:k,iterations:Q||W?E:1,steps:K,cfg_scale:s,threshold:G,perlin:P,height:g,width:xe,sampler_name:T,seed:V,progress_images:be==="full-res",progress_latents:be==="latents",save_intermediates:Ie,generation_mode:n,init_mask:""};if(De.seed=Q?X$(H_,W_):V,["txt2img","img2img"].includes(n)&&(De.seamless=O,De.hires_fix=m),n==="img2img"&&w&&(De.init_img=typeof w=="string"?w:w.url,De.strength=v,De.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ct},boundingBoxCoordinates:ft,boundingBoxDimensions:ut,inpaintReplace:vt,shouldUseInpaintReplace:Ee,stageScale:Je,isMaskEnabled:Lt,shouldPreserveMaskedArea:it}=i,pt={...ft,...ut},an=IEe(Lt?Ct.filter(nk):[],pt);De.init_mask=an,De.fit=!1,De.init_img=a,De.strength=v,De.invert_mask=it,Ee&&(De.inpaint_replace=vt),De.bounding_box=pt;const _t=t.scale();t.scale({x:1/Je,y:1/Je});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:pt.x+Ut.x,y:pt.y+Ut.y,width:pt.width,height:pt.height});We&&OEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(_t),De.init_img=sn,De.progress_images=!1,De.seam_size=R,De.seam_blur=M,De.seam_strength=z,De.seam_steps=N,De.tile_size=X,De.force_outpaint=ue,De.infill_method=b}W?(De.variation_amount=Me,$&&(De.with_variations=Eye($))):De.variation_amount=0;let Qe=!1,st=!1;return ne&&(Qe={level:ce,strength:me}),J&&(st={type:h,strength:u},h==="codeformer"&&(st.codeformer_fidelity=l)),We&&(De.enable_image_debugging=We),{generationParameters:De,esrganParameters:Qe,facetoolParameters:st}},NEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(yu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(s4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:g,esrganParameters:m,facetoolParameters:v}=REe(h);t.emit("generateImage",g,m,v),g.init_mask&&(g.init_mask=g.init_mask.substr(0,64).concat("...")),g.init_img&&(g.init_img=g.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...g,...m,...v})}`}))},emitRunESRGAN:i=>{n(yu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(yu(!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(Co({timestamp:_o(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(IH(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")},emitRequestModelChange:i=>{n(i4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},DEe=()=>{const{origin:e}=new URL(window.location.href),t=o5(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:b,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=MEe(i),{emitGenerateImage:O,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:V,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:ue,emitRequestModelChange:W,emitSaveStagingAreaImageToGallery:Q,emitRequestEmptyTempFolder:ne}=NEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>b(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{k(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{O(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{V(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ue();break}case"socketio/requestModelChange":{W(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{Q(a.payload);break}case"socketio/requestEmptyTempFolder":{ne();break}}o(a)}},zEe=["cursorPosition"].map(e=>`canvas.${e}`),BEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),FEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),tU=l$({options:zke,gallery:lSe,system:c4e,canvas:jbe}),$Ee=T$.getPersistConfig({key:"root",storage:P$,rootReducer:tU,blacklist:[...zEe,...BEe,...FEe],debounce:300}),HEe=uye($Ee,tU),nU=r2e({reducer:HEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(DEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=q2e,Le=z2e;function a5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?a5=function(n){return typeof n}:a5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},a5(e)}function WEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(r2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),YEe=dt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),qEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(YEe),i=t?Math.round(t*100/n):0;return x(MF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function KEe(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function XEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Av(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(x(KEe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(X0,{isOpen:t,onClose:r,children:[x(Z0,{}),ee(Dv,{className:" modal hotkeys-modal",children:[x(u_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ee(wb,{allowMultiple:!0,children:[ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(i)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(o)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(a)})]}),ee(Vf,{children:[ee(Hf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Wf,{})]}),x(Uf,{children:l(s)})]})]})})]})]})]})}const ZEe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(dH(i))};return ee("div",{className:"model-list-item",children:[x(pi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(rB,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Wa,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},QEe=dt(e=>e.system,e=>{const t=Ze.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),JEe=()=>{const{models:e}=Le(QEe);return x(wb,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(Vf,{children:[x(Hf,{children:ee("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Wf,{})]})}),x(Uf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(ZEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},ePe=dt([p2,Q$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Ze.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),tPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Av(),{isOpen:a,onOpen:s,onClose:l}=Av(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(ePe),b=()=>{mU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(o4e(E))};return ee(Wn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(X0,{isOpen:r,onClose:o,children:[x(Z0,{}),ee(Dv,{className:"modal settings-modal",children:[x(Ob,{className:"settings-modal-header",children:"Settings"}),x(u_,{className:"modal-close-btn"}),ee(Nv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(JEe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Iu,{label:"Display In-Progress Images",validValues:b5e,value:u,onChange:E=>t(Q5e(E.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(Fa,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(eH(E.target.checked))}),x(Fa,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(n4e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(Fa,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(a4e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[x(Qf,{size:"md",children:"Reset Web UI"}),x(Wa,{colorScheme:"red",onClick:b,children:"Reset Web UI"}),x(Po,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Po,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Ib,{children:x(Wa,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(X0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Z0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Dv,{children:x(Nv,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Po,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},nPe=dt(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:Jr.exports.isEqual}}),rPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(nPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(pi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Po,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(tH())},className:`status ${l}`,children:u})})},iPe=["dark","light","green"];function oPe(){const{setColorMode:e}=Yv(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(_ke(i))};return x(rd,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(F4e,{})}),children:x(aB,{align:"stretch",children:iPe.map(i=>x(ra,{style:{width:"6rem"},leftIcon:n===i?x(J_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const aPe=dt([p2],e=>{const{isProcessing:t,model_list:n}=e,r=Ze.map(n,(o,a)=>a),i=Ze.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),sPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(aPe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Iu,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(dH(o.target.value))}})})},lPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[x("img",{src:LH,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[x(rPe,{}),x(sPe,{}),x(XEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(R4e,{})})}),x(oPe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(E4e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(S4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(b4e,{})})}),x(tPe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(tk,{})})})]})]}),uPe=dt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),cPe=dt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Jr.exports.isEqual}}),dPe=()=>{const e=qe(),t=Le(uPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(cPe),[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(tH()),e(Pw(!n))};return gt("`",()=>{e(Pw(!n))},[n]),gt("esc",()=>{e(Pw(!1))}),ee(Wn,{children:[n&&x(BH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:b}=h;return ee("div",{className:`console-entry console-${b}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},g)})})}),n&&x(pi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Va,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(x4e,{}),onClick:()=>a(!o)})}),x(pi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Va,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(z4e,{}):x(oH,{}),onClick:l})})]})};function fPe(){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)})}var hPe=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 y2(e,t){var n=pPe(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 pPe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=hPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var gPe=[".DS_Store","Thumbs.db"];function mPe(e){return c1(this,void 0,void 0,function(){return d1(this,function(t){return _4(e)&&vPe(e.dataTransfer)?[2,xPe(e.dataTransfer,e.type)]:yPe(e)?[2,bPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,SPe(e)]:[2,[]]})})}function vPe(e){return _4(e)}function yPe(e){return _4(e)&&_4(e.target)}function _4(e){return typeof e=="object"&&e!==null}function bPe(e){return V7(e.target.files).map(function(t){return y2(t)})}function SPe(e){return c1(this,void 0,void 0,function(){var t;return d1(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 y2(r)})]}})})}function xPe(e,t){return c1(this,void 0,void 0,function(){var n,r;return d1(this,function(i){switch(i.label){case 0:return e.items?(n=V7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(wPe))]):[3,2];case 1:return r=i.sent(),[2,zI(iU(r))];case 2:return[2,zI(V7(e.files).map(function(o){return y2(o)}))]}})})}function zI(e){return e.filter(function(t){return gPe.indexOf(t.name)===-1})}function V7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,WI(n)];if(e.sizen)return[!1,WI(n)]}return[!0,null]}function Of(e){return e!=null}function BPe(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=lU(l,n),h=Hv(u,1),g=h[0],m=uU(l,r,i),v=Hv(m,1),b=v[0],w=s?s(l):null;return g&&b&&!w})}function k4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function b3(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 UI(e){e.preventDefault()}function FPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function $Pe(e){return e.indexOf("Edge/")!==-1}function HPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FPe(e)||$Pe(e)}function ll(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function iTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ok=C.exports.forwardRef(function(e,t){var n=e.children,r=E4(e,YPe),i=pU(r),o=i.open,a=E4(i,qPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(ur(ur({},a),{},{open:o}))})});Ok.displayName="Dropzone";var hU={disabled:!1,getFilesFromEvent:mPe,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};Ok.defaultProps=hU;Ok.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var Y7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ur(ur({},hU),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,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,O=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,V=t.validator,$=C.exports.useMemo(function(){return UPe(n)},[n]),j=C.exports.useMemo(function(){return VPe(n)},[n]),ue=C.exports.useMemo(function(){return typeof E=="function"?E:jI},[E]),W=C.exports.useMemo(function(){return typeof w=="function"?w:jI},[w]),Q=C.exports.useRef(null),ne=C.exports.useRef(null),J=C.exports.useReducer(oTe,Y7),K=Xw(J,2),G=K[0],X=K[1],ce=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&WPe()),xe=function(){!Me.current&&me&&setTimeout(function(){if(ne.current){var Xe=ne.current.files;Xe.length||(X({type:"closeDialog"}),W())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[ne,me,W,Me]);var be=C.exports.useRef([]),Ie=function(Xe){Q.current&&Q.current.contains(Xe.target)||(Xe.preventDefault(),be.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",UI,!1),document.addEventListener("drop",Ie,!1)),function(){T&&(document.removeEventListener("dragover",UI),document.removeEventListener("drop",Ie))}},[Q,T]),C.exports.useEffect(function(){return!r&&k&&Q.current&&Q.current.focus(),function(){}},[Q,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),De=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[].concat(ZPe(be.current),[Oe.target]),b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){if(!(k4(Oe)&&!N)){var Xt=Xe.length,Yt=Xt>0&&BPe({files:Xe,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:V}),_e=Xt>0&&!Yt;X({isDragAccept:Yt,isDragReject:_e,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Xe){return We(Xe)})},[i,u,We,N,$,a,o,s,l,V]),Qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=b3(Oe);if(Xe&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Xe&&g&&g(Oe),!1},[g,N]),st=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe);var Xe=be.current.filter(function(Yt){return Q.current&&Q.current.contains(Yt)}),Xt=Xe.indexOf(Oe.target);Xt!==-1&&Xe.splice(Xt,1),be.current=Xe,!(Xe.length>0)&&(X({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),b3(Oe)&&h&&h(Oe))},[Q,h,N]),Ct=C.exports.useCallback(function(Oe,Xe){var Xt=[],Yt=[];Oe.forEach(function(_e){var It=lU(_e,$),ze=Xw(It,2),ot=ze[0],ln=ze[1],zn=uU(_e,a,o),He=Xw(zn,2),ct=He[0],tt=He[1],Nt=V?V(_e):null;if(ot&&ct&&!Nt)Xt.push(_e);else{var Zt=[ln,tt];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:_e,errors:Zt.filter(function(er){return er})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(_e){Yt.push({file:_e,errors:[zPe]})}),Xt.splice(0)),X({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,Xe),Yt.length>0&&b&&b(Yt,Xe),Xt.length>0&&v&&v(Xt,Xe)},[X,s,$,a,o,l,m,v,b,V]),ft=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),_t(Oe),be.current=[],b3(Oe)&&Promise.resolve(i(Oe)).then(function(Xe){k4(Oe)&&!N||Ct(Xe,Oe)}).catch(function(Xe){return We(Xe)}),X({type:"reset"})},[i,Ct,We,N]),ut=C.exports.useCallback(function(){if(Me.current){X({type:"openDialog"}),ue();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(Xe){return i(Xe)}).then(function(Xe){Ct(Xe,null),X({type:"closeDialog"})}).catch(function(Xe){GPe(Xe)?(W(Xe),X({type:"closeDialog"})):jPe(Xe)?(Me.current=!1,ne.current?(ne.current.value=null,ne.current.click()):We(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 was provided."))):We(Xe)});return}ne.current&&(X({type:"openDialog"}),ue(),ne.current.value=null,ne.current.click())},[X,ue,W,P,Ct,We,j,s]),vt=C.exports.useCallback(function(Oe){!Q.current||!Q.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),ut())},[Q,ut]),Ee=C.exports.useCallback(function(){X({type:"focus"})},[]),Je=C.exports.useCallback(function(){X({type:"blur"})},[]),Lt=C.exports.useCallback(function(){M||(HPe()?setTimeout(ut,0):ut())},[M,ut]),it=function(Xe){return r?null:Xe},pt=function(Xe){return O?null:it(Xe)},an=function(Xe){return R?null:it(Xe)},_t=function(Xe){N&&Xe.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.role,_e=Oe.onKeyDown,It=Oe.onFocus,ze=Oe.onBlur,ot=Oe.onClick,ln=Oe.onDragEnter,zn=Oe.onDragOver,He=Oe.onDragLeave,ct=Oe.onDrop,tt=E4(Oe,KPe);return ur(ur(j7({onKeyDown:pt(ll(_e,vt)),onFocus:pt(ll(It,Ee)),onBlur:pt(ll(ze,Je)),onClick:it(ll(ot,Lt)),onDragEnter:an(ll(ln,De)),onDragOver:an(ll(zn,Qe)),onDragLeave:an(ll(He,st)),onDrop:an(ll(ct,ft)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,Q),!r&&!O?{tabIndex:0}:{}),tt)}},[Q,vt,Ee,Je,Lt,De,Qe,st,ft,O,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xe=Oe.refKey,Xt=Xe===void 0?"ref":Xe,Yt=Oe.onChange,_e=Oe.onClick,It=E4(Oe,XPe),ze=j7({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:it(ll(Yt,ft)),onClick:it(ll(_e,sn)),tabIndex:-1},Xt,ne);return ur(ur({},ze),It)}},[ne,n,s,ft,r]);return ur(ur({},G),{},{isFocused:ce&&!r,getRootProps:Ut,getInputProps:yn,rootRef:Q,inputRef:ne,open:it(ut)})}function oTe(e,t){switch(t.type){case"focus":return ur(ur({},e),{},{isFocused:!0});case"blur":return ur(ur({},e),{},{isFocused:!1});case"openDialog":return ur(ur({},Y7),{},{isFileDialogActive:!0});case"closeDialog":return ur(ur({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ur(ur({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ur(ur({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ur({},Y7);default:return e}}function jI(){}const aTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return gt("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ee(Qf,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[x(Qf,{size:"lg",children:"Invalid Upload"}),x(Qf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},YI=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:a0(),category:"user",...l};t(r0({image:u,category:"user"})),o==="unifiedCanvas"?t(ak(u)):o==="img2img"&&t(m2(u))},sTe=e=>{const{children:t}=e,n=qe(),r=Le(_r),i=c2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=xV(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,O)=>M+` +`+O.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(YI({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:b,isDragActive:w,open:E}=pU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const O=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&O.push(N);if(!O.length)return;if(T.stopImmediatePropagation(),O.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=O[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(YI({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${If[r].tooltip}`:"";return x(lk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(aTe,{isDragAccept:v,isDragReject:b,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},lTe=()=>{const e=qe(),t=Le(wCe),n=c2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(l4e())},[e,n,t])},gU=dt([e=>e.options,e=>e.gallery,_r],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:Ze.isEqual}}),uTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(gU),s=()=>{e(ad(!0)),i&&setTimeout(()=>e(Li(!0)),400)};return gt("f",()=>{o||t?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(a||i)&&setTimeout(()=>e(Li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:x(lH,{})}),r&&ee(Wn,{children:[x(fH,{iconButton:!0}),x(hH,{})]})]}):null},cTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(gU),a=()=>{e(id(!0)),r&&e(Li(!0))};return gt("f",()=>{t||i?(e(ad(!1)),e(id(!1))):(e(ad(!0)),e(id(!0))),(r||o)&&setTimeout(()=>e(Li(!0)),400)},[t,i]),n?x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:x(nH,{})}):null};fPe();const dTe=()=>(lTe(),ee("div",{className:"App",children:[ee(sTe,{children:[x(qEe,{}),ee("div",{className:"app-content",children:[x(lPe,{}),x(bke,{})]}),x("div",{className:"app-console",children:x(dPe,{})})]}),x(uTe,{}),x(cTe,{})]}));const mU=gye(nU),fTe=SN({key:"invokeai-style-cache",prepend:!0});Qw.createRoot(document.getElementById("root")).render(x(ae.StrictMode,{children:x(G2e,{store:nU,children:x(rU,{loading:x(jEe,{}),persistor:mU,children:x(_J,{value:fTe,children:x(xve,{children:x(dTe,{})})})})})})); diff --git a/frontend/dist/assets/index.99dfa618.js b/frontend/dist/assets/index.99dfa618.js deleted file mode 100644 index b3cb25e5a5..0000000000 --- a/frontend/dist/assets/index.99dfa618.js +++ /dev/null @@ -1,623 +0,0 @@ -function Eq(e,t){for(var n=0;nr[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 ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function R9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/** - * @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 Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),dE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=dE&&e[dE]||e["@@iterator"],typeof e=="function"?e:null)}var IO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RO=Object.assign,NO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}Z0.prototype.isReactComponent={};Z0.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")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DO(){}DO.prototype=Z0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}var D9=N9.prototype=new DO;D9.constructor=N9;RO(D9,Z0.prototype);D9.isPureReactComponent=!0;var fE=Array.isArray,zO=Object.prototype.hasOwnProperty,z9={current:null},BO={key:!0,ref:!0,__self:!0,__source:!0};function FO(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)zO.call(t,r)&&!BO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,he=G[X];if(0>>1;Xi(De,te))$ei(He,De)?(G[X]=He,G[$e]=te,X=$e):(G[X]=De,G[Se]=te,X=Se);else if($ei(He,te))G[X]=He,G[$e]=te,X=$e;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te:G.id-Z.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=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=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(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,H=5,$=-1;function j(){return!(e.unstable_now()-$G||125X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})($O);(function(e){e.exports=$O})(e0);/** - * @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 HO=C.exports,ca=e0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fw=Object.prototype.hasOwnProperty,Wq=/^[: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]*$/,pE={},gE={};function Vq(e){return Fw.call(gE,e)?!0:Fw.call(pE,e)?!1:Wq.test(e)?gE[e]=!0:(pE[e]=!0,!1)}function Uq(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 Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(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 ao(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 Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(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){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var F9=/[\-:]([a-z])/g;function $9(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(F9,$9);Oi[t]=new ao(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(F9,$9);Oi[t]=new ao(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(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(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 Np:return"Fragment";case Rp:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UO:return(e.displayName||"Context")+".Consumer";case VO:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ac:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function Yq(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 Vw(t);case 8:return t===W9?"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 nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=jO(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 ry(e){e._valueTracker||(e._valueTracker=qq(e))}function YO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(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 qO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){qO(e,t);var n=nd(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")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yE(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 jw(e,t,n){(t!=="number"||r4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={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},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function QO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function JO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({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 Kw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Xw(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 Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function xE(e){if(e=Fv(e)){if(typeof Qw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=_5(t),Qw(e.stateNode,e.type,t))}}function eI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function tI(){if(n0){var e=n0,t=r0;if(r0=n0=null,xE(e),t)for(e=0;e>>=0,e===0?32:31-(sK(e)/lK|0)|0}var oy=64,ay=4194304;function Jg(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 s4(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=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(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;0n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(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=ym),LE=String.fromCharCode(32),ME=!1;function xI(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function WK(e,t){switch(e){case"compositionend":return wI(t);case"keypress":return t.which!==32?null:(ME=!0,LE);case"textInput":return e=t.data,e===LE&&ME?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!J9&&xI(e,t)?(e=SI(),v3=X9=zc=null,Dp=!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)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=NE(n)}}function EI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PI(){for(var e=window,t=r4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r4(e.document)}return t}function e7(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 QK(e){var t=PI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&EI(n.ownerDocument.documentElement,n)){if(r!==null&&e7(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=DE(n,o);var a=DE(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=document.documentMode,zp=null,i6=null,bm=null,o6=!1;function zE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r4(r)||(r=zp,"selectionStart"in r&&e7(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}),bm&&Jm(bm,r)||(bm=r,r=c4(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function Yn(e,t){$p++,d6[$p]=e.current,e.current=t}var rd={},Vi=fd(rd),To=fd(!1),qf=rd;function L0(e,t){var n=e.type.contextTypes;if(!n)return rd;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 Ao(e){return e=e.childContextTypes,e!=null}function f4(){Zn(To),Zn(Vi)}function UE(e,t,n){if(Vi.current!==rd)throw Error(Ie(168));Yn(Vi,t),Yn(To,n)}function DI(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(Ie(108,Yq(e)||"Unknown",i));return fr({},n,r)}function h4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function GE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=DI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var uu=null,k5=!1,ux=!1;function zI(e){uu===null?uu=[e]:uu.push(e)}function cX(e){k5=!0,zI(e)}function hd(){if(!ux&&uu!==null){ux=!0;var e=0,t=Pn;try{var n=uu;for(Pn=1;e>=a,i-=a,du=1<<32-xs(t)+i|n<z?(H=N,N=null):H=N.sibling;var $=m(E,N,T[z],M);if($===null){N===null&&(N=H);break}e&&N&&$.alternate===null&&t(E,N),_=o($,_,z),R===null?I=$:R.sibling=$,R=$,N=H}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;zz?(H=N,N=null):H=N.sibling;var j=m(E,N,$.value,M);if(j===null){N===null&&(N=H);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=H}if($.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!$.done;z++,$=T.next())$=p(E,$.value,M),$!==null&&(_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return nr&&vf(E,z),I}for(N=r(E,N);!$.done;z++,$=T.next())$=v(N,E,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ac&&QE(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=k3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=vx(T,E.mode,M),_.return=E,E=_}return a(E);case Ac:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);hy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=mx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=GI(!0),jI=GI(!1),$v={},xl=fd($v),rv=fd($v),iv=fd($v);function Lf(e){if(e===$v)throw Error(Ie(174));return e}function u7(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function YI(e){Lf(iv.current);var t=Lf(xl.current),n=qw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function c7(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=fd(0);function S4(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 cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function uR(){return Fa().memoizedState}function pX(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cR(e))dR(t,n);else if(n=HI(e,t,n,r),n!==null){var i=io();ws(n,e,r,i),fR(n,t,r)}}function gX(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cR(e))dR(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,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=HI(e,t,i,r),n!==null&&(i=io(),ws(n,e,r,i),fR(n,t,r))}}function cR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function dR(e,t){xm=b4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x4={readContext:Ba,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},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:eP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,iR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();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=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:JE,useDebugValue:m7,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=JE(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),di===null)throw Error(Ie(349));(Xf&30)!==0||XI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,eP(QI.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,ZI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=fu,r=du;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<\/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[pl]=t,e[nv]=r,xR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=S4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Ir()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(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=Ir(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function _X(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var uP=!1;function EX(e,t){if(a6=l4,e=PI(),e7(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{n=null;break e}var a=0,s=-1,l=-1,u=0,h=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&&++h===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(s6={focusedElem:e,selectionRange:n},l4=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:hs(t.type,w),P);E.__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(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return S=uP,uP=!1,S}function wm(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&&C6(t,n,o)}i=i.next}while(i!==r)}}function T5(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 _6(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 _R(e){var t=e.alternate;t!==null&&(e.alternate=null,_R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[c6],delete t[lX],delete t[uX])),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 kR(e){return e.tag===5||e.tag===3||e.tag===4}function cP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kR(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 k6(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=d4));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(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(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Pi=null,ps=!1;function wc(e,t,n){for(n=n.child;n!==null;)ER(e,t,n),n=n.sibling}function ER(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(b5,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Pi,i=ps;Pi=null,wc(e,t,n),Pi=r,ps=i,Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Zm(e)):lx(Pi,n.stateNode));break;case 4:r=Pi,i=ps,Pi=n.stateNode.containerInfo,ps=!0,wc(e,t,n),Pi=r,ps=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(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)&&C6(n,t,a),i=i.next}while(i!==r)}wc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}wc(e,t,n);break;case 21:wc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,wc(e,t,n),Hi=r):wc(e,t,n);break;default:wc(e,t,n)}}function dP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ls(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Ir()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10e?16:e,Bc===null)var r=!1;else{if(e=Bc,Bc=null,_4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,ot=e.current;ot!==null;){var o=ot,a=o.child;if((ot.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lIr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function RR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=io();e=yu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RR(e,n)}function NX(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(Ie(314))}r!==null&&r.delete(t),RR(e,n)}var NR;NR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&BI(t,g4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();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,Ao(r)?(o=!0,h4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E5,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=hs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=aP(null,t,r,e,n);break e;case 11:t=iP(null,t,r,e,n);break e;case 14:t=oP(null,t,r,hs(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),aP(e,t,r,i,n);case 3:e:{if(yR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,WI(e,t),y4(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=R0(Error(Ie(423)),t),t=sP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Ie(424)),t),t=sP(e,t,r,n,i);break e}else for(oa=Yc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,vs=null,n=jI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=Su(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return YI(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),vR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return SR(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),iP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(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,Yn(m4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=Su(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=pu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(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(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(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}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=hs(r,t.pendingProps),i=hs(r.type,i),oP(e,t,r,i,n);case 15:return gR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h4(t)):e=!1,o0(t,n),UI(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return bR(e,t,n);case 22:return mR(e,t,n)}throw Error(Ie(156,t.tag))};function DR(e,t){return lI(e,t)}function DX(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 Ia(e,t,n,r){return new DX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function Zc(e,t){var n=e.alternate;return n===null?(n=Ia(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 k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case GO:return L5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VO:a=10;break e;case UO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ac:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L5(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=GO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BX(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=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new BX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function FX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Il);const yy=R9(Il.exports);var SP=Il.exports;Bw.createRoot=SP.createRoot,Bw.hydrateRoot=SP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N5={exports:{}},D5={};/** - * @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 UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function $R(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)YX.call(t,r)&&!KX.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:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}D5.Fragment=jX;D5.jsx=$R;D5.jsxs=$R;(function(e){e.exports=D5})(N5);const $n=N5.exports.Fragment,x=N5.exports.jsx,re=N5.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Hv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(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?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??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 ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),bP=()=>{};function xP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function HR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>xP(a,s)),[h,p]=C.exports.useState(()=>xP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?bP:_,setColorMode:t?bP:E,forced:t!==void 0}),[P,_,E,t]);return x(A7.Provider,{value:T,children:n})}HR.displayName="ColorModeProvider";var M6={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]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[H]=ye[h]=ye[$]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,$e=Se||De||Function("return this")(),He=t&&!t.nodeType&&t,qe=He&&!0&&e&&!e.nodeType&&e,tt=qe&&qe.exports===He,Ze=tt&&Se.process,nt=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=nt&&nt.isTypedArray;function xt(U,ne,ge){switch(ge.length){case 0:return U.call(ne);case 1:return U.call(ne,ge[0]);case 2:return U.call(ne,ge[0],ge[1]);case 3:return U.call(ne,ge[0],ge[1],ge[2])}return U.apply(ne,ge)}function Le(U,ne){for(var ge=-1,Ke=Array(U);++ge-1}function S1(U,ne){var ge=this.__data__,Ke=qa(ge,U);return Ke<0?(++this.size,ge.push([U,ne])):ge[Ke][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=zu,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne1?ge[zt-1]:void 0,yt=zt>2?ge[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Eh(ge[0],ge[1],yt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ke-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Od=$l(function(){return arguments}())?$l:function(U){return Wn(U)&&yn.call(U,"callee")&&!We.call(U,"callee")},Vl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Uu(U)}function Ph(U){return Wn(U)&&Ht(U)}var Vu=Zt||O1;function Uu(U){if(!Bo(U))return!1;var ne=Ns(U);return ne==v||ne==S||ne==u||ne==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Wn(U)||Ns(U)!=_)return!1;var ne=ln(U);if(ne===null)return!0;var ge=yn.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&sn.call(ge)==Xt}var Ah=Tt?at(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?A1(U,!0):Ds(U)}var un=Ka(function(U,ne,ge,Ke){No(U,ne,ge,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=un})(M6,M6.exports);const yl=M6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),wP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=wP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function us(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var WR=["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 iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...WR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...WR].join(" ")}var aZ={"--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(" ")},sZ={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 lZ(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 uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},VR="& > :not(style) ~ :not(style)",cZ={[VR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[VR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},I6={"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"},fZ=new Set(Object.values(I6)),UR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||UR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in I6?I6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=GR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var GR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(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(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||GR(e)||UR.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){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:us("borderWidths"),borderStyles:us("borderStyles"),colors:us("colors"),borders:us("borders"),radii:us("radii",rn.px),space:us("space",by(rn.vh,rn.px)),spaceT:us("space",by(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:us("sizes",by(rn.vh,rn.px)),sizesT:us("sizes",by(rn.vh,rn.fraction)),shadows:us("shadows"),logical:rZ,blur:us("blur",rn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.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",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var pn={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(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},R6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(R6,{shadow:R6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},P4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({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(P4,{flexDir:P4.flexDirection});var jR={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},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={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",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},km={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(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.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")},Xn={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(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.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")},MZ={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")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.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"}},IZ={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 YR(e){return _s(e)&&e.reference?e.reference:String(e)}var z5=(e,...t)=>t.map(YR).join(` ${e} `).replace(/calc/g,""),CP=(...e)=>`calc(${z5("+",...e)})`,_P=(...e)=>`calc(${z5("-",...e)})`,N6=(...e)=>`calc(${z5("*",...e)})`,kP=(...e)=>`calc(${z5("/",...e)})`,EP=e=>{const t=YR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(CP(e,...t)),subtract:(...t)=>_f(_P(e,...t)),multiply:(...t)=>_f(N6(e,...t)),divide:(...t)=>_f(kP(e,...t)),negate:()=>_f(EP(e)),toString:()=>e.toString()}),{add:CP,subtract:_P,multiply:N6,divide:kP,negate:EP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function BZ(e,t=""){return[t,e].filter(Boolean).join("-")}function FZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${BZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:FZ(r,t)}}function HZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function WZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=WZ(e);return t||typeof e=="number"?`${e}px`:e}var qR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(qR));function PP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(L7(e));return new Set(t)}function TP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=PP(e),n=Object.entries(e).sort(qR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?TP(u):void 0,{_minW:TP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:PP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;HZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={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}`},Cc=e=>KR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ru=e=>KR(t=>e(t,"~ &"),"[data-peer]",".peer"),KR=(e,...t)=>t.map(e).join(", "),B5={_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:Cc(_i.hover),_peerHover:ru(_i.hover),_groupFocus:Cc(_i.focus),_peerFocus:ru(_i.focus),_groupFocusVisible:Cc(_i.focusVisible),_peerFocusVisible:ru(_i.focusVisible),_groupActive:Cc(_i.active),_peerActive:ru(_i.active),_groupDisabled:Cc(_i.disabled),_peerDisabled:ru(_i.disabled),_groupInvalid:Cc(_i.invalid),_peerInvalid:ru(_i.invalid),_groupChecked:Cc(_i.checked),_peerChecked:ru(_i.checked),_groupFocusWithin:Cc(_i.focusWithin),_peerFocusWithin:ru(_i.focusWithin),_peerPlaceholderShown:ru(_i.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]"},GZ=Object.keys(B5);function AP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=AP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:P}=AP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=B5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(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:UZ(n.breakpoints)}),n}var M7=yl({},E3,pn,yZ,P4,Ta,SZ,TZ,bZ,jR,PZ,km,R6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Ta,P4,jR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(M7),...GZ],iQ={...M7,...B5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(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;ue.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var XR=e=>t=>dQ({theme:t,pseudos:B5,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,$5--),$r}function sa(){return $r=Io2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Wv(e,P3()+(t<6&&wl()==32&&sa()==32))}function F6(e){for(;sa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&F6($r);break;case 40:e===41&&F6(e);break;case 92:sa();break}return Io}function LQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Wv(t,Io-1)+"*"+F5(e===47?e:sa())}function MQ(e){for(;!dv(wl());)sa();return Wv(e,Io)}function OQ(e){return nN(A3("",null,null,null,[""],e=tN(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=sa()){case 40:if(S!=108&&Ti(N,p-1)==58){B6(N+=wn(T3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=T3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(P3()-1,7);continue;case 47:switch(wl()){case 42:case 47:xy(IQ(LQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&xy(v>32?MP(N+";",r,n,p-1):MP(wn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(R=LP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)A3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:A3(e,R,R,r&&xy(LP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:A3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=T3(sa())),m=wl(),h=p=dl(T=N+=MQ(P3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function LP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=R7(m),S=0,w=0,P=0;S0?m[E]+" "+_:wn(_,/&\f/g,m[E])))&&(l[P++]=T);return H5(e,t,n,i===0?O7:s,l,u,h)}function IQ(e,t,n){return H5(e,t,n,ZR,F5(EQ()),cv(e,2,-2),0)}function MP(e,t,n,r){return H5(e,t,n,I7,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=R7(e),i=0;i6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+T4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B6(e,"stretch")?iN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~B6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var WQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case I7:t.return=iN(t.value,t.length);break;case QR:return s0([Mg(t,{value:wn(t.value,"@","@"+gn)})],i);case O7:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[wn(o,/:(read-\w+)/,":"+T4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,":"+T4+"$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},VQ=[WQ],oN=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(w){var P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E=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 eJ={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},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fN=function(t){return t.charCodeAt(1)===45},RP=function(t){return t!=null&&typeof t!="boolean"},Sx=rN(function(e){return fN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),NP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!fN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(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 fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},SN=xJ(bJ);function bN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var xN=e=>bN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function wN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(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 EJ=/^((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)-.*))$/,PJ=rN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},FP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},$P=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},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return cN(n,r,i),oJ(function(){return dN(n,r,i)}),null},MJ=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=$P(t,n,r),l=s||FP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var BJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),FJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),HJ=An("formError").parts("text","icon"),WJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(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 wy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function CN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function HP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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+(t1&&(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 aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(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=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function WP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(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>16,g:(e&65280)>>8,b:e&255}}var V6={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 dee(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=pee(e)),typeof e=="object"&&(iu(e.r)&&iu(e.g)&&iu(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):iu(e.h)&&iu(e.s)&&iu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):iu(e.h)&&iu(e.s)&&iu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=CN(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 fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),xx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),fs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),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 pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=fs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=fs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=fs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:UP(n[4]),format:t?"name":"hex8"}:(n=fs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=fs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:UP(n[4]+n[4]),format:t?"name":"hex8"}:(n=fs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function iu(e){return Boolean(fs.CSS_UNIT.exec(String(e)))}var Vv=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=cee(t)),this.originalInput=t;var i=dee(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=CN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=WP(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=WP(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=HP(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=HP(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),VP(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),lee(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(Mi(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(Mi(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="#"+VP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=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=wy(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=wy(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=wy(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=wy(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;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(_N(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=A4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A4([0,100],t.seed);var n=kN(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 A4([r,i],t.seed)}function vee(e,t,n){var r=yee(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 A4([r,i],n.seed)}function yee(e,t){for(var n=kN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=PN.find(function(a){return a.name===e});if(n){var r=EN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function kN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=PN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A4(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 EN(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 PN=[{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 bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function GP(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 _ee(e){const t=_N().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function TN(e){return Tee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(TN).join(` ${e} `).replace(/calc/g,""),jP=(...e)=>`calc(${eS("+",...e)})`,YP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,qP=(...e)=>`calc(${eS("/",...e)})`,KP=e=>{const t=TN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},cu=Object.assign(e=>({add:(...t)=>cu(jP(e,...t)),subtract:(...t)=>cu(YP(e,...t)),multiply:(...t)=>cu(U6(e,...t)),divide:(...t)=>cu(qP(e,...t)),negate:()=>cu(KP(e)),toString:()=>e.toString()}),{add:jP,subtract:YP,multiply:U6,divide:qP,negate:KP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function AN(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,AN(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${AN(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Bee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Fee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Hee=Nee({container:zee,button:Bee,panel:Fee,icon:$ee}),Wee=Dee({baseStyle:Hee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),la=ei("alert-fg"),bu=ei("alert-bg"),Uee=Uv({container:{bg:bu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[bu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[bu.variable]:`colors.${t}.200`},color:la.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),LN={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"},Zee={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"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...LN,...Zee,container:Qee},MN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:ON,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},XP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:XP.reference,"&:not([data-loaded])":{[XP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=ON(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function _c(e){const t=e!=="100%"?MN[e]:void 0;return ON({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":_c(4),xs:_c(6),sm:_c(8),md:_c(12),lg:_c(16),xl:_c(24),"2xl":_c(32),full:_c("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={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"}}},IN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ue("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"},...fi(IN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:IN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={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"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=L3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:L3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Bte}=Pm,Fte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Fte,variants:zte,defaultProps:Bte},Hte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Wte={baseStyle:Hte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:qte}=rr(BJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function yp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=G6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(FJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(HJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"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}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:hu,defineMultiStyleConfig:Ane}=rr(WJ.keys),Lne=hu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),kc={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"}},Mne={lg:hu({field:kc.lg,addon:kc.lg}),md:hu({field:kc.md,addon:kc.md}),sm:hu({field:kc.sm,addon:kc.sm}),xs:hu({field:kc.xs,addon:kc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var One=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),Ine=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),Rne=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=hu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},mn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Bne={baseStyle:zne},Fne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Fne},{defineMultiStyleConfig:Hne,definePartsStyle:Wne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Wne({icon:Vne}),Gne=Hne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:j6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=j6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function cs(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:cs("xs"),sm:cs("sm"),md:cs("md"),lg:cs("lg"),xl:cs("xl"),"2xl":cs("2xl"),"3xl":cs("3xl"),"4xl":cs("4xl"),"5xl":cs("5xl"),"6xl":cs("6xl"),full:cs("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={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"}},RN=hre,{defineMultiStyleConfig:pre,definePartsStyle:NN}=rr(jJ.keys),V7=Ui("number-input-stepper-width"),DN=Ui("number-input-input-padding"),gre=cu(V7).add("0.5rem").toString(),mre={[V7.variable]:"sizes.6",[DN.variable]:gre},vre=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[V7.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=NN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function _y(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=RN.fontSizes[o];return NN({field:{...r.field,paddingInlineEnd:DN.reference,verticalAlign:"top"},stepper:{fontSize:cu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),ZP,Cre={...(ZP=mn.baseStyle)==null?void 0:ZP.field,textAlign:"center"},_re={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"}},QP,kre={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),ky=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),JP=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[ky.variable]:"colors.white",bg:ky.reference,[Are.variable]:ky.reference,[JP.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[JP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Bre,definePartsStyle:nm}=rr(qJ.keys),Fre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(GP(),GP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Ai(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Hre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),Wre=e=>({transitionProperty:"common",transitionDuration:"slow",...Fre(e)}),Vre=nm(e=>({label:$re,filledTrack:Wre(e),track:Hre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Bre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:M3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(L4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=M3(e=>{var t,n,r,i;return{label:(n=(t=L4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),Ey={paddingInlineEnd:"8"},eT,tT,nT,rT,iT,oT,aT,sT,nie={lg:{...(eT=mn.sizes)==null?void 0:eT.lg,field:{...(tT=mn.sizes)==null?void 0:tT.lg.field,...Ey}},md:{...(nT=mn.sizes)==null?void 0:nT.md,field:{...(rT=mn.sizes)==null?void 0:rT.md.field,...Ey}},sm:{...(iT=mn.sizes)==null?void 0:iT.sm,field:{...(oT=mn.sizes)==null?void 0:oT.sm.field,...Ey}},xs:{...(aT=mn.sizes)==null?void 0:aT.xs,field:{...(sT=mn.sizes)==null?void 0:sT.xs.field,...Ey},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:mn.variants,defaultProps:mn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Ex=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:tS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Rc=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...$7({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Rc.variable]:"colors.gray.200",_dark:{[Rc.variable]:"colors.whiteAlpha.200"},_disabled:{[Rc.variable]:"colors.gray.300",_dark:{[Rc.variable]:"colors.whiteAlpha.300"}},bg:Rc.reference}),hie=e=>{const{orientation:t}=e;return{...$7({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:gv.reference,h:gv.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"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Rc.variable]:`colors.${t}.500`,_dark:{[Rc.variable]:`colors.${t}.200`},bg:Rc.reference}},gie=tS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=tS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=tS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=tS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:zN}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=zN({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:zN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:O3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Hf=Ui("switch-track-height"),Px=Ui("switch-track-diff"),Iie=cu.subtract(Lm,Hf),Y6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Hf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hf.reference],height:[Hf.reference],_checked:{transform:`translateX(${Y6.reference})`}},Die=O3(e=>({container:{[Px.variable]:Iie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:cu(Px).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:O3({container:{[Lm.variable]:"1.375rem",[Hf.variable]:"sizes.3"}}),md:O3({container:{[Lm.variable]:"1.875rem",[Hf.variable]:"sizes.4"}}),lg:O3({container:{[Lm.variable]:"2.875rem",[Hf.variable]:"sizes.6"}})},Bie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Fie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({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"}}),M4={"&[data-is-numeric=true]":{textAlign:"end"}},Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Hie,striped:Wie,unstyled:{}},Uie={sm:f0({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:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Fie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=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}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(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:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Wf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={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}},doe=Wf({container:loe,label:uoe,closeButton:coe}),foe={sm:Wf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Wf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Wf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),lT,goe={...(lT=mn.baseStyle)==null?void 0:lT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},uT,moe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((uT=mn.variants)==null?void 0:uT.unstyled.field)??{}},cT,dT,fT,hT,voe={xs:((cT=mn.sizes)==null?void 0:cT.xs.field)??{},sm:((dT=mn.sizes)==null?void 0:dT.sm.field)??{},md:((fT=mn.sizes)==null?void 0:fT.md.field)??{},lg:((hT=mn.sizes)==null?void 0:hT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Py=Ui("tooltip-bg"),Tx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[Soe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Wee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:L4,CloseButton:Dte,Code:$te,Container:Wte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:mn,Kbd:Bne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Bie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={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"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={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"},Ooe=Moe,Ioe={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"},Roe={"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)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Boe={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},Foe=Boe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Hoe=$oe,Woe={breakpoints:Eoe,zIndices:Foe,radii:Loe,blur:Hoe,colors:Toe,...RN,sizes:MN,shadows:Ooe,space:LN,borders:_oe,transition:zoe},Voe={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-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={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"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Woe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I3(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(!I3(e[r],t[r]))return!1;return!0}var o;if(Koe&&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(!I3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&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(Zoe&&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(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!I3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return I3(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 t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function BN(){const e=Hv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(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)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return re(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iae(){const{colorMode:e}=Hv();return x(Q5,{styles:t=>{const n=SN(t,"styles.global"),r=wN(n,{theme:t,colorMode:e});return r?XR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=bN(a,(p,m)=>oQ(m)),l=wN(e,t),u=Object.assign({},i,l,xN(s),o),h=XR(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Hv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function FN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=BN(),a=e?SN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},xN(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return FN(e,t)}function Ii(e,t={}){return FN(e,t)}function uae(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(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 h=new Error(o??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Fn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Fn(...e),e)}function pT(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 hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function gT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function mT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=pT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=gT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=gT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=mT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=mT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=pT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return q6(()=>()=>e.current.destroy()),e.current}var[mae,$N]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=$N(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Fn(o,i)}}function HN(){return[O4(mae),()=>O4($N()),()=>gae(),i=>vae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),vT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??vT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??vT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ct(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(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 nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function yae(){return C.exports.useContext(rS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",I4=sh?C.exports.useLayoutEffect:C.exports.useEffect,WN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(WN),a=C.exports.useContext(n1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);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 I4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),I4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(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):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||xae.some(t=>vv(e[t]))}function VN(e){return Boolean(oS(e)||e.variants)}function wae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[yT(t),yT(n)])}function yT(e){return Array.isArray(e)?e.join(" "):e}const ou=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:ou(["layout","layoutId","drag"]),animation:ou(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ou(["exit"]),drag:ou(["drag","dragControls"]),focus:ou(["whileFocus"]),hover:ou(["whileHover","onHoverStart","onHoverEnd"]),tap:ou(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ou(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ou(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return aS(()=>{if(Mm.hasEverUpdated)return kae++})}const G7=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const UN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(WN).strict,E=C.exports.useContext(UN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return re(Pae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(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 Oae=["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 j7(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const R4={};function Iae(e){Object.assign(R4,e)}const N4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(N4);function GN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!R4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>N4.indexOf(e)-N4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[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 jN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,YN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[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,Bae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:YN(0,1)}),Ty=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ec=Yv("deg"),_l=Yv("%"),wt=Yv("px"),Fae=Yv("vh"),$ae=Yv("vw"),ST=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),Y7=(e,t)=>n=>Boolean(jv(n)&&Bae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),qN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:Y7("hsl","hue"),parse:qN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Hae=YN(0,255),Lx=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Hae(e))}),$c={test:Y7("rgb","red"),parse:qN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Om(Im.transform(r))+")"};function Wae(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 X6={test:Y7("#"),parse:Wae,transform:$c.transform},eo={test:e=>$c.test(e)||X6.test(e)||If.test(e),parse:e=>$c.test(e)?$c.parse(e):If.test(e)?If.parse(e):X6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?$c.transform(e):If.transform(e)},KN="${c}",XN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function ZN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,KN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,XN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function QN(e){return ZN(e).values}function JN(e){const{values:t,numColors:n,tokenised:r}=ZN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Gae(e){const t=QN(e);return JN(e)(t.map(Uae))}const xu={test:Vae,parse:QN,createTransformer:JN,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},xu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),bT={...lh,transform:Math.round},eD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ec,rotateX:Ec,rotateY:Ec,rotateZ:Ec,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Ec,skewX:Ec,skewY:Ec,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:ST,originY:ST,originZ:wt,zIndex:bT,fillOpacity:Im,strokeOpacity:Im,numOctaves:bT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(jN(m)){o[m]=v;continue}const S=eD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function tD(e,t,n){for(const r in t)!ks(t[r])&&!GN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return tD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(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 Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=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",...tse,...Jae,...Qae,...ese]);function D4(e){return nse.has(e)}let nD=e=>!D4(e);function rse(e){!e||(nD=t=>t.startsWith("on")?!D4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(nD(i)||n===!0&&D4(i)||!t&&!D4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function xT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function ose(e,t,n){const r=xT(t,e.x,e.width),i=xT(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),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=ose(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&&lse(p,o,a,s,!1)}const rD=()=>({...K7(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=rD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};tD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const iD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function oD(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 aD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function sD(e,t,n,r){oD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(aD.has(i)?i:iD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||GN(r,e))&&(n[r]=t[r]);return n}function lD(e){const t=Z7(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(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 bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),uD=e=>bv(e)?e[e.length-1]||0:e;function R3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const cD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():aS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=R3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=VN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const pse={useVisualState:cD({scrapeMotionValuesFromProps:lD,createRenderState:rD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),sD(t,n)}})},gse={useVisualState:cD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?pse:gse,preloadedFeatures:n,useRender:cse(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 sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function dD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function fD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:fD(e)?bse(e,t):xse(e,t)}}const hD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function pD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return sS(e,pD(t),hD(n,t==="pointerdown"),r)}function z4(e,t,n,r){return Q6(e,pD(t),n&&hD(n,t==="pointerdown"),r)}function gD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wT=gD("dragHorizontal"),CT=gD("dragVertical");function mD(e){let t=!1;if(e==="y")t=CT();else if(e==="x")t=wT();else{const n=wT(),r=CT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function vD(){const e=mD(!0);return e?(e(),!1):!0}function _T(e,t,n){return(r,i)=>{!dD(r)||vD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z4(r,"pointerenter",e||n?_T(r,!0,e):void 0,{passive:!e}),z4(r,"pointerleave",t||n?_T(r,!1,t):void 0,{passive:!t})}const yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1;function e_(e){return C.exports.useEffect(()=>()=>e(),[])}function SD(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);iMath.min(Math.max(n,e),t),Mx=.001,Ase=.01,kT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=kT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,kT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(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 Ise=12;function Rse(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ET(e,Dse)&&ET(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=SD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=PT,S=PT;function w(){const P=h?-(h/1e3):0,E=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 M=J6(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(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 TT({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=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Bse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Fse=[X6,$c,If],AT=e=>Fse.find(t=>t.test(e)),bD=(e,t)=>{let n=AT(e),r=AT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=TT(i),n=$c),r===If&&(o=TT(o),r=$c);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Bse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce($se);function xD(e,t){return eC(e)?n=>wr(e,t,n):eo.test(e)?bD(e,t):CD(e,t)}const wD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>xD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function LT(e){const t=xu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=xu.createTransformer(t),r=LT(e),i=LT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(wD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Wse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Wse;if(typeof e=="string")return eo.test(e)?bD:CD;if(Array.isArray(e))return wD;if(typeof e=="object")return Hse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;an(xv(e,t,r))}function jse(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(;li||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function _D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;B4(o===t.length),B4(!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=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),kD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=kD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ED=1.525,Kse=4/11,Xse=8/11,Zse=9/10,r_=e=>e,i_=Yse(2),Qse=uS(i_),PD=n_(i_),TD=e=>1-Math.sin(Math.acos(e)),o_=uS(TD),Jse=n_(o_),a_=kD(ED),ele=uS(a_),tle=n_(a_),nle=qse(ED),rle=4356/361,ile=35442/1805,ole=16061/1805,$4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$4(1-e*2)):.5*$4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||PD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function N3({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=cle(r&&r.length===a.length?r:ule(a),i);function l(){return _D(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({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:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const MT={keyframes:N3,spring:t_,decay:dle};function fle(e){if(Array.isArray(e.to))return N3;if(MT[e.type])return MT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t_:N3}const AD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),LD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),AD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&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(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const yle=e=>cS[e].process(p0),MD=e=>{wv=!1,p0.delta=tC?AD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,nC=!0,qv.forEach(yle),nC=!1,wv&&(tC=!1,LD(MD))},Sle=()=>{wv=!0,tC=!0,nC||LD(MD)},ble=()=>p0;function OD(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?OD(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function ID(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=SD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=_D([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function $(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=OD(a,T,u),l==="mirror"&&H.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=H.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_{p?.(),E.stop()}}}function RD(e,t){return t?e*(1e3/t):0}function _le({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:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=H=>{R=N,N=H,t=RD(H-R,ble().delta),(I===1&&H>M||I===-1&&HS?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),OT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s_(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=OT(e)&&OT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ND=(e,t)=>1-3*t+3*e,DD=(e,t)=>3*t-6*e,zD=e=>3*e,H4=(e,t,n)=>((ND(t,n)*e+DD(t,n))*e+zD(t))*e,BD=(e,t,n)=>3*ND(t,n)*e*e+2*DD(t,n)*e+zD(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H4(o(a),t,r)}function Ole({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 h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(jn.Tap,!1),!vD()}function p(S,w){!h()||(yD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}z4(i,"pointerdown",o?v:void 0,l),e_(u)}const Ile="production",FD=typeof process>"u"||process.env===void 0?Ile:"production",IT=new Set;function $D(e,t,n){e||IT.has(t)||(console.warn(t),n&&console.warn(n),IT.add(t))}const iC=new WeakMap,Ix=new WeakMap,Rle=e=>{const t=iC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Ix.has(n)||Ix.set(n,{});const r=Ix.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Ble({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"?Hle:$le)(a,o.current,e,i)}const Fle={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Fle[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Hle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(FD!=="production"&&$D(!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 Hc=e=>t=>(e(t),null),Wle={inView:Hc(Ble),tap:Hc(Ole),focus:Hc(vse),hover:Hc(Pse)};function l_(){const e=C.exports.useContext(n1);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 Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function HD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gle={linear:r_,easeIn:i_,easeInOut:PD,easeOut:Qse,circIn:TD,circInOut:Jse,circOut:o_,backIn:a_,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:$4},RT=e=>{if(Array.isArray(e)){B4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",NT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&xu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Rx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),DT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:My,scaleY:My,scale:My,opacity:Rx,backgroundColor:Rx,color:Rx,default:My},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=DT[e]||DT.default,{to:t,...n(t)}},Kle={...eD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:Z6,WebkitFilter:Z6},u_=e=>Kle[e];function c_(e,t){var n;let r=u_(e);return r!==Z6&&(r=xu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},WD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),VD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),WD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&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(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Kv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),eue=e=>dS[e].process(g0),UD=e=>{Cv=!1,g0.delta=oC?WD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,aC=!0,Kv.forEach(eue),aC=!1,Cv&&(oC=!1,VD(UD))},tue=()=>{Cv=!0,oC=!0,aC||VD(UD)},sC=()=>g0;function GD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({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 rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(RT):RT(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 iue(e,t){var n,r;return(r=(n=(d_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=d_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=NT(e,n);a==="none"&&s&&typeof n=="string"?a=c_(e,n):zT(a)&&typeof n=="string"?a=BT(n):!Array.isArray(n)&&zT(n)&&typeof a=="string"&&(n=BT(a));const l=NT(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"?_le({...p,...o}):ID({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=uD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function zT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function BT(e){return typeof e=="number"?0:c_("",e)}function d_(e,t){return e[t]||e.default||e}function f_(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=GD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function h_(e,t){e.indexOf(t)===-1&&e.push(t)}function p_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return h_(this.subscriptions,t),()=>p_(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!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.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=()=>Es.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=cue(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?RD(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 B0(e){return new due(e)}const jD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},YD=[lh,wt,_l,Ec,$ae,Fae,fue],Rg=e=>YD.find(jD(e)),hue=[...YD,eo,xu],pue=e=>hue.find(jD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,B0(n))}function yue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=uD(o[a]);vue(e,a,s)}}function Sue(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;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=qD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>qD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function qD(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 h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=f_(m,v,S,w);V4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(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(_ue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g_=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...g_].reverse(),Pue=g_.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{$=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!HD(K,G)||H?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(Q=>({animation:Q,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:Hc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Hc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l_(),o=C.exports.useContext(n1);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 KD{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=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s_(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),dD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},fD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function FT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:FT(e,XD(t)),offset:FT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function XD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(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 da(e){return e.max-e.min}function $T(e,t=0,n=.01){return s_(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function UT(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 zue(e,{top:t,left:n,bottom:r,right:i}){return{x:UT(e.x,n,i),y:UT(e.y,t,r)}}function GT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(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 uC=.35;function Hue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:jT(e,"left","right"),y:jT(e,"top","bottom")}}function jT(e,t,n){return{min:YT(e,t),max:YT(e,n)}}function YT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const qT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:qT(),y:qT()}),KT=()=>({min:0,max:0}),Ei=()=>({x:KT(),y:KT()});function ul(e){return[e("x"),e("y")]}function ZD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(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 Bx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Bx(e)||!Bx(t)||!Bx(n)}function Sf(e){return cC(e)||QD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function QD(e){return XT(e.x)||XT(e.y)}function XT(e){return e&&e!=="0%"}function U4(e,t,n){const r=e-n,i=t*r;return n+i}function ZT(e,t,n,r,i){return i!==void 0&&(e=U4(e,i,r)),U4(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=ZT(e.min,t,n,r,i),e.max=ZT(e.max,t,n,r,i)}function JD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Uue(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{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=da(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new KD(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?.(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||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(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&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Hue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Bue(i.layout.actual,o);if(n){const s=n(Wue(a));this.hasMutatedConstraints=!!s,s&&(a=ZD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f_(t,r,0,n)}stopAnimation(){ul(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){ul(n=>{const{drag:r}=this.getProps();if(!Oy(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.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Fue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(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=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({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(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new KD(h,l,{transformPagePoint:s})}z4(i,"pointerdown",o&&u),e_(()=>a.current&&a.current.end())}const Jue={pan:Hc(Que),drag:Hc(Zue)},fC={current:null},tz={current:!1};function ece(){if(tz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Iy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Iy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Iy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Iy[i]]=o=>r.add(o),n["notify"+Iy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),V4(r)&&r.add(i);else if(ks(a))e.addValue(i,B0(o)),V4(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,B0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const nz=Object.keys(yv),rce=nz.length,rz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const H={..._},$=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),V4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=oS(p),Z=VN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),tz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,$e){const He=[];for(let qe=0;qete.scheduleRender(),animationType:typeof tt=="string"?tt:"both",initialPromotionConfig:$e,layoutScroll:Tt})}return He},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=B0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){H[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=Q7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return $[X]!==void 0&&Se===void 0?void 0:H[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),az=e=>sce.has(e),lce=e=>Object.keys(e).some(az),sz=(e,t)=>{e.set(t,!1),e.set(t)},JT=e=>e===lh||e===wt;var eA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(eA||(eA={}));const tA=(e,t)=>parseFloat(e.split(", ")[t]),nA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return tA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?tA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=N4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.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.syncRender(),t}const rA={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:nA(4,13),y:nA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=rA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);sz(h,s[u]),e[u]=rA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(az);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const lz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=u_(t);return n&&n.default||0}else{const n=mce(e),r=(jN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ez(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:oD},vce=rz(lz),yce=rz({...lz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=u_(t))===null||n===void 0?void 0:n.default)||0:(t=aD.has(t)?t:iD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:lD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:sD}),Sce=(e,t)=>j7(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function iA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=iA(e,t.target.x),r=iA(e,t.target.y);return`${n}% ${r}%`}},oA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(oz,v=>(o.push(v),oA)));const a=xu.parse(e);if(a.length>5)return r;const s=xu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.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(oA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),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()})),Mm.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()||Es.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?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=l_(),r=C.exports.useContext(G7);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(UN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:B0(e);return f_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const uz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=uz.length,aA=e=>typeof e=="string"?parseFloat(e):e,sA=e=>typeof e=="number"||wt.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(xv(e,t,r))}function uA(e,t){e.min=t.min,e.max=t.max}function ds(e,t){uA(e.x,t.x),uA(e.y,t.y)}function cA(e,t,n,r,i){return e-=t,e=U4(e,1/n,r),i!==void 0&&(e=U4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=cA(e.min,t,n,s,i),e.max=cA(e.max,t,n,s,i)}function dA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function fA(e,t,n,r){dA(e.x,t,Mce,n?.x,r?.x),dA(e.y,t,Oce,n?.y,r?.y)}function hA(e){return e.translate===0&&e.scale===1}function dz(e){return hA(e.x)&&hA(e.y)}function fz(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 pA(e){return da(e.x)/da(e.y)}function Ice(e,t,n=.1){return s_(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){h_(this.members,t),t.scheduleRender()}remove(t){if(p_(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,t.snapshot.isShared=!0),!((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)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function gA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){h_(this.children,t),this.isDirty=!0}remove(t){p_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const mA=["","X","Y","Z"],vA=1e3;function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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(Wce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=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;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=GD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(SA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!fz(this.targetLayout,w)||S,H=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const $={...d_(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&SA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}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,Jf.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(Uce))}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.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));CA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var _;const T=E/1e3;bA(m.x,a.x,T),bA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,vA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.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,vA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&pz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ds(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.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 l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yA),this.root.sharedNodes.clear()}}}function Bce(e){e.updateLayout()}function Fce(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{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):pz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!dz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),fz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function yA(e){e.clearMeasurements()}function Hce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function SA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Wce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function bA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xA(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){xA(e.x,t.x,n.x,r),xA(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(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 wA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function CA(e){wA(e.x),wA(e.y)}function pz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(pA(t),pA(n),.2)}const Xce=hz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fx={current:void 0},Zce=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fx.current=e}return Fx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Wle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function gz(){const e=C.exports.useRef(!1);return I4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=gz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede 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 tde({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]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const gd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",$D(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=gz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(I4(()=>{w.current=!1,rde(h,S),v.current=p}),e_(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x($n,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x($x,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),FD!=="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.`),x($n,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]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 gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={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 mC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,kA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(kA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(kA.enter,i)})},vz=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:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(gd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});vz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},yz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(gd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...yz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},Sz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(gd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...Sz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var EA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??Ps.exit(EA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??Ps.enter(EA.enter,r),transitionEnd:t?.enter}}},bz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(gd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});bz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=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:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(gd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,pS]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[yde,m_]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Sde,GPe,bde,xde]=HN(),Nf=Pe(function(t,n){const{getButtonProps:r}=m_(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,v_]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v_(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(H={},$=null){return{...H,type:"button",ref:Fn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx(H.onClick,T),onFocus:Hx(H.onFocus,I),onKeyDown:Hx(H.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function(H={},$=null){return{...H,ref:$,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){hS({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 Pde(e){hS({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 Tde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=m_(),{reduceMotion:r}=v_(),i=Zv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Bf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v_(),{getPanelProps:s,isOpen:l}=m_(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(vz,{in:l,...i,children:m})});Bf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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 Ode(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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 PA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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[Ide,Rde]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Nde,y_]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),xz={info:{icon:Ode,colorScheme:"blue"},warning:{icon:PA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:PA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return xz[e].colorScheme}function zde(e){return xz[e].icon}var wz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});wz.displayName="Alert";var Cz=Pe(function(t,n){const i={display:"inline",...y_().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});Cz.displayName="AlertDescription";function _z(e){const{status:t}=Rde(),n=zde(t),r=y_(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}_z.displayName="AlertIcon";var kz=Pe(function(t,n){const r=y_();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});kz.displayName="AlertTitle";function Bde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Fde(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G4.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Fde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Bde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:G4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G4,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,[Hde,Wde]=Cn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=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 le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Vde(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 $a=Pe((e,t)=>{const n=Wde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=vn(e),_=C.exports.useMemo(()=>{const R={...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:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":TA(a),"data-loading":TA(o),__css:_,className:SS("chakra-button",w),...E},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(AA,{...I})):x(AA,{...I}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function AA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re($n,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("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}},le.createElement(Hde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((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 x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Ry=e=>e?"":void 0,Wx=e=>e?!0:void 0;function LA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Gde,a1]=Cn({strict:!1,name:"FormControlContext"});function jde(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`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Fn(z,H=>{!H||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Ry(P),"data-disabled":Ry(i),"data-invalid":Ry(r),"data-readonly":Ry(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Fn(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var md=Pe(function(t,n){const r=Ii("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});md.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Ez(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function S_(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b_(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b_(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:LA(t?.onFocus,h),onBlur:LA(t?.onBlur,p)}}var[qde,Kde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=vn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("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"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Pz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Pz=Pe(function(t,n){const r=a1(),i=Ez();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Pz.displayName="RequiredIndicator";function id(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 x_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:x_});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:x_});Jde.displayName="VisuallyHiddenInput";var MA=!1,bS=null,F0=!1,bC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function w_(e,t){bC.forEach(n=>n(e,t))}function OA(e){F0=!0,tfe(e)&&(bS="keyboard",w_("keyboard",e))}function Sp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(F0=!0,w_("pointer",e))}function nfe(e){e.target===window||e.target===document||(F0||(bS="keyboard",w_("keyboard",e)),F0=!1)}function rfe(){F0=!1}function IA(){return bS!=="pointer"}function ife(){if(typeof window>"u"||MA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){F0=!0,e.apply(this,n)},document.addEventListener("keydown",OA,!0),document.addEventListener("keyup",OA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),MA=!0}function ofe(e){ife(),e(IA());const t=()=>e(IA());return bC.add(t),()=>{bC.delete(t)}}var[jPe,afe]=Cn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Tz(e={}){const t=b_(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),H=cr(l),[$,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),id(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const $e=n&&!m,He=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),qe=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const tt=C.exports.useCallback((Le={},at=null)=>{const At=st=>{de&&st.preventDefault(),K(!0)};return{...Le,ref:at,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&$),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Pa(Le.onMouseDown,At),onMouseUp:Pa(Le.onMouseUp,()=>K(!1)),onMouseEnter:Pa(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,$,J,S,o,r]),Ze=C.exports.useCallback((Le={},at=null)=>({...R,...Le,ref:Fn(at,At=>{!At||te(At.tagName==="LABEL")}),onClick:Pa(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var st;(st=G.current)==null||st.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),nt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:Fn(G,at),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Pa(Le.onChange,De),onBlur:Pa(Le.onBlur,z,()=>V(!1)),onFocus:Pa(Le.onFocus,H,()=>V(!0)),onKeyDown:Pa(Le.onKeyDown,He),onKeyUp:Pa(Le.onKeyUp,qe),required:i,checked:Se,disabled:$e,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x_}),[w,P,a,De,z,H,He,qe,i,Se,$e,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:at,onMouseDown:Pa(Le.onMouseDown,RA),onTouchStart:Pa(Le.onTouchStart,RA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:tt,getInputProps:nt,getLabelProps:Tt,htmlProps:R}}function RA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=pd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=pd({from:{opacity:0},to:{opacity:1}}),vfe=pd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Az=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Tz({...E,isDisabled:S,isChecked:_,onChange:T}),H=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:H,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Az.displayName="Checkbox";function yfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("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 xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C_(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(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 j4(e,t,n){return(e-t)*100/(n-t)}function Lz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C_(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Mz(Pc(v),o),w=n??S,P=C.exports.useCallback($=>{$!==v&&(m||p($.toString()),u?.($.toString(),Pc($)))},[u,m,v]),E=C.exports.useCallback($=>{let j=$;return l&&(j=m0(j,a,s)),C_(j,w)},[w,l,s,a]),_=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc($):j=Pc(v)+$,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc(-$):j=Pc(v)-$,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=Vx(r,o,n)??a,P($)},[r,n,o,P,a]),I=C.exports.useCallback($=>{const j=Vx($,o,w)??a;P(j)},[w,o,P,a]),R=Pc(v);return{isOutOfRange:R>s||Rx(Q5,{styles:Oz}),wfe=()=>x(Q5,{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; - } - - ${Oz} - `});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():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??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Iz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Iz()&&e.test(navigator.vendor),Efe=e=>Iz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function NA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=NA(n),a=NA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function __(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k_=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=vn(i),s=S_(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k_.displayName="Input";k_.id="Input";var[Ife,Rz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=vn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=__({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E_=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=Rz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});E_.displayName="InputAddon";var Nz=Pe(function(t,n){return x(E_,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Nz.displayName="InputLeftAddon";Nz.id="InputLeftAddon";var Dz=Pe(function(t,n){return x(E_,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Dz.displayName="InputRightAddon";Dz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Rz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var zz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});zz.id="InputLeftElement";zz.displayName="InputLeftElement";var Bz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Bz.id="InputRightElement";Bz.displayName="InputRightElement";function Bfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Bfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Ffe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(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)});Ffe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Nl=we("div");Nl.displayName="Box";var Fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Nl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Fz.displayName="Square";var Hfe=Pe(function(t,n){const{size:r,...i}=t;return x(Fz,{size:r,ref:n,borderRadius:"9999px",...i})});Hfe.displayName="Circle";var $z=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});$z.displayName="Center";var Wfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Wfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Gfe.displayName="Divider";var en=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});en.displayName="Flex";var Hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Hz.displayName="Grid";function DA(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=__({gridArea:r,gridColumn:DA(i),gridRow:DA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(Nl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("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%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Wz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P_=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P_.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P_,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(P_,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Wz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Wz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return od(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function rhe(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,[CC]:od(n,i=>r[i])}}function ihe(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{"&":od(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var T_=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=yS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,$=p?x(Uz,{children:I},N):I;if(!P)return $;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return re(C.exports.Fragment,{children:[$,de]},N)})},[u,w,P,E,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[CC]:S[CC]},...m},_)});T_.displayName="Stack";var Gz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=__({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function zA(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,_=>zA(O6("space",_)(E))),"--chakra-wrap-y-spacing":E=>od(P,_=>zA(O6("space",_)(E))),"--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]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Yz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var ahe={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[]}}}},qz=ahe,bp=()=>{},she={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:qz},Kz=typeof window<"u"?{window,document}:uhe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(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?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return re(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){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 Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&Ux(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),H=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Fn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:$,onKeyDown:H,onMouseOver:J,onMouseLeave:ie}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function phe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),ghe=e=>tB(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||mhe(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]():vhe(e)?!0:tB(e)}function yhe(e){return e?Jz(e)&&rB(e)&&!ghe(e):!1}var She=["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]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>rB(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Wa="bottom",Va="right",Oo="left",A_="auto",Jv=[Mo,Wa,Va,Oo],$0="start",kv="end",Phe="clippingParents",oB="viewport",zg="popper",The="reference",BA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),aB=[].concat(Jv,[A_]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Bhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function Ga(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=Ga(e).Element;return e instanceof t||e instanceof Element}function Da(e){var t=Ga(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L_(e){if(typeof ShadowRoot>"u")return!1;var t=Ga(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Fhe(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];!Da(o)||!Al(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 $he(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},{});!Da(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Hhe={name:"applyStyles",enabled:!0,phase:"write",fn:Fhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,Y4=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Da(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=eh(e)?Ga(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M_(e){var t=W0(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 lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wu(e){return Ga(e).getComputedStyle(e)}function Whe(e){return["table","td","th"].indexOf(Al(e))>=0}function vd(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(L_(e)?e.host:null)||vd(e)}function FA(e){return!Da(e)||wu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&Da(e)){var r=wu(e);if(r.position==="fixed")return null}var i=CS(e);for(L_(i)&&(i=i.host);Da(i)&&["html","body"].indexOf(Al(i))<0;){var o=wu(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 e2(e){for(var t=Ga(e),n=FA(e);n&&Whe(n)&&wu(n).position==="static";)n=FA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&wu(n).position==="static")?t:n||Vhe(e)||t}function O_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return Yf(e,Y4(t,n))}function Uhe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=O_(s),u=[Oo,Va].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=M_(o),v=l==="y"?Mo:Oo,S=l==="y"?Wa:Va,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Bm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(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)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function $A(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,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===Ga(n)&&(R=vd(n),wu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Va)&&o===kv){M=Wa;var H=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=H-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Wa)&&o===kv){T=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(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:kl(t.placement),variation:V0(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,$A(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,$A(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 Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ny={passive:!0};function Jhe(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=Ga(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function HA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function I_(e){var t=Ga(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function R_(e){return W0(vd(e)).left+I_(e).scrollLeft}function rpe(e,t){var n=Ga(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+R_(e),y:l}}function ipe(e){var t,n=vd(e),r=I_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+R_(e),l=-r.scrollTop;return wu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N_(e){var t=wu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Da(e)&&N_(e)?e:fB(CS(e))}function Fm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ga(r),a=i?[o].concat(o.visualViewport||[],N_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Fm(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=W0(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 WA(e,t,n){return t===oB?kC(rpe(e,n)):eh(t)?ope(t,n):kC(ipe(vd(e)))}function ape(e){var t=Fm(CS(e)),n=["absolute","fixed"].indexOf(wu(e).position)>=0,r=n&&Da(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&lB(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=WA(e,u,r);return l.top=Yf(h.top,l.top),l.right=Y4(h.right,l.right),l.bottom=Y4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},WA(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 hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Wa:l={x:a,y:t.y+t.height};break;case Va:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O_(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(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?Phe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=cB(typeof P!="number"?P:dB(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||vd(e.elements.popper),l,h,a),R=W0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),H=m===zg?z:R,$={top:I.top-H.top+E.top,bottom:H.bottom-I.bottom+E.bottom,left:I.left-H.left+E.left,right:H.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys($).forEach(function(V){var J=[Va,Wa].indexOf(V)>=0?1:-1,ie=[Mo,Wa].indexOf(V)>=0?"y":"x";$[V]+=de[ie]*J})}return $}function lpe(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?aB:l,h=V0(r),p=h?s?BA:BA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===A_)return[];var t=z3(e);return[HA(e),t,HA(t)]}function cpe(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,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[z3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===A_?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,H=M[0],$=0;$=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Va:Oo:V?Wa:Mo;I[ie]>R[ie]&&(K=z3(K));var G=z3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){H=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var $e=M.find(function(He){var qe=N.get(He);if(qe)return qe.slice(0,De).every(function(tt){return tt})});if($e)return H=$e,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function VA(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 UA(e){return[Mo,Va,Wa,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=VA(a,r),u=VA(s,i,o),h=UA(l),p=UA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].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,[Oo,Va].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=ppe(p,t.rects,o),h},{}),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 mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(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,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=O_(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Wa:Va,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?M_(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),$e=De[J],He=De[ie],qe=Bm(0,N[Q],Se[Q]),tt=T?N[Q]/2-te-qe-$e-$.mainAxis:X-qe-$e-$.mainAxis,Ze=T?-N[Q]/2+te+qe+He+$.mainAxis:he+qe+He+$.mainAxis,nt=t.elements.arrow&&e2(t.elements.arrow),Tt=nt?M==="y"?nt.clientTop||0:nt.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+tt-xt-Tt,at=K+Ze-xt,At=Bm(v?Y4(G,Le):G,K,v?Yf(Z,at):Z);R[M]=At,de[M]=At-K}if(s){var st,gt=M==="x"?Mo:Oo,an=M==="x"?Wa:Va,Ct=R[I],Ut=I==="y"?"height":"width",sn=Ct+P[gt],yn=Ct-P[an],Oe=[Mo,Oo].indexOf(E)!==-1,et=(st=j?.[I])!=null?st:0,Xt=Oe?sn:Ct-N[Ut]-z[Ut]-et+$.altAxis,Yt=Oe?Ct+N[Ut]+z[Ut]-et-$.altAxis:yn,ke=v&&Oe?Uhe(Xt,Ct,Yt):Bm(v?Xt:sn,Ct,v?Yt:yn);R[I]=ke,de[I]=ke-Ct}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===Ga(e)||!Da(e)?I_(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Da(t),i=Da(t)&&_pe(t),o=vd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||N_(o))&&(s=Cpe(t)),Da(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=R_(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(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 Ppe(e){var t=Epe(e);return Bhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(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 GA={placement:"bottom",modifiers:[],strategy:"absolute"};function jA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(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 Rpe={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"},Npe=e=>Rpe[e],YA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...YA,...e}}:t={enabled:e,options:YA},t}var zpe={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`}},Bpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{qA(e)},effect:({state:e})=>()=>{qA(e)}},qA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Npe(e.placement))},Fpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Hpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Hpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Wpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{KA(e)},effect:({state:e})=>()=>{KA(e)}},KA=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:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"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"}},Upe={"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 Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function pB(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:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=_.current)==null||$.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Wpe,Fpe,Bpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=P.current)==null||$.destroy(),P.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),I=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=$;return{...Q,ref:j,"data-popper-arrow":"",style:jpe($)}},[]),H=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=P.current)==null||$.update()},forceUpdate(){var $;($=P.current)==null||$.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:I}}function jpe(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 gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(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]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=Cn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Xpe]=Cn({strict:!1,name:"PortalContext"}),D_="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=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=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D_,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D_),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=D_;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[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 h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Dy.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(wp=new WeakMap,wp=new WeakMap,Dy=new WeakMap,zy={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function z_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function bB(){}function xB(){}xB.resetWarningCache=bB;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){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:xB,resetWarningCache:bB};return n.PropTypes=n,n};On.exports=a0e();var EC="data-focus-lock",wB="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(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 CB(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);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 h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function B_(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=gl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=mz(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 x(r,{...gl({},n)})};PB.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),PB}var TB=B_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=B_(),h0e=B_(),p0e=EB({async:!0}),g0e=[],F_=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),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,H=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(He){var qe=u.current;if(qe&&qe.focus){var tt=typeof j=="function"?j(qe):j;if(tt){var Ze=typeof tt=="object"?tt:void 0;u.current=null,He?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[j]),te=C.exports.useCallback(function(He){l.current&&TB.useMedium(He)},[]),X=AB.useMedium,he=C.exports.useCallback(function(He){s.current!==He&&(s.current=He,a(He))},[]),ye=Tn((r={},r[wB]=p&&"disabled",r[EC]=P,r),H),Se=m!==!0,De=Se&&m!=="tail",$e=CB([n,he]);return re($n,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x($,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:$e,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});F_.propTypes={};F_.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 LB=F_;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(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){$_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.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 x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Dl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W_=k0e.join(","),E0e="".concat(W_,", [data-focus-guard]"),$B=function(e,t){var n;return Dl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:W_)?[i]:[],$B(i))},[])},V_=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Dl(r.parentNode.querySelectorAll(W_)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Dl(t).map(function(n){return V_([n])}).reduce(function(n,r){return n.concat(r)},[])},U_=function(e,t){return Dl(e).filter(function(n){return RB(t,n)}).filter(function(n){return x0e(n)})},XA=function(e,t){return t===void 0&&(t=new Map),Dl(e).filter(function(n){return NB(t,n)})},AC=function(e,t,n){return FB(U_(V_(e,n),t),!0,n)},ZA=function(e,t){return FB(U_(V_(e),t),!1)},T0e=function(e,t){return U_(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Dl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},G_=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?A0e(Dl(HB(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},j_=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Dl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},VB=function(e){var t=document&&j_();return!t||t.dataset&&t.dataset.focusGuard?!1:G_(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&j_();return e?Dl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y_=function(e,t){return BB(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y_(n,e))}),e.filter(function(n){return t.has(n)})},QA=function(e){return e[0]&&e.length>1?Y_(e[0],e):e[0]},JA=function(e,t){return e.length>1?e.indexOf(Y_(e[t],e)):t},UB="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=JA(e,0),_=JA(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=XA(r.filter(D0e(n)));return i&&i.length?QA(i):QA(XA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Pv(u,a)?a=u:a=Yx(u,a))})}),a},B0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},F0e=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(C0e)},$0e=function(e,t){var n=document&&j_(),r=G_(e).filter(q4),i=GB(n||e,e,r),o=new Map,a=ZA(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=ZA([i],o).map(function(m){var v=m.node;return v}),u=F0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===UB?{node:z0e(a,h,B0e(r,o))}:p===void 0?p:u[p]}},H0e=function(e){var t=G_(e).filter(q4),n=GB(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q4(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:H_(s)}})},W0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,W0e(r.node,n.focusOptions),qx--}};const jB=V0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function eL(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 X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},K4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(VB(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=H0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),eL(S,v.length,1,v),eL(S,-1,-1,v))}}}return t},qB=function(t){K4()&&t&&(t.stopPropagation(),t.preventDefault())},q_=function(){return YB(K4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},KB=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",q_),window.addEventListener("blur",KB)},r1e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",q_),window.removeEventListener("blur",KB)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K4(),YB(K4)):(r1e(),qp=null)}TB.assignSyncMedium(e1e);AB.assignMedium(q_);h0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const a1e=m0e(i1e,o1e)(t1e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:a1e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;z_(ZB,["sideCar"]);XB.propTypes={};const s1e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var B3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",JB=EB(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=gl(gl({},_),i);return re($n,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:F3,zeroRight:B3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},v1e=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[Zx(n),Zx(r),Zx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(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])}},S1e=eF(),b1e=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(l1e,` { - 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(B3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(F3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(B3," .").concat(B3,` { - right: 0 `).concat(r,`; - } - - .`).concat(F3," .").concat(F3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(u1e,": ").concat(s,`px; - } -`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var By=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",By,By),window.removeEventListener("test",By,By)}catch{MC=!1}var Cp=MC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return tF(e,"overflowY")},_1e=function(e){return tF(e,"overflowX")},tL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?C1e(t):_1e(t)},rF=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&nF(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nL=function(e){return[e.deltaX,e.deltaY]},rL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return eF()})[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 w=gC([e.lockRef.current],(e.shards||[]).map(rL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=tL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=tL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var H=r.current||I;return T1e(H,P,w,H==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?nL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(rL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,nL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return re($n,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(JB,O1e);var iF=C.exports.forwardRef(function(e,t){return x(_S,{...gl({},e,{ref:t,sideCar:I1e})})});iF.classNames=_S.classNames;const oF=iF;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){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}},OC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function D1e(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),h=C.exports.useRef(null),[p,m,v]=B1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:Fn(H,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,$=>$.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},H=null)=>({...z,ref:Fn(H,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function B1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[F1e,fh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[$1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(F1e,{value:S,children:x(gd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var K_=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=dh("chakra-modal__close-btn",r),s=fh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});K_.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[p,m]=l_();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var H1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...Sz,custom:{initialScale:.95,reverse:!0}},none:{}},W1e=we(Rl.section),V1e=e=>H1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(W1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=ad();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=ad();return x(U1e,{...i||(u==="none"?{}:yz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function lF(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var uF=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[YPe,G1e]=Cn(),j1e=we(bz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:P}=G1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(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 cF=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("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"})}),X1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("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 iL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,oL=300;function Q1e(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);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},oL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},oL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(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 nge(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:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:H,format:$,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr(H??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useRef(null),tt=C.exports.useCallback(ke=>ke.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),nt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);id(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(tt(Ot))}},[Ze,tt]);const Tt=C.exports.useCallback((ke=a)=>{Se&&te(ke)},[te,Se,a]),xt=C.exports.useCallback((ke=a)=>{Se&&X(ke)},[X,Se,a]),Le=Q1e(Tt,xt);iL(He,"disabled",Le.stop,Le.isSpinning),iL(qe,"disabled",Le.stop,Le.isSpinning);const at=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Z(tt(Ne)),$e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Z,tt,Ze]),At=C.exports.useCallback(ke=>{var Ot;V?.(ke),$e.current&&(ke.target.selectionStart=$e.current.start??((Ot=ke.currentTarget.value)==null?void 0:Ot.length),ke.currentTarget.selectionEnd=$e.current.end??ke.currentTarget.selectionStart)},[V]),st=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;tge(ke,Q)||ke.preventDefault();const Ot=gt(ke)*a,Ne=ke.key,ln={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[Ne];ln&&(ke.preventDefault(),ln(ke))},[Q,a,Tt,xt,Z,i,o]),gt=ke=>{let Ot=1;return(ke.metaKey||ke.ctrlKey)&&(Ot=.1),ke.shiftKey&&(Ot=10),Ot},an=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),Ct=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&Ct()},[n,ye,Ct]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=De.current)==null||ke.focus()})},[t]),yn=C.exports.useCallback(ke=>{ke.preventDefault(),Le.up(),sn()},[sn,Le]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Le.down(),sn()},[sn,Le]);Uf(()=>De.current,"wheel",ke=>{var Ot;const ut=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!ut)return;ke.preventDefault();const ln=gt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Tt(ln):Nn===1&&xt(ln)},{passive:!1});const et=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Fn(Ot,He),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||yn(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,yn,Le.stop,l]),Xt=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Fn(Ot,qe),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||Oe(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Le.stop,l]),Yt=C.exports.useCallback((ke={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Fn(De,Ot),value:nt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:ol(ke.onChange,at),onKeyDown:ol(ke.onKeyDown,st),onFocus:ol(ke.onFocus,At,()=>ye(!0)),onBlur:ol(ke.onBlur,J,Ut)}),[E,m,p,M,T,nt,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,at,st,At,J,Ut]);return{value:nt(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,PS]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ige,X_]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z_=Pe(function(t,n){const r=Ii("NumberInput",t),i=vn(t),o=b_(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:cF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z_.displayName="NumberInput";var dF=Pe(function(t,n){const r=PS();return le.createElement(we.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}})});dF.displayName="NumberInputStepper";var Q_=Pe(function(t,n){const{getInputProps:r}=X_(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:cF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q_.displayName="NumberInputField";var fF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J_=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X_(),o=i(t,n);return x(fF,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});J_.displayName="NumberDecrementStepper";var e8=Pe(function(t,n){const{getIncrementButtonProps:r}=X_(),i=r(t,n),o=PS();return x(fF,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});e8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[uge,n2]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,$]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=pB({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),$e=C.exports.useCallback((at={},At=null)=>{const st={...at,style:{...at.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Fn(R,At),children:De?at.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(at.onKeyDown,gt=>{n&>.key==="Escape"&&E()}),onBlur:al(at.onBlur,gt=>{const an=aL(gt),Ct=Jx(R.current,an),Ut=Jx(I.current,an);P&&t&&(!Ct&&!Ut)&&E()}),"aria-labelledby":H?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(st.role="tooltip",st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0}),st.onMouseLeave=al(at.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),st},[De,Q,H,K,j,G,u,n,E,P,t,p,l,s]),He=C.exports.useCallback((at={},At=null)=>X({...at,style:{visibility:P?"visible":"hidden",...at.style}},At),[P,X]),qe=C.exports.useCallback((at,At=null)=>({...at,ref:Fn(At,M,Z)}),[M,Z]),tt=C.exports.useRef(),Ze=C.exports.useRef(),nt=C.exports.useCallback(at=>{M.current==null&&Z(at)},[Z]),Tt=C.exports.useCallback((at={},At=null)=>{const st={...at,ref:Fn(I,At,nt),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(st.onClick=al(at.onClick,T)),u===kp.hover&&(st.onFocus=al(at.onFocus,()=>{tt.current===void 0&&_()}),st.onBlur=al(at.onBlur,gt=>{const an=aL(gt),Ct=!Jx(R.current,an);P&&t&&Ct&&E()}),st.onKeyDown=al(at.onKeyDown,gt=>{gt.key==="Escape"&&E()}),st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0,tt.current=window.setTimeout(()=>_(),h)}),st.onMouseLeave=al(at.onMouseLeave,()=>{N.current=!1,tt.current&&(clearTimeout(tt.current),tt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),st},[ie,P,Q,u,nt,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{tt.current&&clearTimeout(tt.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((at={},At=null)=>({...at,id:K,ref:Fn(At,st=>{$(!!st)})}),[K]),Le=C.exports.useCallback((at={},At=null)=>({...at,id:G,ref:Fn(At,st=>{de(!!st)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:He,getPopoverProps:$e,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function Jx(e,t){return e===t||e?.contains(t)}function aL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t8(e){const t=Ii("Popover",e),{children:n,...r}=vn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t8.displayName="Popover";function n8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(xS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={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]}}},gge=we(Rl.section),hF=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});hF.displayName="PopoverTransition";var r8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(hF,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});r8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function i8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}i8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=pd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=pd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=pd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function pF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(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 gF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};gF.displayName="Shape";var IC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});IC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=pF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(gF,{size:n,isIndeterminate:v,children:[x(IC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(IC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=pF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),mF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=vn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},re(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});mF.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(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 vF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});vF.displayName="SelectField";var yF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=vn(e),[w,P]=Age(S,nQ),E=S_(P),_={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 le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(vF,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(SF,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});yF.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SF=e=>{const{children:t=x(Lge,{}),...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 x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};SF.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function bF(e){return!!e.touches}function Rge(e){return bF(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function xF(e,t="page"){return bF(e)?Dge(e,t):zge(e,t)}function Bge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Fge(e,t=!1){function n(i){e(i,{point:xF(i)})}return t?Bge(n):n}function $3(e,t,n,r){return Oge(e,t,Fge(n,t==="pointerdown"),r)}function wF(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:xF(e)},{timestamp:i}=BP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Vge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=BP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function sL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:sL(e.point,t[t.length-1]),offset:sL(e.point,t[0]),velocity:Wge(t,.1)}}var Hge=e=>e*1e3;function Wge(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>Hge(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 Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function lL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(lL(e)&&lL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function CF(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),h=wF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;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;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function _F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=_F({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},yd=Zge({"../../../react-shim.js"(){}});yd();yd();yd();var Ma=e=>e?"":void 0,S0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");yd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function Qge(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 im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function kF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>$y(w).height>$y(P).height?w:P,H3):r.reduce((w,P)=>$y(w).width>$y(P).width?w:P,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({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",...im({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({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:S,rootStyle:s,getThumbStyle:o}}function EF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(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:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),H=cr(w),$=EF({isReversed:a,direction:s,orientation:l}),[j,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),He=($?De:X).map(We=>j4(We,t,n)),qe=l==="vertical",tt=C.exports.useRef(null),Ze=C.exports.useRef(null),nt=_F({getNodes(){const We=Ze.current,ht=We?.querySelectorAll("[role=slider]");return ht?Array.from(ht):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),at=C.exports.useCallback(We=>{var ht;if(!tt.current)return;Se.current.eventSource="pointer";const it=tt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ht=We.touches)==null?void 0:ht[0])??We,Qn=qe?it.bottom-Zt:Nt-it.left,lo=qe?it.height:it.width;let gi=Qn/lo;return $&&(gi=1-gi),Lz(gi,t,n)},[qe,$,n,t]),At=(n-t)/10,st=S||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(We,ht){if(!Z)return;const it=Se.current.valueBounds[We];ht=parseFloat(wC(ht,it.min,st)),ht=m0(ht,it.min,it.max);const Nt=[...Se.current.value];Nt[We]=ht,de(Nt)},setActiveIndex:G,stepUp(We,ht=st){const it=Se.current.value[We],Nt=$?it-ht:it+ht;gt.setValueAtIndex(We,Nt)},stepDown(We,ht=st){const it=Se.current.value[We],Nt=$?it+ht:it-ht;gt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[st,$,de,Z]),an=C.exports.useCallback(We=>{const ht=We.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,At),PageDown:()=>gt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];gt.setValueAtIndex(K,Zt)}}[ht];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[gt,K,At,ye]),{getThumbStyle:Ct,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>kF({isReversed:$,orientation:l,thumbRects:nt,thumbPercents:He}),[$,l,He,nt]),Oe=C.exports.useCallback(We=>{var ht;const it=We??K;if(it!==-1&&M){const Nt=Le.getThumb(it),Zt=(ht=Ze.current)==null?void 0:ht.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=We=>{const ht=at(We)||0,it=Se.current.value.map(gi=>Math.abs(gi-ht)),Nt=Math.min(...it);let Zt=it.indexOf(Nt);const Qn=it.filter(gi=>gi===Nt);Qn.length>1&&ht>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),gt.setValueAtIndex(Zt,ht),Oe(Zt)},Xt=We=>{if(K==-1)return;const ht=at(We)||0;G(K),gt.setValueAtIndex(K,ht),Oe(K)};CF(Ze,{onPanSessionStart(We){!Z||(J(!0),et(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ht=null)=>({...We,...R,id:Le.root,ref:Fn(ht,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),ke=C.exports.useCallback((We={},ht=null)=>({...We,ref:Fn(ht,tt),id:Le.track,"data-disabled":Ma(h),style:{...We.style,...sn}}),[h,sn,Le]),Ot=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.innerTrack,style:{...We.style,...yn}}),[yn,Le]),Ne=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We,Zt=X[it];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${it}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[it];return{...Nt,ref:ht,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(it),"data-active":Ma(V&&K===it),"aria-valuetext":H?.(Zt)??P?.[it],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[it],"aria-labelledby":E?.[it]?void 0:_?.[it],style:{...We.style,...Ct(it)},onKeyDown:b0(We.onKeyDown,an),onFocus:b0(We.onFocus,()=>{Q(!0),G(it)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,H,P,l,h,p,E,_,Ct,an,Q]),ut=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.output,htmlFor:X.map((it,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),ln=C.exports.useCallback((We,ht=null)=>{const{value:it,...Nt}=We,Zt=!(itn),Qn=it>=X[0]&&it<=X[X.length-1];let lo=j4(it,t,n);lo=$?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ht,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!Zt),"data-highlighted":Ma(Qn),style:{...We.style,...gi}}},[h,$,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We;return{...Nt,ref:ht,id:Le.getInput(it),type:"hidden",value:X[it],name:Array.isArray(T)?T[it]:`${T}-${it}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>He[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:gt,getRootProps:Yt,getTrackProps:ke,getInnerTrackProps:Ot,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Nn,getOutputProps:ut}}function eme(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[tme,TS]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[nme,o8]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),PF=Pe(function(t,n){const r=Ii("Slider",t),i=vn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});PF.defaultProps={orientation:"horizontal"};PF.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o8(),s=r(t,n);return le.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";yd();yd();function sme(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:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),H=EF({isReversed:a,direction:s,orientation:l}),[$,j]=nS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0($,t,n),te=n-Z+t,he=j4(H?te:Z,t,n),ye=l==="vertical",Se=wF({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:H,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useId(),tt=u??qe,[Ze,nt]=[`slider-thumb-${tt}`,`slider-track-${tt}`],Tt=C.exports.useCallback(Ne=>{var ut;if(!De.current)return;const ln=Se.current;ln.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ht}=((ut=Ne.touches)==null?void 0:ut[0])??Ne,it=ye?Nn.bottom-ht:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=it/Nt;H&&(Zt=1-Zt);let Qn=Lz(Zt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(wC(Qn,ln.min,ln.step))),Qn=m0(Qn,ln.min,ln.max),Qn},[ye,H,Se]),xt=C.exports.useCallback(Ne=>{const ut=Se.current;!ut.isInteractive||(Ne=parseFloat(wC(Ne,ut.min,G)),Ne=m0(Ne,ut.min,ut.max),j(Ne))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(Ne=G){const ut=H?Z-Ne:Z+Ne;xt(ut)},stepDown(Ne=G){const ut=H?Z+Ne:Z-Ne;xt(ut)},reset(){xt(o||0)},stepTo(Ne){xt(Ne)}}),[xt,H,Z,G,o]),at=C.exports.useCallback(Ne=>{const ut=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(ut.min),End:()=>xt(ut.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),ut.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,st=Kge($e),{getThumbStyle:gt,rootStyle:an,trackStyle:Ct,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const Ne=Se.current,ut=st??{width:0,height:0};return kF({isReversed:H,orientation:Ne.orientation,thumbRects:[ut],thumbPercents:[he]})},[H,st,he,Se]),sn=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ut;return(ut=$e.current)==null?void 0:ut.focus()})},[Se]);id(()=>{const Ne=Se.current;sn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Z,N]);function yn(Ne){const ut=Tt(Ne);ut!=null&&ut!==Se.current.value&&j(ut)}CF(He,{onPanSessionStart(Ne){const ut=Se.current;!ut.isInteractive||(V(!0),sn(),yn(Ne),R?.(ut.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Oe=C.exports.useCallback((Ne={},ut=null)=>({...Ne,...I,ref:Fn(ut,He),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(J),style:{...Ne.style,...an}}),[I,h,J,an]),et=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,De),id:nt,"data-disabled":Ma(h),style:{...Ne.style,...Ct}}),[h,nt,Ct]),Xt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,style:{...Ne.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,$e),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ma(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...Ne.style,...gt(0)},onKeyDown:b0(Ne.onKeyDown,at),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,gt,at]),ke=C.exports.useCallback((Ne,ut=null)=>{const ln=!(Ne.valuen),Nn=Z>=Ne.value,We=j4(Ne.value,t,n),ht={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:H?`${100-We}%`:`${We}%`},horizontal:{left:H?`${100-We}%`:`${We}%`}})};return{...Ne,ref:ut,role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!ln),"data-highlighted":Ma(Nn),style:{...Ne.style,...ht}}},[h,H,n,t,l,Z]),Ot=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Oe,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:ke,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t"}),[dme,LS]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a8=Pe((e,t)=>{const n=Ii("Slider",e),r=vn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a8.defaultProps={orientation:"horizontal"};a8.displayName="Slider";var TF=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});TF.displayName="SliderThumb";var AF=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});AF.displayName="SliderTrack";var LF=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});LF.displayName="SliderFilledTrack";var RC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});RC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),uL=e=>e?"":void 0,s8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Tz(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]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":uL(s.isChecked),"data-hover":uL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,MF,pme,gme]=HN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=MF(),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())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Fn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:OF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":IF(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[bme,xme]=Cn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:IF(n,s),tabId:OF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({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 _me(){const e=r2(),t=MF(),{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 Cs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.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 OF(e,t){return`${e}--tab-${t}`}function IF(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),RF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});RF.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var NF=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});NF.displayName="TabPanel";var DF=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});DF.displayName="TabPanels";var zF=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});zF.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],BF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=S_(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});BF.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=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 i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function cL(e,t){const n=FF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function FF(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(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 Dme(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 zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Bme(zme);function Bme(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=Fme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=cL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:$F(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=FF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(cL(ml.getState(),i).position)}}var dL=0;function Fme(e,t={}){dL+=1;const n=t.id??dL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=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 le.createElement(wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(_z,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(kz,{id:u?.title,children:i}),s&&x(Cz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function $F(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Hme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=$F(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.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,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=BN();return C.exports.useMemo(()=>Hme(t.direction,e),[e,t.direction])}var Wme={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]}}},HF=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=Wme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},DC(n,{id:t,onClose:P})))});HF.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=HF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(gd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re($n,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={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 Bg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(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:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:H}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=pB({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),H()},[H]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=zC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),$e=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>X4(K),"keydown",s?$e:void 0),Uf(()=>X4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const He=C.exports.useCallback((Ze={},nt=null)=>({...Ze,ref:Fn(K,nt,$),onPointerEnter:Bg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Bg(Ze.onClick,Se),onPointerDown:Bg(Ze.onPointerDown,De),onFocus:Bg(Ze.onFocus,he),onBlur:Bg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,$]),qe=C.exports.useCallback((Ze={},nt=null)=>j({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},nt),[j,S,w]),tt=C.exports.useCallback((Ze={},nt=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:nt,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:He,getTooltipProps:tt,getTooltipPositionerProps:qe,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=X4(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X4(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const H=mQ(i,"colors",E);n[Hr.arrowBg.var]=H}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const H=C.exports.Children.only(o);M=C.exports.cloneElement(H,_.getTriggerProps(H.props,H.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?re($n,{children:[M,x(gd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x($n,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:re(HR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return re(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l8(e)?2:u8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function WF(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function VF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l8(e){return ive&&e instanceof Map}function u8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function c8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=GF(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return d8(r,!0)},!0)),e}function Jme(){Ss(2)}function f8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=HC[e];return t||Ss(18,e),t}function eve(e,t){HC[e]||(HC[e]=t)}function BC(){return Mv}function rw(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function Z4(e){FC(e),e.p.forEach(tve),e.p=null}function FC(e){e===Mv&&(Mv=e.l)}function fL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(Z4(t),Ss(4)),Cu(e)&&(e=Q4(t,e),t.l||J4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Q4(t,n,[]),Z4(t),t.u&&t.v(t.u,t.s),e!==UF?e:void 0}function Q4(e,t,n){if(f8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return hL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return hL(e,r,i,o,a,n)}),J4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function hL(e,t,n,r,i,o){if(sd(i)){var a=Q4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(WF(n,r,a),!sd(a))return;e.m=!1}if(Cu(i)&&!f8(i)){if(!e.h.F&&e._<1)return;Q4(e,i),t&&t.A.l||J4(e,i)}}function J4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d8(t,n)}function ow(e,t){var n=e[tr];return(n?bf(n):e)[t]}function pL(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 Nc(e){e.P||(e.P=!0,e.l&&Nc(e.l))}function aw(e){e.o||(e.o=c8(e.t))}function $C(e,t,n){var r=l8(t)?El("MapSet").N(t,n):u8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:BC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:BC()).p.push(r),r}function nve(e){return sd(e)||Ss(22,e),function t(n){if(!Cu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=gL(n,o),i.I=!1}else r=gL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||WF(r,a,t(s))}),o===3?new Set(r):r}(e)}function gL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c8(e)}function rve(){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[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Nc(s);break;case 4:n(s)&&Nc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!VF(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?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;l1?E-1:0),T=1;T1?h-1:0),m=1;m=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=El("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new sve,jF=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function SL(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 bL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p8)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E"u")throw new Error($i(12));if(typeof n(void 0,{type:e5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function YF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n5}function i(s,l){r(s)===n5&&(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 hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;QF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=QF})(ZF);var JF={exports:{}},e$={};/** - * @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 OS=C.exports,Qve=ZF.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=OS.useRef,r2e=OS.useEffect,i2e=OS.useMemo,o2e=OS.useDebugValue;e$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,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=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=e$})(JF);function a2e(e){e()}let t$=a2e;const s2e=e=>t$=e,l2e=()=>t$,ld=C.exports.createContext(null);function n$(){return C.exports.useContext(ld)}const u2e=()=>{throw new Error("uSES not initialized!")};let r$=u2e;const c2e=e=>{r$=e},d2e=(e,t)=>e===t;function f2e(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(r,i=d2e){const{store:o,subscription:a,getServerState:s}=t(),l=r$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const h2e=f2e();var p2e={exports:{}},Mn={};/** - * @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 m8=Symbol.for("react.element"),v8=Symbol.for("react.portal"),IS=Symbol.for("react.fragment"),RS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),BS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),i$;i$=Symbol.for("react.module.reference");function ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m8:switch(e=e.type,e){case IS:case NS:case RS:case FS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case zS:case BS:case WS:case HS:case DS:return e;default:return t}}case v8:return t}}}Mn.ContextConsumer=zS;Mn.ContextProvider=DS;Mn.Element=m8;Mn.ForwardRef=BS;Mn.Fragment=IS;Mn.Lazy=WS;Mn.Memo=HS;Mn.Portal=v8;Mn.Profiler=NS;Mn.StrictMode=RS;Mn.Suspense=FS;Mn.SuspenseList=$S;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return ja(e)===zS};Mn.isContextProvider=function(e){return ja(e)===DS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m8};Mn.isForwardRef=function(e){return ja(e)===BS};Mn.isFragment=function(e){return ja(e)===IS};Mn.isLazy=function(e){return ja(e)===WS};Mn.isMemo=function(e){return ja(e)===HS};Mn.isPortal=function(e){return ja(e)===v8};Mn.isProfiler=function(e){return ja(e)===NS};Mn.isStrictMode=function(e){return ja(e)===RS};Mn.isSuspense=function(e){return ja(e)===FS};Mn.isSuspenseList=function(e){return ja(e)===$S};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===IS||e===NS||e===RS||e===FS||e===$S||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===BS||e.$$typeof===i$||e.getModuleId!==void 0)};Mn.typeOf=ja;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();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 PL={notify(){},get:()=>[]};function y2e(e,t){let n,r=PL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=PL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function o$(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=o$();function C2e(e=ld){const t=e===ld?w2e:o$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(JF.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var y8="persist:",a$="persist/FLUSH",S8="persist/REHYDRATE",s$="persist/PAUSE",l$="persist/PERSIST",u$="persist/PURGE",c$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function TL(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 E2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,H){return H.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).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=O2e,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,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function AL(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 au(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var B2e=5e3;function F2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:B2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===l$){var P=!1,E=function(z,H){P||(p.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return au({},t(w,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(N){var z=e.migrate||function(H,$){return Promise.resolve(H)};z(N,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(N){E(void 0,N)}),au({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===u$)return s=!0,p.result(I2e(e)),au({},t(w,p),{_persist:v});if(p.type===a$)return p.result(a&&a.flush()),au({},t(w,p),{_persist:v});if(p.type===s$)l=!0;else if(p.type===S8){if(s)return au({},w,{_persist:au({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=au({},M,{_persist:au({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(au({},R,{_persist:v}))}}function LL(e){return W2e(e)||H2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function H2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function W2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:d$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case c$:return VC({},t,{registry:[].concat(LL(t.registry),[n.key])});case S8:var r=t.registry.indexOf(n.key),i=LL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=p8(U2e,d$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:c$,key:u})},a=function(u,h,p){var m={type:S8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:s$})},persist:function(){e.dispatch({type:l$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b8={},x8={};x8.__esModule=!0;x8.default=q2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var j2e={getItem:dw,setItem:dw,removeItem:dw};function Y2e(e){if((typeof self>"u"?"undefined":V3(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{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}b8.__esModule=!0;b8.default=Z2e;var K2e=X2e(x8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.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 f$=void 0,Q2e=J2e(b8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");f$=eye;var h$={},p$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w8={};(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={}))})(w8);(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=nh,n=w8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths. - - ${JSON.stringify(Z)} - - ${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(te)} - - ${G}`)};e.singleTransformValidator=z;const H=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.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(ie)}`)}};e.transformsValidator=H;const $=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.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(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=$;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. - - ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(p$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)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)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&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(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&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 S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||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 S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...H,...$,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(h$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C8(r)?r:!1},C8=e=>Boolean(typeof e=="string"?tye(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)})),i5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * 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,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,H=512,$=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",H],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",$e="[object Array]",He="[object AsyncFunction]",qe="[object Boolean]",tt="[object Date]",Ze="[object DOMException]",nt="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",at="[object Number]",At="[object Null]",st="[object Object]",gt="[object Promise]",an="[object Proxy]",Ct="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",ke="[object DataView]",Ot="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",ln="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ht="[object Uint8ClampedArray]",it="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),va=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Du=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),zu=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Bu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ya=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,qa="\\ud800-\\udfff",Bl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",$l=Bl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",Sn=" \\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",_r="\\ufe0e\\ufe0f",Ur=Ds+No+kn+Sn,zo="['\u2019]",zs="["+qa+"]",Gr="["+Ur+"]",Ka="["+$l+"]",Td="\\d+",Hl="["+_h+"]",Xa="["+Fu+"]",Ad="[^"+qa+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ka+"|"+mi+")",Eh="[^"+qa+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Bs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",Wl="(?:"+Xa+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",$u="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+_r+"]?",ya="(?:"+Fs+"(?:"+[Eh,Ld,Bs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Wu+Md+ya,Ph="(?:"+[Hl,Ld,Bs].join("|")+")"+Ht,Vu="(?:"+[Eh+Ka+"?",Ka,Ld,Bs,zs].join("|")+")",Uu=RegExp(zo,"g"),Th=RegExp(Ka,"g"),Bo=RegExp(mi+"(?="+mi+")|"+Vu+Ht,"g"),Wn=RegExp([uo+"?"+Xa+"+"+$u+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+Hu+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+$u,uo+"+"+Hu,Vl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Fs+qa+$l+_r+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["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"],Lh=-1,un={};un[Ot]=un[Ne]=un[ut]=un[ln]=un[Nn]=un[We]=un[ht]=un[it]=un[Nt]=!0,un[De]=un[$e]=un[Yt]=un[qe]=un[ke]=un[tt]=un[nt]=un[Tt]=un[Le]=un[at]=un[st]=un[Ct]=un[Ut]=un[sn]=un[et]=!1;var Wt={};Wt[De]=Wt[$e]=Wt[Yt]=Wt[ke]=Wt[qe]=Wt[tt]=Wt[Ot]=Wt[Ne]=Wt[ut]=Wt[ln]=Wt[Nn]=Wt[Le]=Wt[at]=Wt[st]=Wt[Ct]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[We]=Wt[ht]=Wt[it]=Wt[Nt]=!0,Wt[nt]=Wt[Tt]=Wt[et]=!1;var Mh={\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"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,Ke=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,$s=hn&&hn.isSet,I1=hn&&hn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je-1;);return ve}function Za(oe,xe){for(var ve=oe.length;ve--&&Yu(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var y2=Bd(Mh),Qa=Bd(O1);function Ws(oe){return"\\"+ne[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Gl(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function S2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve-1}function B2(c,g){var b=this.__data__,L=Er(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=Z1,Wo.prototype.has=Q1,Wo.prototype.set=B2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Ae=si(c),Ge=Ae==Tt||Ae==xt;if(xc(c))return Js(c,ee);if(Ae==st||Ae==De||Ge&&!D){if(Y=ce||Ge?{}:xk(c),!ee)return ce?mg(c,dc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Ae])return D?c:{};Y=nU(c,Ae,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Xk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,F))}):qk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,F))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,F))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=cn(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function fc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,kr(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=Ku,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:Qk(L);b0&&b(ee)?g>1?Pr(ee,g-1,b,L,D):ba(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return eu(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&tn.call(c,g)}function Qh(c,g){return c!=null&&g in cn(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Ae=-1,Ge=ee[0];e:for(;++Ae-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Jl(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+Yl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,F=mr(Kd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function yc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Yl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Lb(_k(c,g,xo),c+"")}function ip(c){return cc(mp(c))}function rf(c,g){var b=mp(c);return j2(b,Kl(g,0,b.length))}function Zl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Wd(Ce);Y=!1,D=Ku,ce=new Ca}else ce=g?[]:ee;e:for(;++L=L?c:Ar(c,g,b)}var fg=_2||function(c){return yt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=ec?ec(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Ql(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,Ya.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?cn(Zd.call(c)):{}}function V2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Ae=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Zi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=cn(g);++L-1?D[F?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new yi(a);if(D&&!Y&&be(F)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Ae=-1,Ge=!0,dt=b&w?new Ca:n;for(F.set(c,g),F.set(g,c);++Ae1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{ -/* [wrapped with `+g+`] */ -`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Jl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Dk(c,b)});function zk(c){var g=B(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function Y2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Jl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function vG(){return zk(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=Zk(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Lk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Mb)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){tn.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var PG=vg(Mk),TG=vg(Ok);function AG(c,g){return Pr(q2(c,g),1)}function LG(c,g){return Pr(q2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Pr(q2(c,g),b)}function Bk(c,g){var b=Rt(c)?Vn:ts;return b(c,Te(g,3))}function Fk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var OG=dp(function(c,g,b){tn.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Yu(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return ts(c,function(Y){F[++L]=D?vi(g,Y,b):ns(Y,g,b)}),F}),NG=dp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=Rt(c)?zn:Sr;return b(c,Te(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function BG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,ts)}function FG(c,g,b){var L=Rt(c)?p2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,Z2(Te(g,3)))}function HG(c){var g=Rt(c)?cc:ip;return g(c)}function WG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?wb:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Tr(c).length}function GG(c,g,b){var L=Rt(c)?Gu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Pr(g,1),[])}),K2=k2||function(){return yt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function $k(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Hk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Ib=_t(function(c,g,b){var L=P;if(b.length){var D=Ho(b,Ve(Ib));L|=I}return pe(c,L,g,b,D)}),Wk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Ho(b,Ve(Wk));L|=I}return pe(g,L,c,b,D)});function Vk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=Vk.placeholder,L}function Uk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Uk.placeholder,L}function Gk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new yi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Ae="maxWait"in b,F=Ae?mr(Ea(b.maxWait)||0,g):F,Ge="trailing"in b?!!b.trailing:Ge);function dt(Mr){var ss=L,nu=D;return L=D=n,Ce=Mr,Y=c.apply(nu,ss),Y}function St(Mr){return Ce=Mr,ee=xg(jt,g),_e?dt(Mr):Y}function $t(Mr){var ss=Mr-ce,nu=Mr-Ce,cE=g-ss;return Ae?qr(cE,F-nu):cE}function bt(Mr){var ss=Mr-ce,nu=Mr-Ce;return ce===n||ss>=g||ss<0||Ae&&nu>=F}function jt(){var Mr=K2();if(bt(Mr))return Jt(Mr);ee=xg(jt,$t(Mr))}function Jt(Mr){return ee=n,Ge&&L?dt(Mr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(K2())}function Zo(){var Mr=K2(),ss=bt(Mr);if(L=arguments,D=this,ce=Mr,ss){if(ee===n)return St(ce);if(Ae)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Ea(g)||0,b)});function XG(c){return pe(c,H)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new yi(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 ZG(c){return Hk(2,c)}var QG=kb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],kr(Te())):zn(Pr(g,1),kr(Te()));var b=g.length;return _t(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&tn.call(c,"callee")&&!W1.call(c,"callee")},Rt=ve.isArray,hj=jr?kr(jr):og;function So(c){return c!=null&&Q2(c.length)&&!eu(c)}function Lr(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==qe}var xc=E2||Gb,gj=co?kr(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||xc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Tr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function yj(c,g){return pc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?pc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==nt||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function eu(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==He||g==an}function Yk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var qk=Gi?kr(Gi):_b;function xj(c,g){return c===g||gc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,gc(c,g,Et(g),b)}function Cj(c){return Kk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Kk(c){return typeof c=="number"||br(c)&&oi(c)==at}function wg(c){if(!br(c)||oi(c)!=st)return!1;var g=tc(c);if(g===null)return!0;var b=tn.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?kr(Sa):or;function Pj(c){return Yk(c)&&c>=-G&&c<=G}var Xk=$s?kr($s):Bt;function J2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==sn}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==yn}var gp=I1?kr(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==et}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function Zk(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):Ci(c);if(nc&&c[nc])return S2(c[nc]());var g=si(c),b=g==Le?Dh:g==Ut?Wd:mp;return b(c)}function tu(c){if(!c)return c===0?c:0;if(c=Ea(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=tu(c),b=g%1;return g===g?b?g-b:g:0}function Qk(c){return c?Kl(Dt(c),0,X):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?Ke(c.slice(2),b?2:8):_1.test(c)?te:+c}function Jk(c){return _a(c,bo(c))}function Ij(c){return c?Kl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)tn.call(g,b)&&Gs(c,b,g[b])}),eE=Xi(function(c,g){_a(g,bo(g),c)}),ey=Xi(function(c,g,b,L){_a(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){_a(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=ql(c);return g==null?b:Qe(b,g)}var Bj=_t(function(c,g){c=cn(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b1),F}),_a(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return nE(c,Z2(Te(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function nE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?oE(g):g)});function oE(c){return Fb(xn(c).toLowerCase())}function aE(c){return c=xn(c),c&&c.replace(A1,y2).replace(Th,"")}function mY(c,g,b){c=xn(c),g=Ki(g);var L=c.length;b=b===n?L:Kl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=xn(c),c&&va.test(c)?c.replace(Os,Qa):c}function yY(c){return c=xn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Yl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=xn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=Ki(g),!g&&Gl(c))?is(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Fb(g)});function MY(c,g,b){return c=xn(c),b=b==null?0:Kl(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=B.templateSettings;b&&Zi(c,g,b)&&(g=n),c=xn(c),g=ey({},g,L,Re);var D=ey({},g.imports,L.imports,Re),F=li(D),Y=Hd(D,F),ee,ce,Ce=0,_e=g.interpolate||Rs,Ae="__p += '",Ge=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Du?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` -`;c.replace(Ge,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Ae+=c.slice(Ce,Zo).replace(L1,Ws),jt&&(ee=!0,Ae+=`' + -__e(`+jt+`) + -'`),Qi&&(ce=!0,Ae+=`'; -`+Qi+`; -__p += '`),Jt&&(Ae+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+bt.length,bt}),Ae+=`'; -`;var St=tn.call(g,"variable")&&g.variable;if(!St)Ae=`with (obj) { -`+Ae+` -} -`;else if(x1.test(St))throw new kt(s);Ae=(ce?Ae.replace(Zt,""):Ae).replace(Qn,"$1").replace(lo,"$1;"),Ae="function("+(St||"obj")+`) { -`+(St?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Ae+`return __p -}`;var $t=lE(function(){return Qt(F,dt+"return "+Ae).apply(n,Y)});if($t.source=Ae,Nb($t))throw $t;return $t}function IY(c){return xn(c).toLowerCase()}function RY(c){return xn(c).toUpperCase()}function NY(c,g,b){if(c=xn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Za(L,D)+1;return is(L,F,Y).join("")}function DY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.slice(0,B1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Za(L,Ni(g))+1;return is(L,0,D).join("")}function zY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.replace(zu,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return is(L,D).join("")}function BY(c,g){var b=$,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=xn(c);var F=c.length;if(Gl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-xa(L);if(ee<1)return L;var ce=Y?is(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Db(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,xn(Ya.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Ae=Ce.index;ce=ce.slice(0,Ae===n?ee:Ae)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ge=ce.lastIndexOf(D);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+L}function FY(c){return c=xn(c),c&&m1.test(c)?c.replace(gi,w2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Fb=hp("toUpperCase");function sE(c,g,b){return c=xn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var lE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return Nb(b)?b:new kt(b)}}),HY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Ib(c[b],c))}),c});function WY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++DG)return[];var b=X,L=qr(c,X);g=Te(g),c-=X;for(var D=$d(L,g);++b0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Ae=function(jt){var Jt=D.apply(B,ba([jt],ee));return L&&Ge?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ge=this.__chain__,dt=!!this.__actions__.length,St=F&&!Ge,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:Y2,args:[Ae],thisArg:n}),new Yi(bt,Ge)}return St&&$t?c.apply(this,ee):(bt=this.thru(Ae),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Zu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";tn.call(Ja,L)||(Ja[L]=[]),Ja[L].push({name:g,func:b})}}),Ja[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=M2,B.prototype.at=mG,B.prototype.chain=vG,B.prototype.commit=yG,B.prototype.next=SG,B.prototype.plant=xG,B.prototype.reverse=wG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=CG,B.prototype.first=B.prototype.head,nc&&(B.prototype[nc]=bG),B},wa=po();Vt?((Vt.exports=wa)._=wa,Pt._=wa):yt._=wa}).call(ys)})(Zr,Zr.exports);const Je=Zr.exports;var rye=Object.create,g$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&g$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},m$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?g$(n,"default",{value:e,enumerable:!0}):n,e)),uye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),v$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=ze((e,t)=>{var n=v$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=ze((e,t)=>{var n=VS(),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}),dye=ze((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=ze((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=ze((e,t)=>{var n=VS();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}),US=ze((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),y$=ze((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Tu=ze((e,t)=>{var n=y$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),_8=ze((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=ze((e,t)=>{var n=_8(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=ze((e,t)=>{var n=_8(),r=yye(),i=Sye(),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}),S$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),b$=ze((e,t)=>{var n=GS(),r=S$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),bye=ze((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=ze((e,t)=>{var n=bye(),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}),x$=ze((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),wye=ze((e,t)=>{var n=b$(),r=xye(),i=S$(),o=x$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),Cye=ze((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=ze((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k8=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),jS=ze((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=ze((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=ze((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),Eye=ze((e,t)=>{var n=jS(),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}),Pye=ze((e,t)=>{var n=jS(),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}),Tye=ze((e,t)=>{var n=jS(),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}),Aye=ze((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Aye(),r=US(),i=k8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=ze((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}),YS=ze((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=ze((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=ze((e,t)=>{var n=YS();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}),w$=ze((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k8(),i=w$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Bye=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Fye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=ze((e,t)=>{var n=w$(),r=Bye(),i=Fye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),C$=ze((e,t)=>{var n=$ye(),r=Hye(),i=Wye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=ze((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}),Gye=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),jye=ze((e,t)=>{var n=_8(),r=Vye(),i=v$(),o=C$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,H,$,j,de,V,J){switch($){case M:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case T:return!(z.byteLength!=H.byteLength||!V(new r(z),new r(H)));case h:case p:case S:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=H.size&&!Q)return!1;var K=J.get(z);if(K)return K==H;j|=u,J.set(z,H);var G=o(ie(z),ie(H),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call(H)}return!1}t.exports=N}),Yye=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),qye=ze((e,t)=>{var n=Yye(),r=E8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Zye=ze((e,t)=>{var n=Kye(),r=Xye(),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}),Qye=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=ze((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=ze((e,t)=>{var n=Jye(),r=qS(),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}),t3e=ze((e,t)=>{function n(){return!1}t.exports=n}),_$=ze((e,t)=>{var n=Tu(),r=t3e(),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}),n3e=ze((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=ze((e,t)=>{var n=GS(),r=k$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[H]=V[$]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=ze((e,t)=>{var n=y$(),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{}}();t.exports=s}),E$=ze((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=ze((e,t)=>{var n=Qye(),r=e3e(),i=E8(),o=_$(),a=n3e(),s=E$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=ze((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}),l3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=ze((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=ze((e,t)=>{var n=s3e(),r=u3e(),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}),d3e=ze((e,t)=>{var n=b$(),r=k$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=ze((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=ze((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=ze((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=ze((e,t)=>{var n=g3e(),r=k8(),i=m3e(),o=v3e(),a=y3e(),s=GS(),l=x$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=ze((e,t)=>{var n=zye(),r=C$(),i=jye(),o=p3e(),a=S3e(),s=E8(),l=_$(),u=E$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),H=N?m:a(E),$=z?m:a(_);H=H==p?v:H,$=$==p?v:$;var j=H==v,de=$==v,V=H==$;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,H,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=ze((e,t)=>{var n=b3e(),r=qS();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}),P$=ze((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[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=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return T$(e,["input","textarea","select"])}function T$({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 P3e(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 '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=m$(P$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var OL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(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=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!T$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){OL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){OL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}m$(P$());var UC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const B3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),F3e=ct({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("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"})})}),$3e=ct({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("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"})}),H3e=ct({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("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"})}),W3e=ct({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("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 no=(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.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(no||{});const V3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"The Bounding Box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},za=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(md,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s8,{className:"invokeai__switch-root",...s})]})})};function A$(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(lke(i.target.checked))})]})}const IL=/^-?(0\.)?\.?$/,As=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(IL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(IL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const H=Je.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String(H)),h(H)};return x(hi,{..._,children:re(md,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Q_,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e8,{...E,className:"invokeai__number-input-stepper-button"}),x(J_,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Au=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return re(md,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(yF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[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],j3e=[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],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],P8=0,T8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ft(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ft(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),A8=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee(X3e),{isGFPGANAvailable:i}=Ee(Z3e),o=l=>e(K3(l)),a=l=>e(dV(l)),s=l=>e(X3(l.target.value));return re(en,{direction:"column",gap:2,children:[x(Au,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(za,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var L$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},RL=le.createContext&&le.createContext(L$),Jc=globalThis&&globalThis.__assign||function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{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 bs(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const $e=Je.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String($e)),l($e)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return re(md,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...H,children:r}),re(Gz,{w:"100%",gap:2,children:[re(a8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&re($n,{children:[x(RC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...$,children:o}),x(RC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(AF,{className:"invokeai__slider_track",...j,children:x(LF,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(TF,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z_,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(Q_,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),re(dF,{...ie,children:[x(e8,{className:"invokeai__slider-number-stepper"}),x(J_,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L8,{}),onClick:Se,isDisabled:M,...K})]})]})}function O$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const I$=()=>x(Nl,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(za,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(hV(r.target.checked))})})},s4e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(za,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},R$=()=>re(en,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),M8=()=>x(Nl,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(za,{label:"Randomize Seed",isChecked:t,onChange:r=>e(ake(r.target.checked))})}function u4e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(f2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:P8,max:T8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const N$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(f2(N$(P8,T8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(cke(r)),value:t,isInteger:!1})}function f4e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(eke(r)),value:t,isInteger:!1})}const O8=()=>re(en,{gap:2,direction:"column",children:[x(l4e,{}),re(en,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(en,{gap:2,children:x(d4e,{})}),x(en,{gap:2,children:x(f4e,{})})]});function D$(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(ske(i.target.checked))})]})}const h4e=ft(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ft(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),I8=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(h4e),{isESRGANAvailable:r}=Ee(p4e);return re("div",{className:"upscale-options",children:[x(Au,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(za,{isChecked:e,width:"auto",onChange:r=>t(nke(r.target.checked))})}function R8(){return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(md,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k_,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(C8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(dke(i)),isInteger:!1})}const N8=()=>re(en,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]});function S4e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(cV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Cr=ft(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:Je.isEqual}}),b4e=ft(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),z$=e=>e.options;function x4e(){const e=Ee(i=>i.options.height),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(fV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ft([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function C4e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Q8e(i)),value:t,width:D8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(Au,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Ee(i=>i.options.width),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const D8="auto";function z8(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),re("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={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:"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:[]},B$=MS({name:"system",initialState:P4e,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="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},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="Processing canceled"},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="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",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}}}),{setShouldDisplayInProgressType:T4e,setIsProcessing:gu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:NL,setSocketId:qPe,setShouldConfirmOnDelete:F$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:G3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:DL,errorSeen:$$,setModelList:zL,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:B4e,setProcessingIndeterminateTask:F4e}=B$.actions,$4e=B$.reducer;function H4e(e){return pt({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 W4e(e){return pt({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 H$(e){return pt({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 V4e(e){return pt({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 U4e(e){return pt({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)}const G4e=ft(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Ee(G4e),{text:r}=V3e[t];return n?re(t8,{trigger:"hover",children:[x(i8,{children:x(Nl,{children:e})}),re(r8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=H4e},n)=>x(j4e,{feature:e,children:x(Nl,{ref:n,children:x(ma,{marginBottom:"-.15rem",as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return re(zf,{className:"advanced-settings-item",children:[x("h2",{children:re(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Bf,{className:"advanced-settings-panel",children:r})]})}const B8=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({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 X4e(e){return pt({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 Z4e(e){return pt({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 W$(e){return pt({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 V$(e){return pt({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 Q4e(e){return pt({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 J4e(e){return pt({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 e5e(e){return pt({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 t5e(e){return pt({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 n5e(e){return pt({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 F8(e){return pt({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 U$(e){return pt({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 KS(e){return pt({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 r5e(e){return pt({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 G$(e){return pt({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 i5e(e){return pt({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 o5e(e){return pt({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 a5e(e){return pt({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 s5e(e){return pt({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 l5e(e){return pt({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 u5e(e){return pt({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 c5e(e){return pt({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 d5e(e){return pt({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 f5e(e){return pt({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 h5e(e){return pt({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 p5e(e){return pt({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 g5e(e){return pt({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 m5e(e){return pt({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 v5e(e){return pt({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 y5e(e){return pt({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 S5e(e){return pt({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 j$(e){return pt({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 b5e(e){return pt({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 x5e(e){return pt({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 BL(e){return pt({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 Y$(e){return pt({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 w5e(e){return pt({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 c1(e){return pt({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 C5e(e){return pt({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 $8(e){return pt({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 _5e(e){return pt({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 H8(e){return pt({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 k5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],W8=e=>e.kind==="line"&&e.layer==="mask",E5e=e=>e.kind==="line"&&e.layer==="base",o5=e=>e.kind==="image"&&e.layer==="base",P5e=e=>e.kind==="line",Rn=e=>e.canvas,Lu=e=>e.canvas.layerState.stagingArea.images.length>0,q$=e=>e.canvas.layerState.objects.find(o5),K$=ft([e=>e.options,e=>e.system,q$,Cr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=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")),h||(p=!1,m.push("System Disconnected")),o&&(!(C8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Je.isEqual,resultEqualityCheck:Je.isEqual}}),GC=Jr("socketio/generateImage"),T5e=Jr("socketio/runESRGAN"),A5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),FL=Jr("socketio/requestNewImages"),M5e=Jr("socketio/cancelProcessing"),O5e=Jr("socketio/requestSystemConfig"),X$=Jr("socketio/requestModelChange"),I5e=Jr("socketio/saveStagingAreaImageToGallery"),R5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Z$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i}=Ee(K$),o=Ee(Cr),a=()=>{r(GC(o))};return vt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const N5e=ft(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function Q$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(N5e),a=()=>n(M5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const D5e=ft(e=>e.options,e=>e.shouldLoopback),z5e=()=>{const e=Xe(),t=Ee(D5e);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(y5e,{}),onClick:()=>{e(ike(!t))}})},V8=()=>{const e=Ee(Cr);return re("div",{className:"process-buttons",children:[x(Z$,{}),e==="img2img"&&x(z5e,{}),x(Q$,{})]})},B5e=ft([e=>e.options,Cr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),U8=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(B5e),{isReady:r}=Ee(K$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(md,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(BF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function J$(e){return pt({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 eH(e){return pt({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 F5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function $5e(e,t){e.classList?e.classList.add(t):F5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $L(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function H5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$L(e.className,t):e.setAttribute("class",$L(e.className&&e.className.baseVal||"",t))}const HL={disabled:!1},tH=le.createContext(null);var nH=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",YC="exiting",Mu=function(e){$_(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=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}: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!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=YC)}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===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&nH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&this.setState({status:sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||HL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||HL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},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:yy.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],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sm)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=z_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(tH.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Mu.contextType=tH;Mu.propTypes={};function Ep(){}Mu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Mu.UNMOUNTED=sm;Mu.EXITED=xf;Mu.ENTERING=wf;Mu.ENTERED=Ip;Mu.EXITING=YC;const W5e=Mu;var V5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return $5e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return H5e(t,r)})},G8=function(e){$_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(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}},WL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),U5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),G5e=.999,j5e=.1,Y5e=20,Fg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},q5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},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:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,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"},iH=MS({name:"canvas",initialState:q5e,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(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!W8(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:hl(Je.clamp(n.width,64,512),64),height:hl(Je.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Fg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(Je.clamp(i,64,n/e.stageScale),64),s=hl(Je.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=U5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=WL(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(Je.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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(P5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(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(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Fg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=WL(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(o5)){const i=Pp(r.width,r.height,512,512,Fg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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=Pp(r,i,s,l,Fg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Fg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!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:hl(Je.clamp(o,64,512),64),height:hl(Je.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...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}}}),{addImageToStagingArea:K5e,addLine:oH,addPointToCurrentLine:aH,clearMask:X5e,commitStagingAreaImage:Z5e,discardStagedImages:Q5e,fitBoundingBoxToStage:KPe,nextStagingAreaImage:J5e,prevStagingAreaImage:eSe,redo:tSe,resetCanvas:sH,resetCanvasInteractionState:nSe,resetCanvasView:rSe,resizeAndScaleCanvas:lH,resizeCanvas:iSe,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:XPe,setBrushColor:oSe,setBrushSize:mw,setCanvasContainerDimensions:aSe,clearCanvasHistory:uH,setCursorPosition:cH,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:j8,setInpaintReplace:VL,setIsDrawing:XS,setIsMaskEnabled:dH,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:ZPe,setIsMoveStageKeyHeld:QPe,setIsMovingBoundingBox:UL,setIsMovingStage:a5,setIsTransformingBoundingBox:vw,setLayer:fH,setMaskColor:sSe,setMergedCanvas:lSe,setShouldAutoSave:uSe,setShouldCropToBoundingBoxOnSave:cSe,setShouldDarkenOutsideBoundingBox:dSe,setShouldLockBoundingBox:JPe,setShouldPreserveMaskedArea:fSe,setShouldShowBoundingBox:hSe,setShouldShowBrush:eTe,setShouldShowBrushPreview:tTe,setShouldShowCanvasDebugInfo:pSe,setShouldShowCheckboardTransparency:nTe,setShouldShowGrid:gSe,setShouldShowIntermediates:mSe,setShouldShowStagingImage:vSe,setShouldShowStagingOutline:GL,setShouldSnapToGrid:ySe,setShouldUseInpaintReplace:SSe,setStageCoordinates:hH,setStageDimensions:rTe,setStageScale:bSe,setTool:C0,toggleShouldLockBoundingBox:iTe,toggleTool:oTe,undo:xSe}=iH.actions,wSe=iH.reducer,pH=""+new URL("logo.13003d72.png",import.meta.url).href,CSe=ft(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:Je.isEqual}}),Y8=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(CSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),vt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),vt("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(oke(!i)),t(Wi(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(rH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("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:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(J$,{}):x(eH,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function _Se(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(B8,{accordionInfo:e})]})}const q8=C.exports.createContext(null),kSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(q8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x($8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},ESe=ft(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(ESe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(F$(!S.target.checked));return re($n,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(lF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:re(en,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(md,{children:re(en,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(s8,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),ed=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t8,{...o,children:[x(i8,{children:t}),re(r8,{className:`invokeai__popover-content ${r}`,children:[i&&x(n8,{className:"invokeai__popover-arrow"}),n]})]})},PSe=ft([e=>e.system,e=>e.options,e=>e.gallery,Cr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,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:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),gH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(PSe),m=o2(),v=()=>{!u||(h&&e(cd(!1)),e(d2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(K8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{u?.metadata&&e(f2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(P(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(T5e(u))};vt("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(A5e(u))};vt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(bV(!l)),I=()=>{!u||(h&&e(cd(!1)),e(j8(u)),e(Wi(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(x5e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(BL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(BL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(KS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(G$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(mt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(mt,{icon:x(b5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(mt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(A8,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(I8,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(mt,{icon:x(U$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(mt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},TSe={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},mH=MS({name:"gallery",initialState:TSe,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=Zr.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{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}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:vH,setCurrentImage:ASe,addGalleryImages:LSe,setIntermediateImage:MSe,selectNextImage:K8,selectPrevImage:X8,setShouldPinGallery:OSe,setShouldShowGallery:_0,setGalleryScrollPosition:ISe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:RSe,setShouldHoldGalleryOpen:yH,setShouldAutoSwitchToNewImages:NSe,setCurrentCategory:Wy,setGalleryWidth:DSe}=mH.actions,zSe=mH.reducer;ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ct({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"});ct({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("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"})});ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ct({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("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"})})});ct({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ct({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ct({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ct({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ct({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ct({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ct({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ct({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ct({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"});ct({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var SH=ct({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ct({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ct({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"});ct({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"});ct({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({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"});ct({displayName:"SpinnerIcon",path:re($n,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ct({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"});ct({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("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"})});ct({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"});ct({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"});ct({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"});ct({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ct({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"});ct({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"});ct({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"});ct({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ct({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"});ct({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"});ct({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ct({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ct({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"});function BSe(e){return pt({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 Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>re(en,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(BSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),re(en,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(SH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),FSe=(e,t)=>e.image.uuid===t.image.uuid,bH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();vt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(en,{gap:1,direction:"column",width:"100%",children:[re(en,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(SH,{mx:"2px"})]})]}),Object.keys(r).length>0?re($n,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:U3(l),onClick:()=>n(gb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(f2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(cV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:i5(h),onClick:()=>n(yV(i5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(hV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(fV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(d2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&re($n,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,H)=>{if(z.type==="esrgan"){const{scale:$,strength:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(x9(j))})]},H)}else if(z.type==="gfpgan"){const{strength:$}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},H)}else if(z.type==="codeformer"){const{strength:$,fidelity:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(dV(j)),n(X3("codeformer"))}})]},H)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),re(en,{gap:2,direction:"column",children:[re(en,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x($z,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},FSe),xH=ft([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=>u.uuid===e?.currentImage?.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:Je.isEqual}});function $Se(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())},m=()=>{e(cd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(bH,{image:i,styleClass:"current-image-metadata"})]})}const HSe=ft([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),wH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(HSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re($n,{children:[x(gH,{}),x($Se,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},WSe=()=>{const e=C.exports.useContext(q8);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x($8,{}),onClick:e||void 0})};function VSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(uV())};return re($n,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(WSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const USe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(VSe,{})}):x(kSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(wH,{})})]})};function GSe(e){return pt({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)}var jSe=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)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"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)}},JSe=["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"],XL="__resizable_base__",CH=function(e){KSe(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(XL):o.className+=XL,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||XSe},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","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(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&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.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"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,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Uy(n,M,I),r=Uy(r,R,N)}else n=Uy(n,h,p),r=Uy(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&&ZSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Gy(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 h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.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:cl(cl({},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&&Gy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Gy(n)?n.touches[0].clientX:n.clientX,h=Gy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=QSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=KL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=KL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=qL(M,this.props.grid[0]),z=qL(T,this.props.grid[1]),H=this.props.snapGap||0;M=H===0||Math.abs(N-M)<=H?N:M,T=H===0||Math.abs(z-T)<=H?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},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:cl(cl({},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 h=Object.keys(i).map(function(p){return i[p]!==!1?x(qSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return JSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({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 re(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("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);function qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(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,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ebe(i,...t)]}function ebe(...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 tbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _H(...e){return t=>e.forEach(n=>tbe(n,t))}function Ua(...e){return C.exports.useCallback(_H(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(rbe);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(KC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ibe(r,n.props),ref:_H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const nbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function rbe(e){return C.exports.isValidElement(e)&&e.type===nbe}function ibe(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 obe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],_u=obe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kH(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function EH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ua(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ua(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const abe=C.exports.createContext(void 0);function PH(e){const t=C.exports.useContext(abe);return e||t||"ltr"}function Ll(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 sbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",lbe="dismissableLayer.pointerDownOutside",ube="dismissableLayer.focusOutside";let ZL;const cbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(cbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ua(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=fbe(z=>{const H=z.target,$=[...h.branches].some(j=>j.contains(H));!I||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=hbe(z=>{const H=z.target;[...h.branches].some(j=>j.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return sbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),QL(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ZL)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),QL())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(_u.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function fbe(e,t=globalThis?.document){const n=Ll(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(){TH(lbe,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 hbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&TH(ube,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 QL(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function TH(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?kH(i,o):i.dispatchEvent(o)}let bw=0;function pbe(){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:JL()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:JL()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function JL(){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 xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},gbe=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=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ua(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){nM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(xw,eM);s.addEventListener(xw,u),s.dispatchEvent(E),E.defaultPrevented||(mbe(xbe(AH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const E=new CustomEvent(ww,eM);s.addEventListener(ww,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(ww,h),nM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=vbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(_u.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function mbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function vbe(e){const t=AH(e),n=tM(t,e),r=tM(t.reverse(),e);return[n,r]}function AH(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 tM(e,t){for(const n of e)if(!ybe(n,{upTo:t}))return n}function ybe(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 Sbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sbe(e)&&t&&e.select()}}const nM=bbe();function bbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rM(e,t),e.unshift(t)},remove(t){var n;e=rM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function rM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},wbe=zw["useId".toString()]||(()=>{});let Cbe=0;function _be(e){const[t,n]=C.exports.useState(wbe());return Y0(()=>{e||n(r=>r??String(Cbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function ZS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function Z8(e){return e==="y"?"height":"width"}function iM(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=f1(t),l=Z8(s),u=r[l]/2-i[l]/2,h=d1(t),p=s==="x";let m;switch(h){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(ZS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const kbe=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:h}=iM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=LH(r),h={x:i,y:o},p=f1(a),m=ZS(a),v=Z8(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,H=ZC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?zAbe[t])}function Lbe(e,t,n){n===void 0&&(n=!1);const r=ZS(e),i=f1(e),o=Z8(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u5(a)),{main:a,cross:u5(a)}}const Mbe={start:"end",end:"start"};function aM(e){return e.replace(/start|end/g,t=>Mbe[t])}const Obe=["top","right","bottom","left"];function Ibe(e){const t=u5(e);return[aM(e),t,aM(t)]}const Rbe=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:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[u5(a)]:Ibe(a)),_=[a,...E],T=await l5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:H,cross:$}=Lbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[H],T[$])}if(I=[...I,{placement:r,overflows:M}],!M.every(H=>H<=0)){var R,N;const H=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=_[H];if($)return{data:{index:H,overflows:I},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lM(e){return Obe.some(t=>e[t]>=0)}const Nbe=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 l5(r,{...n,elementContext:"reference"}),a=sM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lM(a)}}}case"escaped":{const o=await l5(r,{...n,altBoundary:!0}),a=sM(o,i.floating);return{data:{escapedOffsets:a,escaped:lM(a)}}}default:return{}}}}};async function Dbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=ZS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const zbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Dbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function MH(e){return e==="x"?"y":"x"}const Bbe=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:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await l5(t,l),p=f1(d1(i)),m=MH(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=ZC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=ZC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Fbe=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,h={x:n,y:r},p=f1(i),m=MH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;vN&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function OH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ou(e){if(e==null)return window;if(!OH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Ou(e).getComputedStyle(e)}function ku(e){return OH(e)?"":e?(e.nodeName||"").toLowerCase():""}function IH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Ou(e).HTMLElement}function ud(e){return e instanceof Ou(e).Element}function $be(e){return e instanceof Ou(e).Node}function Q8(e){if(typeof ShadowRoot>"u")return!1;const t=Ou(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function QS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Hbe(e){return["table","td","th"].includes(ku(e))}function RH(e){const t=/firefox/i.test(IH()),n=s2(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 NH(){return!/^((?!chrome|android).)*safari/i.test(IH())}const uM=Math.min,Hm=Math.max,c5=Math.round;function Eu(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&&Ml(e)&&(l=e.offsetWidth>0&&c5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c5(s.height)/e.offsetHeight||1);const h=ud(e)?Ou(e):window,p=!NH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function bd(e){return(($be(e)?e.ownerDocument:e.document)||window.document).documentElement}function JS(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function DH(e){return Eu(bd(e)).left+JS(e).scrollLeft}function Wbe(e){const t=Eu(e);return c5(t.width)!==e.offsetWidth||c5(t.height)!==e.offsetHeight}function Vbe(e,t,n){const r=Ml(t),i=bd(t),o=Eu(e,r&&Wbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((ku(t)!=="body"||QS(i))&&(a=JS(t)),Ml(t)){const l=Eu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=DH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zH(e){return ku(e)==="html"?e:e.assignedSlot||e.parentNode||(Q8(e)?e.host:null)||bd(e)}function cM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ube(e){let t=zH(e);for(Q8(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(ku(t));){if(RH(t))return t;t=t.parentNode}return null}function QC(e){const t=Ou(e);let n=cM(e);for(;n&&Hbe(n)&&getComputedStyle(n).position==="static";)n=cM(n);return n&&(ku(n)==="html"||ku(n)==="body"&&getComputedStyle(n).position==="static"&&!RH(n))?t:n||Ube(e)||t}function dM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Eu(e);return{width:t.width,height:t.height}}function Gbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((ku(n)!=="body"||QS(o))&&(a=JS(n)),Ml(n))){const l=Eu(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 jbe(e,t){const n=Ou(e),r=bd(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=NH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ybe(e){var t;const n=bd(e),r=JS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Hm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+DH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Hm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BH(e){const t=zH(e);return["html","body","#document"].includes(ku(t))?e.ownerDocument.body:Ml(t)&&QS(t)?t:BH(t)}function d5(e,t){var n;t===void 0&&(t=[]);const r=BH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ou(r),a=i?[o].concat(o.visualViewport||[],QS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d5(a))}function qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Q8(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Kbe(e,t){const n=Eu(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 fM(e,t,n){return t==="viewport"?s5(jbe(e,n)):ud(t)?Kbe(t,n):s5(Ybe(bd(e)))}function Xbe(e){const t=d5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?QC(e):e;return ud(r)?t.filter(i=>ud(i)&&qbe(i,r)&&ku(i)!=="body"):[]}function Zbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=fM(t,h,i);return u.top=Hm(p.top,u.top),u.right=uM(p.right,u.right),u.bottom=uM(p.bottom,u.bottom),u.left=Hm(p.left,u.left),u},fM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Qbe={getClippingRect:Zbe,convertOffsetParentRelativeRectToViewportRelativeRect:Gbe,isElement:ud,getDimensions:dM,getOffsetParent:QC,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Vbe(t,QC(n),r),floating:{...dM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Jbe(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,h=l||u?[...ud(e)?d5(e):[],...d5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?Eu(e):null;s&&S();function S(){const w=Eu(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const exe=(e,t,n)=>kbe(e,t,{platform:Qbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(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(!e9(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)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function txe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function nxe(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=txe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||exe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=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]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:P,floating:E}),[u,v,_,P,E])}const rxe=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?oM({element:t.current,padding:n}).fn(i):{}:t?oM({element:t,padding:n}).fn(i):{}}}};function ixe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{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 FH="Popper",[J8,$H]=a2(FH),[oxe,HH]=J8(FH),axe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(oxe,{scope:t,anchor:r,onAnchorChange:i},n)},sxe="PopperAnchor",lxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HH(sxe,n),a=C.exports.useRef(null),s=Ua(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(_u.div,Tn({},i,{ref:s}))}),f5="PopperContent",[uxe,aTe]=J8(f5),[cxe,dxe]=J8(f5,{hasParent:!1,positionUpdateFns:new Set}),fxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HH(f5,h),[N,z]=C.exports.useState(null),H=Ua(t,Ct=>z(Ct)),[$,j]=C.exports.useState(null),de=ixe($),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(pxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:$e,update:He}=nxe({strategy:"fixed",placement:ie,whileElementsMounted:Jbe,middleware:[zbe({mainAxis:m+J,alignmentAxis:S}),M?Bbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Fbe():void 0,...Z}):void 0,$?rxe({element:$,padding:w}):void 0,M?Rbe({...Z}):void 0,gxe({arrowWidth:V,arrowHeight:J}),T?Nbe({strategy:"referenceHidden"}):void 0].filter(hxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const qe=ye!==null&&Se!==null,[tt,Ze]=WH(De),nt=(i=$e.arrow)===null||i===void 0?void 0:i.x,Tt=(o=$e.arrow)===null||o===void 0?void 0:o.y,xt=((a=$e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,at]=C.exports.useState();Y0(()=>{N&&at(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:st}=dxe(f5,h),gt=!At;C.exports.useLayoutEffect(()=>{if(!gt)return st.add(He),()=>{st.delete(He)}},[gt,st,He]),C.exports.useLayoutEffect(()=>{gt&&qe&&Array.from(st).reverse().forEach(Ct=>requestAnimationFrame(Ct))},[gt,qe,st]);const an={"data-side":tt,"data-align":Ze,...I,ref:H,style:{...I.style,animation:qe?void 0:"none",opacity:(s=$e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=$e.transformOrigin)===null||l===void 0?void 0:l.x,(u=$e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(uxe,{scope:h,placedSide:tt,onArrowChange:j,arrowX:nt,arrowY:Tt,shouldHideArrow:xt},gt?C.exports.createElement(cxe,{scope:h,hasParent:!0,positionUpdateFns:st},C.exports.createElement(_u.div,an)):C.exports.createElement(_u.div,an)))});function hxe(e){return e!==void 0}function pxe(e){return e!==null}const gxe=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,[S,w]=WH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((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="",M="";return S==="bottom"?(T=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function WH(e){const[t,n="center"]=e.split("-");return[t,n]}const mxe=axe,vxe=lxe,yxe=fxe;function Sxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const VH=e=>{const{present:t,children:n}=e,r=bxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ua(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};VH.displayName="Presence";function bxe(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]=Sxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Yy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Yy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Yy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Yy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),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 Yy(e){return e?.animationName||"none"}function xxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=wxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(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 wxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",Cxe={bubbles:!1,cancelable:!0},ek="RovingFocusGroup",[t9,UH,_xe]=EH(ek),[kxe,GH]=a2(ek,[_xe]),[Exe,Pxe]=kxe(ek),Txe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Axe,Tn({},e,{ref:t}))))),Axe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Ua(t,p),v=PH(o),[S=null,w]=xxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=UH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,_),()=>N.removeEventListener(Cw,_)},[_]),C.exports.createElement(Exe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(_u.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const H=new CustomEvent(Cw,Cxe);if(N.currentTarget.dispatchEvent(H),!H.defaultPrevented){const $=T().filter(ie=>ie.focusable),j=$.find(ie=>ie.active),de=$.find(ie=>ie.id===S),J=[j,de,...$].filter(Boolean).map(ie=>ie.ref.current);jH(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Lxe="RovingFocusGroupItem",Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=_be(),s=Pxe(Lxe,n),l=s.currentTabStopId===a,u=UH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(_u.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Rxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Nxe(w,P+1):w.slice(P+1)}setTimeout(()=>jH(w))}})})))}),Oxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ixe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rxe(e,t,n){const r=Ixe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Oxe[r]}function jH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Dxe=Txe,zxe=Mxe,Bxe=["Enter"," "],Fxe=["ArrowDown","PageUp","Home"],YH=["ArrowUp","PageDown","End"],$xe=[...Fxe,...YH],eb="Menu",[n9,Hxe,Wxe]=EH(eb),[ph,qH]=a2(eb,[Wxe,$H,GH]),tk=$H(),KH=GH(),[Vxe,tb]=ph(eb),[Uxe,nk]=ph(eb),Gxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=tk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=PH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(mxe,s,C.exports.createElement(Vxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Uxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},jxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=tk(n);return C.exports.createElement(vxe,Tn({},i,r,{ref:t}))}),Yxe="MenuPortal",[sTe,qxe]=ph(Yxe,{forceMount:void 0}),td="MenuContent",[Kxe,XH]=ph(td),Xxe=C.exports.forwardRef((e,t)=>{const n=qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tb(td,e.__scopeMenu),a=nk(td,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(VH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Zxe,Tn({},i,{ref:t})):C.exports.createElement(Qxe,Tn({},i,{ref:t})))))}),Zxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ua(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(ZH,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Qxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu);return C.exports.createElement(ZH,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),ZH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=tb(td,n),P=nk(td,n),E=tk(n),_=KH(n),T=Hxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ua(t,R,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?oF:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=H.current+G,he=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(Z=he.find(qe=>qe.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(qe=>qe.textValue),$e=swe(De,X,Se),He=(te=he.find(qe=>qe.textValue===$e))===null||te===void 0?void 0:te.ref.current;(function qe(tt){H.current=tt,window.clearTimeout(z.current),tt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),He&&setTimeout(()=>He.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),pbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&uwe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(Kxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(gbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(dbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Dxe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(yxe,Tn({role:"menu","aria-orientation":"vertical","data-state":iwe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!$xe.includes(G.key))return;G.preventDefault();const De=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);YH.includes(G.key)&&De.reverse(),owe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,i9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),r9="MenuItem",hM="menu.itemSelect",Jxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=nk(r9,e.__scopeMenu),s=XH(r9,e.__scopeMenu),l=Ua(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(hM,{bubbles:!0,cancelable:!0});p.addEventListener(hM,v=>r?.(v),{once:!0}),kH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(ewe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Bxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),ewe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=XH(r9,n),s=KH(n),l=C.exports.useRef(null),u=Ua(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(zxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(_u.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),twe="MenuRadioGroup";ph(twe,{value:void 0,onValueChange:()=>{}});const nwe="MenuItemIndicator";ph(nwe,{checked:!1});const rwe="MenuSub";ph(rwe);function iwe(e){return e?"open":"closed"}function owe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function swe(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=awe(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 lwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function uwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lwe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const cwe=Gxe,dwe=jxe,fwe=Xxe,hwe=Jxe,QH="ContextMenu",[pwe,lTe]=a2(QH,[qH]),nb=qH(),[gwe,JH]=pwe(QH),mwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(gwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(cwe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},vwe="ContextMenuTrigger",ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(vwe,n),o=nb(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),[]),h=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(dwe,Tn({},o,{virtualRef:s})),C.exports.createElement(_u.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,qy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,qy(u)),onPointerCancel:qn(e.onPointerCancel,qy(u)),onPointerUp:qn(e.onPointerUp,qy(u))})))}),Swe="ContextMenuContent",bwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(Swe,n),o=nb(n),a=C.exports.useRef(!1);return C.exports.createElement(fwe,Tn({},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)"}}))}),xwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nb(n);return C.exports.createElement(hwe,Tn({},i,r,{ref:t}))});function qy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const wwe=mwe,Cwe=ywe,_we=bwe,gf=xwe,kwe=ft([e=>e.gallery,e=>e.options,Lu,Cr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Ewe=ft([e=>e.options,e=>e.gallery,e=>e.system,Cr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Pwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Twe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(Ewe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(f2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(cd(!1)),t(d2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(cd(!1)),t(j8(s)),t(lH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(X8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(q8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(wwe,{onOpenChange:H=>{t(yH(H))},children:[x(Cwe,{children:re(Nl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ASe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:F8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(w5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(_we,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:H=>{H.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},Pwe),gs=e=>{const{label:t,styleClass:n,...r}=e;return x(Az,{className:`invokeai__checkbox ${n}`,...r,children:t})},Ky=320,pM=40,Awe={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}},gM=400;function eW(){const e=Xe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Ee(kwe),{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:gM,galleryMaxWidth:gM}:Awe[u],[M,I]=C.exports.useState(S>=Ky),[R,N]=C.exports.useState(!1),[z,H]=C.exports.useState(0),$=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=Ky&&I(!1)},[S]);const V=()=>{e(OSe(!i)),e(Wi(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(Wi(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(yH(!1)),e(ISe(j.current?j.current.scrollTop:0)),setTimeout(()=>e(Wi(!0)),400)},[e]),K=()=>{e(jC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};vt("g",()=>{J()},[o,i]),vt("left",()=>{e(X8())},{enabled:!P},[P]),vt("right",()=>{e(K8())},{enabled:!P},[P]),vt("shift+g",()=>{V()},[i]),vt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return vt("shift+up",()=>{if(s<256){const he=Je.clamp(s+X,32,256);e($g(he))}},[s]),vt("shift+down",()=>{if(s>32){const he=Je.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&$.current&&!$.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(rH,{nodeRef:$,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:re("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:$,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[re(CH,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{H(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const $e=i?Je.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(DSe($e)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(Wi(!0)))},onResize:(he,ye,Se,De)=>{const $e=Je.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));$e>=Ky&&!M?I(!0):$e$e-pM&&e($g($e-pM)),i&&($e>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?re($n,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re($n,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(_5e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(ed,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(H8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(L8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(gs,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(RSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(gs,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(NSe(he.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(J$,{}):x(eH,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?re($n,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(Twe,{image:he,isSelected:r===ye},ye)})}),x($a,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Lwe=ft([e=>e.options,Cr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),rk=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(Lwe),l=()=>{t(uke(!o)),t(Wi(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(GSe,{})})})]}),!a&&x(eW,{})]})})};function Mwe(){return x(rk,{optionsPanel:x(_Se,{}),children:x(USe,{})})}function Owe(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(B8,{accordionInfo:e})]})}const Iwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(wH,{})})});function Rwe(){return x(rk,{optionsPanel:x(Owe,{}),children:x(Iwe,{})})}var o9=function(e,t){return o9=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])},o9(e,t)};function Nwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=Zwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):rW(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function Zwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Qwe(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,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Jwe=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,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ik=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=Qwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Jwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ik(e,t);return e.bounds=n,n};function rb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function ib(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=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*h,m=u-n*h,v=rb(p,m,i,o,0,0,null);return v}function l2(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 vM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ob(o,n);return!l},yM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},e6e=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}},t6e=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 n6e(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 h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ib(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function r6e(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=rb(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var i6e=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 h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},o6e=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},a6e=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 s6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function SM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function l6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function u6e(e,t){var n=o6e(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=l6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function c6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=a6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=s6e(e,l),H=Math.max(z,N),$=h5(e,M),j=h5(e,I),de=$*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();rW(e,T,H,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,$e=De/N,He=tW[S.animationType],qe=1-He(Math.min(1,$e)),tt=1-te,Ze=ye+a*tt,nt=Se+s*tt,Tt=SM(Ze,G.positionX,ye,_,v,h,u,ie,J,qe),xt=SM(nt,G.positionY,Se,E,v,m,p,K,Q,qe);(ye!==Ze||Se!==nt)&&e.setTransformState(he,Tt,xt)})}}function bM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?t6e(e,t):e6e(e,t)}function xM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=i6e(e,t,n),u=l.x,h=l.y,p=h5(e,a),m=h5(e,s);u6e(e,{x:u,y:h}),r6e(e,u,h,p,m)}}function d6e(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?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?c6e(e):iW(e)}}function iW(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,h=o||t=a;if((r>=1||s)&&iW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=ok(e,a,v,S);w&&xd(e,w,h,p)}}function ok(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=ib(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},f6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Hg={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}},aW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},wM=function(e){var t=Pl({},Hg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Hg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Hg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Hg[n]),e[n]):s?t[n]=mM(mM([],Hg[n]),e[n]):t[n]=e[n]}}),t},sW=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 h=r*Math.exp(t*n),p=l2(Ra(h,3),s,a,u,!1);return p};function lW(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 h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=sW(e,t,n),w=ok(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function uW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=aW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ik(e,a.scale),m=rb(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&&h===a.positionY||xd(e,v,t,n)}}function h6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=p6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=ik(e,P),R=rb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function p6e(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 g6e(e){if(e){if(e?.offsetWidth===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 m6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,1,t,n,r)}},v6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,-1,t,n,r)}},y6e=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,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},S6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),uW(e,t,n)}},b6e=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=cW(t||i.scale,o,a);xd(e,s,n,r)}}},x6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&g6e(a)&&a&&o.contains(a)){var s=h6e(e,a,n);xd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:m6e(e),zoomOut:v6e(e),setTransform:y6e(e),resetTransform:S6e(e),centerView:b6e(e),zoomToElement:x6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ob=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},CM=function(e){e&&clearTimeout(e)},w6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},cW=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}},C6e=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,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ob(u,a);return!p};function _6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Dwe(t,n);return r}function dW(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 k6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Ra(v,3),u,l,p,S);return w},E6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},P6e=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=ob(a,i);return!l},T6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},A6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},fW=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))},L6e=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 h=t/r,p=h*n;return l2(Ra(p,2),a,o,l,!u)},M6e=160,O6e=100,I6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Fr(e),t,r),ui(Fr(e),t,i))},R6e=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,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=_6e(t,null),E=k6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=dW(t,o,l),M=S||v===0||h,I=u&&M,R=ib(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Fr(e),t,r),ui(Fr(e),t,i)}},N6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;CM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(oW(e,t.x,t.y),e.wheelAnimationTimer=null)},O6e);var o=E6e(e,t);o&&(CM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Fr(e),t,r),ui(Fr(e),t,i))},M6e))},D6e=function(e,t){var n=fW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},z6e=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,h=l.size;if(!(r===null||!n)){var p=A6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=fW(t),v=L6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ib(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},B6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,oW(e,t?.x,t?.y)};function F6e(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 uW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=sW(e,h,o),m=dW(t,u,l),v=ok(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var $6e=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?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ob(l,s);return!(p||!h)},hW=le.createContext(f6e),H6e=function(e){Nwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=aW(n.props),n.setup=wM(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=kw();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=C6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(I6e(n,r),R6e(n,r),N6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),bM(n,r),ui(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=yM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),xM(n,r.clientX,r.clientY),ui(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(d6e(n),ui(Fr(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=P6e(n,r);!l||(D6e(n,r),vl(n),ui(Fr(n),r,a),ui(Fr(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=T6e(n);!l||(r.preventDefault(),r.stopPropagation(),z6e(n,r),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(B6e(n),ui(Fr(n),r,o),ui(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(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,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),bM(n,r),ui(Fr(n),r,o)),h&&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=yM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];xM(n,s.clientX,s.clientY),ui(Fr(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=$6e(n,r);!o||F6e(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,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Fr(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=cW(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=w6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=kw();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=kw();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),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=wM(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(hW.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),W6e=le.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]),x(H6e,{...Pl({},e,{setRef:i})})});function V6e(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 U6e=`.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; -} -`,_M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};V6e(U6e);var G6e=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(hW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+_M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+_M.content+" "+o,style:s,children:t})})};function j6e({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)},h=()=>{s(!a)};return x(W6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re($n,{children:[re("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(mt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(W4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(L8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(G6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function Y6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())};return vt("Esc",()=>{t&&e(cd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(mt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(cd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(gH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re($n,{children:[x(j6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(bH,{image:n})]})]}),x(eW,{})]})]})}const q6e=ft(Rn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),K6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(q6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return re(en,{direction:"column",gap:"1rem",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},X6e=()=>x(Nl,{flex:"1",textAlign:"left",children:"Bounding Box"}),u2=e=>e.system,Z6e=e=>e.system.toastQueue,Q6e=ft(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee(Q6e),n=Xe();return re(en,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(VL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(VL(1)),isResetDisabled:!t}),x(za,{isChecked:t,onChange:r=>n(SSe(r.target.checked))})]})}const eCe=ft([z$,u2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),tCe=()=>{const e=Xe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Ee(eCe);return re(en,{direction:"column",gap:"1rem",children:[x(J6e,{}),x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(sO(u))},handleReset:()=>e(sO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(aO(u))},handleReset:()=>{e(aO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(uO(u))},handleReset:()=>{e(uO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(lO(u))},handleReset:()=>{e(lO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(za,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(tke(u.target.checked))}}),x(Au,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(pV(u.target.value))}),x(bs,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(cO(u))},handleReset:()=>{e(cO(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},nCe=()=>x(Nl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function rCe(){const e={boundingBox:{header:x(X6e,{}),feature:no.BOUNDING_BOX,options:x(K6e,{})},outpainting:{header:x(nCe,{}),feature:no.OUTPAINTING,options:x(tCe,{})},seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(B8,{accordionInfo:e})]})}const iCe=ft(Rn,q$,Cr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),oCe=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(iCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(aSe({width:a,height:s})),e(iSe()),e(Wi(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var aCe=Math.PI/180;function sCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},lt={_global:k0,version:"8.3.13",isBrowser:sCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return lt.angleDeg?e*aCe: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 lt.DD.isDragging},isDragReady(){return!!lt.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{lt[e.prototype.getClassName()]=e};lt._injectGlobal(lt);class ia{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 ia(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 h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var lCe="[object Array]",uCe="[object Number]",cCe="[object String]",dCe="[object Boolean]",fCe=Math.PI/180,hCe=180/Math.PI,Ew="#",pCe="",gCe="0",mCe="Konva warning: ",kM="Konva error: ",vCe="rgb(",Pw={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]},yCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const SCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_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)===lCe},_isNumber(e){return Object.prototype.toString.call(e)===uCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===cCe},_isBoolean(e){return Object.prototype.toString.call(e)===dCe},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){Xy.push(e),Xy.length===1&&SCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}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=fe.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(Ew,pCe);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=gCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===vCe?(t=yCe.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",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[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,h=[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,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.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=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function Be(){if(lt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function gW(e){if(lt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function ak(){if(lt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(lt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function mW(){if(lt.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function bCe(){if(lt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(lt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function xCe(e){if(lt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Wg="get",Vg="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Wg+fe._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=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._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=fe._capitalize,s=Wg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Vg+n,i=Wg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Wg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Wg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.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 wCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=CCe+u.join(EM)+_Ce)):(o+=s.property,t||(o+=ACe+s.val)),o+=PCe;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 h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.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=PM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=wCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._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{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._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")&&(dn.justDragged=!0,lt._mouseListenClick=!1,lt._touchListenClick=!1,lt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof lt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};lt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",su="absoluteTransform",TM="absoluteScale",Ug="canvas",NCe="Change",DCe="children",zCe="konva",s9="listening",AM="mouseenter",LM="mouseleave",MM="set",OM="Shape",Y3=" ",IM="stage",Tc="transform",BCe="Stage",l9="visible",FCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let $Ce=1;class Fe{constructor(t){this._id=$Ce++,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===Tc||t===su)&&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===Tc||t===su,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(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===su&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),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,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.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 E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new sk({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(TM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}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 h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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 h=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()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==DCe&&(r=MM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,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(l9,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;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!lt.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;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==BCe&&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(Tc),this._clearSelfAndDescendantCache(su)),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 ia,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(Tc);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(Tc),this._clearSelfAndDescendantCache(su),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;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.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 fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.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(j3,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=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._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(),fe._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{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),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():lt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;dn._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=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._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 fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),lt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=lt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}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;n0?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=Fe.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=Fe.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 h=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(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(P){P[t](n,r)}),w&&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},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return lt.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function NM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.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);",q3=[];class lb extends ua{constructor(t){super(NM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{NM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.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===WCe){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-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.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 E0({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+RM,this.content.style.height=n+RM),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;rGCe&&fe.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(),lt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}getLayers(){return this.children}_bindContentEvents(){!lt.isBrowser||jCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(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=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||lt.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=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,lt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;lt.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=Lp(t.type),r=hm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||lt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};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:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=hm(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=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;lt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(lt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){lt["_"+r+"InDblClickWindow"]=!1},lt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),lt["_"+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,lt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),lt["_"+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(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,lk(t)),Wm(t.pointerId)}_lostpointercapture(t){Wm(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:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.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 E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new sk({pixelRatio:1,width:this.width(),height:this.height()}),!!lt.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 fe.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}}lb.prototype.nodeType=HCe;pr(lb);q.addGetterSetter(lb,"container");var LW="hasShadow",MW="shadowRGBA",OW="patternImage",IW="linearGradient",RW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Vm={};function qCe(e){e.fill()}function KCe(e){e.stroke()}function XCe(e){e.fill()}function ZCe(e){e.stroke()}function QCe(){this._clearCache(LW)}function JCe(){this._clearCache(MW)}function e9e(){this._clearCache(OW)}function t9e(){this._clearCache(IW)}function n9e(){this._clearCache(RW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.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(LW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(OW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(lt.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(IW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.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 Fe.prototype.destroy.call(this),delete Vm[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){fe.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(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,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,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[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||fe.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 h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[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,h,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,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(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(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}}Me.prototype._fillFunc=qCe;Me.prototype._strokeFunc=KCe;Me.prototype._fillFuncHit=XCe;Me.prototype._strokeFuncHit=ZCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",QCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",JCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",e9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",t9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",n9e);q.addGetterSetter(Me,"stroke",void 0,mW());q.addGetterSetter(Me,"strokeWidth",2,Be());q.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Me,"hitStrokeWidth","auto",ak());q.addGetterSetter(Me,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Me,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Me,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Me,"lineJoin");q.addGetterSetter(Me,"lineCap");q.addGetterSetter(Me,"sceneFunc");q.addGetterSetter(Me,"hitFunc");q.addGetterSetter(Me,"dash");q.addGetterSetter(Me,"dashOffset",0,Be());q.addGetterSetter(Me,"shadowColor",void 0,h1());q.addGetterSetter(Me,"shadowBlur",0,Be());q.addGetterSetter(Me,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);q.addGetterSetter(Me,"shadowOffsetX",0,Be());q.addGetterSetter(Me,"shadowOffsetY",0,Be());q.addGetterSetter(Me,"fillPatternImage");q.addGetterSetter(Me,"fill",void 0,mW());q.addGetterSetter(Me,"fillPatternX",0,Be());q.addGetterSetter(Me,"fillPatternY",0,Be());q.addGetterSetter(Me,"fillLinearGradientColorStops");q.addGetterSetter(Me,"strokeLinearGradientColorStops");q.addGetterSetter(Me,"fillRadialGradientStartRadius",0);q.addGetterSetter(Me,"fillRadialGradientEndRadius",0);q.addGetterSetter(Me,"fillRadialGradientColorStops");q.addGetterSetter(Me,"fillPatternRepeat","repeat");q.addGetterSetter(Me,"fillEnabled",!0);q.addGetterSetter(Me,"strokeEnabled",!0);q.addGetterSetter(Me,"shadowEnabled",!0);q.addGetterSetter(Me,"dashEnabled",!0);q.addGetterSetter(Me,"strokeScaleEnabled",!0);q.addGetterSetter(Me,"fillPriority","color");q.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);q.addGetterSetter(Me,"fillPatternOffsetX",0,Be());q.addGetterSetter(Me,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);q.addGetterSetter(Me,"fillPatternScaleX",1,Be());q.addGetterSetter(Me,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientStartPointX",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Me,"fillLinearGradientStartPointY",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientEndPointX",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Me,"fillLinearGradientEndPointY",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientStartPointX",0);q.addGetterSetter(Me,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientEndPointX",0);q.addGetterSetter(Me,"fillRadialGradientEndPointY",0);q.addGetterSetter(Me,"fillPatternRotation",0);q.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var r9e="#",i9e="beforeDraw",o9e="draw",NW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],a9e=NW.length;class gh extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new sk({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{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;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(i9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(o9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.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)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class uk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}uk.prototype.nodeType="FastLayer";pr(uk);class K0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Oa{constructor(t,n){this.id=Oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),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;ithis.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=DM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=zM,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===DM?this.setTime(t):this.state===zM&&this.setTime(this.duration-t)}pause(){this.state=l9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=u9e++;var u=r.getLayer()||(r instanceof lt.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Oa(function(){n.tween.onEnterFrame()},u),this.tween=new c9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)s9e[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,h,p,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.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=Or.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=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Um={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||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Iu.prototype._centroid=!0;Iu.prototype.className="Arc";Iu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Iu);q.addGetterSetter(Iu,"innerRadius",0,Be());q.addGetterSetter(Iu,"outerRadius",0,Be());q.addGetterSetter(Iu,"angle",0,Be());q.addGetterSetter(Iu,"clockwise",!1,Ls());function d9(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),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function FM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),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 h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.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 In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.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 In.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],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,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));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,H,$,j,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+Q,u=a[G].points[1]+K;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break;case"a":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||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=In;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 h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)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=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},I=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=I([1,0],[(p-w)/s,(m-P)/l]),N=[(p-w)/s,(m-P)/l],z=[(-1*p-w)/s,(-1*m-P)/l],H=I(N,z);return M(N,z)<=-1&&(H=Math.PI),M(N,z)>=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,_,s,l,R,H,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Ru{_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=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(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(h),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}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Me{_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)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Me{_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)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Me{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=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var DW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],d9e="Change.konva",f9e="none",f9="up",h9="right",p9="down",g9="left",h9e=DW.length;class ck extends K0{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{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)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var $M=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,$M,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),$M,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)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class zl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Oa(()=>{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],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_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],h=r*2;t.rect(u[h+0],u[h+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{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Iw(){return o3||(o3=fe.createCanvasElement().getContext(m9e),o3)}function P9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function T9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(A9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(E+=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=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(v9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||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 fe.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=Iw(),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()+i3+this.fontVariant()+i3+(this.fontSize()+x9e)+E9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(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 Iw().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!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==VM,w=v!==_9e&&S,P=this.ellipsis();this.textArr=[],Iw().font=this._getContextFont();for(var E=P?this._getTextWidth(Ow):0,_=0,T=t.length;_h)for(;M.length>0;){for(var R=0,N=M.length,z="",H=0;R>>1,j=M.slice(0,$+1),de=this._getTextWidth(j)+E;de<=h?(R=$+1,z=j,H=de):N=$}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===HM;ie&&H<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(HM))+1,V>0&&(R=V,z=z.slice(0,R),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_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!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==VM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&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+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(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 h=zW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${UW}`).join(" "),UM="nodesRect",O9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],I9e={"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 R9e="ontouchstart"in lt._global;function N9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(I9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],GM=1e8;function D9e(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 GW(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 z9e(e,t){const n=D9e(e);return GW(e,t,n)}function B9e(e,t,n){let r=t;for(let i=0;i{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(O9e.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(UM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(UM,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=(lt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={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 GW(h,-lt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-GM,y:-GM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-lt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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:lt.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(),p5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new c2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:R9e?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=lt.getAngle(this.rotation()),o=N9e(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 Me({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()*fe._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 h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=lt.getAngle(this.rotation());const V=m+de,J=lt.getAngle(this.rotationSnapTolerance()),Q=B9e(this.rotationSnaps(),V,J)-p.rotation,K=z9e(p,Q);this._fitNodesInto(K,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{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(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{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()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.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 S=_?{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(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(lt.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:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),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(fe._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(fe._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()*fe._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=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function F9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p5.join(", "))}),e||[]}_n.prototype.className="Transformer";pr(_n);q.addGetterSetter(_n,"enabledAnchors",p5,F9e);q.addGetterSetter(_n,"flipEnabled",!0,Ls());q.addGetterSetter(_n,"resizeEnabled",!0);q.addGetterSetter(_n,"anchorSize",10,Be());q.addGetterSetter(_n,"rotateEnabled",!0);q.addGetterSetter(_n,"rotationSnaps",[]);q.addGetterSetter(_n,"rotateAnchorOffset",50,Be());q.addGetterSetter(_n,"rotationSnapTolerance",5,Be());q.addGetterSetter(_n,"borderEnabled",!0);q.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"anchorStrokeWidth",1,Be());q.addGetterSetter(_n,"anchorFill","white");q.addGetterSetter(_n,"anchorCornerRadius",0,Be());q.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"borderStrokeWidth",1,Be());q.addGetterSetter(_n,"borderDash");q.addGetterSetter(_n,"keepRatio",!0);q.addGetterSetter(_n,"centeredScaling",!1);q.addGetterSetter(_n,"ignoreStroke",!1);q.addGetterSetter(_n,"padding",0,Be());q.addGetterSetter(_n,"node");q.addGetterSetter(_n,"nodes");q.addGetterSetter(_n,"boundBoxFunc");q.addGetterSetter(_n,"anchorDragBoundFunc");q.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);q.addGetterSetter(_n,"useSingleNodeRotation",!0);q.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Nu extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,lt.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)}}Nu.prototype.className="Wedge";Nu.prototype._centroid=!0;Nu.prototype._attrsAffectingSize=["radius"];pr(Nu);q.addGetterSetter(Nu,"radius",0,Be());q.addGetterSetter(Nu,"angle",0,Be());q.addGetterSetter(Nu,"clockwise",!1);q.backCompat(Nu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function jM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var $9e=[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],H9e=[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 W9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,H,$,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new jM,Z=null,te=G,X=null,he=null,ye=$9e[t],Se=H9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)0&&W9e(t,n)};q.addGetterSetter(Fe,"blurRadius",0,Be(),q.afterSetFilter);const U9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?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};q.addGetterSetter(Fe,"contrast",0,Be(),q.afterSetFilter);const j9e=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,h=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:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,H=I>0?I:-I;if(z>N&&(R=M),H>N&&(R=I),R*=t,i){var $=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=$>255?255:$<0?0:$,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter(Fe,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter(Fe,"embossBlend",!1,null,q.afterSetFilter);function Rw(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 Y9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mE?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,H,$;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function a7e(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=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter(Fe,"pixelSize",8,Be(),q.afterSetFilter);const c7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);const f7e=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;s255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);q.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const h7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},g7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var pe=` -`+A[W].replace(" at new "," at ");return d.displayName&&pe.includes("")&&(pe=pe.replace("",d.displayName)),pe}while(1<=W&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function Sn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},_r=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ka(){kn(Ur),kn(_r)}function Td(d,f,y){if(_r.current!==Do)throw Error(a(168));Sn(_r,f),Sn(Ur,y)}function Hl(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Xa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=_r.current,Sn(_r,d),Sn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=Hl(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(_r),Sn(_r,d)):kn(Ur),Sn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Bs=64,uo=4194304;function Fs(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 Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?k=Fs(se):(O&=W,O!==0&&(k=Fs(O)))}else W=y&~A,W!==0?k=Fs(W):O!==0&&(k=Fs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Gi=1<<32-mi(f)+A|y<Ft?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Ft],Ve);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Ft===be.length)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;FtFt?(zr=Et,Et=null):zr=Et.sibling;var os=Ye(me,Et,qt.value,Ve);if(os===null){Et===null&&(Et=zr);break}d&&Et&&os.alternate===null&&f(me,Et),ue=O(os,ue,Ft),Mt===null?Te=os:Mt.sibling=os,Mt=os,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;!qt.done;Ft++,qt=be.next())qt=Lt(me,qt.value,Ve),qt!==null&&(ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Ft),Te}for(Et=k(me,Et);!qt.done;Ft++,qt=be.next())qt=Bn(Et,me,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Ft:qt.key),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Ft),Te}function qo(me,ue,be,Ve){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Mt=ue;Mt!==null;){if(Mt.key===Te){if(Te=be.type,Te===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&B1(Te)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=xa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,Ve,be.key),ue.return=me,me=ue):(Ve=sf(be.type,be.key,be.props,null,me.mode,Ve),Ve.ref=xa(me,ue,be),Ve.return=me,me=Ve)}return W(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,Ve),ue.return=me,me=ue}return W(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),Ve)}if(ie(be))return En(me,ue,be,Ve);if(R(be))return er(me,ue,be,Ve);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,Ve),ue.return=me,me=ue),W(me)):y(me,ue)}return qo}var Xu=w2(!0),C2=w2(!1),Vd={},po=No(Vd),wa=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){Sn(oe,f),Sn(wa,d),Sn(po,Vd),d=K(f),kn(po),Sn(po,d)}function je(){kn(po),kn(wa),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(Sn(wa,d),Sn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var It=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||zu(y)||Pd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ud=[];function F1(){for(var d=0;dy?y:4,d(!0);var k=Zu.transition;Zu.transition={};try{d(!1),f()}finally{Ht=y,Zu.transition=k}}function ic(){return Si().memoizedState}function Y1(d,f,y){var k=Ar(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},ac(d))sc(f,y);else if(y=Ku(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function oc(d,f,y){var k=Ar(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(ac(d))sc(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var pe=f.interleaved;pe===null?(A.next=A,Hd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=Ku(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function ac(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function sc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Vl(d,y)}}var Ja={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Yl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Yl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Yl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=Y1.bind(null,bn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=bn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(jl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,nc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Qu++,0rp&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304)}else{if(!k)if(d=cn(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),cc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,Sn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return Sc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),nt&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Ka(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(_r),F1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));ju()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var Gs=!1,Er=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function dc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function Kl(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Fo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:nt&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&st(f)),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 fc(d){return d.tag===5||d.tag===3||d.tag===4}function ts(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||fc(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 Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Pr(d,f,y),y=y.sibling}function Pr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Er||dc(y,f);case 6:if(nt){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?it(yr,y.stateNode):ht(yr,y.stateNode))}else jo(d,f,y);break;case 18:nt&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:nt?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=va(k),Du(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Er&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!Er&&(dc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(Er=(k=Er)||y.memoizedState!==null,jo(d,f,y),Er=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(k){var A=U2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case hc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function pc(d,f){var y=[];d=[d,0];for(var k=0;kA&&(A=W),k&=~O}if(k=A,k=Wn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*_b(k/1960))-k,10d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;peWn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;Ca(d,f),d=f.pendingProps;var A=zs(f,_r.current);qu(f,y),A=H1(null,f,k,d,A,y);var O=Ju();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Xa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Wo(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Fo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=N2(null,f,k,d,y);break e;case 11:f=M2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Fo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),N2(d,f,k,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Nh(f,k,null,y);var W=f.memoizedState;if(k=W.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=lc(Error(a(423)),f),f=z2(d,f,k,y,A);break e}else if(k!==A){A=lc(Error(a(424)),f),f=z2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=C2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(ju(),k===A){f=es(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,De(k,A)?W=null:O!==null&&De(k,O)&&(f.flags|=32),R2(d,f),bi(d,f,W,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return B2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Xu(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),M2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,k,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=es(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Qa(-1,y&-y),pe.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var rt=Re.pending;rt===null?pe.next=pe:(pe.next=rt.next,rt.next=pe),Re.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),$d(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,qu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Fo(k,f.pendingProps),A=Fo(k.type,A),Us(d,f,k,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),Ca(d,f),f.tag=1,Gr(k)?(d=!0,Xa(f)):d=!1,qu(f,y),b2(f,k,A),z1(f,k,A,y),Wo(null,f,k,!0,d,y);case 19:return $2(d,f,y);case 22:return I2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Vu(d,f)}function _a(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,k){return new _a(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function sf(d,f,y,k,A,O){var W=2;if(k=d,typeof d=="function")mg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case _:W=14;break e;case T:W=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,k,A,O,W,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if(H(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Hl(d,y,f)}return f}function yg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=Lt&&A<=rt&&W<=Ye){d.splice(f,1);break}else if(k!==Re||y.width!==pe.width||YeW){if(!(O!==Lt||y.height!==pe.height||rtA)){Re>k&&(pe.width+=Re-k,pe.x=k),rtO&&(pe.height+=Lt-O,pe.y=O),Yey&&(y=W)),W ")+` - -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 Q(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:pp,findFiberByHostInstance:d.findFiberByHostInstance||Sg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!Ct)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),W=Ar(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Qa(O,W),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Ws(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=m7e})(jW);const v7e=R9(jW.exports);var dk={exports:{}},bh={};/** - * @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. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(dk);const YM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let qM=!1,KM=!1;const fk=".react-konva-event",y7e=`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 -`,S7e=`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 -`,b7e={};function ub(e,t,n=b7e){if(!qM&&"zIndex"in t&&(console.warn(S7e),qM=!0),!KM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(y7e),KM=!0)}for(var o in n)if(!YM[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 h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!YM[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)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+fk,v[l])}function kd(e){if(!lt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const YW={},x7e={};rh.Node.prototype._applyProps=ub;function w7e(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),kd(e)}function C7e(e,t,n){let r=rh[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=rh.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 ub(l,o),l}function _7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function k7e(e,t,n){return!1}function E7e(e){return e}function P7e(){return null}function T7e(){return null}function A7e(e,t,n,r){return x7e}function L7e(){}function M7e(e){}function O7e(e,t){return!1}function I7e(){return YW}function R7e(){return YW}const N7e=setTimeout,D7e=clearTimeout,z7e=-1;function B7e(e,t){return!1}const F7e=!1,$7e=!0,H7e=!0;function W7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function V7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function qW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function U7e(e,t,n){qW(e,t,n)}function G7e(e,t){t.destroy(),t.off(fk),kd(e)}function j7e(e,t){t.destroy(),t.off(fk),kd(e)}function Y7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function q7e(e,t,n){}function K7e(e,t,n,r,i){ub(e,i,r)}function X7e(e){e.hide(),kd(e)}function Z7e(e){}function Q7e(e,t){(t.visible==null||t.visible)&&e.show()}function J7e(e,t){}function e_e(e){}function t_e(){}const n_e=()=>dk.exports.DefaultEventPriority,r_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:w7e,createInstance:C7e,createTextInstance:_7e,finalizeInitialChildren:k7e,getPublicInstance:E7e,prepareForCommit:P7e,preparePortalMount:T7e,prepareUpdate:A7e,resetAfterCommit:L7e,resetTextContent:M7e,shouldDeprioritizeSubtree:O7e,getRootHostContext:I7e,getChildHostContext:R7e,scheduleTimeout:N7e,cancelTimeout:D7e,noTimeout:z7e,shouldSetTextContent:B7e,isPrimaryRenderer:F7e,warnsIfNotActing:$7e,supportsMutation:H7e,appendChild:W7e,appendChildToContainer:V7e,insertBefore:qW,insertInContainerBefore:U7e,removeChild:G7e,removeChildFromContainer:j7e,commitTextUpdate:Y7e,commitMount:q7e,commitUpdate:K7e,hideInstance:X7e,hideTextInstance:Z7e,unhideInstance:Q7e,unhideTextInstance:J7e,clearContainer:e_e,detachDeletedInstance:t_e,getCurrentEventPriority:n_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var i_e=Object.defineProperty,o_e=Object.defineProperties,a_e=Object.getOwnPropertyDescriptors,XM=Object.getOwnPropertySymbols,s_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?i_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QM=(e,t)=>{for(var n in t||(t={}))s_e.call(t,n)&&ZM(e,n,t[n]);if(XM)for(var n of XM(t))l_e.call(t,n)&&ZM(e,n,t[n]);return e},u_e=(e,t)=>o_e(e,a_e(t));function hk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=hk(r,t,n);if(i)return i;r=t?null:r.sibling}}function KW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const pk=KW(C.exports.createContext(null));class XW extends C.exports.Component{render(){return x(pk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:c_e,ReactCurrentDispatcher:d_e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f_e(){const e=C.exports.useContext(pk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=c_e.current)!=null?r:hk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],JM=new WeakMap;function h_e(){var e;const t=f_e();qg.splice(0,qg.length),hk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==pk&&qg.push(KW(i))});for(const n of qg){const r=(e=d_e.current)==null?void 0:e.readContext(n);JM.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,u_e(QM({},i),{value:JM.get(r)}))),n=>x(XW,{...QM({},n)})),[])}function p_e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const g_e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=p_e(e),o=h_e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,dk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ub(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",ih="Group",P0="Rect",Kg="Circle",g5="Line",ZW="Image",m_e="Transformer",pm=v7e(r_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const v_e=le.forwardRef((e,t)=>x(XW,{children:x(g_e,{...e,forwardedRef:t})})),y_e=ft([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),S_e=e=>{const{...t}=e,{objects:n}=Ee(y_e);return x(ih,{listening:!1,...t,children:n.filter(W8).map((r,i)=>x(g5,{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))})},cb=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},b_e=ft(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:cb(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),x_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(b_e);return l?re(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},w_e=ft(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),C_e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Ee(w_e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(gw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(gw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},H=()=>{n(UL(!0))},$=()=>{n(vw(!1)),n(UL(!1)),n(Hy(!1))},j=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:H,onMouseOut:de,onMouseOver:j,onMouseUp:$,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(m_e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let QW=null,JW=null;const __e=e=>{QW=e},m5=()=>QW,k_e=e=>{JW=e},E_e=()=>JW,P_e=ft([Rn,Cr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),T_e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(P_e),i=C.exports.useRef(null),o=E_e();vt("esc",()=>{e(nSe())},{enabled:()=>!0,preventDefault:!0}),vt("shift+h",()=>{e(hSe(!n))},{preventDefault:!0},[t,n]),vt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},A_e=ft(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:cb(t)}}),eO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),L_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(A_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=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=eO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=eO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},M_e=ft([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),O_e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(M_e);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=Je.clamp(r*G5e**s,j5e,Y5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(bSe(l)),t(hH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},I_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),R_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(I_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a5(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},N_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),D_e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(N_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a5(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(aH([a.x,a.y]))}else t.current=!1;n(XS(!1))},[t,n,i,o,e,r])},z_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),B_e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(z_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(cH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(aH([s.x,s.y]))))},[t,r,i,a,n,e,o])},F_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),$_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(F_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},H_e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(cH(null)),e(XS(!1))},[e])},W_e=ft([Rn,Lu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V_e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(W_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(hH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!1))},[e,n,t])}};var mf=C.exports,U_e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),mf.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 eV=e=>{const{url:t,x:n,y:r}=e,[i]=U_e(t);return x(ZW,{x:n,y:r,image:i,listening:!1})},G_e=ft([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),j_e=()=>{const{objects:e}=Ee(G_e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o5(t))return x(eV,{x:t.x,y:t.y,url:t.image.url},n);if(E5e(t))return x(g5,{points:t.points,stroke:t.color?cb(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)})}):null},Y_e=ft([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),q_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},K_e=()=>{const{colorMode:e}=Hv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(Y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=q_e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=Je.range(0,T).map(N=>x(g5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=Je.range(0,M).map(N=>x(g5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},X_e=ft([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Z_e=e=>{const{...t}=e,n=Ee(X_e),[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?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(ZW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Q_e=ft([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J_e(){const{cursorCoordinatesString:e}=Ee(Q_e);return x("div",{children:`Cursor Position: ${e}`})}const l3=e=>Math.round(e*100)/100,e8e=ft([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:p}=e;return{activeLayerColor:p==="mask"?"var(--status-working-color)":"inherit",activeLayerString:p.charAt(0).toUpperCase()+p.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),t8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Ee(e8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&re($n,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(J_e,{})]})]})},n8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),r8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee(n8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(ih,{...t,children:[r&&x(eV,{url:u,x:o,y:a}),i&&re(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},i8e=ft([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:Je.isEqual}}),o8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(i8e),o=C.exports.useCallback(()=>{e(GL(!1))},[e]),a=C.exports.useCallback(()=>{e(GL(!0))},[e]);vt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),vt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),vt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(eSe()),l=()=>e(J5e()),u=()=>e(Z5e());return r?x(en,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F8,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(vSe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(j$,{}),onClick:()=>e(I5e(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(Q5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},a8e=ft([Rn,Lu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),s8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(a8e);T_e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{k_e($),p.current=$},[]),S=C.exports.useCallback($=>{__e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=O_e(p),_=R_e(p),T=D_e(p,P),M=B_e(p,P,w),I=$_e(p),R=H_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:H}=V_e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(v_e,{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:M,onTouchEnd:T,onMouseDown:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:H,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(K_e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(j_e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(S_e,{visible:!0,listening:!1}),x(L_e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(x_e,{visible:l!=="move",listening:!1}),x(r8e,{visible:u}),h&&x(Z_e,{}),x(C_e,{visible:n&&!u})]})]}),x(t8e,{}),x(o8e,{})]})})},l8e=ft([Rn,Cr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function u8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(l8e),r=()=>{e(xSe())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(C5e,{}),onClick:r,isDisabled:!t})}const c8e=ft([Rn,Cr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function d8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(c8e),r=()=>{e(tSe())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(S5e,{}),onClick:r,isDisabled:!t})}const tV=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return re($n,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(lF,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),re(kS,{children:[x($a,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x($a,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),f8e=()=>{const e=Xe();return re(tV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(R5e()),e(sH()),e(uH())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},h8e=()=>{const e=Xe();return re(tV,{title:"Clear Canvas History",acceptCallback:()=>e(uH()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},p8e=ft([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),g8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(p8e);return x(ed,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(H8,{})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Show Intermediates",isChecked:a,onChange:l=>e(mSe(l.target.checked))}),x(gs,{label:"Show Grid",isChecked:o,onChange:l=>e(gSe(l.target.checked))}),x(gs,{label:"Snap to Grid",isChecked:s,onChange:l=>e(ySe(l.target.checked))}),x(gs,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(dSe(l.target.checked))}),x(gs,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(uSe(l.target.checked))}),x(gs,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(cSe(l.target.checked))}),x(gs,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(pSe(l.target.checked))}),x(h8e,{}),x(f8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(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 X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:P.buttons>0)&&i.current?o(tO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=v9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(nO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(tO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},rV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},y9=function(e){var t=rV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=rV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},m8e=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:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},v8e=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:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},y8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(gk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(mk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),S8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(gk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),iV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function b8e(e,t,n){var r=m9(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;iV(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(h){return Object.assign({},h,u)})},[]);return[o,l]}var x8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,w8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rO=new Map,C8e=function(e){x8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rO.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,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rO.set(t,n);var r=w8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},_8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(gk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},k8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=nV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);C8e(s);var l=b8e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(S8e,{hsva:u,onChange:h}),x(y8e,{hue:u.h,onChange:h}),le.createElement(_8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},E8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:v8e,fromHsva:m8e,equal:iV},P8e=function(e){return le.createElement(k8e,fb({},e,{colorModel:E8e}))};const oV=e=>{const{styleClass:t,...n}=e;return x(P8e,{className:`invokeai__color-picker ${t}`,...n})},T8e=ft([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:cb(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),A8e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(T8e);vt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),vt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(fH(t==="mask"?"base":"mask"))},a=()=>e(X5e()),s=()=>e(dH(!r));return x(ed,{trigger:"hover",triggerComponent:x(ra,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(gs,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(fSe(l.target.checked))}),x(oV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(sSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let u3;const L8e=new Uint8Array(16);function M8e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(L8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function O8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const I8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iO={randomUUID:I8e};function Jp(e,t,n){if(iO.randomUUID&&!t&&!e)return iO.randomUUID();e=e||{};const r=e.random||(e.rng||M8e)();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 O8e(r)}const R8e=(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(),h=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(h);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)}}},N8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},D8e=(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},z8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=z8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(F4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m5();if(!S){t(gu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=R8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(gu(!1)),t(Kp(!0));return}const E=new FormData;E.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(N8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(D8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(lSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(gu(!1)),t(G3("Connected")),t(Kp(!0))},B8e=ft([Rn,Lu,u2],(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:Je.isEqual}}),F8e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ee(B8e);vt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),vt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),vt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(Y$,{})}),children:re(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(mw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(oV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(oSe(s))})]})})]})};let oO;const aV=()=>({setOpenUploader:e=>{e&&(oO=e)},openUploader:oO}),$8e=ft([u2,Rn,Lu],(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:Je.isEqual}}),H8e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ee($8e),s=m5(),{openUploader:l}=aV();vt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),vt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),vt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=m5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(rSe({contentRect:_}))},p=()=>{e(sH()),e(lH())},m=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(Au,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:k5e,onChange:E=>{const _=E.target.value;e(fH(_)),_==="mask"&&!r&&e(dH(!0))}}),x(A8e,{}),x(F8e,{}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(j$,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(KS,{}),onClick:S,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(G$,{}),onClick:w,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(u8e,{}),x(d8e,{})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x($8,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(g8e,{})})]})},W8e=ft([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V8e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(W8e);return C.exports.useLayoutEffect(()=>{const n=Je.debounce(()=>{e(Wi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(H8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(oCe,{}):x(s8e,{})})]})})})};function U8e(){const e=Xe();return C.exports.useEffect(()=>{e(Wi(!0))},[e]),x(rk,{optionsPanel:x(rCe,{}),styleClass:"inpainting-workarea-overrides",children:x(V8e,{})})}const G8e=ct({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("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"})}),Ef={txt2img:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Rwe,{}),tooltip:"Text To Image"},img2img:{title:x(F3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(G8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(U8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B3e,{}),tooltip:"Post Processing"}},pb=Je.map(Ef,(e,t)=>t);[...pb];function j8e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();vt("1",()=>{a(na(0))}),vt("2",()=>{a(na(1))}),vt("3",()=>{a(na(2))}),vt("4",()=>{a(na(3))}),vt("5",()=>{a(na(4))}),vt("z",()=>{a(cd(!t))},[t]),vt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(Wi(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x(zF,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(NF,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return re(RF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(Wi(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(DF,{className:"app-tabs-panels",children:t?x(Y6e,{}):l()})]})}const sV={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,shouldForceOutpaint:!1,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},Y8e=sV,lV=MS({name:"options",initialState:Y8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(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},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),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:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=i5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...sV}),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=pb.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},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:uV,resetOptionsState:uTe,resetSeed:cTe,setActiveTab:na,setAllImageToImageParameters:q8e,setAllParameters:K8e,setAllTextToImageParameters:X8e,setCfgScale:cV,setCodeformerFidelity:dV,setCurrentTheme:Z8e,setFacetoolStrength:K3,setFacetoolType:X3,setHeight:fV,setHiresFix:hV,setImg2imgStrength:S9,setInfillMethod:pV,setInitialImage:d2,setIsLightBoxOpen:cd,setIterations:Q8e,setMaskPath:gV,setOptionsPanelScrollPosition:J8e,setParameter:dTe,setPerlin:eke,setPrompt:gb,setSampler:mV,setSeamBlur:aO,setSeamless:vV,setSeamSize:sO,setSeamSteps:lO,setSeamStrength:uO,setSeed:f2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:tke,setShouldGenerateVariations:nke,setShouldHoldOptionsPanelOpen:rke,setShouldLoopback:ike,setShouldPinOptionsPanel:oke,setShouldRandomizeSeed:ake,setShouldRunESRGAN:ske,setShouldRunFacetool:lke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:fTe,setShowDualDisplay:uke,setSteps:xV,setThreshold:cke,setTileSize:cO,setUpscalingLevel:b9,setUpscalingStrength:x9,setVariationAmount:dke,setWidth:wV}=lV.actions,fke=lV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const Z3=Object.create(null);Object.keys(Ol).forEach(e=>{Z3[Ol[e]]=e});const hke={type:"error",data:"parser error"},pke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",gke=typeof ArrayBuffer=="function",mke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>pke&&t instanceof Blob?n?r(t):dO(t,r):gke&&(t instanceof ArrayBuffer||mke(t))?n?r(t):dO(new Blob([t]),r):r(Ol[e]+(t||"")),dO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},fO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;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),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},yke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ske(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:hke},Ske=(e,t)=>{if(yke){const n=vke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),bke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},xke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Cke=setTimeout,_ke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=Cke.bind(Vc),e.clearTimeoutFn=_ke.bind(Vc)):(e.setTimeoutFn=setTimeout.bind(Vc),e.clearTimeoutFn=clearTimeout.bind(Vc))}const kke=1.33;function Eke(e){return typeof e=="string"?Pke(e):Math.ceil((e.byteLength||e.size)*kke)}function Pke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Tke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Tke(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=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,Ake={};let hO=0,d3=0,pO;function gO(e){let t="";do t=LV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function MV(){const e=gO(+new Date);return e!==pO?(hO=0,pO=e):e+"."+gO(hO++)}for(;d3{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)};xke(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,bke(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]=MV()),!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=OV(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 Tl(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 Tl extends Vr{constructor(t,n){super(),mb(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=TV(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 RV(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{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"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=Tl.requestsCount++,Tl.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=Oke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.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()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mO);else if(typeof addEventListener=="function"){const e="onpagehide"in Vc?"pagehide":"unload";addEventListener(e,mO,!1)}}function mO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=Vc.WebSocket||Vc.MozWebSocket,vO=!0,Nke="arraybuffer",yO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dke extends AV{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=yO?{}:TV(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=vO&&!yO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Nke,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{const a={};try{vO&&this.ws.send(o)}catch{}i&&NV(()=>{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]=MV()),this.supportsBinary||(t.b64=1);const i=OV(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!!f3}}const zke={websocket:Dke,polling:Rke},Bke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(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=Bke.exec(e||""),o={},a=14;for(;a--;)o[Fke[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=$ke(o,o.path),o.queryKey=Hke(o,o.query),o}function $ke(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 Hke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Dc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(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=C9(n.host).host),mb(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=Lke(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=PV,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 zke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Dc.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{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;Dc.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;Dc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),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,h(),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 h=()=>{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",Dc.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{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;r0&&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){Dc.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(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Gke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",jke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function vk(e){return Vke&&(e instanceof ArrayBuffer||Uke(e))||Gke&&e instanceof Blob||jke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Zke{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=qke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Kke,get PacketType(){return nn},Encoder:Xke,Decoder:yk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Jke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{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=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(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(Jke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.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.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:nn.CONNECT,data:t})}):this.packet({type:nn.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 nn.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 nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.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:nn.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:nn.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;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.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};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{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,mb(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 g1({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||Qke;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 Dc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(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(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(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){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(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;rt()),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 Xg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Wke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Xg[i]||(Xg[i]=new E9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:zV,io:J3,connect:J3});var eEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,tEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,nEe=/[^-+\dA-Z]/g;function _o(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(SO[t]||t||SO.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"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return rEe(e)},P=function(){return iEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":oEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return P()}};return t.replace(eEe,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var SO={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"},wo={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"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},bO=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,h=new Date;h.setDate(h[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"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},rEe=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)},iEe=function(t){var n=t.getDay();return n===0&&(n=7),n},oEe=function(t){return(String(t).match(tEe)||[""]).pop().replace(nEe,"").replace(/GMT\+0000/g,"UTC")};const aEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(NL(!0)),t(G3("Connected")),t(O5e());const r=n().gallery;r.categories.user.latest_mtime?t(FL("user")):t(jC("user")),r.categories.result.latest_mtime?t(FL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(NL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(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,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(K5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(d2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(MSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(gu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(DL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(LSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(vH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(uV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r)),r.infill_methods.includes("patchmatch")||t(pV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(G3("Model Changed")),t(gu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(gu(!1)),t(Kp(!0)),t(DL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},sEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.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},lEe=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("
"),t.document.write(r.outerHTML),t.document.write("

")})},uEe=e=>{const t=m5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:P,perlin:E,prompt:_,sampler:T,seamBlur:M,seamless:I,seamSize:R,seamSteps:N,seamStrength:z,seed:H,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:de,shouldGenerateVariations:V,shouldRandomizeSeed:J,shouldRunESRGAN:ie,shouldRunFacetool:Q,steps:K,threshold:G,tileSize:Z,upscalingLevel:te,upscalingStrength:X,variationAmount:he,width:ye}=r,{shouldDisplayInProgressType:Se,saveIntermediatesInterval:De,enableImageDebugging:$e}=o,He={prompt:_,iterations:J||V?P:1,steps:K,cfg_scale:s,threshold:G,perlin:E,height:p,width:ye,sampler_name:T,seed:H,progress_images:Se==="full-res",progress_latents:Se==="latents",save_intermediates:De,generation_mode:n,init_mask:""};if(He.seed=J?N$(P8,T8):H,["txt2img","img2img"].includes(n)&&(He.seamless=I,He.hires_fix=m),n==="img2img"&&w&&(He.init_img=typeof w=="string"?w:w.url,He.strength=v,He.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ze},boundingBoxCoordinates:nt,boundingBoxDimensions:Tt,inpaintReplace:xt,shouldUseInpaintReplace:Le,stageScale:at,isMaskEnabled:At,shouldPreserveMaskedArea:st}=i,gt={...nt,...Tt},an=sEe(At?Ze.filter(W8):[],gt);He.init_mask=an,He.fit=!1,He.init_img=a,He.strength=v,He.invert_mask=st,Le&&(He.inpaint_replace=xt),He.bounding_box=gt;const Ct=t.scale();t.scale({x:1/at,y:1/at});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});$e&&lEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(Ct),He.init_img=sn,He.progress_images=!1,He.seam_size=R,He.seam_blur=M,He.seam_strength=z,He.seam_steps=N,He.tile_size=Z,He.force_outpaint=de,He.infill_method=S}V?(He.variation_amount=he,$&&(He.with_variations=nye($))):He.variation_amount=0;let qe=!1,tt=!1;return ie&&(qe={level:te,strength:X}),Q&&(tt={type:h,strength:u},h==="codeformer"&&(tt.codeformer_fidelity=l)),$e&&(He.enable_image_debugging=$e),{generationParameters:He,esrganParameters:qe,facetoolParameters:tt}},cEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(gu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=uEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(gu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(gu(!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(Co({timestamp:_o(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(vH(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")},emitRequestModelChange:i=>{n(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},dEe=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=aEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:H,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=cEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{H(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},fEe=["cursorPosition"].map(e=>`canvas.${e}`),hEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),pEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),BV=YF({options:fke,gallery:zSe,system:$4e,canvas:wSe}),gEe=h$.getPersistConfig({key:"root",storage:f$,rootReducer:BV,blacklist:[...fEe,...hEe,...pEe],debounce:300}),mEe=F2e(gEe,BV),FV=Ive({reducer:mEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(dEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=_2e,Ee=h2e;function e4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e4=function(n){return typeof n}:e4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e4(e)}function vEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xO(e,t){for(var n=0;nx(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),wEe=ft(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(wEe),i=t?Math.round(t*100/n):0;return x(mF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function _Ee(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function kEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(_Ee,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re($n,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Lv,{className:" modal hotkeys-modal",children:[x(K_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(i)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(o)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(a)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(s)})]})]})})]})]})]})}const EEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(X$(i))};return re("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},PEe=ft(e=>e.system,e=>{const t=Je.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),TEe=()=>{const{models:e}=Ee(PEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(zf,{children:[x(Nf,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Bf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(EEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},AEe=ft([u2,z$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Je.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),LEe=({children:e})=>{const t=Xe(),n=Ee(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(AEe),S=()=>{QV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(N4e(P))};return re($n,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Lv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K_,{className:"modal-close-btn"}),re(Av,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(TEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Au,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:P=>t(T4e(P.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(za,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(F$(P.target.checked))}),x(za,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:P=>t(O4e(P.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(za,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(D4e(P.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},MEe=ft(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:Zr.exports.isEqual}}),OEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(MEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s($$())},className:`status ${l}`,children:u})})},IEe=["dark","light","green"];function REe(){const{setColorMode:e}=Hv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(Z8e(i))};return x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(jz,{align:"stretch",children:IEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(F8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const NEe=ft([u2],e=>{const{isProcessing:t,model_list:n}=e,r=Je.map(n,(o,a)=>a),i=Je.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),DEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(NEe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Au,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(X$(o.target.value))}})})},zEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(OEe,{}),x(DEe,{}),x(kEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(REe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(LEe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(H8,{})})})]})]}),BEe=ft(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),FEe=ft(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),$Ee=()=>{const e=Xe(),t=Ee(BEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(FEe),[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($$()),e(hw(!n))};return vt("`",()=>{e(hw(!n))},[n]),vt("esc",()=>{e(hw(!1))}),re($n,{children:[n&&x(CH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(U$,{}),onClick:l})})]})};function HEe(){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)})}var WEe=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 h2(e,t){var n=VEe(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 VEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=WEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var UEe=[".DS_Store","Thumbs.db"];function GEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return v5(e)&&jEe(e.dataTransfer)?[2,XEe(e.dataTransfer,e.type)]:YEe(e)?[2,qEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,KEe(e)]:[2,[]]})})}function jEe(e){return v5(e)}function YEe(e){return v5(e)&&v5(e.target)}function v5(e){return typeof e=="object"&&e!==null}function qEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function KEe(e){return r1(this,void 0,void 0,function(){var t;return i1(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 h2(r)})]}})})}function XEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ZEe))]):[3,2];case 1:return r=i.sent(),[2,wO(HV(r))];case 2:return[2,wO(A9(e.files).map(function(o){return h2(o)}))]}})})}function wO(e){return e.filter(function(t){return UEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,PO(n)];if(e.sizen)return[!1,PO(n)]}return[!0,null]}function Pf(e){return e!=null}function hPe(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=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(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 AO(e){e.preventDefault()}function pPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gPe(e){return e.indexOf("Edge/")!==-1}function mPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pPe(e)||gPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function IPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sk=C.exports.forwardRef(function(e,t){var n=e.children,r=S5(e,wPe),i=ZV(r),o=i.open,a=S5(i,CPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});Sk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:GEe,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};Sk.defaultProps=XV;Sk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var I9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),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,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,H=t.validator,$=C.exports.useMemo(function(){return SPe(n)},[n]),j=C.exports.useMemo(function(){return yPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:MO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:MO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(RPe,I9),K=Dw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(et){J.current&&J.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",AO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",AO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var $e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),He=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[].concat(EPe(Se.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){if(!(y5(Oe)&&!N)){var Xt=et.length,Yt=Xt>0&&hPe({files:et,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),ke=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(et){return $e(et)})},[i,u,$e,N,$,a,o,s,l,H]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=h3(Oe);if(et&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return et&&p&&p(Oe),!1},[p,N]),tt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=et.indexOf(Oe.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,et){var Xt=[],Yt=[];Oe.forEach(function(ke){var Ot=GV(ke,$),Ne=Dw(Ot,2),ut=Ne[0],ln=Ne[1],Nn=jV(ke,a,o),We=Dw(Nn,2),ht=We[0],it=We[1],Nt=H?H(ke):null;if(ut&&ht&&!Nt)Xt.push(ke);else{var Zt=[ln,it];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){Yt.push({file:ke,errors:[fPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,et),Yt.length>0&&S&&S(Yt,et),Xt.length>0&&v&&v(Xt,et)},[Z,s,$,a,o,l,m,v,S,H]),nt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){y5(Oe)&&!N||Ze(et,Oe)}).catch(function(et){return $e(et)}),Z({type:"reset"})},[i,Ze,$e,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(et){return i(et)}).then(function(et){Ze(et,null),Z({type:"closeDialog"})}).catch(function(et){bPe(et)?(V(et),Z({type:"closeDialog"})):xPe(et)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):$e(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 was provided."))):$e(et)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,$e,j,s]),xt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),at=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(mPe()?setTimeout(Tt,0):Tt())},[M,Tt]),st=function(et){return r?null:et},gt=function(et){return I?null:st(et)},an=function(et){return R?null:st(et)},Ct=function(et){N&&et.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.role,ke=Oe.onKeyDown,Ot=Oe.onFocus,Ne=Oe.onBlur,ut=Oe.onClick,ln=Oe.onDragEnter,Nn=Oe.onDragOver,We=Oe.onDragLeave,ht=Oe.onDrop,it=S5(Oe,_Pe);return lr(lr(O9({onKeyDown:gt(sl(ke,xt)),onFocus:gt(sl(Ot,Le)),onBlur:gt(sl(Ne,at)),onClick:st(sl(ut,At)),onDragEnter:an(sl(ln,He)),onDragOver:an(sl(Nn,qe)),onDragLeave:an(sl(We,tt)),onDrop:an(sl(ht,nt)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),it)}},[J,xt,Le,at,At,He,qe,tt,nt,I,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.onChange,ke=Oe.onClick,Ot=S5(Oe,kPe),Ne=O9({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:st(sl(Yt,nt)),onClick:st(sl(ke,sn)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Ot)}},[ie,n,s,nt,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:yn,rootRef:J,inputRef:ie,open:st(Tt)})}function RPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},I9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},I9);default:return e}}function MO(){}const NPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Gf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},OO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Cr(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:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(j8(u)):o==="img2img"&&t(d2(u))},DPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Cr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=aV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` -`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(OO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(OO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(q8.Provider,{value:P,children:re("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(NPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},zPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(Wi(!0))},children:x(H$,{})})},BPe=ft(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FPe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(BPe);return re("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(Wi(!0)),400)},children:x(Y$,{})}),t&&re($n,{children:[x(Z$,{iconButton:!0}),x(Q$,{})]})]})},$Pe=()=>{const e=Xe(),t=Ee(Z6e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(B4e())},[e,n,t])};HEe();const HPe=ft([e=>e.gallery,e=>e.options,e=>e.system,Cr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Je.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),WPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(HPe);return $Pe(),x("div",{className:"App",children:re(DPe,{children:[x(CEe,{}),re("div",{className:"app-content",children:[x(zEe,{}),x(j8e,{})]}),x("div",{className:"app-console",children:x($Ee,{})}),e&&x(zPe,{}),t&&x(FPe,{})]})})};const QV=G2e(FV),VPe=oN({key:"invokeai-style-cache",prepend:!0});Bw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:FV,children:x($V,{loading:x(xEe,{}),persistor:QV,children:x(aJ,{value:VPe,children:x(Zme,{children:x(WPe,{})})})})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index fcc162c748..37797115a3 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ InvokeAI - A Stable Diffusion Toolkit - +